博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
逍遥安卓-完整命令行
阅读量:5946 次
发布时间:2019-06-19

本文共 8382 字,大约阅读时间需要 27 分钟。

请记住:指令是死的,有些需要灵活处理的如端口和模拟器名称部分递增关系之类的计算,自己动脑子分析解决,概不提供技术支持。每句命令的意思也请自己领悟,不做注释。
合理利用本帖,可以完全脱离可视化多开管理器的界面。
贴内命令行内容功能介绍:
1. 完整新建模拟器命令行(包含设置CPU、端口、内存、共享目录、品牌、型号、root权限、IMEI和分辨率等所有属性的部分,注意,命令行设置这些属性,仅限于模拟器未启动时执行,启动时的指令后面会发另外的帖子)
2. 删除模拟器(克隆和新建的相同)
3. 完整克隆模拟器命令行
4. 关闭模拟器命令行(配合终止进程使用,可以正常关闭模拟器而不会卡住)
5. 启动模拟器命令行
6. 取所有启动成功的模拟器

启动模拟器 MEmuconsole vmname

创建模拟器 MEmuconsole create
克隆镜像 MEmuconsole clone vmname
导入镜像 MEmuconsole import ovaname
导出镜像 MEmuconsole export vmname ovafile
安装APK MEmuconsole installapk vmname apkfile

补充说明:命令行执行目录需置类似路径
  1. D:\Program Files\Microvirt\MEmu\
复制代码

1. 完整新建模拟器命令行
其实,只参考其中设置部分属性的功能就可以了,可以先用
  1. MEmuConsole create
