How google/android-emulator-hypervisor-driver works
Project type and purpose
• This is a kernel-level hypervisor driver for Windows, originally forked from KVM, that accelerates the Android Emulator by exposing Intel VT-x or AMD SVM features to user-mode emulator code.
• It comprises a Windows kernel driver (AEHD – Android Emulator Hypervisor Driver) plus associated user-space install/packaging scripts.
File structure
Top-level files & folders:
• aehd/, aehd_main.c/.h, aehd_types.h, aehd_ver.h: MSVC solution & entry points for the driver.
• arch/x86/: KVM’s architecture-specific implementation (VMX/SVM, CPUID, MMU, LAPIC, APIC, PMU, paging, interrupt emulation).
• asmgen/: a small tool to generate assembly stubs or tables.
• assembly/x64/: assembly helpers for x64 build.
• /: shared headers (uAPI, Linux-KVM compatibility, KVM-host types).
• virt/kvm/: core KVM logic (VM creation, run loop, IRQ chip abstraction).
• package/: packaging script for building the driver installer.
• sign/: INF and DDF scripts for code signing and driver package creation.
• ntkrutils.c/.h: Windows kernel helper functions.
• .sln/.vcxproj: Visual Studio build artifacts.
README for additional insights
• Confirms: Windows driver, supports Intel and AMD VT extensions, integrates with Android Emulator user-space via an installer or manual driver install.
• Mentions packaging, silent install, Hyper-V must be disabled, target OS versions.
Elements
• Clear labels: “Android Emulator”, “AEHD Driver”, “KVM Core”, “Arch/x86 VMX/SVM”, “ASM Stubs”, “Windows Kernel APIs”, “Installer/Signer”
– From emulator to driver (IOCTLs)
– From driver into KVM Core & Arch modules
– From build scripts to final signed pkg
– Green for user-space components
– Blue for kernel modules
– Orange for build/packaging tools
– Grey for hardware