2

I can't start any x86 Android emulator on my laptop running Windows 7.

I have tried installing HAXM both through the extras folder in the Android SDK as well as directly downloading it from Intel's site and installing version 6.0.1 with no luck.

VT has been turned on in the Bios.

When I start an emulator I get the error

emulator: ERROR: x86 emulation currently requires hardware acceleration!
Please ensure Intel HAXM is properly installed and usable.
CPU acceleration status: HAX version (2) is too old (need at least 3).

If I run haxm_check.exe I get

VT support -- yes
NX support -- yes

Running sc query intelhaxm gives me

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

I have VirtualBox installed, but VMVare is not running. I even stopped all the VMWare services. I don't believe it's any antivirus problem.

Googling HAX version (2) is too old (need at least 3) shows this source code https://github.com/ashishb/android_emulator/blob/master/android/emulation/CpuAccelerator.cpp but can't glean anything from it.

Any ideas?

Milind
  • 2,760
  • 1
  • 16
  • 12

2 Answers2

6

The reason is that there was an old version of HAX driver (version 2) and the latest version of HAXM driver (file version 6.0.3, HAX driver version 3) is not installed successfully because it has some mismatch file name in its intelhaxm.inf file (see step 5) even if it says "install successfully" after you run the installer file on the machine.

Following are steps how did I fix the problem, step 1 to 3 are to remove the old driver and step 4 to 9 are to fix new version problem and install it, the <android-sdk> below should be your Android SDK directory.

  1. Select Computer and Mouse right click menu, Properties->Driver Manager
  2. Menu View->Show hidden devices, in the tree category Non-Plug and Play Drivers, find the IntelHaxm and uninstall the driver if found it.
  3. Remove old intelhaxm driver folder: C:\Windows\System32\DRVSTORE\intelhaxm_579C88F702D572C10DF6C9F1668B2077995F4354
  4. Go to <android-sdk>\extras\intel\Hardware_Accelerated_Execution_Manager and extract the install file intelhaxm-android.exe to folder intelhaxm-android using 7-zip or some other archive program
  5. Go into the extracted folder intelhaxm-android and again, use 7-zip extract the hax64.msi to folder hax64
  6. Go into folder hax64 and remove all .win7_64 suffix from the file names of the inf, sys, and cat files for your OS (win7 or vista), example for windows 7 64bit:

    • intelhaxm.inf.win7_64 rename -> intelhaxm.inf
    • intelhaxm.sys.win7_64 rename -> intelhaxm.sys
    • intelhaxm_x86.cat.win7_64 rename -> intelhaxm_x86.cat
  7. The key step: rename file intelhaxm_x86.cat to IntelHaxm_x64.cat. (Because file reference CatalogFile.ntamd64=IntelHaxm_x64.cat in intelhaxm.inf is actully IntelHaxm_x64.cat instead of intelhaxm_x86.cat)

  8. Open a command window with Administrator privilege and run sfc /SCANNOW and then reboot the machine
  9. After windows up, open a command window with Administrator privilege in that <android-sdk>\extras\intel\Hardware_Accelerated_Execution_Manager\intelhaxm-android\hax64 folder and run this command to install the driver HaxInst64.exe /i intelhaxm.inf 1, there should be no ERROR reported.

  10. run this command to verify that it is working sc query intelhaxm, it should return with a state of 4 (Running)

  11. Try to run AVD manager.exe in <android-sdk> to start your device simulator to check if works.

That's all.

Reference: FIX HAXM 1.1.1 on Windows 7 64bit

base64k
  • 101
  • 1
  • 4
0

I had the same issue with Android SDK 24.0.0 rc3. Turned out it has nothing to do with HAXM but SDK Tools which don't get the correct version.

I then downloaded SDK command line tools 24.4.1 from https://developer.android.com/studio/index.html#downloads and copied all the files over my existing SDK (which was installed with Android Studio last week (android-studio-bundle-143.2915827-windows.exe)). Fun is, that Android Studio is not listing this update in the SDK Manager and says 24.0.0 rc3 is up-to-date.

After that launching an Emulator works with the SDKs default AVD Manager (located in the SDK root), but not from Android Studio. Android Studio still says my HAXM is out of date, it obviously does not recognize the correct version 6.0.1.

Please not that i'm not an Android Expert and have not yet tested any side-effects of the quick-and-dirty SDK Update. Maybe a fresh install of a seperate Android Studio and Android SDK is better.

Hope it resolves your issue as well.

B. Eda
  • 26
  • 1