It’s been possible to run Android app in computers for a while with solutions such as Bluestacks or ShashLik, as well as running Android-x86 ISO in a virtual machine. But all those solutions rely on emulation, may not have the best performance, and at the time I tried them did not really work well, or were inconvenient to use. Anbox is different as instead of running its own Linux kernel for Android, it leverages the Linux kernel in Ubuntu for better integration and performance, and use an LXC container to run Android.
Anbox has been tested with Ubuntu 16.04, but should also work with other recent Ubuntu distributions. Installing Anbox (Alpha) is easy, and can be done with a single command line:
1 |
sudo snap install --classic anbox-installer && anbox-installer |
The command will modify your system with the following:
- Add the anbox-support ppa ppa:morphis/anbox-support to the host system
- Install the anbox-modules-dkms deb package from the ppa which will add kernel modules for ashmem and binder which are required for the Android container to work.
- Configure binder and ashmem kernel modules to be loaded automatically on boot.
- Add an upstart job for the current user XXXXX which will start the anbox runtime on login.
- Add a X11 session configuration file to allow the system application launcher (Unity7, Gnome Shell, ..) to find available Android applications.
If you’re OK with that, enter “I AGREE” to complete the installation, and reboot your computer.
The instructions indicate that you can install apps with adb:
1 |
adb install app-name.apk |
I did that but, adb could not find any devices attached. So I checked the system-info:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
anbox system-info version: 0.1.0 os: name: Ubuntu Core version: 16 snap-based: true kernel: version: Linux version 4.8.0-46-generic (buildd@lcy01-15) (gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4) ) #49~16.04.1-Ubuntu SMP Fri Mar 31 14:51:03 UTC 2017 binder: true ashmem: true graphics: egl: vendor: n/a version: n/a extensions: [] gles2: vendor: n/a vendor: n/a extensions: [] |
And my Nvidia graphics card with proprietary drivers does not seem to be handled properly. Not sure, whether is it the reason Anbox is not running. There are also lots of anbox related messages looping in the kernel log:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
[ 2394.462336] cgroup: new mount options do not match the existing superblock, will be ignored [ 2394.552752] binder_linux: 24131:24131 transaction failed 29189, size 0-0 [ 2394.566842] binder_linux: 24133:24133 transaction failed 29189, size 0-0 [ 2394.805087] anboxbr0: port 1(veth0FKTW7) entered disabled state [ 2394.815520] device veth0FKTW7 left promiscuous mode [ 2394.815527] anboxbr0: port 1(veth0FKTW7) entered disabled state [ 2395.397142] anboxbr0: port 1(vethXVRUND) entered blocking state [ 2395.397146] anboxbr0: port 1(vethXVRUND) entered disabled state [ 2395.397308] device vethXVRUND entered promiscuous mode [ 2395.397479] IPv6: ADDRCONF(NETDEV_UP): vethXVRUND: link is not ready [ 2395.397483] anboxbr0: port 1(vethXVRUND) entered blocking state [ 2395.397486] anboxbr0: port 1(vethXVRUND) entered forwarding state [ 2395.397579] anboxbr0: port 1(vethXVRUND) entered disabled state [ 2395.462011] eth0: renamed from vethNTQOD7 [ 2395.497716] IPv6: ADDRCONF(NETDEV_CHANGE): vethXVRUND: link becomes ready [ 2395.497832] anboxbr0: port 1(vethXVRUND) entered blocking state [ 2395.497835] anboxbr0: port 1(vethXVRUND) entered forwarding state |
So sadly, I did not manage to make it work, but Anbox is an open source project released in github and licensed under the terms of the GPLv3 license, plus some parts with an Apache-2.0 license, so it could be fixed by the developer, or yourself. Several users currently have problems and submitted issues to Anbox’s Github repo. Anbox is alpha software, so it’s bound to have issues at the beginning.
While I did not manage to get it to work, you can still checkout what’s it supposed to look like in the video below.
You could also visit Anbox website for more details.
Via Liliputing
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
Any chance to run this on an ARMbian Xenial over Orange Pi or other ARM SoC?
Thanks
@manuti
Part of the FAQ mentions ” Anbox will ship with a single Android image per architecture (amd64, armhf, arm64)”. So it might work. I’m not sure how it will handle the GPU however.
Just a guess: maybe “adb tcpip” helps?
My guess is that it will also have problems with Android DRM framework and Google Widevine DRM, so it will not just be easy yet to use streaming apps made for Android on Linux.
> Any chance to run this on an ARMbian Xenial over Orange Pi or other ARM SoC?
I think this would be difficult. As far as I know there is no working OSS 3D driver for Mali. The author mentions that he is passing through calls to OpenGL/ES to the host to execute. I’m not sure how well (if at all) this would work on a system without a working 3D driver.
There is apparently a binary driver for Mali, but I don’t think anyone is shipping this in their Linux image.
http://linux-sunxi.org/Mali_binary_driver
@Mum
The Armbian Xenial Desktop OS images for H3 boards have Mali acceleration working (though based on a rather old kernel driver version since the included blobs have to match). I would better try it with H3 Lakka or RetrOrangePi builds (both based on Armbian but maybe their devs had more luck finding newer blobs and included more recent Mali driver). IIRC we patched the driver to run the Mali cores with up to 600 MHz so performance might not suck that much.
@Mum
3D graphics works on Allwinner H3 -> http://www.cnx-software.com/2016/03/16/3d-accelerated-graphics-hardware-video-decoding-and-network-performance-on-orange-pi-one-board-video/
I think it might be using Android GPU drivers + libhybris. So in case that works, Anbox is likely using the libhybris calls (Linux compatible) calls, rather than accessing directly the Android drivers.
Anbox caused problems with my Nvidia graphics driver that would not be updated after a kernel update. So when I booted with the new kernel, I’d see the login prompt in only one of my screen, and it would go back to the login screen automatically. So I can reboot, and select the old kernel (Linux 4.8.0-53-generic in my case), and it works. When you’d run apt upgrade, you’d see the error message: Error! Could not locate dkms.conf file. File: does not exist. The error can be seen with dkms status command too. The solution is to remove anbox in… Read more »