转载 Genymotion:超赞的安卓虚拟机

恒温 · 2014年07月03日 · 最后由 mike 回复于 2015年04月09日 · 1798 次阅读

原文还活着,https://www.imququ.com/post/genymotion.html

Android 模拟器一直以速度奇慢无比著称,基本慢到不可用。

本文介绍我一直在用的 Genymotion,速度不亚于真机。而且功能齐全,使用简单。

Genymotion 来自于 AndroVM 这个开源项目,基于 x86 和 VirtualBox,支持 OpenGL 加速,可以用于 Mac/Win/Linux。最近发布了新版,支持了 Android2.3/4.3,新增了拖拽安装 apk,移除了 Google 市场(后面提供解决方案)。另外增加了功能更丰富的付费版,个人可以继续使用免费版。

如何使用

简单介绍下如何获取和使用 Genymotion:

下载并安装 VirtualBox;
注册 Genymotion 帐号并登录;
根据自己的系统下载并安装 Genymotion,及 Eclipse 插件(可选);
然后就可以启动 Genymotion 程序了:

genymotion2

主界面的 Settings 按钮,可以用来设置 VirtualBox 及 ADB 路径等信息。点击 Add 按钮,用 Genymotion 帐号登录后,会显示可用的 Android 虚拟设备:

genymotion0

找到想要的机型和版本,装好之后,回到主界面点 Play 按钮启动它:

genymotion3

要安装应用,直接把 apk 文件拖进虚拟机就可以了:

genymotion1

键盘 esc 是虚拟机的后退键,f1 是 menu 键。可以看到虽然 Genymotion 底层使用 VirtualBox,但是整个过程中,VirtualBox 一直是幕后英雄,不会露面。

另外,如果安装了 Genymotion 的 Eclipse 插件,以后就可以在 Eclipse 里管理和使用虚拟机了。如果在 Genymotion 里指定了 ADB 路径,调试 Android 应用也很方便。

Genymotion 虚拟机运行于本机,所以本机拥有的内网权限,虚拟机也有。

Google 市场 和 ARM 库

前面说过,新版 Genymotion 移除了 Google 市场。实际上,对 ARM library 的支持也一并移除了:

Both the “Google apps” and the “ARM library support” features are removed.
这样安装某些 App 时,会报「INSTALL_FAILED_CPU_ABI_INCOMPATIBLE」错误,比如微信。xda 论坛给出了一个解决方案,经验证确实好用。

安装 GApps(含 Google 市场)和 ARM Translation(提供 ARM 支持)的步骤:

下载 ARM Translation Installer v1.1(密码:a9cb);
下载对应系统的 GApps:4.4(密码:d885)、4.3(密码:2b8c)、4.2(密码:0c5a)、4.1(密码:67b4);
安装第 1 步下载到的文件(直接把 zip 文件拖进虚拟机,不要解压),安装完关闭虚拟机再打开;
安装第 2 步下载到的文件(步骤同上);
这样,Google Play 和其他 Google App 都有了;再安装微信等应用也不会报错了。

使用 Mac 的同学请注意

Genymotion 依赖的 Virtualbox 虚拟机,和 Mac 系统下另一个著名的虚拟机软件「Parallels Desktop」没办法同时使用。Parallels Desktop 官方说无解:

No workaround is available. Please try not to use Parallels Desktop and Virtual Box at the same time
所以每次使用 Genymotion,必须先关掉 Parallels Desktop;同样,要使用 Parallels Desktop,也得关闭 Genymotion。

问题是:关闭 Genymotion,Virtualbox 某些进程并不会自动退出。所以我们要手动结束 Virtualbox 所有进程,才能正常运行 Parallels Desktop。我写了一个「Kill Virtualbox」的 Alfred Workflow 专门干这事,其实就一行:

kill -9 $(ps -ef|grep VirtualBox|awk '$0 !~/grep/ {print $2}' |tr -s '\n' ' ')
总的说来,除了与 Parallels Desktop 兼容性问题这点小不爽之外,Genymotion 各方便都令人满意,强烈推荐。

update: 升级到 2.0.2 之后,直接关闭 Genymotion 可以同时退出所有 VirtualBox 进程,不需要上面那么复杂了。
本文链接:https://www.imququ.com/post/genymotion.html

如果觉得我的文章对您有用,请随意打赏。您的支持将鼓励我继续创作!
共收到 9 条回复 时间 点赞

不支持 ARM 是硬伤啊

#1 楼 @seveniruby 可以让它支持啊。 Genymotion-ARM-Translation_v1.1.zip 用这个

#2 楼 @lihuazhang 还有这个啊,之前我看过他们给我发的邮件,当时是说不支持了。这个扩展是第三方的吧

百度云盘下载地址(for win32&64)~
VirtualBox-4.3.2-90405-Win.exe
http://pan.baidu.com/s/1pJoCb4f

genymotion-2.0.1-without-VirtualBox.exe
http://pan.baidu.com/s/1mg0Tzjq

genymotion-1.1.0-with-VirtualBox.exe
http://pan.baidu.com/s/1FyaI8

genymotion-2.2.2-without-virtualbox.exe
http://pan.baidu.com/s/1sj58tYl

Genymotion-ARM-Translation_v1.1.zip
http://pan.baidu.com/s/1bnzVm2r

Genymotion-ARM-Translation_v1.1.zip 这个很好用, 就是我的电脑一运行 genymotion 就卡的要死

Genymotion 比较流畅,比官方的模拟器好很多很多。

稳定性有待考验

赞~,下载来试用下,一直为模拟器的事情郁闷

有没有遇到过这样的问题,找了很久,没查到原因,求赐教
"Player.exe has stopped working"

"Microsoft Visual c++ runtime Library
The application has requested the runtime to terminate it in an unusual way"

需要 登录 后方可回复, 如果你还没有账号请点击这里 注册