ChatGPT解决这个技术问题 Extra ChatGPT

Running the new Intel emulator for Android

Lately Google and Intel have published a new way to run the emulator, which should work much better than the previous version (which has emulated ARM CPU). Here are some links about it: this and this.

However, after installing the new components and creating a new emulator configuration as instructed, I get an error and I also can't see any improvements. I've tried both API 10 and API 15, and with GPU enabled and disabled. None of those configurations helped. I've also tried it on two different computers and didn't get any boost (and got the same errors).

It seems that on the posts I've read about it, nobody had any problems with it and all report a much faster emulator.

The error it shows is:

emulator: Failed to open the HAX device!
HAX is not working and emulator runs in emulation mode
emulator: Open HAX device failed

Why is it happening, and is there a way to fix it? Is there anyone else who gets those errors or vice versa?

By the way, I have an Intel CPU, if that could be a problem.

EDIT:

here's what I see in the BIOS, so it should be available... :

https://i.stack.imgur.com/LA6b0.jpg

Note - the Android SDK Manager does not actually do the installation - you must run the installation yourself after using the manager for the download: /extras/intel/Hardware_Accelerated_Execution_Manager/IntelHAXM.exe
Richard is correct. I had the same problem, until I followed his comment. Go to developer.android.com/tools/devices/emulator.html#accel-vm, and scroll down to the section "Configuring VM Acceleration on Windows". Worked for me, no need to reinstall, or reinstall outside of the ADK, or anything.
On Mac OSX 10,9 nedd also to install manualy hotfix from intel site software.intel.com/en-us/android/articles/…
Thank you! I was having the same issues on my Mac.
Is isochronous support part of VT-x?

h
hram908

I had the same issue, solved it by Installing the Intel Hardware Accelerated Execution Manager. Download it with the SDK Manager, it's in Extras. After this, go to the folder

[Android SDK Root]\extras\intel\Hardware_Accelerated_Execution_Manager

then run IntelHaxm.exe and install.

Here the link of the Intel Hardware Accelerated IntelHaxm.exe for Microsoft Windows,Mac OS* X, and Linux Ubuntu

https://i.stack.imgur.com/zbynW.png

You'll get the following message if you don't have virtualization enabled in your BIOS:

https://i.stack.imgur.com/wQjqB.png


still got some errors when trying to execute the emulator , and the emulation either shows black (when using gpu) or is just slow as before , especially compared to a real device. is this a good configuration: tinypic.com/view.php?pic=efgv83&s=6 ?
I just tested running this with the default hardware setup, was working fine then. This x86 emulator is still pretty new, so there's bound to be a bug or two. Try creating a new AVD and run it with the default HW setup.
@Robert Karl There's a know issue on Mac OS X 10.8.2 that caused a Kernel Panic for me when I ran HAXM. Intel has a patch that fixes the issue you download it here: software.intel.com/en-us/articles/… Then open patched dmg file and follow the instructions.
I enabled Virtualization in my BIOS and this is my Intel Processor but when i want to install the HAXM, get the error that says: This computer does not support Intel Virtualization Technology (VT-x). HAXM cannot be installed. Please refer to the Intel HAXM documentation for more information.
Note to Windows 8.1 Users: You must disable Hyper-V otherwise installer will think that VT-x is not available.
V
VeV

Small Note for Windows 8 user, Intel HAX will not work if Hyper-V feature is enable. Hyper-V (like most of the virtualization tech) will exclusively lock the VT extension witch will prevent HAX to work properly. A workaround if you “need” Hyper-V too might be to stop manually the Hyper-V services when you need HAX (haven’t tested it yet through).


interesting . there are multiple hyper-v services . which of them should i disable ?
disabling the service is not enough. you need to disable the feature.
Thanks for the info, this is exactly what my problem is.
I followed this hyper-vandvmware.blogspot.de/2012/10/… and it works great. Requires a reboot but it allows both technologies to work on an installation but unfortunately not side-by-side.
That helped. Thanks a lot. Windows is a pain.
s
swiftBoy

If all else fails. Simply try to download the Intel HAXM zip manually, extract and install. check here

Remember this only works for an Intel cpu that supports Intel Virtualization Technology. And you MUST enable virtulization in your bios.

It's a fairly decent and very noticeable improvement to the android emulator if you ask me.


