Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use adb with genymotion on mac?

I am using cordova to build apps for android, on Mac OS X 10.9.4.

I am using genymotion to create virtual devices.

Yesterday I was able to get 'cordova run android' to get my apps to run on a genymotion virtual device.

Today, I thought I repeated the steps I took yesterday, but I can't get it to work.

I start the adb server (with genymotion not running) with

adb start-server

adb server starts up fine:

* daemon not running. starting it now on port 5037 *
* daemon started successfully *

I can see it's there

lsof -i tcp:5037
adb     19131 bw    7u  IPv4 0x3c0bc54e449e35f5      0t0  TCP localhost:5037 (LISTEN)

There's no devices attached

adb devices

So far so good

Now when I start up genymotion, and start a virtual device, my adb seems to have been killed and cannot start because the virtual device has apparently killed it and started its own adb instance

unknown-6c-40-08-9b-25-2c:todo bw$ adb devices
adb server is out of date.  killing...
cannot bind 'tcp:5037'
ADB server didn't ACK
* failed to start daemon *
error: 

This now gives me no way to add the device to adb so that I can access it by doing

cordova run android

This command now fails, because it can't find a running device.

I tried running adb start-server as root, so that genymotion couldn't kill it, but then the genymotion virtual device wouldn't start up.

What gives? Grateful for any ideas.. Thanks!

like image 205
user384842 Avatar asked Dec 15 '22 19:12

user384842


1 Answers

Well, it's not entirely satisfactory, but I have got it to work.

When I change the settings in genymotion under the settings->adb tab to reference my android sdk rather than the built-in genymotion android tools, everything works fine. That's great, but I don't understand how it can have been working yesterday before I changed that setting. Oh well. Hopefully this will help someone.

enter image description here

like image 89
user384842 Avatar answered Dec 26 '22 16:12

user384842