starkipraggy starkipraggy - 4 months ago 34
Android Question

Connect guest OS (ubuntu) to genymotion on host machine

I have an Ubuntu VM running on VirtualBox and an Android emulator running through Genymotion (which also uses VirtualBox), so I thought I could easily connect one VM to the other, right? Turns out it isn't so simple. I added a bridged adapter to the Ubuntu VM, restarted the ADB server and then ran

adb connect -emulatorIP-
This allows me to see the device, but the problem is that adb insists that the device is offline, when it quite clearly isn't. So I'd like to ask for help with this issue.

Answer

So actually all you have to do is pretend that you're trying to connect to a remote device. On the host machine run

adb tcpip <port>

which will enable that port for remote connection. Then run in the VM

adb connect <deviceip>:<port>

to connect to the genymotion device.