I upgraded a lot of things on my system. From Mavericks to Yosemite (upgrading the entire Mac operating system itself) to upgrading the Android SDK with Eclipse as well as Android Studio from 0.6.1 to 0.8.6.
After all these upgrades, Genymotion stopped working with Android Studio (my preferred Android IDE). Although it was firing up but didn’t show up in the devices list when trying to run the app. The command
adb devices also gave a strange message of not being able to bind to a particular TCP port:
$ adb devices adb server is out of date. killing... cannot bind 'tcp:5037' ADB server didn't ACK * failed to start daemon * error:
I wasn’t sure why this happened but maybe due to the upgrades and maybe with the new Android L (Lollipop) SDKs this issue might have popped up. Anyway, I tried to see what’s bound to
$ lsof -n -i4TCP:5037 | grep LISTEN adb 761 rishabhpugalia 17u IPv4 0x692a354f892d3e13 0t0 TCP 127.0.0.1:5037 (LISTEN)
adb itself with a process ID (PID) of 761. On checking the process list I found this:
$ ps ax | grep adb 820 ?? S 0:00.02 adb -P 5037 fork-server server 822 ?? S 0:00.02 /Applications/Genymotion.app/Contents/MacOS/tools/adb -s 192.168.56.101:5555 shell 824 s000 R+ 0:00.00 grep adb
So seems like Genymotion uses its own version of
adb which is probably the one from my Mavericks installation and not compatible with the newest SDK that’ve been installed. So I guess we could either reinstall Genymotion or try this solution that I found on the internet which worked well for me:
$ cd /Applications/Genymotion.app/Contents/MacOS/tools/ $ ls aapt adb glewinfo $ mv adb adb-old $ ls aapt adb-old glewinfo $ ln -s ~/adt-bundle-mac-x86_64-20140702/sdk/platform-tools/adb adb $ ls -alh total 7096 [email protected] 6 rishabhpugalia admin 204B Oct 18 07:43 . [email protected] 9 rishabhpugalia admin 306B May 26 20:46 .. [email protected] 1 rishabhpugalia admin 1.4M May 26 20:31 aapt lrwxr-xr-x 1 rishabhpugalia admin 75B Oct 18 07:43 adb -> /Users/rishabhpugalia/adt-bundle-mac-x86_64-20140702/sdk/platform-tools/adb [email protected] 1 rishabhpugalia admin 1.6M May 26 20:31 adb-old [email protected] 1 rishabhpugalia admin 512K May 26 20:31 glewinfo
We sort of backed up the
adb in Genymotion and then created a new file which is a symlink to the one in our newly downloaded and installed ADT bundle. Your folder name might not be
adt-bundle-mac-x86_64-20140702 and vary
Next, try killing your existing
adb processes via the
kill command or activity monitor or
$ adb kill-server might work too.
Finally, you’ll be able to check devices properly and if you run the Genymotion emulator it’ll show in the list of devices too.
$ adb devices * daemon not running. starting it now on port 5037 * * daemon started successfully * List of devices attached # After firing up Genymotion emulator $ adb devices List of devices attached 192.168.56.101:5555 device
Hope that helps save some headache!