Search code examples
androidandroid-studiointelvirtualizationhaxm

Android Virtual Device can't be started - Intel HAXM can't be installed


I'd really appreciate it if somebody could help. I pretty much did everything possible that I know. Still, I'm stuck with starting an AVD. When I try to start the virtual device I get the following warning

warning

I tried what it said and rebooted the system, but nothing changed.
I even tried to disable the Hyper-V from Windows Features as in this picture and restarted the windows and still, nothing changed.

picture
PS. The Virtualization Technology in BIOS is enabled.
Neither installing Intel® HAXM from the official website works

(Error Message)

nor installing it from Android Studio works

(Error message)

System Information

OS Name: Microsoft Windows 10 Pro
System Manufacturer: LENOVO
System Model: 80SM
System Type: x64-based PC
Processor: Intel® Core™ i7-6500U Processor
BIOS Mode: UEFI
Secure Boot State: On
Installed Physical Memory (RAM): 12.0 GB
Virtualization-based security: Running


Solution

  • Disable Hyper-V launch, remove all Hyper-V features and set Registry Keys to disable virtualization-based security:

    D:\> bcdedit /set hypervisorlaunchtype off
    
    D:\> dism /Online /Disable-Feature /FeatureName:Microsoft-Hyper-V-All /NoRestart
    
    D:\> reg add HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\LSA /v LsaCfgFlags /d 0 /f /t REG_DWORD
    
    D:\> reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Device Guard" /v EnableVirtualizationBasedSecurity /d 0 /f /t REG_DWORD
    

    Delete the Credential Guard and the VBS UEFI variables. To mount the UEFI partition determine an unused drive letter and set the environment Variable FREE_MOUNT_VOL_DRIVELETTER.

    D:\> set FREE_MOUNT_VOL_DRIVELETTER=L:
    D:\> mountvol %FREE_MOUNT_VOL_DRIVELETTER% /s
    D:\> copy C:\WINDOWS\System32\SecConfig.efi L:\EFI\Microsoft\Boot\SecConfig.efi /Y
    D:\> bcdedit /create {0cb3b571-2f2e-4343-a879-d86a476d7215} /d "DG" /application osloader
    D:\> bcdedit /set {0cb3b571-2f2e-4343-a879-d86a476d7215} path "\EFI\Microsoft\Boot\SecConfig.efi"
    D:\> bcdedit /set {bootmgr} bootsequence {0cb3b571-2f2e-4343-a879-d86a476d7215}
    D:\> bcdedit /set {0cb3b571-2f2e-4343-a879-d86a476d7215} loadoptions DISABLE-LSA-ISO,DISABLE-VBS
    D:\> bcdedit /set {0cb3b571-2f2e-4343-a879-d86a476d7215} device partition=%FREE_MOUNT_VOL_DRIVELETTER%
    D:\> mountvol %FREE_MOUNT_VOL_DRIVELETTER% /d
    D:\> shutdown /t 0 /r
    

    At next boot time, this forces two prompts to disable Credentials Guard and virtualization-based security. Accept both with F3.

    Source Blog by Michael.