复制代码
创建好模拟器后,通过指令设置部分所需属性即可,完整新建命令如下:
  1. ..\MEmuHyperv\MEmuManage.exe import MEmu.ova --dry-run
  2. ..\MEmuHyperv\MEmuManage.exe import MEmu.ova
  3. ..\MEmuHyperv\MEmuManage.exe modifyvm MEmu --natpf1 delete "INP"
  4. ..\MEmuHyperv\MEmuManage.exe modifyvm MEmu --natpf1 delete "MVD"
  5. ..\MEmuHyperv\MEmuManage.exe modifyvm MEmu --natpf1 delete "APP"
  6. ..\MEmuHyperv\MEmuManage.exe modifyvm MEmu --natpf1 delete "ADB"
  7. ..\MEmuHyperv\MEmuManage.exe modifyvm MEmu --natpf1 delete "SNS"
  8. ..\MEmuHyperv\MEmuManage.exe modifyvm MEmu --natpf1 "INP,tcp,127.0.0.1,21500,10.0.2.15,21500"
  9. ..\MEmuHyperv\MEmuManage.exe modifyvm MEmu --natpf1 "MVD,tcp,127.0.0.1,21501,10.0.2.15,21501"
  10. ..\MEmuHyperv\MEmuManage.exe modifyvm MEmu --natpf1 "APP,tcp,127.0.0.1,21502,10.0.2.15,21502"
  11. ..\MEmuHyperv\MEmuManage.exe modifyvm MEmu --natpf1 "ADB,tcp,127.0.0.1,21503,10.0.2.15,5555"
  12. ..\MEmuHyperv\MEmuManage.exe modifyvm MEmu --natpf1 "SNS,tcp,127.0.0.1,2l504,10.0.2.15,21504"
  13. ..\MEmuHyperv\MEmuManage.exe modifyvm "MEmu" --"memory" 512
  14. ..\MEmuHyperv\MEmuManage.exe modifyvm "MEmu" --"cpus" 1
  15. ..\MEmuHyperv\MEmuManage.exe sharedfolder add "MEmu" --name "music" --hostpath "C:\Users\Administrator\Music\逍遥安卓音乐"
  16. ..\MEmuHyperv\MEmuManage.exe sharedfolder add "MEmu" --name "movie" --hostpath "C:\Users\Administrator\Videos\逍遥安卓视频"
  17. ..\MEmuHyperv\MEmuManage.exe sharedfolder add "MEmu" --name "picture" --hostpath "C:\Users\Administrator\Pictures\逍遥安卓照片"
  18. ..\MEmuHyperv\MEmuManage.exe sharedfolder add "MEmu" --name "download" --hostpath "C:\Users\Administrator\Downloads\逍遥安卓下载"
  19. ..\MEmuHyperv\MEmuManage.exe guestproperty set "MEmu" "imsi" "460000446646798"
  20. ..\MEmuHyperv\MEmuManage.exe guestproperty set "MEmu" "imei" "133524256790010"
  21. ..\MEmuHyperv\MEmuManage.exe guestproperty set "MEmu" "enable_su" "1"
  22. ..\MEmuHyperv\MEmuManage.exe guestproperty set "MEmu" "hardware_opengl" "1"
  23. ..\MEmuHyperv\MEmuManage.exe guestproperty set "MEmu" "host_language" "1000"
  24. ..\MEmuHyperv\MEmuManage.exe guestproperty set "MEmu" "is_customed_resolution" "1"
  25. ..\MEmuHyperv\MEmuManage.exe guestproperty set "MEmu" "is_accl_on" "0"
  26. ..\MEmuHyperv\MEmuManage.exe guestproperty set "MEmu" "microvirt_vm_brand" "iphone"
  27. ..\MEmuHyperv\MEmuManage.exe guestproperty set "MEmu" "microvirt_vm_manufacturer" "iphone"
  28. ..\MEmuHyperv\MEmuManage.exe guestproperty set "MEmu" "microvirt_vm_model" "6 plus"
  29. ..\MEmuHyperv\MEmuManage.exe guestproperty set "MEmu" "resolution_height" "480"
  30. ..\MEmuHyperv\MEmuManage.exe guestproperty set "MEmu" "resolution_width" "800"
  31. ..\MEmuHyperv\MEmuManage.exe guestproperty set "MEmu" "simserial" "89860070200779921015"
  32. ..\MEmuHyperv\MEmuManage.exe guestproperty set "MEmu" "vbox_dpi" "192"
  33. ..\MEmuHyperv\MEmuManage.exe guestproperty set "MEmu" "linenum" "+8617677728760"
  34. ..\MEmuHyperv\MEmuManage.exe guestproperty set "MEmu" "phone_layout" "2"
  35. ..\MEmuHyperv\MEmuManage.exe guestproperty set "MEmu" "vkeyboard_mode" "-3"
复制代码
1.8.6之后添加的,隐藏侧边栏:

  1. ..\MEmuHyperv\MEmuManage.exe guestproperty set "MEmu" "is_hide_toolbar" "1"
复制代码

2. 删除模拟器

  1. ..\MEmuHyperv\MEmuManage.exe unregistervm "MEmu" --delete
复制代码

