How to run HAXM on Mac OSX Hight Sierra - android

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

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"

AVD emulator not working on android studio 2.3.3

Ive just installed Android studio on my ubuntu machine and I cant get the emulator to work
Looking at similar questions i ran the commands sudo apt-get install lib64stdc++6:i386 and sudo apt-get install mesa-utils
but in the directory /Android/Sdk/emulator the folder lib64 doesn't even exist ( which it should according to all the other answers)
Another Solution that was given was to go to The AVD manager and to then set the emulated performance to software but as shown below that option is greyed out in my machine
Picture of emulated performance greyed out
Thanks in advance
Reboot to your BIOS and enable Intel HyperV or Virtualization Technology whatever is listed there. AVD requires virtualization to be enabled from BIOS to take advantage of performance enhancements provided. So enabling Virtualization Technology would surely enable Emulated Performance.

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

waiting for target device to come online Android Studio 2.3.3

I am running android studio 2.3.3 on ubuntu Gnome 17.04 when running the android app on the emulator it gives timeout error after "waiting for target device to come online", Actually the emulator doesn't start even when trying to start it alone from the AVD manager. I tried all the solutions in the following links but still not working.
Waiting for Target Device to Come Online
Android Studio Waiting for Target Device to Come Online Linux Mint 18
Android Studio Waiting for Target Device to Come Online Linux Mint 18
Note: The app is working on a physical device
Here are some screenshots from android studio:
Try creating a new AVD with different API and also use the recommended ones for better support for API's .
Hope this helps
The emulator now starts and the problem was solved by locating lib64 folder since i am running ubuntu 64 bit. In my case, its located under ~/Android/Sdk/emulator/lib64. Then run the following commands in terminal :
// Double Check to see if these are available
$ sudo apt-get install lib64stdc++6:i386
$ sudo apt-get install mesa-utils
// Navigate to the ~/Android/Sdk/emulator/lib64 folder
$ mv libstdc++/ libstdc++.bak
$ ln -s /usr/lib64/libstdc++.so.6 libstdc++
Source: How can I get more information about "Waiting for target device to come online" in Android Studio?
Using android studio on W10 had the same problem with the emulator tried all of the answers on StackOverflow: none worked for me until was playing with settings on Emulator, problem was because of OpenGL
Fix: the "More" button on emulator ----> Setting ----> Advanced
1- OpenGL ES Renderer: scroll to select Desktop Native OpenGL.
2- OpenGL ES API Level: scroll to select Compatibility OpenGL.

Intel HAXM installation Failed

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

Categories

Resources