116

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

Community
  • 1
  • 1
loeschg
  • 29,961
  • 26
  • 97
  • 150

9 Answers9

241

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.

Genymotion Settings window

plackemacher
  • 4,216
  • 1
  • 23
  • 26
  • 9
    Also make sure there aren't multiple copies of ADB on the development machine. – Chris Stratton Oct 17 '14 at 20:07
  • 1
    Looks like this may be a problem with genymotion. I'm going to update my question with more details – loeschg Oct 17 '14 at 20:16
  • 1
    Genymotion must have an old version of adb packaged. Thanks! – loeschg Oct 17 '14 at 20:34
  • 4
    Or just set Android sdk path instead using default Genymotion adb. – Nikola Despotoski Oct 18 '14 at 01:34
  • 1
    genymotion installed as application, mac os 10.10 restart -> settings reset. I must set it up manually after each restart. :( – Dmitriy Voronin Oct 22 '14 at 09:52
  • 4
    @ChrisStratton How can I ensure that there is just one copy of ADB? When I see the running processes through Task Manager, I see two instances of adb.exe running every time. – Solace Nov 07 '14 at 11:54
  • 1
    I was having an issue with NativeScript where the Genymotion device(s) were not being detected - I kept getting errors saying the daemon could not be started because the connection was refused. Changing the Genymotion adb settings resolved this. Thanks! – DearVolt Jun 30 '16 at 13:38
3

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

CROSP
  • 4,499
  • 4
  • 38
  • 89
2

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.

Dylan Pierce
  • 4,313
  • 3
  • 35
  • 45
0

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.

Akash Agarwal
  • 2,326
  • 1
  • 27
  • 57
0

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

-1

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

Alex Shcherbyna
  • 301
  • 4
  • 9
-1

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.

Ryhan
  • 1,815
  • 1
  • 18
  • 22
-2

Add the Android SDK to the $PATH variable.

Racil Hilan
  • 24,690
  • 13
  • 50
  • 55
x-ray
  • 9
  • 1
-2

I just used ./adb reboot on Android/Sdk/platform-tools/

Lichblitz
  • 46
  • 4