开发者

Android emulator is based on QEMU. Can I use KVM with it?

开发者 https://www.devze.com 2022-12-26 06:39 出处:网络
My laptop supports hardware virtualization (AMD SVM) and I k开发者_Go百科now that: QEMU can make use of hardware virtualization through KVM;

My laptop supports hardware virtualization (AMD SVM) and I k开发者_Go百科now 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?


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


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,


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).


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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消