Home > Android, Linux, Testing, Ubuntu > How to Run Android Apps in Linux with AndroVM

How to Run Android Apps in Linux with AndroVM

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.

wget http://androvm.org/Download/androVM_vbox86tp_4.1.1_r6.1-20130222-gapps-houdini-flash.ova

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.
    wget http://androvm.org/Download/AndroVMplayer-Linux64-20130208.tgz
    tar xzvf AndroVMplayer-Linux64-20130208.tgz
    cd AndroVMplayer-Linux64/
  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.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter

  1. March 1st, 2013 at 14:25 | #1

    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. -.-

  2. Sander
    March 1st, 2013 at 15:02 | #2

    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.

  3. March 1st, 2013 at 17:40 | #3

    I can’t run Antutu in my machine, but others can, and the Antutu scores are pretty insane (91303) – http://goo.gl/XASpl

  4. onebir
    March 1st, 2013 at 19:44 | #4

    @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 ;) )

  5. Marius
    March 1st, 2013 at 20:40 | #5

    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 ? :)

  6. March 1st, 2013 at 21:15 | #6

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

  7. March 1st, 2013 at 21:22 | #7

    @Dr. Azrael Tod
    As Marius mentioned it’s probably a lot of hard work. There’s the VM, Android is based on the Bionic C library, whereas Linux is based on glibc, and there’s the graphics stuff as well.

  8. March 1st, 2013 at 22:06 | #8

    @Andrew
    Thanks it works.
    However, it seems I may need to install Android to a virtual harddrive to save the settings/apps, and some apps can’t be installed via Google Play.

  9. notzed
    March 2nd, 2013 at 05:52 | #9

    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.

  10. March 2nd, 2013 at 06:50 | #10

    @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?

  11. ZC
    March 9th, 2013 at 23:51 | #11

    @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.

  12. Piledriver
    April 9th, 2013 at 06:36 | #12

    @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.

  13. Brian
    April 10th, 2013 at 02:33 | #13

    @ZC

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

  14. zeddock
    April 11th, 2013 at 05:44 | #14

    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

  15. April 11th, 2013 at 14:35 | #15

    @zeddock
    USB could work, but needs some settings in VirtualBox. TBC.

    The easiest way to exchange files between your Android VM and your host (Linux or Windows) is to create a SAMBA or NFS share in the host, and access the files with apps such as ES File Explorer.

  16. Dave
    April 29th, 2013 at 00:07 | #16

    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!

  17. Dave
    April 29th, 2013 at 02:55 | #17

    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

  18. April 29th, 2013 at 10:08 | #18

    @Dave
    You don’t need to touch the setting for Network Adapter 1, as this is reserved for OpenGL.

    I have tried myself, but this may work: Make sure Network Adapter 2 is enabled, and selected “Bridged adapter”. You Androvm should get an IP from the same LAN as your host, and you can just use NFS or SAMBA/CIFS to share files.

    If it does not work (e.g. Ethernet not supported in Android), you may want to use Ubuntu One or Dropbox, and even though it may not be a perfect solution, it should work.

  19. David
    May 24th, 2013 at 02:35 | #19

    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.

  20. May 27th, 2013 at 09:34 | #20

    AndroVM becomes a commercial project, and has been renamed to Genymotion http://androvm.org/blog/blog/2013/05/16/androvm-moving-to-a-commercial-product/

  21. Dan Jones
    May 30th, 2013 at 21:24 | #21

    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.

  22. No
    June 5th, 2013 at 11:25 | #22

    @Dr. Azrael Tod
    So do it yourself then?

  23. Saskia
    June 8th, 2013 at 15:12 | #23

    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

  24. Ally
    July 16th, 2013 at 15:29 | #24

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

  25. July 16th, 2013 at 18:11 | #25

    @Ally
    In theory it may run, but I’m not sure about video playback.
    I wonder why you would want to do that instead of simply running XBMC in your Linux PC.

  26. curious linux user
    August 12th, 2013 at 16:53 | #26

    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}

  27. August 12th, 2013 at 17:23 | #27

    @curious linux user
    You may have to download again, as the image appears to be corrupted.

  28. Chip
    September 6th, 2013 at 23:32 | #28

    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

  29. Uther
    September 24th, 2013 at 03:43 | #29

    @cnxsoft
    have you tried the windows version under wine?

  30. Seb
    February 24th, 2014 at 14:02 | #30

    @Marius

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

  1. April 11th, 2013 at 16:49 | #1
  2. April 11th, 2013 at 21:10 | #2
  3. April 22nd, 2014 at 02:51 | #3