Skip to content

Instantly share code, notes, and snippets.

@vitovalov
Created February 20, 2015 22:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vitovalov/ba6d1b68cdd0c3e65953 to your computer and use it in GitHub Desktop.
Save vitovalov/ba6d1b68cdd0c3e65953 to your computer and use it in GitHub Desktop.
Genymotion utils

Nombre emulador Genymotion

Lista VMs

Para sacar el listado de maquinas virtuales (imagenes) de los emuladores Genymotion creados:

VBoxManage list vms

Ejecutar

Para ejecutar un emulador específico por su nombre:

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

Apagar

Para (matar) a un emulador específico por nombre:

ps | grep "name of the emulator or its id" | awk 'NR==1 {print $1}' | xargs echo

Lo que devuelve el ps con grep: 33539 ttys003 0:07.36 /Applications/Genymotion.app/Contents/MacOS/player --vm-name emulatorName 36995 ttys003 0:00.00 grep emulatorName

Lo cual contiene dos IDs de proceso (el de genymotion, que es el que nos interesa, y el de propio grep).

Para coger solo la ID del proceso del genymotion cogemos la columna y la linea:

  • print $1: coge la primera columna de lo que devuelve el ps.
  • NR==1: coge la primera linea de lo que devuelve ps.

Esconder genymotion a traves de bash

/usr/bin/osascript -e 'tell application "System Events" to tell process "player" to set visible to false'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment