How to start a Genymotion device with a shell command?

I need to run genymotion through a shell command, does anyone know if this can be done?

+42
android shell avd genymotion
Sep 12 '13 at 15:31
source share
3 answers

Genymotion offers a shell: Genymotion Shell . It is currently not possible to start a virtual machine with it.

But you can start Genymotion VM thanks to this command:

player --vm-name <VM id | VM name>

This command launches the Genymotion player, which gives you access to all Genymotion enhancement widgets (GPS, battery, rotation, ...), screen scaling, rendering, ... Like the standard GUI launch.

If you want to use the Genymotion virtual machine without improvements, you can start it through the VirtualBox command line as follows:

VBoxManage startvm gui <VM id | VM name>

The VM ID can be found thanks to this command line:

VBoxManage list vms

It displays a list of your VirtualBox machines in this format: name {id} .

UPDATE

With Genymotion 2.5.0, you can control all your Genymotion devices with the command line tool. With this tool you can create, start, stop, delete, click files, blink a device, ... Here is a simple example of creating a device and starting it:

 gmtool admin create "Google Nexus 5 - 4.4.4 - API 19 - 1080x1920" myNexus gmtool admin start myNexus 

This feature is available for paid licenses.

+64
Sep 12 '13 at 19:47
source share

As of Genymotion 2.6.0 (December 2015), it looks like they have moved the player executable to player.app .

In OSX, you can start the required virtual machine as follows:

 # First, get a list of the VM you have installed VBoxManage list vms # Returns something like "5.0.0 - API 21 - 768x1280" {091d022d-6a7b-4475-845f-7a6e06024fb6} 

Copy the id of the virtual machine, for example. 091d022d-6a7b-4475-845f-7a6e06024fb6 , and then use it again as follows:

 # Launch a specific VM open -a /Applications/Genymotion.app/Contents/MacOS/player.app --args --vm-name '091d022d-6a7b-4475-845f-7a6e06024fb6' 
+18
Dec 11 '15 at 2:17
source share

For windows.

Get the list of available virtual devices by running:

 <Genymotion installer path>\genyshell -c "devices list" 

Launch one of the virtual devices by running:

 <Genymotion installer path>\player --vm-name "<virtual device name>" 

Link

UPD May 8, 2019: I am creating a simple shell for genymotion cli in bash. Link to github here .

+11
02 Oct '15 at 8:07
source share



All Articles