After upgrading my Macbook Pro to Yosemite beta version, i experienced some problems starting Android emulator because HAXM didn’t work anymore. It was really a problem, because the emulator was really slow and hanged for long time.
The first step i made was trying to re-install the HAXM. Even if the installation completed correctly and everything was compatible with HAXM requirement, at the end of the installation process i get i message explaining that the HAX installation couldn’t work properly.
I decided to find a solution on the net and finally i find out something that could help me. In this post i’d like to explain how i made HAXM working on Yosemite. Some fo these information are extracted from here.
The first step is to check why HAX module doesn’t work. Instead of starting the emulator from Android Studio, you can start it from the command line and set some parameters.
./emulator -avd your_avd -verbose
Using this command you start the emulator and it shows the logs on the stdout. If you take some time reading them, you can notice that after some lines describing the type of AVD you are starting and so on there is some lines like those shown below:
As you can see the log shows a message saying that is impossible to open HAX module even if it is installed correctly.
We can investigate more the problem, using the command kextload:
sudo kextload -bunlde-id com.intel.kext.intelhaxm
the result is shown below:
It doesn’t help us much, it just says it is impossible to load the module. The next step is using kextutil:
sudo kextutil -bunlde-id com.intel.kext.intelhaxm
It returns the information shown below:
Finally we found out the reason, it is a signature problem. I guess it is because this module isn’t certified for OS Yosemite.
HAXM Yosemite fix
We have to run this command to fix the HAXM problem under Yosemite:
sudo nvram boot-args="kext-dev-mode=1"
and then reboot.
Now re-install the HAXM module again and start the emulator we can notice from the log that we have:
The problem is fixed! Enjoy the fast emulator with HAXM