3. 完整克隆模拟器命令行
  1. ..\MEmuHyperv\MEmuManage.exe import MEmu.ova
  2. ..\MEmuHyperv\MEmuManage.exe storageattach "MEmu_1" --storagectl "IDE" --port 0 --device 1 --type hdd --medium none --mtype normal
  3. ..\MEmuHyperv\MEmuManage.exe closemedium disk "D:\Program Files\Microvirt\MEmu\MemuHyperv VMs\MEmu_1\MEmu-20150728-disk2.vmdk" --delete
  4. ..\MEmuHyperv\MEmuManage.exe clonehd "D:\Program Files\Microvirt\MEmu\MemuHyperv VMs\MEmu\MEmu-20150728-disk2.vmdk" "D:\Program Files\Microvirt\MEmu\MemuHyperv VMs\MEmu_1\MEmu-20150728-disk2.vmdk"
  5. ..\MEmuHyperv\MEmuManage.exe storageattach "MEmu_1" --storagectl "IDE" --port 0 --device 1 --type hdd --medium "D:\Program Files\Microvirt\MEmu\MemuHyperv VMs\MEmu_1\MEmu-20150728-disk2.vmdk" --mtype normal
  6. ..\MEmuHyperv\MEmuManage.exe storageattach "MEmu_1" --storagectl "IDE" --port 1 --device 0 --type hdd --medium none --mtype normal
  7. ..\MEmuHyperv\MEmuManage.exe closemedium disk "D:\Program Files\Microvirt\MEmu\MemuHyperv VMs\MEmu_1\MEmu-20150728-disk1.vmdk" --delete
  8. ..\MEmuHyperv\MEmuManage.exe clonehd "D:\Program Files\Microvirt\MEmu\MemuHyperv VMs\MEmu\MEmu-20150728-disk1.vmdk" "D:\Program Files\Microvirt\MEmu\MemuHyperv VMs\MEmu_1\MEmu-20150728-disk1.vmdk"
  9. ..\MEmuHyperv\MEmuManage.exe storageattach "MEmu_1" --storagectl "IDE" --port 1 --device 0 --type hdd --medium "D:\Program Files\Microvirt\MEmu\MemuHyperv VMs\MEmu_1\MEmu-20150728-disk1.vmdk" --mtype normal
  10. ..\MEmuHyperv\MEmuManage.exe modifyvm MEmu_1 --natpf1 delete "INP"
  11. ..\MEmuHyperv\MEmuManage.exe modifyvm MEmu_1 --natpf1 delete "MVD"
  12. ..\MEmuHyperv\MEmuManage.exe modifyvm MEmu_1 --natpf1 delete "APP"
  13. ..\MEmuHyperv\MEmuManage.exe modifyvm MEmu_1 --natpf1 delete "ADB"
  14. ..\MEmuHyperv\MEmuManage.exe modifyvm MEmu_1 --natpf1 delete "SNS"
  15. ..\MEmuHyperv\MEmuManage.exe modifyvm MEmu_1 --natpf1 "INP,tcp,127.0.0.1,21510,10.0.2.15,21500"
  16. ..\MEmuHyperv\MEmuManage.exe modifyvm MEmu_1 --natpf1 "MVD,tcp,127.0.0.1,21511,10.0.2.15,21501"
  17. ..\MEmuHyperv\MEmuManage.exe modifyvm MEmu_1 --natpf1 "APP,tcp,127.0.0.1,21512,10.0.2.15,21502"
  18. ..\MEmuHyperv\MEmuManage.exe modifyvm MEmu_1 --natpf1 "ADB,tcp,127.0.0.1,21513,10.0.2.15,5555"
  19. ..\MEmuHyperv\MEmuManage.exe modifyvm MEmu_1 --natpf1 "SNS,tcp,127.0.0.1,2l514,10.0.2.15,21504"
  20. ..\MEmuHyperv\MEmuManage.exe modifyvm "MEmu" --"memory" 512
  21. ..\MEmuHyperv\MEmuManage.exe modifyvm "MEmu" --"cpus" 1
  22. ..\MEmuHyperv\MEmuManage.exe sharedfolder add "MEmu_1" --name "music" --hostpath "C:\Users\Administrator\Music\逍遥安卓音乐"
  23. ..\MEmuHyperv\MEmuManage.exe sharedfolder add "MEmu_1" --name "movie" --hostpath "C:\Users\Administrator\Videos\逍遥安卓视频"
  24. ..\MEmuHyperv\MEmuManage.exe sharedfolder add "MEmu_1" --name "picture" --hostpath "C:\Users\Administrator\Pictures\逍遥安卓照片"
  25. ..\MEmuHyperv\MEmuManage.exe sharedfolder add "MEmu_1" --name "download" --hostpath "C:\Users\Administrator\Downloads\逍遥安卓下载"
  26. ..\MEmuHyperv\MEmuManage.exe guestproperty set "MEmu_1" "channel" "0ecfe1c9"
  27. ..\MEmuHyperv\MEmuManage.exe guestproperty set "MEmu_1" "imsi" "460000446646798"
  28. ..\MEmuHyperv\MEmuManage.exe guestproperty set "MEmu_1" "imei" "133524256790010"
  29. ..\MEmuHyperv\MEmuManage.exe guestproperty set "MEmu_1" "enable_su" "1"
  30. ..\MEmuHyperv\MEmuManage.exe guestproperty set "MEmu_1" "hardware_opengl" "1"
  31. ..\MEmuHyperv\MEmuManage.exe guestproperty set "MEmu_1" "host_language" "1000"
  32. ..\MEmuHyperv\MEmuManage.exe guestproperty set "MEmu_1" "is_customed_resolution" "1"
  33. ..\MEmuHyperv\MEmuManage.exe guestproperty set "MEmu_1" "is_accl_on" "0"
  34. ..\MEmuHyperv\MEmuManage.exe guestproperty set "MEmu_1" "microvirt_vm_brand" "iphone"
  35. ..\MEmuHyperv\MEmuManage.exe guestproperty set "MEmu_1" "microvirt_vm_manufacturer" "iphone"
  36. ..\MEmuHyperv\MEmuManage.exe guestproperty set "MEmu_1" "microvirt_vm_model" "6 plus"
  37. ..\MEmuHyperv\MEmuManage.exe guestproperty set "MEmu_1" "resolution_height" "480"
  38. ..\MEmuHyperv\MEmuManage.exe guestproperty set "MEmu_1" "resolution_width" "800"
  39. ..\MEmuHyperv\MEmuManage.exe guestproperty set "MEmu_1" "simserial" "89860070200779921015"
  40. ..\MEmuHyperv\MEmuManage.exe guestproperty set "MEmu_1" "vbox_dpi" "192"
  41. ..\MEmuHyperv\MEmuManage.exe guestproperty set "MEmu_1" "linenum" "+8617677728760"
  42. ..\MEmuHyperv\MEmuManage.exe guestproperty set "MEmu_1" "phone_layout" "2"
  43. ..\MEmuHyperv\MEmuManage.exe guestproperty set "MEmu_1" "vkeyboard_mode" "-3"
  44. ..\MEmuHyperv\MEmuManage.exe guestproperty set "MEmu_1" "custom_tag" "克隆自MEmu"
