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.
1 |
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
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.
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:
- Open a terminal to download and extract AndroVMPlayer.
123wget http://androvm.org/Download/AndroVMplayer-Linux64-20130208.tgztar xzvf AndroVMplayer-Linux64-20130208.tgzcd AndroVMplayer-Linux64/ - 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)
- 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.
- Start AndroVM, click on “androVM Configuration” app, enable “Hardware OpenGL”, and click “Save” to reboot the device.
- Back to the terminal to run ./AndroVMPlayer, select the resolution and virtual machine, and click on Run
- 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.
Jean-Luc started CNX Software in 2010 as a part-time endeavor, before quitting his job as a software engineering manager, and starting to write daily news, and reviews full time later in 2011.
Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress
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. -.-
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.
I can’t run Antutu in my machine, but others can, and the Antutu scores are pretty insane (91303) – http://goo.gl/XASpl
@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 😉 )
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… Read more »
To fix the mouse issue with VirtualBox and Android-x86 4.2, from the VirtualBox menu select: Machine > Disable Mouse Integration.
@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.
@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.
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.
@Jean-Luc Aufranc (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?
@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.
@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.
@ZC
Great idea! I would definitely contribute $25! Anyone else?
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
@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.
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!
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… Read more »
@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.
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.
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/
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.
@Dr. Azrael Tod
So do it yourself then?
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
Does the XBMC (http://xbmc.org/) media app able to launch from this? The program is set to only run from certain hardware models.
@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.
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}
@curious linux user
You may have to download again, as the image appears to be corrupted.
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
@Jean-Luc Aufranc (CNXSoft)
have you tried the windows version under wine?
@Marius
Like $20-30?
Or you could make it shareware like so many successful apps like TC or AdBlock
Good tutorial friend for some time I wanted to learn