0

I am trying to run android emulator on android studio but it always kept prompting that haxm is not installed and always give option to install haxm and i installed it every time then it shows its successfully done then again when i run emulator it show haxm is not installed.

I tried every thing that I found on internet. But emulator is not starting it kept showing haxm is not installed but when i try to installed it show its already installed.

Syed John
  • 3
  • 1
  • Does this answer your question? [HAXM is not installed on this machine](https://stackoverflow.com/questions/45273905/haxm-is-not-installed-on-this-machine) – user21193451 Jul 17 '23 at 11:19

1 Answers1

0

I can not say what you did. Bu what is what I did for it to work. As admin from command prompt

  1. check if installed sc query intelhaxm

    [SC] EnumQueryServicesStatus:OpenService FAILED 1060:
    
    The specified service does not exist as an installed service.
    Service not installed, need to install
  2. install haxm-7.8.0-setup.exe. I downloaded from https://github.com/intel/haxm/releases

  3. check if installed sc query intelhaxm

SERVICE_NAME: intelhaxm
        TYPE               : 1  KERNEL_DRIVER
        STATE              : 1  STOPPED
        WIN32_EXIT_CODE    : 31  (0x1f)
        SERVICE_EXIT_CODE  : 0  (0x0)
        CHECKPOINT         : 0x0
        WAIT_HINT          : 0x0

It will say to stop Hyper-V if it works like this.

4.bcdedit /set hypervisorlaunchtype off The operation completed successfully. it will also ask to restart for disable operation to to take effect.

  1. restart Query againg for service state

  2. sc query intelhaxm

    SERVICE_NAME: intelhaxm
        TYPE               : 1  KERNEL_DRIVER
        STATE              : 4  RUNNING
                                (STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN)
        WIN32_EXIT_CODE    : 0  (0x0)
        SERVICE_EXIT_CODE  : 0  (0x0)
        CHECKPOINT         : 0x0
        WAIT_HINT          : 0x0
    From android SDK check
  3. Android\Sdk\emulator>emulator-check.exe accel accel: 0 HAXM version 7.8.0 (4) is installed and usable. accel After runnin an emulation with kernel logs

  4. I see in qemu logs 4 encounters

8.1. VERBOSE | CPU Acceleration status: HAXM version 7.8.0 (4) is installed and usable. 8.2. INFO | argv[16] = "-enable-hax" 8.3. INFO | Concatenated QEMU options: "lala;a-bla-bla-bla pstore.bin -cpu android64 -enable-hax 8.4. HAX is working and emulator runs in fast virt mode.

I hope it helps. p.s. someone I had to run emulator from Studio twice for it to kick in otherwise no issues...