For a long time people have been trying to get Android apps running on Linux. After all, it makes a whole lot of sense. Android does use the Linux kernel. So why has it been so hard then?
Aside from the Linux kernel, Linux and Android are radically different systems. Linux uses the GNU user environment, while Android has its own entirely different one that’s heavily reliant on Java. Android also relies on many Google-specific tools like those that run the Play store. Of course, none of those are available for or run on Linux.
Anbox aims to bridge the gap by providing a compatibility layer between Android apps and Linux. It uses the host system’s Linux kernel but creates its own Android userspace. You can think of it as being sort of like Wine (Windows compatibility layer).
It’s important to keep in mind that Anbox is in early Alpha. Don’t expect perfection right now. The purpose of this is to experiment and test out features and apps. Things will break. Over time, the project will mature, and you’ll probably see some improvement in the coming months.
If you’re running Ubuntu, you should already have Snap installed. Anbox is packaged and distributed as a Snap package. Use it to install Anbox.
snap install --edge --devmode anbox
Install the Anbox Modules
You’re going to need a couple of specialized kernel modules before Anbox will work properly. They’re available from a PPA, so enable it on your system and install them.
sudo add-apt-repository -y ppa:morphis/anbox-support sudo apt update sudo apt install -y anbox-modules-dkms
When the install completes, you may want to restart Ubuntu to make sure that it loads the modules.
Launching Anbox is a little strange. Right now the launcher itself doesn’t load everything that you need. First, you need to open up a terminal window. In that window run the following command.
It’ll look like the command is unresponsive. It’s not. Just leave that window running in the background.
Now, launch Anbox the way you normally would through Unity or whichever desktop you’re running.
It’ll take a few seconds, but Anbox will open and show you the apps that it currently has installed. The assortment is about as bare-bones as it gets. There are only basic utilities there – no browser or Play Store.
Feel free to explore what you do have. It should all work well. You’ll immediately recognize everything as the default applications that come with Android.
Install Packages With ADB
So how do you get actual apps on there? Again, this is still very rough. You need to use the ADB (Android Debug Bridge). At least it’s easy to set up.
Open a terminal and install the necessary packages with
sudo apt install android-tools-adb android-tools-fastboot
After they’re done installing, you can go to a website, like ApkMirror, to pick up some Android app packages. You can’t export them from your phone because Anbox is running as an x86 computer, not ARM. That’s an important thing to keep in mind as you’re looking for apps.
It’s also important to remember that not every app will work. Currently, there’s no way to get the Play Store or Google Play Services working in Anbox. As a result, no apps that require Play Services to work will.
Once you have an app to install, you can use
adb to do it. While Anbox is running, open a terminal and type the following command. The app will be installed in Anbox.
adb install 'name-of.apk'
You’ll see the app icon appear in Anbox when it’s done. Try launching it. It might work; it might not. Experiment. That’s really the point right now.
While Anbox might not be ready for daily use, it is an interesting tool that deserves some attention and some testing. As it develops and matures, Anbox may be the best way to run Android apps in Linux, and can potentially open up a whole new world of applications to Linux users.
Our latest tutorials delivered straight to your inbox