ADB over Wi-Fi with Genymotion Android Emulator

I do my android development under a Ubuntu Virtual Machine for ease of use with GIT and Gradle. However I am unable to run the Genymotion Emulator within this virtual machine as the Oracle virtual box hypervisor is problematic under a VMware virtual Machine.

To overcome this problem I have configured the Genymotion Emulator to use the ADB (Android Debugger) over Wi-Fi. The emulator runs in the windows host and interfaces to the Ubuntu development VM using the virtual network.

Setting up the Genymotion Emulator

The steps are:

  1. Configure a second network interface as a bridge
  2. Install Google Play
  3. Install an ADB over WIFI application

After installing the Genymotion/VirtualBox bundle under windows execute Virtual Box

adb1

 

Select Settings and configure Adaptor 2 as shown. The adaptor will be configured as a Bridged Adaptor. Select a physical interface that has connectivity to the development machine. In my case I am using the WIFI interface as it provides connectivity between the emulator and the VMware Host OS (since it is the DHCP client of my router)

adb2

Enable debug via usb by switching on developer options.  Developer options are enabled from Settings->about tablet by tapping the build number 7 times.

From developer options select debug via usb

adb2-5

 

We need to install Google Play so that a suitable USB over WI-FI application can be sourced.

Download the gapps rom for the version of Android. I use AndroidFileHost.com https://www.androidfilehost.com/?fid=23311191640114013

This can be installed by simply dragging the file onto a running Genymotion emulator

Follow the prompts and reboot

adb3

adb4

adb5

 

Now use Google Play to download an ADB to WIFI application. I have found the best results using ADB Wireless Pro as it is easy to quickly enable and disable and allows switching back to usb based adb if required. Install ADB Wireless Pro and grant Superuser access.

adb7

adb8

Check that adb over WI-FI is enabled.  Make note of the ip address reported. In this case it is 192.168.1.160

replace this with your IP address when running the adb commands.

adb9

The Emulator is now ready to connect with the developer machine.

For the development machine enter the command “adb connect 192.168.1.100”. Adb listens on port 5555 by default.

If required the port can be changed on the emulator via the ADB wireless pro menu.

Example of a successful connection below

adb10

To disconnect the debugger from the emulator use the “adb disconnect 192.168.1.160”

adb11

 

Finally Desktop snapshot with an Emulator being controlled from a Ubuntu Development VM. Enjoy you sick puppies

adb13

 

 

5 thoughts on “ADB over Wi-Fi with Genymotion Android Emulator

  1. thanks for this blog post, very useful! I keep getting error messages when flashing 4.4.4 with a gapps rom, but despite the error messages it seems to work.

  2. I have been searching for this a long time and finally found this wonderful article.
    Thanks a lot. Works like a charm!!

  3. It shows that the device is connected but offline. Any clues?

    • Kunal
      Try the following
      disable/enable the adb over wifi app then attempt to reconnect
      check how many adb processes are running in the genymotion emulator and kill any that are running
      in the windows task manager

  4. Thank you it really helps me 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *