Android Studio - Lollipop, ADB, & Genymotion issues: Devices won't show up. "adb server is out of date. killing..."
AndroidAdbGenymotionAndroid 5.0-LollipopAndroid Problem Overview
Update (11/10/14): Genymotion has released 2.3.1 which fixes this issue. https://cloud.genymotion.com/page/changelog/#231
Update (10/21/14): Genymotion replied to my support email and indicated the solution recommended by @plackemacher below is the suggested fix at the moment. They are aware of the issue.
Since upgrading to Lollipop, I'm having adb issues when using a Genymotion emulator. Devices don't show up in Android Studio, and I've also gotten the following error when trying to run adb devices
:
$ adb devices
adb server is out of date. killing...
cannot bind 'tcp:5037'
ADB server didn't ACK
* failed to start daemon *
error:
I'm not sure if it's because of the Lollipop upgrade or coincidence.
Edit/update:
Per Chris Satton's comment, I investigated if multiple adb processes were running (ps aux | grep adb
), and it looks like it's a Genymotion conflict(?). It looks to include its own version of adb.
> greg 72550 0.0 0.0 611164 1508 ?? S 4:14PM
> 0:00.02
> /Applications/Genymotion.app/Contents/MacOS/player.app/Contents/MacOS/tools/adb
> -s 192.168.56.102:5555 shell
>
> greg 72523 0.0 0.0 635956 2296 ?? S 4:14PM 0:00.02 adb -P 5037 fork-server server
Android Solutions
Solution 1 - Android
Try running this:
killall -9 adb
That should remove all running traces of the daemon
Edit: Best solution below
This issue may be adb
incompatibility with the newest version of the platform SDK. The best solution for this issue with Genymotion is to set the Android SDK within Genymotion to your location. This can be found within the Settings page.
Solution 2 - Android
In my case the problem was that I have installed adb tools and fastboot using this command
sudo apt-get install android-tools-adb android-tools-fastboot
From repository, so in this case this executables goes to the /usr/bin/
directory in order that you can use it system-wide ($PATH
variable).
In addition, I am running android studio with genymotion configured like in the answer above.
So when I was trying to acces adb (adb shell
in my case) it was trying to start another copy of adb process (server) and bind to default port, so the problem was here.
I have just uninstalled the android-tools-adb android-tools-fastboot
and added the path to my Android SDK
to the $PATH
variable
Solution 3 - Android
Using genymotion on ubuntu.
My solution was to actually use the binary instead of the PATH'd adb.
~/genymotion/tools/abd reboot
Also I have the custom SDK in genymotion.
Solution 4 - Android
What worked for me finally and what I think is hastle free is that you simply run the adb commands directly from platform-tools
folder. For example, use ./adb devices
to view the devices.
I also changed genymotion's SDK to android's default SDK but I'm not sure if it won't work without doing that.
Solution 5 - Android
I think ,if you want to use adb its better to use android studio emulator and test what you want, after you can use Genymotion
Solution 6 - Android
None of solutions helped for Ubuntu. Just drag .apk file onto Genymotion device's screen and app will be installed.
Ubuntu 15.04, Genymotion 2.5.2
Solution 7 - Android
The accepted answer did not work for me, although the idea did, just with a different command:
pkill adb
I'm running ubuntu MATE 1.8.2 and Genymotion 2.6.
Solution 8 - Android
Add the Android SDK to the $PATH
variable.
Solution 9 - Android
I just used ./adb reboot on Android/Sdk/platform-tools/