How to Run Android Apps in Linux with AndroVM

Orange Pi Development Boards

You may want to run some Android applications in your computer. If you’re using Windows, there’s already a decent option with Bluestacks. If you’re using Linux, you could always install the Android SDK and run the emulator, but I don’t really like this option because of the user interface, and for people who don’t need to use the SDK it’s not really the simplest thing to install.

The way to run Android apps in Linux is probably to run an x86 Android virtual machine in VirtualBox. Yesterday, I tried the latest development version of Android x86 4.2, but for some reasons I could not control the mouse, and had to perform all tasks with the keyboard. What I’m going to use today instead is AndroVM, an Android VM for x86 processor, that is even more easy to use than the Android x86 image. The instructions has been performed in a machine running Ubuntu 12.04 LTS 64-bit.

If it’s not installed already, you’ll first need to download and install VirtualBox for your Linux distribution. You could also install it with apt-get or yum, but downloading from VirtualBox.org ensures you have the very latest version.

Now download Android 4.1.1 AndroVM image.


Start Virtual Box, and in the top menu, click on File->Import Appliance, and click on Open Appliance to select androVM_vbox86tp_4.1.1_r6.1-20130222-gapps-houdini-flash.ova file and import it.

A new virtual machine should now show up in Oracle VM VirtualBox Manager

AndroVM_VirtualBox

Click on Start, the Android windows should appear in a few seconds, asking your language, to login with your existing Google Account or create a new one, and once the setup is all complete you should be able access the Android Home Screen, install apps via Google Play, and run them as you would one a tablet.

AndroVM

I’ve tried to install several applications such as Facebook, Bloomberg for Tablet, Antutu, Quadrant, Angry Birds Star Wars, Subway Surfers, etc.. and the installation process works fine. Apps that do not require 3D GPU power work just fine, and if you’re only planning to use this type of apps, you don’t need to do anything else.

However, none of the games will start, but this can (partially) be solved as AndroVM can support OpenGL. It’s just a bit more complicated to setup:

  1. Open a terminal to download and extract AndroVMPlayer.
  2. Enable “Host Only” network adapter in VirtualBox
    Click on File->Preferences->Network, and click on the green board (“+”) icon to add a network (e.g. vboxnet0)
    VirtualBox_enable_Host_only_adapter_network
  3. Setup AndroVM to use “Host-only” network adapter
    Click on AndroVM (now powered off), and click on the Settings button, access Network menu, and make changes to Adapter 1 to configure it to use an Host-only adapter. You should see the two fields below set to:
    • Attached-to: Host-only adapter
    • Name: vboxnet0

    Click OK.

  4. Start AndroVM, click on “androVM Configuration” app, enable “Hardware OpenGL”, and click “Save” to reboot the device.
  5. Back to the terminal to run ./AndroVMPlayer, select the resolution and virtual machine, and click on Run

    AndroVMPlayer_Configuration

  6. A new Android window with OpenGL acceleration should now start. Bear in mind that you must click “Run” before Android fully boots in VirtualBox. If it has already booted, stopped the Virtual Machine, restart it, and click on “Run” again in AndroVmPlayer.

Angry Birds is now playable, although not quite as smooth as on tablet, and audio is not working properly on my system. However, Subway Surfers won’t start at all, and Antutu and Quadrant benchmarks fail when running 2D/3D benchmark tests. Bloomberg for Tablet still runs, but the font is now much bigger, and it’s basically unusable. So it looks like OpenGL support is still very much work in progress, or my (low-end) Nvidia graphics card is not up to the job.

Finally, if you plan to use Android daily in your Linux PC, you may want to autostart AndroVM when Linux boots. I haven’t tried it myself (yet), but instructions to auto-start VirtualBox VM are available here.

36
Leave a Reply

avatar
36 Comment threads
0 Thread replies
0 Followers
 
Most reacted comment
Hottest comment thread
23 Comment authors
FranclinTop 10 Posts of 2013 and Stats on CNXSoft BlogAndroid-x86 4.4 Stable Released for x86 Computers, Laptops, Netbooks…Caballo de Troya: Aplicaciones Android en otros sistemas operativosSeb Recent comment authors
  Subscribe  
newest oldest most voted
Notify of
Dr. Azrael Tod
Guest

