Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 905
Felix Avatar asked Apr 08 '10 10:04

Felix


3 Answers

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

like image 199
David Evans Avatar answered Oct 27 '22 08:10

David Evans


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,

like image 35
dave1010 Avatar answered Oct 27 '22 08:10

dave1010


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

like image 37
SaltySub2 Avatar answered Oct 27 '22 07:10

SaltySub2