Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I script genymotion emulator to launch a given avd, headless?

Is there any way to launch by command line a given avd and have it registered via adb ?

I would also prefer to get the emulator launched headless.

I am looking for this to run tests quickly.

like image 538
Snicolas Avatar asked Aug 23 '13 06:08

Snicolas


1 Answers

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 
like image 63
k s Avatar answered Sep 23 '22 23:09

k s