【发布时间】:2013-09-17 02:08:22
【问题描述】:
我需要通过shell命令启动genymotion,有谁知道是否可以这样做?
【问题讨论】:
-
Genymotion FAQ 的快速链接是genymotion.com/#!/…
标签: android shell avd genymotion
我需要通过shell命令启动genymotion,有谁知道是否可以这样做?
【问题讨论】:
标签: android shell avd genymotion
Genymotion 提出了一个外壳:Genymotion Shell。目前无法使用它启动 VM。
但是您可以通过以下命令启动 Genymotion VM:
player --vm-name <VM id | VM name>
此命令启动 Genymotion 的播放器,让您可以访问所有 Genymotion 增强小部件(GPS、电池、旋转...)、屏幕缩放、渲染...就像标准 GUI 启动一样。
如果您想使用没有增强功能的 Genymotion VM,可以通过 VirtualBox 命令行启动它,如下所示:
VBoxManage startvm gui <VM id | VM name>
可以通过以下命令行找到 VM id:
VBoxManage list vms
它以这种格式显示您的 VirtualBox 机器列表:name {id}。
更新
从 Genymotion 2.5.0 开始,您可以通过命令行工具管理所有 Genymotion 设备。使用此工具,您可以创建、启动、停止、删除、推送文件、刷新设备,... 下面是一个创建设备并启动它的简单示例:
gmtool admin create "Google Nexus 5 - 4.4.4 - API 19 - 1080x1920" myNexus
gmtool admin start myNexus
此功能适用于付费许可证。
【讨论】:
从 Genymotion 2.6.0(2015 年 12 月)开始,他们似乎已将 player 可执行文件移至 player.app。
在 OSX 上,您可以像这样启动所需的虚拟机:
# First, get a list of the VM's you have installed
VBoxManage list vms
# Returns something like "5.0.0 - API 21 - 768x1280" {091d022d-6a7b-4475-845f-7a6e06024fb6}
复制 VM ID,例如091d022d-6a7b-4475-845f-7a6e06024fb6,然后像这样再次使用它:
# Launch a specific VM
open -a /Applications/Genymotion.app/Contents/MacOS/player.app --args --vm-name '091d022d-6a7b-4475-845f-7a6e06024fb6'
【讨论】:
对于窗户。
通过运行检索可用虚拟设备的列表:
<Genymotion installer path>\genyshell -c "devices list"
通过运行启动其中一个虚拟设备:
<Genymotion installer path>\player --vm-name "<virtual device name>"
2019 年 5 月 8 日更新: 我正在为 bash 上的 genymotion cli 创建简单的包装器。链接到githubhere。
【讨论】:
player -n $NAME -x