problem is that this is overly complicated…
Why doesn’t somebody just build a dalvikvm you could install on “normal” Linux?
It’s not like that would be some kind of huge task involving magic.

Like it’s currently, i’ve got an armhf-netbook (Toshiba AC100, Tegra2) running Linux and always know “it would be easy to run $android-thing if people weren’t full of shit”, while beeing unable to do so, without emulating X86 on ARMHF, to run half of the software what would run directly on ARMHF. -.-

Sander
Guest
Sander

Interesting; my ISP Telfort provides 3-play, including IPTV. You can watch IPTV on your TV (via a settopbox), on your iPad, on certain Android devices, and on your Windows PC. Not on Linux.

So I hope that with this tool I can run the Telfort IPTV-Android-app on Ubuntu. I’ll try it tonight.

For those interested: the Telfort Android app is here: https://play.google.com/store/apps/details?id=com.telfort.mobile.android&feature=search_result#?t=W251bGwsMSwxLDEsImNvbS50ZWxmb3J0Lm1vYmlsZS5hbmRyb2lkIl0.

onebir
Guest
onebir

@Dr. Azrael Tod
Canonical were making something like WINE for Andoid in about 2009, but it mysteriously died… (possibly because people are full sh*t 😉 )

Member

Dr. Azrael Tod :
problem is that this is overly complicated…
Why doesn’t somebody just build a dalvikvm you could install on “normal” Linux?
It’s not like that would be some kind of huge task involving magic.
Like it’s currently, i’ve got an armhf-netbook (Toshiba AC100, Tegra2) running Linux and always know “it would be easy to run $android-thing if people weren’t full of shit”, while beeing unable to do so, without emulating X86 on ARMHF, to run half of the software what would run directly on ARMHF. -.-

I’ve thought about working on such a thing, to be able to run Android stuff directly on Linux but it’s a lot of hard work. If people would pay for it I’d do it, and realease it to open source but as it is I have a job and a life.
So how much would you pay for Android on Linux ? 🙂

Andrew
Guest

To fix the mouse issue with VirtualBox and Android-x86 4.2, from the VirtualBox menu select: Machine > Disable Mouse Integration.

notzed
Guest
notzed

Installing 2 packages doesn’t seem too “complicated”?

I’m a little surprised it hasn’t been done yet, but then what’s the status of the x86 support in android? And being apache licensed, there isn’t much motivation for individuals to do it unpaid, it would really require some vendor support like redhat or canonical – but they have their own agenda.

zoobab
Guest

@cnxsoft

“Android is based on the Bionic C library, whereas Linux is based on glibc”

Multiple C libs can coexist on a system, no problem with that.

Who starts packaging dalvik?

ZC
Guest
ZC

@Marius

How about fundraising on Kickstarter? I’d be happy to put in a contribution and I’m sure, seeing the popularity of BlueStacks on Windows, many other Linux users would be happy to pitch in, especially as it could increase the number of apps dramatically.

Piledriver
Guest
Piledriver

@notzed
android-x86 is getting along quite nicely, having updated to the 3.8x Linux kernel, a LOT of hardware is supported already.

I’m still working on getting an x64 kernel going so I can run a full x64 distro in a chroot and Win8 in Virtualbox in the background.

Brian
Guest
Brian

@ZC

Great idea! I would definitely contribute $25! Anyone else?

zeddock
Guest
zeddock

Thank you for the virtual Android. I am trying to put some files on it for sharing but cannot figure out how to move them from Linux to the Android OS. Normally I woudl attach through USB, but obviously not really an option to the PC.

Can I share a folder?

Thanx!

zeddock

trackback

[…] applicaties en evetueel testen. Voor de 3D-games hoef je het niet te doen, ik heb de instructies hier gevolgd om OpenGL aan het werk te krijgen, maar dat was nog geen succes. Nu is het zo dat een hoop […]

trackback

[…] this very good score, the fastest ever recorded on ARM devices. It’s not quite as high as the ~91,000 points I got with my x86 PC, but this is more than enough to run any current mobile applications, as well […]

Dave
Guest
Dave

Thanks for the helpful and well-written article. I installed androVM on Kubuntu 12.04 LTS 64 bit. (I’m running a high end ATI graphics card with 3 monitors.) androVM is working great for me so far. I have not tried all my apps yet, but the ones I have tried are working very well. I don’t need OpenGL support right now, so I didn’t do those steps. The install was super easy!

