37

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 !
Peter Cordes
  • 328,167
  • 45
  • 605
  • 847
Andrii Kovalchuk
  • 4,351
  • 2
  • 36
  • 31

11 Answers11

67

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:

enter image description here

Alexander Farber
  • 21,519
  • 75
  • 241
  • 416
Shaz
  • 958
  • 7
  • 9
  • When I click on allow nothing happens. Even after a restart. What can I do? – Felix Nov 09 '17 at 08:24
  • 2
    I selected the allow button by pressing tab multiple times and then "clicked" the button with space. It works now, lol. – Felix Nov 09 '17 at 08:32
  • @Felix - Same for me. Nothing happens. Were you able to fix the issue? – Cosmin Dec 18 '17 at 09:03
  • @Felix - It turns out that it doesn't work via ScreenShare or SSH, so you need to be physically at the machine and use a Keyboard and Mouse - https://github.com/tekezo/Karabiner-Elements/issues/1017 – Cosmin Dec 18 '17 at 09:20
  • @aeid, make sure that you installed HAXM through .mpkg file without issues – Shaz Dec 25 '17 at 07:00
  • FWIW, double-click on .dmg to see the .mpkg – ToolmakerSteve Apr 29 '18 at 14:49
  • 1
    So when I clicked allow nothing happens, but the installation eventually succeeds. So yeah, just gotta wait a bit. – b.lyte Oct 04 '18 at 18:59
  • Thank you very much, after searching for hours this was my solution! I've installed HAXM on Mac but it didn't work, AVD still said that HAXM was missing. After installation you can validate with `kextstat | grep intel`. If it returns nothing then something is wrong you need to allow Intel in Security and Privacy. – Skoempie Nov 29 '18 at 09:46
  • I don't even have that warning with the "Allow" button there... :( – Fran Marzoa Jul 27 '19 at 13:32
  • I just installed in Mojave and it appeared there, THANKS! – Daniel Gomez Rico Feb 10 '20 at 15:50
15

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.

Octavian Mărculescu
  • 4,312
  • 1
  • 16
  • 29
  • Great work around. Any thoughts about the implications of such change ? Why would Intel support "officially" up to 10.12 ? – Jalal El-Shaer Oct 10 '17 at 07:15
  • 1
    @JalalEl-Shaer I don't think there are any side effects of installing the HAXM drivers this way. It seems that the Intel guys need to remove a [workaround](https://issuetracker.google.com/issues/62395878#comment18) for an old bug in the XNU kernel which was fixed in 10.13. – Octavian Mărculescu Oct 10 '17 at 19:22
  • 1
    `csrutil enable --with kext` didnt work for me on 10.13. I had to run `csrutil clear` to reset SIP – Zayin Krige Oct 13 '17 at 10:18
12

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

kba
  • 19,333
  • 5
  • 62
  • 89
  • 2
    The kernel ext fails to install for me, end result is `/dev/kvm not found` when trying to install emulators. – mxcl Oct 14 '17 at 16:16
  • 1
    This worked for me as well, however I needed to restart macOS after installing the .dmg. Before restart I was getting HAX VM errors in the console when trying to launch the emulator. – rynop Oct 26 '17 at 18:29
8

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.

  • 2
    For some users the location for *advancedFeatures.ini* would be this `/Users//Library/Android/sdk/emulator/lib` – Jagjot Nov 01 '17 at 05:16
3

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
dieter_h
  • 2,707
  • 1
  • 13
  • 19
2

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

Jon Douglas
  • 13,006
  • 4
  • 38
  • 51
1

Try using Hypervisor.Framework as mentioned in this post.

https://issuetracker.google.com/issues/62395878

  • What is that and how do you use it? I looked at that post and didn't get much from it, other then what you just stated. – huey77 Oct 16 '17 at 22:21
1

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

Can Uludağ
  • 705
  • 8
  • 14
  • have you read the question? because the question is about how to install haxm on high sierra which doesn't satisfy haxm max installable os which is Sierra. ![](https://i.imgur.com/aM7GlWe.png) – nikoss Oct 06 '17 at 05:19
  • Yeap. It says it's not supported but re-install solved my issue. After updating to High Sierra, Android emulators stopped working. Then I re-installed the HAXM with the link above. Emulators started to work again. – Can Uludağ Oct 06 '17 at 07:59
  • I don't know how you did it but for me its just impossible to install and so for the author of this post as I understand. So we can't install it not that it fails working. – nikoss Oct 07 '17 at 02:00
1

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.

1

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.

Brent
  • 1,894
  • 1
  • 15
  • 17
  • Incomplete check answer from @Shaz – Lukas Oct 10 '18 at 07:49
  • It's not incomplete, as this is exactly how I fixed my issue. You might not like my answer, but it fixed my problem. – Brent Oct 18 '18 at 15:36
  • What I meant to say is you left out the part where in addition to the Unlock button you need to click the `Allow` button as well. – Lukas Oct 22 '18 at 06:49
1

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

Vilen
  • 5,061
  • 3
  • 28
  • 39