复制代码
事实上,克隆的这些指令,生成模拟器的部分可以调用官方提供的
  1. MEmuConsole.exe clone "MEmu"
复制代码
来克隆,克隆结束后,使用设置属性的指令自定义所需属性即可。
4. 关闭模拟器命令行(如果你直接杀死窗体的话,记得执行如下指令)
  1. ..\MEmuHyperv\MEmuManage.exe controlvm "MEmu" poweroff
复制代码

5. 启动模拟器命令行
  1. MEmuConsole.exe "MEmu"
复制代码

6. 取所有启动成功的模拟器
  1. ..\MEmuHyperv\MEmuManage.exe list runningvms
复制代码

转载于:https://www.cnblogs.com/hdk1993/p/6654808.html

你可能感兴趣的文章
jQuery的技巧01
查看>>
基于泛型实现的ibatis通用分页查询
查看>>
gopacket 使用
查看>>
AlertDialog对话框
查看>>
我的友情链接
查看>>
linux安全---cacti+ntop监控
查看>>
鸟哥的linux私房菜-shell简单学习-1
查看>>
nagios配置监控的一些思路和工作流程
查看>>
通讯组基本管理任务三
查看>>
赫夫曼编码实现
查看>>
html页面显示div源代码
查看>>
Centos下基于Hadoop安装Spark(分布式)
查看>>
3D地图的定时高亮和点击事件(基于echarts)
查看>>
接口由40秒到200ms优化记录
查看>>
java 视频播放 多人及时弹幕技术 代码生成器 websocket springmvc mybatis SSM
查看>>
Activiti6.0,spring5,SSM,工作流引擎,OA
查看>>
使用Tooltip会出现一个问题,如果行上出现复选框
查看>>
禁止浏览器缓存js
查看>>
【Redis】安装PHP的redis驱动(二)
查看>>
什么是序列化,为什么要序列化
查看>>