Friday, March 23, 2012

Android Emulation on x86 Machines

It was news to me that Android doesn't just work on ARM processors, but apparently it has been running on x86 machines for a while.

Now thanks to some wizardry from Intel, the performance has been significantly improved by taking advantage of virtualization. Although x86-based Android devices aren't going to take over the world anytime soon, this does mean that we now have a viable Android emulator to use on the desktop.


The instructions are here and I suggest you follow them all. The only sticking point is if your machine supports Virtualization Technology or not. You can find that out by checking Intel's list or running their processor information tool. Even my budget ACER i3 laptop has it:

Then you need to run the Android SDK Manager and download version 17 of Android SDK Tools and the x86 system image:

One limitation is that the only AVD image available at the moment is for Android 2.3.3, but (depressingly perhaps) that covers 95% the devices out there. There is also an Intel configuration tool (in the Extras section) that you must install and run (see the aforementioned instructions). Note that the virtualization manager is memory hungry (I recommend a 2GB allocation), but RAM is so cheap that maxing out my laptop to 8GB only cost about £30 (it's the best investment you can make).

When you next open Android AVD Manager, you should be able to create a new x86-based VM:

Configure to your hearts content and launch...

You should find it a much faster experience than the ARM emulator and identical for Java-based applications. I'm not sure if NDK applications would work the same - comments welcome!

The possibility of developing applications completely on one machine really lowers the barrier to entry.

No comments: