36

After the SDK upgrade to Android 5, I cannot use the Intel Hardware Accelerated Execution Manager:

$ android-sdk-macosx/tools/emulator -avd AVD_for_LowMemoryDevice_by_User -netspeed full -netdelay none -gpu on
HAX is working and emulator runs in fast virt mode    
emulator: VCPU shutdown request

EAX=80000001 EBX=019a0000 ECX=c0000080 EDX=00000000
ESI=00013c40 EDI=01d9d000 EBP=00100000 ESP=004f6104
EIP=001000f0 EFL=00000002 [-------] CPL=0 II=0 A20=1 SMM=0 HLT=0
ES =0018 00000000 ffffffff 00c09300 DPL=0 DS   [-WA]
CS =0010 00000000 ffffffff 00c09b00 DPL=0 CS32 [-RA]
SS =0018 00000000 ffffffff 00c09300 DPL=0 DS   [-WA]
DS =0018 00000000 ffffffff 00c09300 DPL=0 DS   [-WA]
FS =0018 00000000 ffffffff 00c09300 DPL=0 DS   [-WA]
GS =0018 00000000 ffffffff 00c09300 DPL=0 DS   [-WA]
LDT=0000 00000000 00000000 00008200 DPL=0 LDT
TR =0020 00000000 00000fff 00008b00 DPL=0 TSS64-busy
GDT=     00000000004ea098 00000030
IDT=     0000000000000000 00000000
CR0=80000011 CR2=0000000000000000 CR3=0000000001d97000 CR4=00000020
DR0=0000000000000000 DR1=0000000000000000 DR2=0000000000000000 DR3=0000000000000000 
DR6=00000000ffff0ff0 DR7=0000000000000400
emulator: VCPU shutdown request

Any ideas as to how to fix it? (platform: OS X 10.10, java version "1.8.0_25")

Gabor
  • 7,352
  • 4
  • 35
  • 56
  • I'm having a similar problem. Perhaps its a new issue with Yosemite and HAXM? – cayblood Oct 21 '14 at 16:15
  • Anybody? I am having the same problem with Windows 8.1 64bit & Intel 64-bit image for Android L. – Shantanu Paul Oct 21 '14 at 18:10
  • 1
    @CarlYoungblood make sure to get the HAXM for 10.10 in the SDK manager download, it puts a dmg under your android-sdk-dir/extras/intel/ – Captnwalker1 Oct 21 '14 at 19:18
  • @Captnwalker1 I tried that, even with a full reboot, and the problem isn't fixed. – Gabor Oct 24 '14 at 09:13
  • 2
    Do you have an older CPU, e.g. a Core 2 Duo? I'm having the same problem, and it looks like it might be an issue with HAXM 1.1.1 not being able to run 64-bit images on older processors :( – Matt Gibson Nov 27 '14 at 21:23
  • well, you've read @florian's quote, you've been warned – Gabor Nov 28 '14 at 09:18

16 Answers16

22

I had the same issue when creating a Nexus 6 AVD with an x86_64 image and it appears the HAXM does not support that on an old Core 2 Duo (Mac Book Pro late 2009 for example).
This is specified in the Release note known issues in $ANDROID_SDK_HOME/extras/intel/Hardware_Accelerated_Execution_Manager.

HAXM driver does not support emulating a 64 bit system image on Intel systems based on Core microarchitecture (Core, Core2 Duo etc.). All systems based on Nehalem and beyond are supported. (Corei3, Core i5 and Core i7 machines).

grandouassou
  • 2,500
  • 3
  • 25
  • 60
9

Try the newest HAXM provide in Intel official site https://software.intel.com/en-us/android/articles/intel-hardware-accelerated-execution-manager-end-user-license-agreement-macosx ,now is 1.1.1.The one which from sdk manager is still old 1.1.0. it works for me.

  • 4
    it removes the crash but the emulator just hangs with a black screen – Gabor Oct 29 '14 at 12:18
  • I have Andrio Studio 1.5. It bundles HAXM newest 6.0.1 version. My PC is Windows 7 32bit with CPU core i3 but the problem still exists when I run with a Nexus 5 x86_64bit ADV. The problem is gone only when I change to x86, instead. – Scott Chu Dec 10 '15 at 15:11
8

It seems that the SDK manager automatically installs HAXM 1.0.8 instead of 1.1.0/1.1.1. To fix this, navigate to

<android-sdk>/extras/intel/Hardware_Accelerated_Execution_Manager

and reinstall HAXM by executing

$ chmod +x silent_install.sh
$ sudo ./silent_install.sh -u
$ sudo ./silent_install.sh

The emulator should boot properly now.

ubuntudroid
  • 3,680
  • 6
  • 36
  • 60
  • `./silent_install.sh -h` shows other flags, `-m` for specifying memory limit – karmakaze Apr 20 '15 at 22:38
  • Take care about the -m value. This value a total value for all the instances you can run at time. If you put 512Mb and try to run twice default VM (with default 512mb) you will got a laggy virtual devices or even fail, i didn't try to exhaust as i only run a VM each time. – m3nda Apr 24 '15 at 08:15
8

Upgrading to the latest HAXM may not be enough (current version to date is 6.0.1).

You can still begin with a HAXM update, but if you run an older CPU such as a Core 2 Duo, you should definitely choose an x86 version of your virtual image, not x86_64.

Yako
  • 3,405
  • 9
  • 41
  • 71
3

