Intel HAXM installation Failed - android

I installed HAXM using Android SDK and it gave me an error of Not Installed while building. On maual installation, I get the following error. Can anyone help to figure out this?
Last login: Sun Jul 19 21:44:03 on ttys000
Tikas-MacBook-Pro:~ user$ /Users/user/Downloads/haxm-macosx_r05/HAXM\ installation ; exit;
2015-07-19 21:56:46.472 HAXM installation[779:65674] AuthorizationExecuteWithPrivileges failed with return: -60031
2015-07-19 21:56:46.472 HAXM installation[779:65674] HAXM installation failed!
logout
Saving session...completed.
[Process completed]

I just ran into this problem as well. I'm running Yosemite so the downgrading solution isn't pertinent. Eventually I decided to try running the silent_install.sh that's in the same dir as HAXM installation, and it worked.
Details
Open terminal window. (/Applications/Utilities/Terminal)
sudo ~/Library/Developer/Xamarin/android-sdk-macosx/extras/intel/Hardware_Accelerated_Execution_Manager/silent_install.sh
when prompted, enter sudo password.
wait a minute - says "Silent installation Pass!".
To verify success:
Open Google Android Virtual Device (AVD) manager.
Create a virtual machine with x86 or x86_64 as architecture.
Start that virtual machine - says "HAX is enabled", and Android Emulator window opens showing the emulated device.

NOTE: This answer is obsolete. Use adamvert's answer.
For anyone coming here, Preview Versions of Max OS X like El Capitan do not completely support all apps like the HAXM
Downgraded to Yosemite and it worked.

if the reason is that you upgraded to High Sierra 10.13 masOS
then : Do this on your own responsibility as I am not sure that it has no side effects
Download the HAXM-maxosx_v6_2_1
open the file silent_install.sh
go to the line :
for v in 10.8 10.9 10.10 10.11 10.12
add to it 10.13 if your os is High Sierra 10.13.xx
so it will be :
for v in 10.8 10.9 10.10 10.11 10.12 10.13
then run the silent_install.sh file as sudo
then it will pass :)

Related

Why won't the Android emulator run on macOS 10.14 Mojave or earlier?

Hopefully someone can help me with the following problem:
I installed Android Studio (Artic Fox, 2020.3.1. patch 3) on an fairly old MBP (mid 2012, i7, 16G, NVIDIA GeForce GT 650M 1024 MB, Intel HD Graphics 4000 1536 MB, High Sierra 10.13.6)
When i want to run my first app i get this message:
Error while waiting for device: The emulator process for AVD Pixel_XL_API_30 has terminated.
I searched on Stackoverflow for solutions and i found the following:
Error while waiting for device: The emulator process for AVD Pixel_3a_API_30 has terminated
Emulator always crashes with error "Error While waiting for device: The emulator process for AVD has terminated"
But both solutions did't work for me.
Can someone point me to the right direction.
Thank you.
To summarize from Arthur Wilton's medium post:
Recent versions of the Android emulator won't run on macOS before 10.15 Catalina. The AVD Manager alert might read, "The emulator process for AVD Pixel_2_API_29 was killed."
Arthur encountered this problem with emulator version 30.5.3.0.
As of this writing, the current release is 31.1.4.0.
Launching the emulator from Android Studio doesn't reveal error info but in this case it's because the new emulator requires the IOUSBHost library that Apple introduced in macOS 10.15.
You can get error messages and other information from the Android emulator from the command line:
emulator -version
emulator -list-avds
emulator -avd Pixel_2_API_29 # try to run the named AVD
(The emulator is typically installed in ~/Library/Android/sdk/tools/emulator on macOS. It might not be on your shell path.)
An obvious solution is to upgrade to macOS 10.15 Catalina or later. If you can't do that (staying on Mojave in order to run 32-bit apps?), Arthur's workaround is to download Android Emulator 3.4.5 from https://dl.google.com/android/repository/emulator-darwin_x64-7140946.zip, install it by unzipping it into ~/Library/Android/sdk/emulator, then editing the <revision> info in package.xml to trick Android Studio into thinking you have the latest emulator installed. Otherwise it'll try to upgrade it.

How to run HAXM on Mac OSX Hight Sierra

I have just updated my OSX to High Sierra. Since then My android Emulators don't run! I have deleted all the old emulators and created a new one. But it is too slow. It seems HAXM is disabled right now!
How can I enable and run HAXM?
HAXM is supported until mac OS 10.12. They have not support for mac OSX 10.13 yet.
Supported Operating Systems:
Mac* OS X* 10.10 (Yosemite) or higher, up to macOS* 10.12 (Sierra)
check here for more
1- Go to Recovery Mode by restarting and holding down ⌘+R until Apple logo appears.
2- In the top menu click Utilities > Terminal.
3- In the Terminal window type and press Enter:
csrutil enable --without kext
Then you can install HAXM from:
Download the driver from here and unzip it.
Open a terminal and go to the directory of the driver :
cd Downloads/haxm-macosx_v6_2_0
# edit the file and look for 10.12
Add 10.13 after 10.12, and save the file
Run it :
Make sure it works :
sudo kextload -bundle-id com.intel.kext.intelhaxm
See this post
here

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

Android Studio emulator doesn't work

I have just installed Android studio but when I try to run my app I get the following error message
emulator: ERROR: This AVD's configuration is missing a kernel file!!
emulator: ERROR: ANDROID_SDK_ROOT is undefined
I am using Ubuntu 12.04 LTS and I have an intel B960 ( I have read that this cpu doesn't support virtualization ).
I read many answers ( on stackoverflow too ), but it doesn't work:
I checked that $ANDROID_HOME/Sdk/system-images/android-MNC/default/armeabi-v7a exists and is not empty.
I installed ARM EABI v7a from the AVD Manager.
I installed KVM by using:
sudo apt-get install qemu-kvm libvirt-bin ubuntu-vm-builder bridge-utils
But then I get this:
# kvm-ok
INFO: Your CPU does not support KVM extensions
KVM acceleration can NOT be used
what other do I have to try ?
It looks like your emulator is trying to use a version of the SDK that you don't have installed. You could either change the SDK of the AVD, create a new AVD with a different SDK, or install the appropriate SDK, and make sure that your environment variable is set correctly.
But frankly, I wouldn't bother. Get the Genymotion emulator instead. The difference between it and the built-in emulator can not be overstated. The free version has everything you need for basic tests. There are other emulators available, and I've heard they're all better than Android Studio's, but I only have personal experience with Genymotion. I ran a test where I started the Android Emulator first, and then the Genymotion emulator, and I had booted the Genymotion emulator and completed my test suite long before the Android Emulator finished booting.

Categories

Resources