我需要通过shell命令启动genymotion,有没有人知道是否可以这样做?
发布于 2013-09-13 03:47:19
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>
可以通过以下命令行找到虚拟机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
此功能适用于付费许可证。
发布于 2015-12-11 10:17:37
从Genymotion 2.6.0 (2015年12月)开始,他们似乎已经将player
可执行文件移动到了player.app
。
在OSX上,您可以像这样启动所需的VM:
# 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}
复制虚拟机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'
发布于 2015-10-02 16:07:59
用于windows。
通过运行以下命令检索可用虚拟设备的列表:
<Genymotion installer path>\genyshell -c "devices list"
通过运行以下命令启动其中一个虚拟设备:
<Genymotion installer path>\player --vm-name "<virtual device name>"
2019年5月8日更新:我正在为bash上的genymotion cli创建简单的包装器。链接到github here。
https://stackoverflow.com/questions/18768489
复制相似问题