Android模拟器是基于QEMU的。我可以使用 KVM 吗?

发布于 2024-08-28 02:29:58 字数 161 浏览 7 评论 0原文

我的笔记本支持硬件虚拟化(AMD SVM),我知道:

  • QEMU可以通过KVM利用硬件虚拟化;
  • Android 模拟器很大程度上基于 QEMU

自然问题如下:我可以将两者(Android + KVM)结合起来以提高模拟器的性能吗?

My laptop supports hardware virtualization (AMD SVM) and I know that:

  • QEMU can make use of hardware virtualization through KVM;
  • The Android emulator is very much based on QEMU

Natural question follows: can I combine the two (Android+KVM) to get improved performance in the emulator?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

调妓 2024-09-04 02:29:58

是的,你可以。只需在 Android SDK 中下载适当的 Intel Atom CPU 软件包,然后让您的 AVD 使用 Intel Atom CPU 架构。 Android模拟器甚至可以使用主机GPU。以下是有关如何执行此操作的链接:

http://developer.android.com/tools/devices/ emulator.html#acceleration

Yes, you can. Just download the appropriate Intel atom CPU packages in the Android SDK and have your AVD use an Intel atom CPU architecture. The android emulator can even use the host gpu. Here is a link on how to do it:

http://developer.android.com/tools/devices/emulator.html#acceleration

嘴硬脾气大 2024-09-04 02:29:58

您可以尝试使用 AndroidVM - http://androvm.org/blog/ ...在我的测试中也可以有硬件 OpenGL 和旋转支持(这有点复杂,但一切都在 AndroidVM 页面上进行了解释)。

根据我的经验,这比 Android SDK 模拟器好得多,至少在 Windows 和 Mac 上是这样。

对于 Linux,您应该能够使用 VirtualBox for Linux 来使用 AndroidVM。由于它主要是 OVA 文件,因此您应该能够根据需要使用其他虚拟化客户端。

有趣的是,这不是模拟 ARM,而是 x86 上的 Android...这有优点也有缺点,但如果你可以在虚拟机上进行各种初始测试,那么绝对有助于不必购买大量设备,因为Android 4.1 通常不会被 ARM 和 x86 手机和平板电脑等制造商进行过多修改(IMO)。

You can try to use AndroidVM - http://androvm.org/blog/ ... In my testing you can have Hardware OpenGL and Rotation Support as well (this is slightly convoluted but everything is explained on the AndroidVM page).

In my experience this is miles better than the Android SDK Emulator, at least on Windows and Mac.

For Linux, you should be able to use VirtualBox for Linux to use AndroidVM. Since it is an OVA file mainly, you should be able to use other Virtualisation clients as needed.

What's interesting is that this is NOT emulating ARM, it is Android on x86... which has pros and cons, but definitely helps in not having to buy a ton of devices if you can do initial testing of various sorts on virtual machines, since Android 4.1 is generally not too heavily modified by manufacturers across ARM and x86 phones and tablets, etc (IMO).

心凉怎暖 2024-09-04 02:29:58

您可以在带有 KVM 的 QEMU 中(甚至在 VirtualBox 中)运行 Android-x86。我不确定设置开发有多容易,但它应该运行得更快一些。此外,英特尔正在致力于在其 x86 芯片上支持 Android,因此希望将来会变得更容易。

更新:我设法让它在 VirtualBox 中工作,除了一些网站使网络浏览器崩溃。由于我正在制作一个网络应用程序,所以这没有帮助。不过它比标准 Android 模拟器要快得多,

You can run Android-x86 in QEMU with KVM (or even in VirtualBox). I'm not sure how easy it would be to set up for development but it should run quite a bit faster. Also, Intel are working on getting Android on their x86 chips so this will hopefully become easier in the future.

Update: I managed to get it working in VirtualBox, except some sites crash the web browser. Since I was making a web app, this was not helpful. It was much faster than the standard Android emulator though,

会傲 2024-09-04 02:29:58

与您所追求的答案并不密切相关,但是

  • 当您在界面上工作时,或者在编码时尽可能多地使用 Run (与调试相比,它要快得多,甚至快 10 倍)
  • 尝试尽量减少 Debug 运行,学会完美编码,因此少用 Debug。
  • 您可能已经知道,您不需要为每个运行会话关闭模拟器,因此请将其保持打开状态。
  • 使用一小时后重新启动 Eclipse,但保持模拟器打开。重新启动 Eclipse 比模拟器更快。
  • 将 Eclipse 设置为记住上次运行的项目,以便启动只需一键点击即可完成

Not closely related to the answer you are after, but

  • use Run when you work on your interface, or as much as possible while coding (it's a lot faster compared to Debug, even 10 times faster)
  • try to minimize the Debug runs, learn to code perfect, so use less Debug.
  • probably you already know, you don't need to close the Emulator for each run session, so keep it open.
  • restart Eclipse after hour of usage, but keep the Emulator open. It's faster to restart Eclipse than the Emulator.
  • set Eclipse to remember the last run project, so the launch is done via just one click
原谅过去的我 2024-09-04 02:29:58

针对 x86 的 Google TV 模拟器支持 KVM 模式虚拟化

ARM还没有做到这一点。我相信目前正在进行中。

Google TV emulator which is targeted at x86 supports KVM mode virtualization.

ARM is not there yet. I believe it's currently work-in-progress.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文