installed it in the past . no luck . btw , it was enabled in the BIOS , so still i don't understand why it's not as speedy as google has promised.
@androiddeveloper It really works !!! When you installed HAXM how much RAM did you allocate ? I allocated 512 MB and its blazingly fast !
@2-Stroker after downloading the new driver (updated recently) i've tried to install it and it says that my computer doesn't support intel virtualization technology. guess i will never have a smooth emulator with my current computer. :( maybe i will try it at the office.
C
Community

Not every processor is supporting the virtualization!

To find out your chipset abilities go to http://ark.intel.com/, insert the name of your processor in the search line and check out the resolve.

Advanced Technologies: ... Intel® Virtualization Technology (VT-x) = ???

If you see "No", you can forget HAXM!


If running in VMWare, be sure to enable VTX under processor settings.
i think in my system there is not HAXM and i got this error can you suggest me what can i to solve this ?
This link works better for finding if your CPU supports Intel® Virtualization Technology: ark.intel.com/Products/VirtualizationTechnology
M
Mohamed El-Nakeep

Here are the steps to get the Hardware Accelerated Execution (HAX) which is really quite a lot:

1-check your processor Intel website to see if it supports Intel VT-x or not: http://ark.intel.com/Products/VirtualizationTechnology all Intel Core i processors and some other selected processors support Intel VT-x

2- check your bios to enable Intel VT-x , usually called hardware virtualization or Intel virtualization in bios

3- check if you are using a software conflicting with HAXM, popular software conflicting with haxm include but not limited to:

Hyper-V
Windows phone SDK 8
Avast antivirus 8 

4-install Intel management engine interface (MEI), this driver is usually not installed and is not part of retailer Windows DVD, even Windows 8. Check this post about how to install: http://communities.intel.com/community/vproexpert/blog/2011/12/19/mei-driver-now-available-via-microsoft-windows-update This driver is required and is not optional to activate Hardware Acceleration you can also install it from windows update

5-use android SDK manager to download Extras -> Intel x86 Hardware Accelerated Execution Manager.

6-Run installer of HAXM from: [Android SDK Root]\extras\intel\Hardware_Accelerated_Execution_Manager\IntelHaxm.exe

if you passed the previous steps the installer will work just fine ,otherwise it will fail

7-start AVD and see the difference in performance, Animations are faster System UI and launchers crashes in 4.0.3 but are just fine for 4.2.2

see installation guide by intel:


Thanks! I had incorrectly assumed the SDK Manager would auto install the HAXM package instead of just downloading it. Step 6 solved it for me.
Thanks For Information , Is There any other ways to launch android projects without using previous way , Coz my intel don't support the VT-x @MuhammadAnnaqeeb
@Loai Of course you can run it without HAX. HAX is used only to speed up x86 emulation, not to enable it, and it does not speed up ARM emulation. Also if you have an android device you can debug your applications on the device itself, by connecting it to the computer, much faster than any accelerated emulator!
@MuhammadAnnaqeeb ok , as you said the HAX used to speed up the x86 emulations! , actually when i want to run my project through VM it ask me to install the HAX !
@Loai How does it ask you? Could you post a screenshot of that please? How long do you wait for emulator to launch after that before cancelling the launch? Do you launch ARM emulator without errors?
p
pajb

Using SDK Manager to download Intel HAX did not work.

Downloading and installing it from the Intel website did work. http://software.intel.com/en-us/articles/intel-hardware-accelerated-execution-manager/

Top Tip: making the change in my BIOS to enable virtualization and then using "restart" did not enable virtualization. Doing a cold boot (i.e. shutdown and restart) suddenly made it appear.

The first step (on Windows) is to make sure that the Micrsoft Hardware-Assisted Virtualization Tool reports that "this computer is configured with hardware-assisted virtualization". http://www.microsoft.com/en-us/download/details.aspx?id=592


last link app told me it's incompatible with the current OS (which is windows 8) .
actually - SDK manager download of HAX DOES work - it's downloading an extra's install file you must manually execute!
P
Patrick Tescher

You might need to turn on virtualization in your BIOS, most manufacturers disable it by default. Intel HAX requires CPU virtualization to be enabled.


you mean that it won't work on cpus that don't have this feature? how would i know if i have it? my cpu is a little old , but it's usually fast enough for me , and i've tested it on other , much better computers than mine . my CPU is intel core i3 540 .
According to this page it should work: ark.intel.com/products/46473/…
Most modern CPUs support virtualization, you just have to turn it on in your BIOS.
wow , thanks . will try it soon and give you a "V" . for now , take a +1 . :) how do you enable it in the bios mode ?
It depends on your computer, usually you press F2 or something when you boot up.
u
user1763174