Dave
Guest
Dave

I installed androVM on Kubuntu 12.04 LTS 64 bit. I am having trouble figuring out any way to share files with my host PC. I have been trying SFTP with ES File Explorer. However, the connection is refused. The strange thing is that no matter what values I use in VirualBox>File>Preferences>Network>vboxnet0, the IP Management string shown in androVM configuration app is always the same. It is eth0: ip 192.168.56.1 mask 255.255.255.0 flgas [up broadcast running multicast]. Given that the vboxnet virtual interface (on the host) has an IP address of 192.168.56.1, this doesn’t seem correct. I changed the values to ones that I believe are correct, but I still cannot connect. In a terminal I used ssh with the -vvv option and the only reported error is Error connecting: connection refused. Can anyone suggest next steps? Thanks

David
Guest
David

I booted it up in my virtual box, but i cant seems to get the task bar on the bottom on the screen somehow. now im stuck at setting screen and cant get back to home screen. any help? thanks.

Dan Jones
Guest
Dan Jones

The problem with Android x86 is that apps with ARM code won’t work. I tried to do something like that, and the first app I tried completely failed. I discovered the app used ARM libraries, so it won’t work on an x86 system.

No
Guest
No

@Dr. Azrael Tod
So do it yourself then?

Saskia
Guest
Saskia

Thank you, for me it runs great …
the Internet connection and the browser PlayStore also work, but when a game (Fish Live), a compound needed, indicating that there is no …
How can I fix this?

Greetings Saskia

Ally
Guest
Ally

Does the XBMC (http://xbmc.org/) media app able to launch from this? The program is set to only run from certain hardware models.

curious linux user
Guest
curious linux user

there seems to be a problem because when i import the .ova file into the vbox it says:
Failed to import appliance /home/neo/Desktop/androVM_vbox86tp_4.1.1_r6.1-20130222-gapps-houdini-flash.ova.

Could not create the clone medium ‘/home/neo/VirtualBox VMs/androVM_vbox86tp_4.1.1_r6.1-20130222-gapps-houdini-flash/androVM_vbox86tp_4.1.1_r6.1-20130222-gapps-houdini-flash-disk1.vmdk’.

VMDK: Compressed image is corrupted ‘/home/neo/Desktop/androVM_vbox86tp_4.1.1_r6.1-20130222-gapps-houdini-flash-disk1.vmdk’ (VERR_ZIP_CORRUPTED).

Result Code: VBOX_E_FILE_ERROR (0x80BB0004)
Component: Appliance
Interface: IAppliance {3059cf9e-25c7-4f0b-9fa5-3c42e441670b}

Chip
Guest
Chip

Hi there!

Thanks for the great instruction!
I got everything to work..

But I can’t start the app “Megapolis” (https://play.google.com/store/apps/details?id=com.socialquantum.acityint).
Is there a special reason, why it doesn’t work?!

I’m using:
– KDE 4.10.5
– Ubuntu 13.04
– Kernel: 3.8.0-29-generic .

Thanks in advance & have a nice weekend!

Regards,
Chipy

Uther
Guest
Uther

@cnxsoft
have you tried the windows version under wine?

Seb
Guest
Seb

@Marius

Like $20-30?
Or you could make it shareware like so many successful apps like TC or AdBlock

trackback

[…] No nos olvidamos de Linux. Pero al estar Android basado en ellos no es una opción que debería llamarnos la atención. Mientras tanto, gracias a Bluestacks tenemos aplicaciones Android en cualquier de los grandes sistemas de escritorio, tanto Windows como MacOS. Este programa no consigue una compatibilidad nativa, simplemente es una emulación y suele generar bastantes problemas sobretodo de rendimiento, sin embargo tiene el apoyo de una empresa tan potente como AMD detrás. […]

trackback

[…] are several methods to run Android in an x86 computer or laptop, but Android-x86 could be one of the best to do that, and the developers have just released the […]

trackback

[…] How to Run Android Apps in Linux with AndroVM (March 2013) – Android’s got plenty of app, and I though it would be nice is there was an easy way to run then in a Linux desktop. Luckily, AndroVM, now GenyMotion, made it relatively easily. […]

Franclin
Guest

Good tutorial friend for some time I wanted to learn