Intel HAXM - HAX version is too old - android

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?

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.
Select Computer and Mouse right click menu, Properties->Driver Manager
Menu View->Show hidden devices, in the tree category Non-Plug and Play Drivers, find the IntelHaxm and uninstall the driver if found it.
Remove old intelhaxm driver folder: C:\Windows\System32\DRVSTORE\intelhaxm_579C88F702D572C10DF6C9F1668B2077995F4354
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
Go into the extracted folder intelhaxm-android and again, use 7-zip extract the hax64.msi to folder hax64
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
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)
Open a command window with Administrator privilege and run sfc /SCANNOW and then reboot the machine
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.
run this command to verify that it is working sc query intelhaxm, it should return with a state of 4 (Running)
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

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.

Related

/dev/kvm is not found on Mac OS

I recently updated my Macbook pro to Mac OS High Sierra. Now I'm running into an issue where I can no longer start the emulator in Android Studio.
The warning /dev/kvm is not found. is shown. When I tried to start the emulator I get the following error:
I tried different versions of Intel HAXM from the SDK manager and standalone, reinstalling Android Studio and completely removing all configurations, still the same issue..
Go to:
System Preferences > Security & Privacy > General
There should be a message like “System software from developer xxx was blocked from loading.”
Click Allow
To use VM acceleration on a Mac, you must install the Intel HAXM kernel extension to allow the emulator to make use of CPU virtualization extensions. Android Studio requires Mac OS X 10.8.5 or higher, up to 10.11.4 (El Capitan) Mac OS X; the kernel extension is compatible with Mac OS X 10.6.0 and higher.
To install the Intel HAXM kernel extension, follow these steps:
Open the SDK Manager.
Click the SDK Update Sites tab and then select Intel HAXM.
Click OK.
After the download finishes, execute the installer.
For example, it might be at this location:
sdk/extras/intel/Hardware_Accelerated_Execution_Manager/IntelHAXM_version.dmg.
To begin installation, in the Finder, double-click the IntelHAXM.dmg file and then the IntelHAXM.mpkg file.
Follow the on-screen instructions to complete the installation.
After installation finishes, confirm that the new kernel extension is operating correctly by opening a terminal window and running the following command:
kextstat | grep intel
You should see a status message containing the following extension name, indicating that the kernel extension is loaded:
com.intel.kext.intelhaxm
Reference
It seemed to be an Intel HAXM issue. I resolved it by completely removing Intel HAXM.
Then I followed this guide, which basically makes you edit the install script of HAXM so the silent installation will work on Mac OS High Sierra.
I found the answers provided by #AresDev & #ShubhamJain to be super helpful for the uninstallation & re-installation of HAXM, but in my case it still didn't resolve the /dev/kvm not found errors I was seeing. My Mac OS High Sierra was blocking the AVD / Intel extensions from running correctly, and I had to Allow it under System Preferences > Security & Privacy > Allow.
However, the Allow button doesn't respond in some situations! I had to quit Google Chrome, before could click Allow, as described in these posts: "Github Karabiner Elements Issues"

Intel HAXM on macOS high sierra (10.13)

