Android Genymotion 命令行启动

每次启动Gemymotion都得先点击:

启动,再点击play按钮,

这样大大降低了效率,于是我搜索了一下genymotion 命令行启动,找到了以下文章

转自码农场 » Genymotion 命令行启动

鼠标和GUI的确是效率的大敌,让我们用command line嘲讽它们。

所谓的Genymotion插件其实也没什么了不起的,也就是提供一个快速启动虚拟机的按钮而已,根本不值得花功夫安装一整个插件。这个按钮大概也是对命令行的简化吧。

来看看Genymotion的命令行:

 1 The command line you need to launch is:
 2 
 3 player --vm-name <VM id | VM name>
 4 The VMs id and name can be found from command line using this code:
 5 
 6 VBoxManage list vms
 7 It displays a list of your Virtual Box machines on this format: name {id}.
 8 
 9 
10  --> http://stackoverflow.com/questions/18768489/how-to-start-genymotion-device-with-shell-command/18773118#18773118

于是我一段一键启动代码(可以点击下载):

启动Genymotion.bat

1 "X:Program FilesGenymobileGenymotionplayer.exe" --vm-name "Galaxy Nexus - 4.2.2 - API 17 - 720x1280"

这段命令行启动后会留下dos窗口,怪难看的,于是进化一个vbs:

启动Genymotion.vbs

CreateObject("wscript.shell").run """X:Program FilesGenymobileGenymotionplayer.exe"" --vm-name ""Galaxy Nexus - 4.2.2 - API 17 - 720x1280""",0

//0表示隐藏cmd窗口。若为1,则用cmd /c 运行程序时会闪现黑色的DOS窗口。
//true表示等待cmd命令运行结束并返回,然后才会执行后面的命令。

原文地址:https://www.cnblogs.com/ning1121/p/3944927.html