For many years now people have been trying to find a way to run Android apps on Linux. In many ways, it may sound like something that should be easy to do. After all, Android is based on Linux, so why should it be so hard? While Google works to bring Android apps to Chrome OS, and by extension, the Chrome browser, many third party developers are looking for ways to integrate Android apps into Linux. One of the most recent projects, dubbed Anbox, attempts to do just that. Today, we will learn how to install Anbox and run Android apps inside your Ubuntu installation on your Linux based laptop or PC.
Why Android Apps on Linux Is Difficult
So why is it so difficult to run Android apps on Linux anyway? It’s actually quite simple. While Android does run its very own Linux kernel, it’s been heavily customized for mobile technology. At the same time, the front end systems are designed in very different ways. While standard Linux installations such as Ubuntu and its derivatives are designed using the GNU user environment, Android is very different. It runs its very own custom interface that relies heavily on Java. On top of that, Google has designed some very specific tools and tech that Android uses that just isn’t made available for Linux.
Of course, that doesn’t mean that there isn’t a way to do it. In fact, there are several ways to run Android on your Linux laptop or desktop available today.
A Few Things You Should Know
Before we begin with exactly how to do this, there are a few things you should know. First, this isn’t the only way to get Android apps running on Ubuntu. One of the easiest and most popular ways to do it is through virtualization. It’s actually pretty easy to setup a virtual machine running the latest version of Android on VirtualBox. Today, however, we will focus on Anbox.
The other thing you need to know is that Anbox is still considered Alpha software. That means there will be bugs. You can pretty much guarantee it. If you run into a bug, please feel free to report it here. The developers would love to hear about them as they work on the more complete version.
The last thing you need to understand is that not every Android app will work. Many apps aren’t designed to run on X86 architecture. Instead, they are designed for ARM, which is the main architecture found in most mobile processors today. Also, there is currently know way to install Play Services using Anbox. That means that you won’t be able to install and run any app that needs it. This includes many of the Google apps that we all know and love today.
Still, this is a great way to install many of the mobile apps you have come to rely on over the years. While it’s not a perfect solution, it will work. Over time, you can expect the compatibility and functionality to improve as the developers continue to work on and improve the Anbox application.
How Anbox Works
Anbox isn’t really a virtual machine. Instead, it tries to bridge the gap between the two platforms. It makes use of the host system’s Linux kernel but it creates a specific Android workspace. In many ways, it functions a lot like Wine. “Anbox puts the Android operating system into a container, abstracts hardware access and integrates core system services into a GNU/Linux system. Every Android application will be integrated with your operating system like any other native application.” Check out this video to learn more:
While it’s far from perfect, it is a welcome addition to any Ubuntu installation, especially if you are a fan of Android. Check out the video below to learn more:
As I have already said, Anbox is still in early Alpha. This method really isn’t meant for strong productivity, at least not yet. Things will break. In time, the project will mature and it will become more stable and feature stronger compatibility with a variety of apps. So be patient. Even in this stage, it is a great way to run those Android apps you have come to rely on right on your Ubuntu desktop.
Thankfully, the team has made installing Anbox easy. Anbox is made available through the snap system, which means all you will need to do on Ubuntu is run the command to install it. Other distributions may require you to install snap before you run the Anbox installer. To install snap, run the following command in terminal:
sudo apt-get install snapd
If this command doesn’t work for you, then I suggest visiting the snap site to find out how to install it for your distribution.
Once snap is installed, open a terminal and run the following command:
snap install --classic anbox-installer && anbox-installer
It will then walk you through exactly what it is doing for the install. When it’s finished, you will be able to load Anbox. How you load it depends on your distribution, but in Ubuntu, and in my case Ubuntu Budgie, it created a new section called Other in my launcher.
Unfortunately, there is still isn’t a clean, GUI-based method of installing apps on the system. So I hope you are prepared to play in the Terminal a little more.
Before we begin, we need to install the necessary packages needed to install apps. Unfortunately, this doesn’t get installed with Anbox. In order to install apps, you will need the Android Debug Bridge, otherwise known as ADB. Thankfully, it’s easy to install. Open a terminal and install the packages needed:
sudo apt install android-tools-adb android-tools-fastboot
As you know, the Play Store isn’t available, so how do you go about downloading the apps? Visit a site such as ApkMirror and download the Android app package for the app or apps you want. Make sure you look for versions designed for x86, as the ARM versions will not run on your computer.
Once you download your apk files, you may need to rename them. Some of the characters used in the download doesn’t always play nicely with ADB. I recommend keeping them in your Downloads folder and then opening your GUI File Manager and renaming them, but you can do it in the terminal if you wish. Try renaming it something simple and get rid of the ultra long filename. Just make sure you keep the .apk extension in the name. Once you have done that, open your Terminal and run the following command:
adb install ‘name-of-app.apk’
The app will then appear in your Anbox window and if you have Ubuntu, it will even appear in your new Android section (or Other section) that got created when you installed Anbox. You can then run the app. Remember, they may or may not work. In my tests, some worked while others did not.
Now that you know how to install and run the apps, it’s time to learn how to remove them if they don’t work or if you just aren’t using them.
First, you have to find out the name of your app:
adb shell ‘pm list packages -f’
Once you locate the actually name of the app you are removing, you can easily remove it with the following command in your terminal:
adb uninstall name-of-app
As you can see, the installation and use of this software still requires a little manual work on your part in the terminal. Hopefully, one day as the project matures, you will be able to install apps right from the Play Store. But we just aren’t quite there yet. Still, it’s nice to be able to run many of my favorite Android apps on my laptop powered by Ubuntu. So I won’t be getting rid of it anytime soon.
For now, you should play around with the software and experiment. Find out what apps run and what don’t. If you run into a bug, take a few minutes to report it. Let’s all pitch in and make this project the best way to run Android apps on Linux. While it still has a long way to go, I do see the potential in this app. One day it could be the best way to run Android apps on Linux. Just think about that possibility for a minute and imagine how much bigger the world of Linux would be with Android apps running on your desktop.
About the author
Matt is an IT professional with over fifteen years experience supporting network infrastructure and computers. An avid gamer, Matt enjoys his time playing and writing about his experiences both in the IT world and in the gaming communities. You can find more of his writing for LaptopNinja where he enjoys talking about everything tech.