Is there any way of using Android emulator on High Sierra (10.13)?
When I run
./HAXM\ installation -u
It says:
HAXM silent installation only supports macOS from 10.8 to 10.12 !
The command line installation doesn't work and gives unsupported mac os version error, while the installation through IntelHAXM_6.2.1.mpkg works but kext is not loaded due to "Approved Kernel Extension Loading" changes,
So you will need to allow the extensions from Intel and restart your mac,
then launch the emulator like from inside Android Studio,
To enable go to System Preferences > Security & Privacy as shown in the screenshot:
I was able to install Intel HAXM drivers on my Mac using the instructions provided in this post. There might be other (better) solutions to this, but I have successfully managed to start the emulator this way. Essentially you need to disable the security protection on kext before trying to install the HAXM drivers.
This command will only work on Recovery OS, which means that you need to restart your Mac and hold command + R until the Apple logo is displayed. Next, you need to go to Utilities > Terminal and run:
csrutil enable --without kext
Then restart your Mac and log in, go here to download the latest Intel HAXM driver. Unzip if needed, edit the silent_install.sh file and search for the 10.12 OS version. You will find it on the line which should look like this
for v in 10.8 10.9 10.10 10.11 10.12
You need to add the 10.13 version after 10.12 (separated by space, just like the rest). Save the file and open a Terminal at this location. Run ./silent_install.sh and that should be it. To be sure it works, you can also run sudo kextload -bundle-id com.intel.kext.intelhaxm.
Now your emulator should work.
In order to re-enable the kext security protection, you need to restart your Mac in Recovery OS, open a Terminal window and run csrutil enable.
Intel Corporation just fixed it and released HAXM for macOS Sierra and macOS High Sierra, just download the ZIP and execute the .dmg file, then restart Android Studio. It worked for me, hope it works for you too.
Intel Link for the download : https://software.intel.com/en-us/android/articles/intel-hardware-accelerated-execution-manager-end-user-license-agreement-macosx
Use the new Hypervisor.Framework support on macOS.
Add this line in ~/.android/advancedFeatures.ini (create this file if it doesn't exist already).
HVF = on
Issue answered here:
https://issuetracker.google.com/issues/62395878#comment7
That's worked for me.
Also you can be updated with Intel HAXM as they fixed this error.
Download HAXM latest version here (Restart macOS Required):
https://software.intel.com/en-us/android/articles/intel-hardware-accelerated-execution-manager-end-user-license-agreement-macosx
Hope it help.
To verify that Intel HAXM is running, open a terminal window and execute the following command:
kextstat | grep intel
If Intel HAXM is operating correctly, the command will show a status message indicating that the kernel extension named com.intel.kext.intelhaxm is loaded.
Try to stop and stat again HAXM., than verify it works correctly.
To stop Intel HAXM, use the following commands:
sudo kextunload -b com.intel.kext.intelhaxm
To start Intel HAXM, use the following commands:
sudo kextload -b com.intel.kext.intelhaxm
You can use Google's 6.2.1's silent_installer.sh to properly install HAXM on High Sierra:
https://dl.google.com/android/repository/extras/intel/haxm-macosx_r6_2_1.zip
Otherwise use Android Studio's SDK Manager to download and install it for you:
This was not introduced until 6.2.1(Google Distribution only) which looks like a hotfix from the 6.2.0 version which would throw the following message:
HAXM silent installation only supports macOS from 10.8 to 10.12!
If you don't want to use HAXM, you can use the Hypervisor.Framework by ensuring you have installed Android Emulator 26.1.3
Documentation
The emulator is now fully compatible with macOS 10.13 High Sierra through either Hypervisor.Framework or HAXM 6.2.0.
https://developer.android.com/studio/releases/emulator.html#26-1-3
Try using Hypervisor.Framework as mentioned in this post.
https://issuetracker.google.com/issues/62395878
If you have already installed the latest Intel HAXM Manager (v6.2.1) then re-install it and restart your computer. It will fix the emulator problem. You will be able to run emulators again. Here is the link:
https://software.intel.com/en-us/articles/intel-hardware-accelerated-execution-manager-intel-haxm
Download this https://software.intel.com/en-us/android/articles/intel-hardware-accelerated-execution-manager-end-user-license-agreement-macosx
and install .dmg then restart pc.This worked for me.
I had to go to System Preferences > Security & Privacy, click the unlock button, and a message will pop up asking to allow Intel to run. After that, HAXM ran on High Sierra.
very specific case: if you keep android studio and sdk in separate partitions, and then you moved sdk to newly formatted partition, then in my case only uninstalling android studio and reinstalling it with new sdk is helped. sad story..

ERROR: resizing partition e2fsck failed with exit code 8

I'm new to android studio. When I try to run my first programme in android studio on the emulator, I get this error.
I have searched through other comments and have also tried decreasing my build.gradle from 24.0.0 to 23.0.3 as shown below, but it still doesn't work. I'm running on Nexus 5X API 23.
android {
compileSdkVersion 24
buildToolsVersion "23.0.3"
}
The error shown is:
Cannot launch AVD in emulator.
Output:
emulator: WARNING: userdata partition is resized from 756 M to 800 M ERROR: resizing partition e2fsck failed with exit code 8
Hax is enabled
Hax ram_size 0x60000000
HAX is working and emulator runs in fast virt mode.
emulator: Listening for console connections on port: 5554
emulator: Serial number of this emulator (for ADB): emulator-5554
I had the same issue after updating Android SDK tools package to version 25.2.2. To fix the problem i've restarted Android SDK Manager and then created new virtual device instead of using the old one.
I know this is an "old" question, but the following command solved the problem for me:
./emulator -data /sdk/path/here/system-images/android-API/default/x86/userdata.img -avd your_avd_name
where API is the api level you want to use. I found that this is only needed for API<20
Note: I had that problem with libstdc++, so I had to use the LD_PRELOAD envvar. I removed it in the example, so for me, the complete command looks like this:
LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libstdc++.so.6 ./emulator -data /home/username/Android/Sdk/system-images/android-API/default/x86/userdata.img -avd Whatever
I ran into the same type of problem after installing an update to one the SDK platforms, except my output log contained more than complaints. It contained a possible solution to the problem. See the log below.
emulator: WARNING: userdata partition is resized from 769 M to 770 MERROR: resizing partition e2fsck failed with exit code 8
Hax is enabled
Hax ram_size 0x40000000
HAX is working and emulator runs in fast virt mode.
emulator: Listening for console connections on port: 5554
emulator: Serial number of this emulator (for ADB): emulator-5554
Your emulator is out of date, please update by launching Android Studio:
- Start Android Studio
- Select menu "Tools > Android > SDK Manager"
- Click "SDK Tools" tab
- Check "Android SDK Tools" checkbox
- Click "OK"
Emulator Android_Accelerated_x86_Nougat is running.
Waiting for emulator to be ready...
Solution 1: Update the SDK Tools
Open Android SDKs and Tools window.
Go to the Tools tab (the name of this tab has changed).
Expand the Android SDK Tools group and make sure you select the
latest available version.
Click Apply Changes.
Possible problem with this solution:
You may run into a new problem by following this solution. When you run the emulator it will do a cold boot and ask you for a decryption password. If you don't provide the right password, it will display a black screen and then tell you that the decryption failed.
So this did not work in my case, but your mileage may vary.
Solution 2: Factory reset the emulator
I don't use Android Studio. I use Xamarin with Visual Studio. Installing the Xamarin Device Manager and doing a factory reset of the emulator is what fixed the problem for me.
You should have a similar option if you are using Android Studio. But if you would like to, you can try downloading and installing the Xamarin Device Manager by Microsoft. It's an independent application that does not require installation of Visual Studio or Xamarin.
The misleading ERROR: resizing partition e2fsck failed with exit code 8 when starting an Android Virtual Device (AVD) can occur when you have an old version of Android SDK installed, but without the Android Studio. The old standalone graphical SDK Manager is deprecated as of SDK Tools v25.2.3 - running it does not report any errors, but does not properly update your Android SDK.
Use the new command line SDK Manager ./sdkmanager --update to properly update your Android SDK and the e2fsck failed with exit code 8 problem will be gone.
More information: How to update Android emulator without Android Studio?
WARNING: userdata partition is resized from 756 M to 800 M
For this warning set Internal Storage = 756 MB
error warning will be removed.
Change disk.dataPartition.size to 756M in:
~/.android/avd/your_avd_name.avd/config.ini
I had the same issue, and tried everything that is suggested above, without success.
Being desperate, I tried every menu I could find in AVD. So, I came on "show on disk" menu, at the right of the line of my device, in AVD device list.
Android Studio opened an explorer window, and showed me a directory with a name not matching my device name... Probably because I had renamed my device in AVD, and Android Studio had not reported this change on disk.
So I deleted my device, created a new one with same parameters, verified that directory and name matched, and launched the device... and it worked!!!
Hope this will be helpfull to anyone...
None of the answers here solved my issue, but I did find this after searching for a while and it solved my issue. If all else fails, check out the answer here:
Emulator: ERROR: resizing partition e2fsck failed with exit code 1

Android Studio 2.1.3, intel haxm issue, Android studio doesn't recognize uninstalled intelhaxm

Android studio won't react to "uninstalled" Haxm . It keeps showing the message "Virtual machine acceleration driver is out-of-date. Reinstall inter Haxm."
On my windows 7 machine, I recently installed Android Studio 2.1.3. In SDK manager I also first installed intel haxm installer 6.0.3. However when I open AVD manager to create virtual device the error occurs - "Virtual machine acceleration driver is out-of-date. Reinstall inter Haxm.".
I tried -
1) I tracked the intelhaxm.exe file under the sdk folder and ran installation with administrative rights. Result = Same error message appears.
2) I uninstalled intelhaxm installed by SDK manager. Obtained the IntelHaxm installer from the Intel site and manually installed it. Result = Same error message appears.
Note: Curiously under the Registry, HKEY_LOCAL_MACHINE->Software->HAXM->HAXM, I see Haxm binery data value "0" but I expect it to be "1"!
3) After frustrated 3 days with no help by googling, I uninstalled the intelhaxm. EVEN THEN, the same error message appears in the AVD manager. when I have none intelhaxm installed, how can it report "Intelhaxm is out-of-date, reinstall" ?
Is the AVD manager not looking at the intelhaxm on my system at all? Is it a Haxm problem? or it is a Android Studio problem?
"Help is need desperately".

