Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running apps on Genymotion over local network

I have two machines running on the same network. I use one machine for development and the other has various android emulators.

I need to run apps on the emulator running on the other pc from the development pc. Something like the run command in Android studio should make the app install in Genymotion running on the other pc.

Possible? Any ideas ?

like image 972
Jaydeep Solanki Avatar asked Jul 14 '15 10:07

Jaydeep Solanki


People also ask

Can I run Genymotion without VirtualBox?

It creates virtual devices (android phones). In short, VirtualBox takes some of your computer's memory and allocates that memory to a virtual device. It's all about the concept of virtualization. Without VirtualBox, you can't run Genymotion On macOS, windows, or Linux.

Can I install APK in Genymotion?

Drag'n Drop the APK file to the virtual device display. This will install and try to run the application.

Is Genymotion better than bluestacks?

Pro Genymotion is a true enterprise grade Android Emulator and a very close competitor to Bluestacks in terms of features and apps compatibility. One of the key differences between Bluestacks and Genymotion is the target users.


1 Answers

This is possible. You first need to expose your Genymotion devices to the local network. For this, create all the device you want to run on the dedicated computer. Then open VirtualBox locally and for each device do this:

  1. Open the Settings > Network tab
  2. Open the "Adapter 2"
  3. Change the "Attached to" option to "Bridged Adapter" (by default it is set to NAT)
  4. Click OK

Then you need to get the local IP of the device. You can get it by running this command:

adb shell "ifconfig | awk '/inet addr/{print substr(\$2,6)}' | awk 'NR==2'"

When all these things are done, come back to your development PC. Open a terminal and type for each of your remote Genymotion devices:

adb connect <DEVICE_IP>

This way, you will connect your local adb deamon to the remote devices.

You are now able to control your remote Genymotion devices as if they were local. You can run adb install to install APKs remotely.

like image 109
eyal-lezmy Avatar answered Nov 01 '22 06:11

eyal-lezmy