A lead software engineer at Ubuntu-maker Canonical has released a tool to run Android apps on Linux desktops without using emulators.
A new open-source project, Anbox, from a Canonical engineer lets you run Android apps natively on Ubuntu and other Linux-powered desktops.
It differs from several existing projects that allow Android apps to run on PCs. Instead of using emulators, Anbox employs Linux namespaces to run Android in a container on the same kernel as the host operating system, allowing Android software to run like native apps on the host.
Fels explains in a blogpost that he began the project 2015 with “the idea of putting Android into a simple container based on LXC and bridging relevant parts over to the host operating system while not allowing any access to real hardware or user data”.
Anbox is currently in a “pre-alpha development state”, so while it should allow Android apps to run natively on Ubuntu or Debian, it isn’t stable.
It can be installed on any of several Linux distributions that support snaps. Fels notes in an FAQ that apps that rely on Wi-Fi, Bluetooth, and other hardware components won’t work until further work is completed.
“Anbox itself is still in its early phase and is in a pre-alpha state where crashes and instability are expected. The next phase of development will focus on stability and bug-fixing and will add more necessary features to integrated better with the host operating system,” wrote Fels.
As noted by OMGUbuntu, there’s also no simple way to install Android apps in Anbox. Google Play Store isn’t included due to Google’s requirements, but neither are third-party stores, like F-Droid.
Instead, installing apps requires using the Android Debug Bridge (adb) tool and the command line. Anbox’s developers note in an FAQ that there’s no intention to install the Google Play Store, but they may in future create a way to install Android apps.
Given Canonical’s decision to withdraw from its Ubuntu Touch efforts, the main targets for Anbox are Linux desktops. However, Fels notes it can be used on Ubuntu Touch, Sailfish OS, and Lune OS. Indeed, the initial proof-of-concept was done on Ubuntu Touch, according to Anbox’s GitHub page.
Fels says there are parallels between Anbox and how Google is enabling Android apps to run on Chrome OS.
“Both approaches are quite similar as both put Android into a lightweight system container based on Linux namespaces and keep a small bridge to allow communication with the host system,” he explains.
“In contrast to Google’s implementation, Anbox doesn’t allow any direct access to hardware devices. For example, it bridges Open GL ES to the host. In Chrome OS the container gets access to the host kernel side of the graphic subsystem to allow fast rendering. In our case we decided against this to keep an easy way to port Anbox to different platforms.
“All a host operating system needs to provide is an Open GL / Open GL ES compatible driver to provide proper integration with the graphics subsystem. Other hardware devices like Wi-Fi or Bluetooth will be abstracted in the future via a dedicated API between the container and the host.”