Can I open a Genymotion device from a terminal command?

When I start Android development, I always go through the same process of opening Genymotion, then select the virtual device with my mouse and then launch.

I would like a script so that I can just open a virtual device with termainal. Is there a way to do this?

+3


source to share


1 answer


This question has been asked before and is accepted here.

For others looking to run without a command line:

/Applications/Genymotion.app/Contents/MacOS/player --vm-name "xxxx"

Get vms list:

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

Where xxxx can be either name or 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 the normal kill process:



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

UPDATE

With Genymotion 2.5.0, you can control all your Genymotion devices thanks to the command line tool. With this tool you can create, start, stop, delete, push files, blink the 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.

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

+1


source







All Articles