How to Start Genymotion Device

How to start Genymotion device with shell command?

Genymotion proposes a shell: the Genymotion Shell. It is not currently possible to start a VM with it.

But you can however launch a Genymotion VM thanks to this command:

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

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

If you want to use a Genymotion VM without the enhancements, you can launch it via the VirtualBox command line like this:

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 on this format: name {id}.

UPDATE

Since Genymotion 2.5.0 you can manage all your Genymotion devices thanks to a command line tool. With this tool you can create, start, stop, delete, push files, flash the device, ...
Here is a simple example to create a device and start 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.

Not able to start Genymotion device

I had this same issue and here are the specific configuration that I needed to get this to work.

First, go to the VirtualBox preferences -> Network.

Sample Image

Sample Image

Sample Image

For the "Host-only Networks" tab, focus on the vboxnet0.

Sample Image

Click the icon on the left that looks like a screwdriver.
For the Adapter tab, fill in the IPv4 Network Address as 192.168.56.1
Fill in the IPv4 Network Mask as 255.255.255.0

Sample Image

For the DHCP Server tab, select the check box for Enable Server to enable the server
Fill in the Server Address as 192.168.56.100
Fill in the Server Mask as 255.255.255.0
Fill in the Lower Address Bound as 192.168.56.101
Fill in the Upper Address Bound as 192.168.56.254

Sample Image

The DHCP server part is what was not correct for me and it fixed my problem.

Can I open a Genymotion device from a terminal command?

This question has been asked before, and here is it's accepted Answer.

For others looking for non-headless command line startup:

/Applications/Genymotion.app/Contents/MacOS/player --vm-name "xxxx"
Get a list of vms:

$ VBoxManage list vms
"Galaxy Nexus - 4.2.2 - API 17 - 720x1280" {56d8e3aa-ecf8-483e-a450-86c8cdcedd35}

Where xxxx can be either the name or the id:

/Applications/Genymotion.app/Contents/MacOS/player --vm-name 56d8e3aa-ecf8-483e-a450-86c8cdcedd35
/Applications/Genymotion.app/Contents/MacOS/player --vm-name "Galaxy Nexus - 4.2.2 - API 17 - 720x1280"

You can kill it with a normal process kill:

ps | grep "Genymotion\.app/Contents/MacOS/player" | awk '{print $1}' | xargs kill

UPDATE

Since Genymotion 2.5.0 you can manage all your Genymotion devices thanks to a command line tool. With this tool you can create, start, stop, delete, push files, flash the device, ... Here is a simple example to create a device and start 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.

Reference Link:

https://www.genymotion.com/#!/support?chapter=start-virtual-devices-command-prompt#faq

How to reboot android device emulator in Genymotion

You can use the command line with adb reboot. It should restart your device.

To use adb you need to be inside the adb binary's folder. ie, <android SDK>/platform-tools/ or <genymotion folder>/tools/ if the android SDK is not installed. You can also these folders to your path to access it from anywhere.

How to start a genymotion device that is already on?

Sir. in Intllij IDEA or Andorid Studio you dont need to use that. just set Target Device in Edit Configuration setting to USB Device and after run project thats show Genymotion virtual devices.



Related Topics



Leave a reply



Submit