Accelerating Android Emulators with HAXM
- PDF for offline use:
This guide explains how to install and configure the Intel Hardware Accelerated Execution Manager (HAXM) to make the Google Android Emulator run faster.
Out of the box, the Google Android Emulators are prohibitively slow, to the point of being near unusable. As such, several technologies are available to significantly speed them up so that they can be used effectively. In general, we support three techniques that you can use to improve Android emulation performance:
Xamarin Android Player – Our new Xamarin Android Player runs with hardware-virtualization on your Windows or Mac desktop to give your apps the shortest startup time and best possible performance through hardware-virtualization and hardware-accelerated graphics. This is our recommended way to run Android in a virtualized environment. For information about how to install and configure Xamarin Android Player, see Xamarin Android Player.
Intel HAXM Drivers – The Intel Hardware Accelerated Execution Manager (HAXM) Drivers provide hardware acceleration for x86 based Android SDK emulators on Intel VT-enabled sytems. The HAXM drivers, published by Intel, are free to use.
Note: Running HAXM simultaneously with VirtualBox (Xamarin Android Player uses VirtualBox) can cause stability issues. Both can coexist on the same machine, but it is best not to run a HAXM-based emulator at the same time as a VirtualBox emulator.
This guide provides detailed information about how to install and configure the Intel HAXM drivers to make the Google Android Emulator run faster. If you plan to exclusively use the Google emulators, you should install these drivers. However, you are strongly encouraged to use the Xamarin Android Player instead.
Setting Up Your Google Android Emulator with HAXM
Launch Xamarin Studio.
From the Tools menu, choose Open Android SDK Manager:
In the SDK Manager, make sure you have installed the x86 Atom System Image for the desired Android SDK version. If needed, select it and install the package, agreeing to the license as needed. The image will download and install:
At this point, you can build x86 Android Virtual Device versions by selecting the appropriate CPU/ABI choice when creating the device, but they will not be accelerated. If you have any Android Virtual Devices running, close them before continuing.
From the Intel website, download the latest HAXM virtualization engine. If you are running Mac OS X 10.9 Mavericks or Windows 8.1, you will want the appropriate hotfix version that corrects issues on these systems. While the links appear to have been temporarily removed, they are still accessible directly from the original links: HAXM hotfix for OS X 10.9 and HAXM hotfix for Windows 8.1.
Install the HAXM engine, following along with the dialogs:
If you haven't already created an x86 Android Virtual Device, do so now from the Android Virtual Device Manager (accessible in Xamarin Studio from the Tools menu by selecting Open Android Emulator Manager). Use the following template to create an x86 Android Virtual Device:
After you have a device defined, in the Virtual Device Manager, select it and click Start. Adjust any launch options and launch it. After several seconds, your accelerated Android Virtual Device will be running.
From Xamarin Studio, deploy your project and pick your new x86 emulator device as the target:
If you are using Xamarin Studio with Configuration: Debug selected, the ABIs list will be greyed out as shown below and all options (including x86) will automatically be supported. If you are testing a Release configuration, ensure that the x86 checkbox under Options > Build > Android Build > Advanced is ticked.
If you are using Visual Studio, set the project to support x86 by selecting the x86 checkbox under Project > Properties > Application > Supported Architectures, as shown below:
Now your Android emulator will run much faster! For information about deploying your app to the emulator, see Deploy and Launch an Application.
This guide explained how to improve Android emulation by installing and configuring the Intel Hardware Accelerated Execution Manager (HAXM) to make the Google Android Emulator run faster.