Android emulator: how to find out if hardware virtualization feature is used?

痞子三分冷 提交于 2019-12-21 03:30:14

问题


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:

  • The newest SDK tools
  • The Intel Hardware Accelerated Execution Manager (and installed it by executing IntelHaxm.exe)
  • Intel Atom x86 System Image (available as API 10 and API 15 image)

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.


回答1:


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




回答2:


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



回答3:


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




回答4:


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


来源:https://stackoverflow.com/questions/9839851/android-emulator-how-to-find-out-if-hardware-virtualization-feature-is-used

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!