When I started my first wear emulator it was fine until today when after restarting my MacBook Pro I've experienced the crash VCPU shutdown request. The version of HAXM I'm using is 1.1.4. So I tried restarting, recreating emulator images... Nothing worked until I've reinstalled the HAXM driver using .dmg installer in /extras/HAXM... folder. Just FYI

Vito Valov
  • 1,765
  • 1
  • 19
  • 37
3

I recently upgraded to El-capitan os, and I've encountered same problem.

First, uninstall HAXM throughly.

sudo /Library/Extensions/intelhaxm.kext/Contents/Resources/uninstall.sh 
sudo rm /System/Library/LaunchDaemons/com.intel.haxm.plist

Second, reinstall HAXM with latest version. https://software.intel.com/en-us/android/articles/intel-hardware-accelerated-execution-manager

This solved problem for me.

Following is the link i referred to HAXM on OS X keeps on disappearing

Community
  • 1
  • 1
Jaeseok An
  • 58
  • 6
2

Solved! Apparently, I was using HAXM 1.0.8 which is the latest version that is available at Intel's site. However, Android SDK Manager downloads a preview version on HAXM 1.1.0 which is required to run 64bit images.

Shantanu Paul
  • 706
  • 10
  • 26
2

If you are using Android Studio 0.8.13 or older, then upgrade it to latest. This issue is fixed in 0.8.14 Release.

Kartihkraj Duraisamy
  • 3,171
  • 2
  • 25
  • 36
2

It works with the latest Android studio after upgrading the SDK component to:

Intel x86 Emulator Accelerator (HAXM installer), revision 5.2

Gabor
  • 7,352
  • 4
  • 35
  • 56
1

Solved the issue. You need to do these things:

  • Uninstall old HAXM: sudo /System/Library/Extensions/intelhaxm.kext/Contents/Resources/uninstall.sh
  • Disable kext signing: apparently HAXM 1.1.0 is not signed appropriately sudo nvram boot-args="kext-dev-mode=1". Reboot
  • Install the new HAXM 1.1.0 as usual (notice that if you don't disable kext signing, haxm will refuse to install with the error that VT/NX is disabled)
  • Add $ANDROID_HOME/tools/lib to your $LD_LIBRARY_PATH

API 21 AVD images work without a hitch for me now.

Source: http://www.csell.net/2014/09/03/VTNX_Not_Enabled/

Rohan Dhruva
  • 1,194
  • 1
  • 10
  • 20
  • this blog is about a different problem than what I asked about - I had "HAX is working" from the beginning - problem is just the runtime crash – Gabor Oct 29 '14 at 12:26
1

Try to reduce Memory Limit used by HAXM.

https://software.intel.com/sites/default/files/managed/86/82/ss-mac-3.png

This works for me.

Diego Bas
  • 11
  • 1
  • Damn! I thought this had worked for me, but actually it had just reduced the memory limit so much that my selected emulator wouldn't run under HAXM at all, so it had reverted to the slow software emulator. – Matt Gibson Nov 28 '14 at 08:01
1

1- Update HAXM Accelerator to revision 5.2 From your SDK Manager

2- Install the new Updated HAXM (no need to uninstall the previous) -> (Restart the System)

3- Make the AVD of Lollipop Using following Configuration.

enter image description here

hope this helps

Qadir Hussain
  • 8,721
  • 13
  • 89
  • 124
0

Now there is a new version HAXM 1.1.1 and it has a different version for Mac OS <10.9 and >10.9. enter image description here

satyajit
  • 1,470
  • 3
  • 22
  • 43
0

Updating HAXM from download manager worked for me. It's not downloaded automatically when you upgrade your system to android 5.x

0

if after the update it still doesn't works get a wipe data on your emulator and don't load it from snapshot because the problem is here, it's corrupted it just happend to me right now and iv got it solved this way

Khan Laoji
  • 19
  • 4
0

I had a similar issue when I booted a Vagrant VM simultaneously. It then sent a VCPU shutdown request. Also the Android emulator wouldn't boot when a Vagrant VM was running. I hope this could help anyone.

emulator: VCPU shutdown request

EAX=00000000 EBX=c085e000 ECX=01000000 EDX=00000000
ESI=00000000 EDI=c0860000 EBP=c085ffbc ESP=c085ffb4
EIP=c02065cf EFL=00000246 [---Z-P-] CPL=0 II=0 A20=1 SMM=0 HLT=0
ES =007b 00000000 ffffffff 00c0f300 DPL=3 DS   [-WA]
CS =0060 00000000 ffffffff 00c09b00 DPL=0 CS32 [-RA]
SS =0018 00000000 ffffffff 00c09300 DPL=0 DS   [-WA]
DS =007b 00000000 ffffffff 00c0f300 DPL=3 DS   [-WA]
FS =0018 00000000 ffffffff 00c09300 DPL=0 DS   [-WA]
GS =0018 00000000 ffffffff 00c09300 DPL=0 DS   [-WA]
LDT=0000 00000000 00000000 00008200 DPL=0 LDT
TR =0020 00001000 00000067 00008900 DPL=0 TSS32-avl
GDT=     0086a2c0 0000001f
IDT=     00000000 00000000
CR0=8005003b CR2=b6ec0004 CR3=3666b000 CR4=00000690
DR0=00000000 DR1=00000000 DR2=00000000 DR3=00000000 
DR6=ffff0ff0 DR7=00000400
emulator: Failed to sync vcpu reg
gustre
  • 81
  • 1
  • 4
  • It's a known problem: https://www.virtualbox.org/ticket/14294 (assuming you run vagrant via virtualbox which is the common practice) – Gabor Mar 03 '16 at 20:10