3 easy steps for maximum performance for your Android emulator (Intel HAXM)

3 easy steps for maximum performance for your Android emulator (Intel HAXM)

First time users of Intel® HAXM can occasionally run into situations where they are not sure if their Android* emulator is in fact using HAXM technology. This article will provide the necessary steps to verify that you are in fact using HAXM technology.

Once you have Intel® HAXM for Android emulator installed on your system, the next step is to create an appropriate Android* Virtual Device (AVD) configuration using the x86 Android* images for the target API level.  We need to ensure the x86 image has already been downloaded inside the Android SDK manager.

 For example, for Android* "L" preview, open your Android SDK Manager and ensure the x86 image for "L" preview is installed.

Next, open the Android AVD Manager (located in android-sdk folder), create a new AVD configuration with CPU set to x86 as shown/highlighted below.

 Now, when you start this AVD configuration, you will see an indication that HAXM is working in a separate window with message "HAX is working and emulator runs in fast virt mode". Please see below.

Sometimes, you may not see this message confirming HAXM is working. This could be related to situations where there is a delay in showing the window/status. For example, if you choose to use a host camera in your AVD configuration, it will open another window asking you to pick which of the host cameras, which can delay the HAXM status message (or not show at all).

At any time, you can always run "sc query intelhaxm" in a command prompt (shown above), to check the current status of HAXM. The STATE should show "RUNNING" (shown in above screenshot).

In summary, even if you do not see the status "HAX is working…",  you can ensure you are using HAXM by checking the items below:

  • Make sure you are creating the AVD with an x86 image. AVD manager will not show the x86 option if you did not download those specific API level x86 images in SDK manager

  • Open a cmd prompt and run "sc query intelhaxm" for current status of HAXM. The STATE should say "RUNNING".

  • For an additional sanity check, once you have your emulator started, go to the Windows Task Manager, and look for a process nameemulator-x86.exe. If you do not find it, and instead find emulator-arm.exe, double check that your avd configuration is set to x86 as discussed.

You can always visually see the difference in performance with HAXM and without. It is unmistakable.

For more such Android resources and tools from Intel, please visit the Intel® Developer Zone

Source: https://software.intel.com/en-us/blogs/2014/10/20/how-to-ensure-you-are-using-intel-haxm-for-android-emulator

Digit.in
Logo
Digit.in
Logo