[android] 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... :

enter image description here

This question is related to android sdk android-emulator intel avd

The answer is


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


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!


  1. Download HAXM from the Intel site.

  2. Install it.

  3. And then run the AVD from AndroidStudio, menu -> Tools -> AVD. Choose x86.

It works!


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.


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!


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.


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:


Here there are two issues we have to concentrate on:

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

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

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/


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

VMX checked is a sign that your processor support virtualisation asked


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.


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


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.


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


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


Examples related to android

Under what circumstances can I call findViewById with an Options Menu / Action Bar item? How to implement a simple scenario the OO way My eclipse won't open, i download the bundle pack it keeps saying error log getting " (1) no such column: _id10 " error java doesn't run if structure inside of onclick listener Cannot retrieve string(s) from preferences (settings) strange error in my Animation Drawable how to put image in a bundle and pass it to another activity FragmentActivity to Fragment A failure occurred while executing com.android.build.gradle.internal.tasks

Examples related to sdk

I am receiving warning in Facebook Application using PHP SDK Has been compiled by a more recent version of the Java Runtime (class file version 57.0) Difference between OpenJDK and Adoptium/AdoptOpenJDK Error:Failed to open zip file. Gradle's dependency cache may be corrupt Can't accept license agreement Android SDK Platform 24 Automatically accept all SDK licences Android SDK location should not contain whitespace, as this cause problems with NDK tools Android SDK folder taking a lot of disk space. Do we need to keep all of the System Images? "The following SDK components were not installed: sys-img-x86-addon-google_apis-google-22 and addon-google_apis-google-22" Can't find SDK folder inside Android studio path, and SDK manager not opening

Examples related to android-emulator

flutter run: No connected devices How to remove the Flutter debug banner? Android Studio AVD - Emulator: Process finished with exit code 1 Android Studio Emulator and "Process finished with exit code 0" Run react-native on android emulator ERROR Android emulator gets killed Error while waiting for device: Time out after 300seconds waiting for emulator to come online Unfortunately Launcher3 has stopped working error in android studio? updating Google play services in Emulator Android Studio emulator does not come with Play Store for API 23

Examples related to intel

Emulator: ERROR: x86 emulation currently requires hardware acceleration I can't install intel HAXM Error in launching AVD with AMD processor INSTALL_FAILED_NO_MATCHING_ABIS when install apk Intel HAXM installation error - This computer does not support Intel Virtualization Technology (VT-x) fork: retry: Resource temporarily unavailable Running the new Intel emulator for Android

Examples related to avd

PANIC: Cannot find AVD system path. Please define ANDROID_SDK_ROOT (in windows 10) Android Studio AVD - Emulator: Process finished with exit code 1 Why AVD Manager options are not showing in Android Studio Run AVD Emulator without Android Studio Is Google Play Store supported in avd emulators? Error in launching AVD with AMD processor How do you install Google frameworks (Play, Accounts, etc.) on a Genymotion virtual device? Why emulator is very slow in Android Studio? Android Studio doesn't see device Running Google Maps v2 on the Android emulator