Android virtualization with Genymotion and VirtualBox

Slashdot it! Delicious Share on Facebook Tweet! Digg!

Real Alternative

The alternative Genymotion Android emulator lets you test a self-developed app under real conditions.

Being able to test their home-grown Android apps as comprehensively as possible would be a boon to every app developer. Hobby developers and beginners have a hard enough time keeping their Android systems, in all their myriad forms, in check. That's why Google has for some time provided in its Android SDK an emulator [1] for desktop PCs that captures various Android versions, CPU architectures, and displays (Figure 1).

Figure 1: The Android emulator can only be used for experimentation because of its sluggishness.

Not only developers but also users can benefit from a virtual Android on their system. Users are constantly looking for ways to capture an Android phone in a window. They can then safely test apps, play their favorite phone game, or find out which not readily available app can work on a tablet.

Lame Emulator

The official emulator, however, suffers from a series of limitations. For one thing, the emulator is sluggish – even if it's now possible to use the host CPU. For another, the emulator system never includes the Google Framework. Maps, Chrome and, of course, the Play Store aren't readily available from the emulated system, and subsequent app installations from Google Market aren't possible.

The AndroVM [2] open source project has long been available as an alternative. Based on work in Android x86 [3], which made Android runnable on conventional PC architectures, AndroVM ported Android to a virtual machine with help from VMware or VirtualBox. The virtualized Android was then already running quite a bit faster than the emulator from the SDK.

In the meantime, AndroVM has developed into a commercial project, known as Genymotion [4], which is still a cost-based version of the Android VM. Additional developer features are to be added later, which can be unlocked based on purchasing a license. For now, Genymotion remains available to any interested user.

Thanks to OpenGL support, the virtual Android in Genymotion runs practically as fast and smoothly on the PC as is expected on the smartphone itself. The prerequisites are a reasonable current PC and an OpenGL-capable graphics card with the associated drivers (see the "Genymotion: System Prerequisites" box).

Genymotion: System Prerequisites

  • OpenGL 2.0-capable graphics card
  • VT-x or AMD-V capable CPU with a minimum 2GHz
  • 2 GB RAM
  • 2 GB storage

Installing Genymotion

You can obtain the virtual Android as Genymotion after a free registration on the project homepage. Downloads are available for Windows, Mac OS X, and Linux. For Windows, there's also a version that includes VirtualBox [5]. For Linux, you need to install VirtualBox before starting Genymotion from the repository of the distro used.

To run Genymotion with Linux, the developers provide various downloads. A unified binary archive exists for 32-bit or 64-bit Ubuntu, Fedora, and Red Hat. The project has another archive for 64-bit Debian, for which you should also integrate the libpng3 package. As of yet, no DEB or RPM packages are available for installing Genymotion through the package manager. You can install the software with Arch Linux from the Arch User Repository (AUR) [6].

To install from binary packages, set the execute bit with chmod and call up the self-extracting archive. This unpacks all files in the genymotion directory into the current folder, where you'll also find the program executables.

Genymotion puts the downloaded OVA images and active virtual machines into the ~/.Genymotion folder. The tool links the active machines automatically with the VirtualBox installation so that the Android VMs are available in VirtualBox. At this point, you can make fundamental changes to the virtual machines. However, if you start an Android VM from VirtualBox, the Genymotion menus will be missing.

Buy this article as PDF

Express-Checkout as PDF

Pages: 2

Price $0.99
(incl. VAT)

Buy Ubuntu User

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content