How to develop faster with Android: Don't hate the emulator
Christian Karasiewicz 270005XS4E Visits (14595)
This blog post is contributed by Virginijus Kaminas, a software engineer for a newly formed Mobile Center of Competency team for Industry Solutions. He has been a part of the Extreme Blue program and helped to develop Android/iOS applications which optimize Portal/WCM content consumption on tablet devices.
Android Virtual Device, more commonly referred to as AVD, is utilized by the emulator and allows you to define various useful configurations such as:
When the emulator and AVD are set up, and an application is finally ready for a test run, starting the emulator for the first time can be quite underwhelming. It just feels slow. The startup speeds can vary, and the simplest solution for this is to have the same emulator instance running at all times of testing.
What if you need to test an application against a different Android environment, where you might be required to change the version of the application programming interface (API) being used or enable camera support? The same process has to be repeated, and it can be somewhat slow at times.
In order to speed up the whole development and testing process I highly recommended using Intel x86 Hardware Accelerated Execution Manager (HAXM). HAXM provides extensions that allow for a more manageable running of virtual machines. Not everyone can take advantage of this feature; only specific CPUs that support the following technologies are eligible for this type of acceleration:
Here’s the list of all supported Intel CPUs: Virtualization Technology supported list.
I am a proud owner of a Windows 7 laptop with an Intel i7 CPU, which means I’m one of the lucky ones. If you happen to own a supported machine, here are the steps to install HAXM:
Step 1: Download HAXM through Android SDK Manager
If the installation fails there’s no need to panic. It could just mean that Intel Virtualization Technology (VT) must be manually enabled within the basic input/output system (BIOS) setup utility.
In order to enable VT for Lenovo laptops, complete the following steps:
For Lenovo ThinkPad W510:
For Lenovo ThinkPad W520:
If there are additional errors with the installation I recommend reading through Intel Installation Instructions.
Step 2: Install Intel x86 system image for Android emulator
If you experience any additional problems with this step I recommend referring to the Install Intel x86 System Image for Android emulator guide.
From my experience using HAXM I have noticed a considerable increase in the emulator execution speeds, and I would advise anyone who is focused on Android development to use this technology.
If you are already using HAXM feel free to comment. I’d be interested in seeing the steps you took to enable Virtualization Technology on your machine, as the steps seem to vary based on the manufacturer. You can also connect with me on Twitter @VKaminas.