Cannot launch AVD in emulator. Please ensure Intel HAXM is properly installed and usable [duplicate]

This question already has answers here:
Error in launching AVD with AMD processor
(19 answers)
Closed 6 years ago.
I am getting this error when i tired launching the emulator. Any suggestions?
Cannot launch AVD in emulator.
Output:
emulator: WARNING: VM heap size set below hardware specified minimum of 128MB
emulator: WARNING: Setting VM heap size to 384MB
emulator: ERROR: x86 emulation currently requires hardware acceleration!
Please ensure Intel HAXM is properly installed and usable.
CPU acceleration status: HAXM must be updated (version 1.1.4 < 6.0.1).
After downloading the Intel HAXM from the android studio, you need to install it. Run the setup from Users*name*\AppData\Local\Android\sdk\extras\intel\Hardware_Accelerated_Execution_Manager\intelhaxm-android.exe
Sadly, this can be installed only on computers with Intel CPU's, so you must have an Intel to run the Android Studio emulator.
Have you tried reinstalling Intel HAXM? To do that follow these steps.
1) Open SDK Manager and Download Intel x86 Emulator Accelerator (HAXM installer) if you haven't.
2) Now go to your SDK directory (C:\users\username\AppData\Local\Android\sdk, generally). In this directory Go to extras > intel > Hardware_Accelerated_Execution_Manager and run the file named "intelhaxm-android.exe".
3) Restart Android Studio and then try to start the AVD again.
It might take a minute or 2 to show the emulator window.
See this link
or this (for Windows, see link for Mac/Linux):
Configuring VM Acceleration on Windows
Virtual machine acceleration for Windows requires the installation of the Intel Hardware Accelerated Execution Manager (Intel HAXM). The software requires an Intel CPU with Virtualization Technology (VT) support and one of the following operating systems:
Windows 7 (32/64-bit)
Windows Vista (32/64-bit)
Windows XP (32-bit only)
To install the virtualization driver:
Start the Android SDK Manager, select Extras and then select Intel Hardware Accelerated Execution Manager.
After the download completes, execute /extras/intel/Hardware_Accelerated_Execution_Manager/IntelHAXM.exe.
Follow the on-screen instructions to complete installation.
After installation completes, confirm that the virtualization driver is operating correctly by opening a command prompt window and running the following command:
sc query intelhaxm
You should see a status message including the following information:
SERVICE_NAME: intelhaxm
...
STATE : 4 RUNNING
...
To run an x86-based emulator with VM acceleration:
If you are running the emulator from the command line, just specify an x86-based AVD:
emulator -avd
Note: You must provide an x86-based AVD configuration name, otherwise VM acceleration will not be enabled.
If you are running the emulator from Android Studio, run your Android application with an x86-based AVD:
In Android Studio, click your Android project folder and then select Run > Edit Configurations...
In the left panel of the Run/Debug Configurations dialog, select your Android run configuration or create a new configuration.
Under the Target Device options, select the x86-based AVD you created previously.
Run your Android project using this run configuration.
You can adjust the amount of memory available to the Intel HAXM kernel extension by re-running its installer.
You can stop using the virtualization driver by uninstalling it. Re-run the installer or use the Control Panel to remove the software.
You need to have the latest version on intel haxm driver installed. You seem to have version 1.1.4 and the latest one is 6.0.1
Here is the direct link to download and install https://software.intel.com/en-us/android/articles/intel-hardware-accelerated-execution-manager
enable VT-x for your system, get the latest version of haxm here https://github.com/intel/haxm/releases/tag/v7.4.1 update and u are good to go.
(Or you can use the SDK manager to install it like the other answer suggests)

Categories

Resources