The same began to happen to me about one week ago, without apparent reason (99% sure that I didn't upgrade anything); after being able to run the emulator for some time it just stopped working without an apparent reason.

I tried to install the Intel thingie, but the installer reported that my machine doesn't support Intel VM, despite the fact that it has an Intel i3 processor and that virtualization is enabled (perhaps XP is too old an OS for that, although MS VM, Oracle's Virtual Box and VMWare have been installed an working in this machine with the same OS).

I just edited the VD to emulate an Arm processor, and everything is working again.

Perhaps not the optimal solution, but it works!


J
Jagger

For Windows, there are some answers explained how it works. But I'm a Mac User, I don't know how to install HAX driver for Mac as they did for Windows. Finally I found the below link and it did fix my problem. You should download HAXM of Mac and then install it.

https://software.intel.com/en-us/articles/intel-hardware-accelerated-execution-manager-end-user-license-agreement-macosx/


I don't use a Mac. However, I wonder, did it help? is it (the emulator) as fast as you'd hope it'd be? is it at least smooth? How did installing the driver help compared to without it?
J
Jeff Axelrod

Complete step-by-step instructions for running the accelerated emulator can be found on the official Android developers website:

Caution: As of SDK Tools Revision 17, the virtual machine acceleration feature for the emulator is experimental; be alert for incompatibilities and errors when using this feature.


would using windows 8 be a possible cause that it doesn't work well ? also , do you think it could work on ubuntu ? what if ubuntu was installed via Wubi ?
@androiddeveloper I suggest you post your comment as a new question. This quote is not from me; it's from the Android developers website linked to in my answer.
do you have any experience with either of those questions? also , did you manage to make the new intel emulator work well so that it's much faster than the normal way the emulator works?
@androiddeveloper I ran the emulator with virtual machine acceleration (changing to the Intel Atom x86 CPU) and it seemed to take about the same time as the ARM emulator to boot. It seemed slightly more responsive than the ARM emulator, but still nothing like a real device. I didn't do any benchmarks. And no, I don't use Windows 8 or Ubuntu. I use Windows 7 x64--I wasn't aware of a Windows 8 being available.
so it's still not as fast as shown in google's videos . too bad.
K
KRP

You have to download the Intel® Hardware Accelerated Execution Manager. Then you will get this message:

Starting emulator for AVD 'test' emulator: device fd:740 HAX is working and emulator runs in fast virt mode


others have answered a similar thing. it's just that it appears my computer can't support it, even though it's not that old and should be capable to run android smoothly. the proof is that it can run fine using virtualBox.
I had your same issue, I just installed the manager and now works correctly
well i can't install using the link you've written.
i get the same as on this post: stackoverflow.com/a/10772162/878126 , meaning: "this computer does not support intel virtualization technology (VT-x). HAXM cannot be installed. Please refer to the Intel HAXM documentation for more information." .
then there's no way, you would have to change hardware to run it
P
Peter Mortensen

For Mac users who want to check whether your processor supports virtualisation, use the maccpuid software and look for VMX. If it is checked then you're good to go.

Download it here

https://i.stack.imgur.com/uJarJ.png


P
Peter Mortensen

Here there are two issues we have to concentrate on:

HAX device failed to open, For this problem, you have to run the HAX device setup file from the HAX addon folder. Follow Speed Up Android Emulator to know clearly how. If you created the AVD through AVD manager then you can change the RAM size in AVD Manager and device edit option.

If you created the AVD through command line, then you should start the AVD from command line will work,

emulator -memory 512 -avd gtv_avd

K
KRP

If everything else fails, it's good to try my option and download a HAXM installer.

It needs to be copied to HAXM installation folder and then started from command line (start CMD as an Administrator). After restarting computer HAXM will be installed. It perfectly worked for me as I was having problems with installing it on my laptop.

After all simply type sc query intelhaxm in your cmd in order to check whether HAXM is installed properly.


P
Peter Mortensen

If you are running an Intel processor make sure the HAXM (Intel® Hardware Accelerated Execution Manager) installer is installed via SDK Manager by checking this option in SDK Manager. And then run the HAXM installer ext via the path below.

your_sdk_folder\extras\intel\Hardware_Accelerated_Execution_Manager\intelhaxm.exe

Also check the RAM size allocated while doing HAX installation so it fits the RAM size of your emulator.

This video shows all the required steps which may help you to solve the problem.

This video will also help you if you face a problem after installing HAXM.


P
Peter Mortensen

Download HAXM from the Intel site. Install it. And then run the AVD from AndroidStudio, menu -> Tools -> AVD. Choose x86.

It works!


It's still very slow and doesn't seem to help.