How to fix: "HAX is not working and emulator runs in emulation mode"

Question is

I get "HAX is not working and emulator runs in emulation mode", is this related to Intel x86 Emulator Accelerator (HAXM) installation and running avd with cpu set to CPU Intel Atom (x86)? And even though it feels like AVD runs faster after i installed HAXM, does this message indicates that AVD performance is hindered. Should it be fixed and if so, how?

I am running on mac os x 10.9.1.

Listing what is installed on my system via android sdk manager:

  • Tools
  • Android SDK Tools Rev 22.3
  • Android SDK Platform-tools rev 19.0.1
  • Android SDK Build-tools Rev 19.0.1
  • Android SDK Build-tools Rev 19
  • ==

  • Android 4.4.2 (API 19)
  • SDK Platform
  • ARM EABI v7a System Image
  • Intel x86 Ato System Image
  • Google APIs
  • Sources for Android SDK
  • ==

  • Extras
  • Intel x86 Emulator Accelerator (HAXM) AND I ALSO run dmg installer as well, and installed hot fix, after i found out about it.
  • AVD set up

  • Platform 4.4.2
  • API Level 19
  • CPU Intel Atom (x86)
  • Once i run avd:

    (ruby-2.0.0-p353) .android   $ tools/emulator -avd 1AVD -wipe-data -no-boot-anim -cpu-delay 0
    

    i get following and emulator eventually loads

    emulator: The memory needed by this VM exceeds the driver limit.
    
    HAX is not working and emulator runs in emulation mode
    

    Yes it should be fixed, HAXM isn't working. How much RAM is set for use inside your AVD configuration ?

    768M is a good number for it, but most importantly this number has to be lower or equal to the memory usage you have set during the installation of HAXM. You can launch its installation again to modify it.


    如果你在Mac上,你可以使用自制软件通过木桶来安装haxm ,这是一个内置的扩展(截至2015年),允许安装非开源和桌面应用程序(即chrome,firefox,eclipse等):

    brew cask install intel-haxm 
    

    The way I solved it is by setting the AVD memory limit and HAXM memory to be equal in size which is 1 GB = 1024 MB. The AVD cannot have higher memory limit than the HAXM.

    1. Setting the HAXM memory to be 1024 M

    The only way to change the HAXM memory is by installing it again. I did it using the terminal. Locate Hardware_Accelerated_Execution_Manager in your machine. Then change directory that folder to run the installation script.

    cd ~/Library/Android/sdk/extras/intel/Hardware_Accelerated_Execution_Manager
    
    -OR-
    
    cd ~/Library/Developer/Xamarin/android-sdk-macosx/extras/intel/Hardware_Accelerated_Execution_Manager
    

    May need to change permissions:

    sudo chmod 755 "HAXM installation"
    

    Then:

    ./HAXM installation -m 1024
    
    -OR-
    
    sudo ./"HAXM installation" -m 1024
    

    2. Setting the virtual device the same size with HAXM memory limit

    在这里输入图像描述

    This works for me. Good luck!

    链接地址: http://www.djcxy.com/p/90516.html

    上一篇: Android模拟器非常非常慢

    下一篇: 如何解决:“HAX不工作,仿真器在仿真模式下运行”