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:
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:
adb install app-name.apk
I did that but, adb could not find any devices attached. So I checked the system-info:
name: Ubuntu Core
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
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:
[ 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.
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.