Android Emulator Hypervisor Driver Guide

Android Emulator
android-emulator-hypervisor-driver-guide
Source: Calbizjournal.com

Introduction

The Android Emulator Hypervisor Driver (AEHD) enhances the performance of the Android Emulator by utilizing the host machine's CPU capabilities. This driver is essential for developers testing and debugging Android applications on Windows. AEHD functions as a Windows driver, compatible with both Intel and AMD processors.

History and Evolution

Initially developed for AMD processors, AEHD now supports Intel processors as well. It is based on porting KVM (Kernel-based Virtual Machine) to Windows, leveraging virtualization extensions in modern CPUs. This evolution has made AEHD a versatile tool for developers across various hardware platforms.

Requirements

Ensure your system meets the following requirements before installing AEHD:

  1. CPU Virtualization: Your CPU must support virtualization extensions. Enable Intel VT-x for Intel processors or SVM (Secure Virtual Machine) for AMD processors in the BIOS settings.
  2. Operating System: AEHD supports 64-bit versions of Windows 10 and Windows 11. Windows 7 users can use AEHD version 1.7 or lower, though support for these versions is deprecated.
  3. Hyper-V: Hyper-V must be disabled in the Windows Features dialog. Certain Windows components, like Core Isolation offered by Windows Defender, can inadvertently enable Hyper-V without showing it in the dialog. In such cases, using the Windows Hypervisor Platform (WHPX) is recommended.

Installation Process

Follow these steps to install AEHD:

Step 1: Downloading the Driver

  1. Open Android Studio: Launch Android Studio and navigate to the SDK Manager.
  2. Select SDK Tools: Click on the "SDK Tools" tab.
  3. Download AEHD: Select "Android Emulator hypervisor driver" and click "OK" to download and install the driver.

Step 2: Installing the Driver

If not using Android Studio 4.0 Canary 5 or later, install the driver manually:

  1. Extract the Driver Package: Extract the downloaded zip file to a directory on your system.
  2. Run silent_install.bat: Open a Windows command console with administrator privileges, navigate to the extracted directory, and run silent_install.bat to install the driver.

Step 3: Verifying Installation

Verify that the driver is running correctly using the following command-line command:

bash
sc query aehd

The output should include a status message indicating that the service is running:

SERVICE_NAME: aehd … STATE : 4 RUNNING

If the driver is not running, check the installation logs for any errors and refer to the troubleshooting section below.

Troubleshooting Common Issues

Issue 1: Driver Not Running

If the driver is not running after installation, check the following:

  1. CPU Virtualization: Ensure that CPU virtualization is enabled in your BIOS settings.
  2. Hyper-V: Verify that Hyper-V is disabled in the Windows Features dialog.
  3. Driver Signing: For Windows 7 users, ensure that you are using version 1.7 of the driver as higher versions may not load due to SHA1 driver signing being deprecated.

Issue 2: BIOS Settings

If you encounter issues related to BIOS settings, follow these steps:

  1. Restart Your Computer: Restart your computer and enter the BIOS settings by pressing the delete key multiple times during boot.
  2. Enable Virtualization: Navigate to the CPU configuration section and enable virtualization (VT-x for Intel or SVM for AMD).
  3. Save Changes: Save the changes and exit the BIOS settings.

Issue 3: Hyper-V Components

If certain Windows components like Core Isolation are enabled, they can inadvertently turn on Hyper-V without showing it in the Windows Features dialog. In such cases:

  1. Disable Core Isolation: Disable Core Isolation offered by Windows Defender.
  2. Use WHPX: Use the Windows Hypervisor Platform (WHPX) instead of AEHD.

Configuring VM Acceleration

AEHD can be configured to work with either the Windows Hypervisor Platform (WHPX) or itself. Here’s how you can configure VM acceleration using each hypervisor:

Using WHPX

  1. Enable WHPX: From the Windows desktop, right-click the Windows icon and select "Apps and features."
  2. Turn Windows Features On or Off: Under "Related settings," click "Programs and Features," then click "Turn Windows Features on or off."
  3. Select WHPX: Select "Windows Hypervisor Platform" and click "OK."
  4. Restart Your Computer: Once the installation has finished, restart your computer.

Using AEHD

  1. Disable Hyper-V: Ensure that Hyper-V is disabled in the Windows Features dialog.
  2. Install AEHD: Install the AEHD as described in the installation process above.
  3. Verify Installation: Verify that AEHD is running correctly using the command-line command sc query aehd.

Final Thoughts

The Android Emulator Hypervisor Driver (AEHD) is a powerful tool for accelerating the performance of the Android Emulator on Windows. By following the steps outlined in this guide, you can ensure that your system meets the requirements and that the driver is installed and running correctly. Troubleshooting common issues related to BIOS settings, Hyper-V components, and driver signing will help you overcome any obstacles you may encounter during the installation process. With proper configuration and troubleshooting, you can achieve faster AVD performance and enhance your development experience with the Android Emulator.

Was this page helpful?