15

Starting with Android SDK Tools rev 17 the Android emulator supports using the hardware virtualization feature (Intel VT, VT-x, vmx and AMD-V, SVM) which should speed-up x86 based emulator images a lot: http://developer.android.com/guide/developing/devices/emulator.html#accel-vm

I installed all necessary components:

Then I created a new AVD using that image, but I could not "feel" any difference regarding the execution speed.

Therefore my question is: How to find out if hardware virtualization feature is used?

And if not what needs to be done to use it?

I know that it is enabled by the BIOS, because I can run Windows 64 bit VMs in VirtualBox. Additionally I have verified it using the Microsoft® Hardware-Assisted Virtualization Detection Tool.

Robert
  • 39,162
  • 17
  • 99
  • 152
  • 1
    for intel http://downloadcenter.intel.com/Detail_Desc.aspx?ProductID=1881&DwnldID=7838&lang=eng&iid=dc_rss but ... anyway, there is only 2.3.3 android x86 image ... – Selvin Mar 23 '12 at 13:48
  • did you ever figure out why the emulator didn't seem faster? i have the same problem on windows 7. i have the HAX component installed via the SDK manager, but the emulator is as slow as ever. HAX works great on my windows xp laptop, but not on my desktop. – Ben H Mar 27 '12 at 06:34
  • @Ben May be the emulation speed is only a problem for CPU intensive programs. I noticed that there is an additional emulator flag for enabling GPU acceleration. Don't know if it is (de)activated by default and if it helps much... – Robert Mar 27 '12 at 08:38
  • not sure what you mean. the emulator is dramatically faster on my laptop, with no special configuration necessary. it's the same old slowness on my desktop. strange. – Ben H Mar 28 '12 at 16:18
  • I had to deinstall Intel HAXM because it blocks other emulators (looks like it occupies and locks the CPU VT-features). Even disabling the HAXM service did not help. Only deinstallation and reboot helped. – Robert Apr 02 '12 at 08:20
  • [Eric Adams' Video](http://software.intel.com/en-us/videos/channel/android/android-ics-emulator-for-mac-os-with-intel%C2%AE-hardware-accelerated-execution-manager/1668186221001) describes using youtube to tell the difference. Youtube on a non HAXM emulator doesn't show video. On HAXM it's just as fast as a regular window (on MAC). – JohnnyLambada Jun 19 '12 at 21:11
  • If you don't feel a difference, it is not on – Heiko Rupp Aug 03 '12 at 16:12
  • FYI, after using this emulator I get blue screens of death every few days from Intel® Hardware Accelerated Execution Manager `haxm.sys` – Jeff Axelrod Oct 04 '12 at 14:09

4 Answers4

16

During emulator loading you should see this line:

[2012-03-26 14:06:22 - Emulator] HAX is working and emulator runs in fast virt mode

Nikita Koksharov
  • 10,283
  • 1
  • 62
  • 71
  • @emmby then how did you determine you're running an accelerated emulator vs. this answer being incorrect? – Jeff Axelrod Sep 19 '12 at 19:05
  • 2
    I get that message but I do not trust or believe it. I get around 6 frames a second when 'HAX is working' on a 2013 MBA with 512GB SSD and 8GB RAM. – mikemaccana Dec 09 '13 at 13:09
  • 1
    @mikemaccana, I agree. With my Intel Q6600 CPU, I get the `HAX is working` message, and the performance and stability are actually worse than when HAX is turned off. – Sam Jun 17 '16 at 06:52
5

After steping through this tutorial on OS X Lion, I see the following in the console, when starting the emulator:

./emulator-x86 -avd Test3                                                                                                              
HAX is working and emulator runs in fast virt mode
Jens Kohl
  • 5,899
  • 11
  • 48
  • 77
4

Had the same issue on Windows 7 32bit with Q6600 Intel processor and pretty outdated Asus P5E-VM SE motherboard. The motherboard did not even have a switch for virtualization, though Intel tool: http://www.intel.com/support/processors/tools/piu/sb/CS-014921.htm indicated that VT technology is enabled. The culprit was that Data Execution prevention was enabled only for windows services, I have enabled it for all programs and after computer restart received this message in the Android Console of the Eclipse: HAX is working and emulator runs in fast virt mode

DEP setting is located: Located Windows/Control Panel/System&Security/System/Advanced System Settings/Advanced tab/Performance/Data Execution Prevention tab

The idea to check it I received here: https://developer.tizen.org/sdk/haxm Though only used standard images (not Tizen ones).

Have to say that loading of the emulator in the virtualization mode is not nearly as impressive as on Intel promo video: http://www.youtube.com/watch?v=pt9IeJ777zw But uploading of the application (mine is pretty big ~5MB) and general responsiveness of the emulator is quite significant. One cannot say that it works as native computer (that it sometimes there is a visible lag), but again it is visibly faster. It eats a lot of memory though (I have 4 GB, only 14MB is free when emulator will run).

Alexey Vassiliev
  • 2,349
  • 2
  • 17
  • 8
  • What symptom did you have before enabling Data Execution Prevention. Were you getting an error? Or just poor performance? – Sam Jun 17 '16 at 06:55
0

A quick solution for Windows platform, Launch CMD as an administrator and type this command

SC query INTELHAXM

And you should see output like this (if hardware acceleration is up and running)

SERVICE_NAME: intelhaxm
    TYPE               : 1  KERNEL_DRIVER
    STATE              : 4  RUNNING
                            (STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN)
    WIN32_EXIT_CODE    : 0  (0x0)
    SERVICE_EXIT_CODE  : 0  (0x0)
    CHECKPOINT         : 0x0
    WAIT_HINT          : 0x0
A.B.
  • 1,554
  • 1
  • 14
  • 21
  • 1
    This just shows that the Intel HAXM is correctly installed and running (hence it is an indicator that the hardware virtualization feature can be used). However it does not show if HAXM is used with a certain virtual machine. – Robert Jul 07 '18 at 14:56