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

前端 未结 7 689
心在旅途
心在旅途 2020-12-12 15:43

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 l

7条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-12 16:22

    Command to launch genymotion from command line -

    player --vm-name Nexus_4
    

    if player is not already added to path, add it to path using below command in your ~/.bash_profile

    export PATH=/Applications/Genymotion.app/Contents/MacOS/:$PATH
    

    When more than one device is connect use 'adb -s' is used to redirect commands to particular device Once emulator is running they will be listed under adb devices

    Example:

    adb devices
    List of devices attached 
    192.168.56.101:5555 device
    

    Send command to click on menu key on android device when multiple devices are connected:

    adb -s 192.168.56.101:5555 shell input keyevent KEYCODE_MENU 
    

提交回复
热议问题