Want to run Android apps on Linux? How about play Android games? Several options are available, but the one that works the best is Anbox. This is a tool that runs your favorite Android apps on Linux without emulation.
Here's how to use Anbox to run Android apps on your Linux PC today.
Meet Anbox, Your "Android in a Box"
Having access to your preferred Android apps and games brings an exciting new dimension of productivity to Linux. Mobile apps are, by design, a lot simpler than those found on desktop operating systems.
This could be just what you're looking for to improve desktop productivity!
Meanwhile, mobile games are becoming increasingly sophisticated. It makes sense that you might want to continue playing on a different device. This is especially true considering the limited battery life of a phone or tablet.
Several macOS and Windows tools are available for running Android apps (such as Bluestacks) but this isn't available for Linux.
Instead, Linux users should try Anbox, a free and open source tool to run Android apps on Linux. It's based on the latest version from the Android Open Source Project (AOSP) and offers a window-based Android environment.
Anbox uses containers to separate Android from the host operating system, enabling you to run Android games on Linux.
That's not all; Anbox has no limits, so in theory you can run any Android app on Linux. There's no hardware virtualization either, so Anbox works as well on a laptop or desktop, whatever the system spec.
Which Linux Distros Support Snap?
Although free to use, Anbox comes as a snap package. This means that the binary and any dependencies are included in a single package, easing installation. Unfortunately, it means that your Linux OS cannot use Anbox unless it can unpackage and install snaps.
The snapd service is required to install snaps, and this is compatible with Linux distributions such as:
- Arch Linux
- Debian
- Fedora
- Gentoo
- Linux Mint
- Manjaro
- openSUSE
- Solus
- Ubuntu
In Ubuntu, snapd comes pre-installed from 14.04 onwards. You'll find full details for your distro at the Snapcraft website.
To install snapd, use the following terminal command:
sudo apt install snapd
Wait until the installation completes before proceeding. Note that while snapd runs or is preinstalled with the above distros, Anbox is officially supported on Ubuntu 16.04 LTS (Xenial Xerxes) and later. However, only a beta version is available for Ubuntu 20.04 LTS, which requires different steps (see below).
More importantly, you're likely to get better results running Android apps on Ubuntu than other distros. Consequently, the steps below are for running Android apps in Anbox on Ubuntu, rather than other distros.
Installing Anbox on Ubuntu 16.04 LTS and 18.04 LTS
With the snapd service installed on your Linux PC, you're ready to install Anbox. Use the following command, which installs everything you need:
snap install --classic anbox-installer && anbox-installer
Enter your password when prompted and the snap package will download.
Shortly after, you'll see a choice:
- Install Anbox
- Uninstall Anbox
Should you need to remove the software later, simply re-run the installer command above, and select option 2. In the case of installing Anbox, however, you can proceed with option 1.
Following this, you'll see a summary of what the installation will do. Take a moment to read through this.
You'll see files added from a PPA listed. There should also be a notice that the anbox runtime will autostart when you log into Linux. (This is a software library that enables other software and apps to run.)
If you're happy with all of this, enter I AGREE and wait for Anbox to install. Once done, follow the instruction to reboot your system before proceeding.
Install Anbox on Ubuntu 20.04 LTS
Installation of Anbox is a little different on Ubuntu 20.04 LTS. A full release of the software has not been made since 2019, and differences to the Linux kernel in the meantime have necessitated release of Anbox only as a beta build.
First, ensure snap is installed. As you're using a recent Ubuntu build it should be, but just in case check with:
snap find hello
This will result in a list of "hello world" snaps being displayed, confirming that snap is installed.
You can then proceed to install the beta version of Anbox:
sudo snap install --devmode --beta anbox
Wait while this installs then restart your computer.
Downloading APK Files to Your Linux PC
With your PC rebooted, you should find Anbox available in your desktop's menu. Click it to launch--- you'll soon see the Anbox window.
If nothing happens, or you're stuck on a splash screen with the Starting message, cancel or wait for this to end. Then open a new terminal and enter
anbox session-manager
Next, click the icon in the menu again. A few moments later, Anbox should run. (This is a known bug in Ubuntu 16.04-based distributions and shouldn't affect later distros.)
With Anbox running, you'll see a list of the basic Android apps you can run on Linux, such as Calendar and Email. Simply left click these icons to open them; they'll appear in new windows that you can resize as required. If you need a browser, the WebView Shell is included.
Install Android Apps From Google Play and Beyond
To add your own apps and games, all you need to do is download (or copy from another device) the appropriate APK files. These are installer files, like DEB files (or snaps) in Linux, or EXE files in Windows. If you run an APK in Ubuntu with Anbox, it will install like any other Android app.
You have two options for installing apps on Anbox:
- Sideload
- Install Google Play
Sideloading is relatively simple. You can use the browser and these Google Play alternatives to add software in Anbox. If you opt to sideload APKs, you'll need to enable installation from unknown sources:
- Open the Settings menu from the apps screen
- Click Security
- Enable Unknown Sources
- Click OK to accept
However, there is a GitHub project, Anbox Playstore Installer, that makes the process of installing apps in Anbox as easy as it is on your phone or tablet.
To start, open the Terminal and enter:
sudo apt install wget curl lzip tar unzip squashfs-tools
Next, download the Anbox Playstore script:
wget https://raw.githubusercontent.com/geeks-r-us/anbox-playstore-installer/master/install-playstore.sh
Make it executable:
chmod +x install-playstore.sh
Then run the script:
./install-playstore.sh
Run Anbox if it doesn't load automatically:
anbox.appmgr
Then, set the correct permissions in Android.
- Open Settings
- Go to Apps > Google Play Services
- Tap Permissions then enable all permissions
- Repeat this for Apps > Google Play
You can now install Android apps in Anbox from Google Play.
Other Ways to Run Android Apps on Linux
While a reliable option, Anbox isn't the only way to run Android apps on Linux. Along with Anbox you can also try:
- Genymotion
- Android Studio
- Archon
There are also two Android-based operating systems compatible with x86 computers which will let you install Android apps:
- Android-x86
- BlissOS
Now You Can Run Android APKs on Linux
Anbox may have some stability issues. However, it is reassuring to know how simple it is to set up, install, and run Android apps on Linux Ubuntu with Anbox.
To recap:
- Confirm your distro supports snap packages.
- Install or update the snapd service.
- Install Anbox.
- Launch Anbox from your Linux desktop.
- Download APK files and run them.
- Wait as the APK file installs.
- Click to run Android apps on your Linux desktop.
Anbox isn't the only way to run Android apps and games on Ubuntu or other Linux distros, but we think it is the simplest.