Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android SDK's Intel HAXM disabled after installing Hyper V

I'm developing a suite of mobile apps - specifically Windows Store/Mobile 8 and Android.

Having installed VS2012 and then Monodroid, I was then able to start x86 Android images in the emulator and take advantage of the Intel HAXM acceleration (emulator output confirms HAXM working) to make the VM buttery-smooth.

I then installed the Windows Phone 8 SDK - which enables the Hyper V role - and now the emulator says it can't find HAXM. I then uninstalled and tried to reinstall HAXM, but now it won't - saying that my processor doesn't support it.

The VT-x extensions are still enabled in the BIOS - so I'm thinking that Hyper-V has blocked the Intel HAXM from working.

Of course it's not a killer - but a non-accelerated Android image is considerably slower than one with HAXM enabled - anybody else encountered this problem? Googling isn't bringing up anything obvious...

Update (30th Nov 2012)

Per @alexw's suggestion I tried stopping & disabling Hyper-V; with a restart. It still doesn't work.

I realise the next step is probably to the Windows Phone SDK (and remove Hyper-V) and then try again - to confirm that it really is the presence of Hyper-V. At the moment this is less than convenient - but I'll try and do it soon and update.

like image 807
Andras Zoltan Avatar asked Nov 08 '12 09:11

Andras Zoltan


People also ask

Does HAXM require Hyper-V?

Windows phone emulator requires Hyper-V to run, but Android emulator in turn requires Intel Hardware Acceleration Manager (HAXM), which is intolerant to Hyper-V.

How do I fix HAXM is not installed in Android Studio?

Option 1: Go to Android SDK Folder --> Extra --> Intel and double click on HAXM installer and install it manually. Option 2: If you do not have latest version of HAXM then you can open sdk manager in android studio and download it.

How do I enable Intel HAXM?

Go to Android SDK Manager (Tools -> SDK Manager) and select SDK Tools. You will find the Intel x86 Emulator Accelerator HAXM installer listed here. Select it and click on OK.


3 Answers

The best thing you can do to get HAXM detect VT again, is turning the whole Hyper-V "Feature" off. Open "Control Panel -> "Programs" -> "Turn Windows features on or off" (under "Programs and Features") and locate "Hyper-V", uncheck, reboot.

Looks like Hyper-V and HAXM are mutually exclusive, which is kind of a nuisance, because you even need to reboot twice to enable or disable either feature.

like image 170
ofrommel Avatar answered Oct 17 '22 23:10

ofrommel


I was in your same case that needed to support Hyper-V and Intel HAXM. Disabling and enabling the feature and then restarting was overkill so I found an alternative solution.

You can create 2 boot entries, one for Windows with the regular configuration of Hyper-V enabled and another one with Hyper-V disabled. I logged in with the second one (Hyper-V disabled) and I was able to install Intel HAXM.

To accomplish this you need:

  1. Open a command prompt as Administrator
  2. Enter the command: bcdedit /copy {current} /d "Windows 8 - No Hyper-V"
  3. This will output an id with the format {GUID} that you need to copy it to use it in the next command.
  4. Enter the command: bcdedit /set { copied GUID of step 3 } hypervisorlaunchtype off

More details in this post.

like image 27
Ajadex Avatar answered Oct 18 '22 00:10

Ajadex


I had a similar problem installing HAXM on Windows 8. I did the following with no effect:

  • Disabled hypervisor using the instructions here (http://blogs.msdn.com/b/virtual_pc_guy/archive/2008/04/14/creating-a-no-hypervisor-boot-entry.aspx)
  • Double checked that processor supported VT-x and was enabled in BIOS (BIOS said "supported", but there was no option to turn it on
  • Verified that all Hyper-V services in control panel were stopped (and never automatically started)
  • Performed a complete shutdown and a cold boot up.

However, I tried installing VirtualBox after the above actions (VirtualBox installed fine) and created a new VM. Running the VM caused my machine to blue screen, but after the reboot HAXM installed fine. Perhaps running VirtualBox flips some sort of flag at the OS level to allow HAXM to install.

I was also running AVAST at that time, and according this (Running the new Intel emulator for Android), that may cause a problem. However, I didn't have to disable AVAST to get HAXM installed.

like image 40
k3v Avatar answered Oct 18 '22 00:10

k3v