An update on Android emulators: Hyper-V and HAXM

An update on Android emulators: Hyper-V and HAXM

Hyper-V

Already around one year ago, I have already written about Hyper-V support for Android emulators.

During this year, a few things have been simplified, mainly thanks to the fact that everything comes automatically with the latest versions of Visual Studio and the Android emulators (so, no need anymore to switch to the Google repository).
You need only to remember to enable both Hyper-V and the Windows Hypervisor Platform. I report here the pictures from the previous blog post.

Adding-Hyper-V

Adding-Windows-Hypervisor-Platform

In the first releases, the Hyper-V emulators were significantly slower compared to the HAXM counterparts, but now they are really very fast and I don't see any significate difference compared to HAXM.

HAXM

And what if you want to test / compare with HAXM?
Ideally it would be enough to disable Hyper-V and the Windows Hypervisor Platform, right?
It seems that this is not always the case. I tried it and I got the following warning:

HAXM-warning

Essentially, when this happens to you, it is because even if Hyper-V is disabled, in reality it is still used.
By what? From the GitHub issue I have seen the following potential causes:

  • Disable Memory Integrity checks from Windows Security | Device Security | Core isolation details

    HAXM-memory-integrity-off

    After you download it, execute

    DG_Readiness_Tool_v3.6.ps1 -disable
    

This should completely disable Hyper-V. If not, you can read the Android emulator troubleshooting article.