The Challenge with Android Development in the Cloud. And the Solution!

Android X-86No matter what you think about running development environments in the cloud, it is here to stay. From my own perspective, there are 2 drivers toward cloud based development: firstly, I work on a lot of different projects from diverse geographic locations and secondly, Learning Tree is rolling out a new one-day course initiative which requires practical exercises which run in the cloud. If you have had any practical experience with cloud based development you’ll know that it is simply a matter of converting your machine image into a virtual machine and deploying into the cloud. Or at least, it should be!

The Challenge

Cloud based development is indeed simple unless you need to work with Android! The Android emulator (which I’ve written about previously) is a great piece of kit but requires virtualization support from it’s environment. Virtualization support is hardware trickery which massively improves the performance of virtualized software. The problem in the cloud is that in most cases, it is impossible to access virtualization support from within a virtual machine.

To get the performance I need in a class-room environment, I have been using the x86 (Intel) based AVD images. These work really well but only if virtualization support is available. They need special drivers (the HAXM drivers) installing and in most virtual environments, that simply won’t work.

The Solution

The solution requires two elements: a cloud provider who supports nested virtualization and a different Android AVD solution. I have found it in the form of SkyTap and the Android X-86 project. SkyTap provides an option to enable nested virtualization which makes it possible to run one virtual machine inside another. This makes it possible to run the Intel AVD images in the cloud VM but to be honest it’s still painfully slow (typically taking about 3 minutes to start an AVD instance). The second part of the solution lies in running an image from the Android X-86 project within Oracle’s VirtualBox virtualizer.

The Android X-86 project is an open-source project which has converted the Android source so that it runs directly within a virtualization engine supporting Linux. While it does not have all of the bells and whistles of the Android AVD in terms of hardware configuration and screen resolution it does provide a fast environment in which to test your code (or in my case, run exercises).

In a future post, I’ll show you step by step how to get up and running with Android X-86 in a virtualized environment.

PS – To learn more, have a look at our comprehensive 4-day course – Android Application Development & Programming.




Type to search

Do you mean "" ?

Sorry, no results were found for your query.

Please check your spelling and try your search again.