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.


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.

Share this:
FacebookTwitterHacker NewsSlashdotRedditLinkedInPinterestFlipboardMeWeLineEmailShare

Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress

ROCK Pi 4C Plus

35 Replies to “How to Run Android Apps in Linux with AndroVM”

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Leave a Reply

Your email address will not be published. Required fields are marked *

Khadas VIM4 SBC
Khadas VIM4 SBC