How to install Anbox in Ubuntu Linux?


Anbox is a free and open-source compatibility layer that allows running Android applications in Linux distributions. It uses LXC to execute the Android runtime environment and recreate the directory structure of Android as a mountable loop image.

For running Android applications in a cloud environment Canonical launched Anbox cloud.

In this article, I will discuss how to install and use Anbox for running Android applications in Ubuntu Linux.

Prerequisites

To install packages on a Ubuntu system you should have the access to a user account that has root permissions.

How to install Anbox in Ubuntu

The installation of Anbox consists of two steps:

  • Installation of necessary kernel modules
  • Installation of the Anbox

Install and load kernel modules

Anbox requires ashmem_linux and binder_linux kernel modules. Use the following commands to install the required kernel modules.

Use the following command to add Anbox PPA repository –

sudo add-apt-repository ppa:morphis/anbox-support

Next, run the update command –

sudo apt update

Finally, use the given command to install kernel modules –

sudo apt install linux-headers-generic anbox-modules-dkms -y

Note:- Starting with Ubuntu 19.04 binder and ashmem are now build with the standard Ubuntu kernel (>= 5.0) and you don’t have to install the modules from the PPA anymore.

Once the required packages get installed, load the kernel modules by using –

sudo modprobe ashmen_linux
sudo modprobe binder_linux

Installing Anbox snap

The next step is to install Anbox using snap. Use the following command in your terminal to install it –

sudo snap install --devmode --beta anbox

Install play store

Play Store is required to download and install Android applications. Anbox comes with only a few applications installed by default so to install android apps you need to have Play Store installed.

We will install Play Store using installer script

First, use the given command to install required libraries –

sudo apt install wget curl lzip tar unzip squashfs-tools

Next, download the installer script by using  –

wget https://raw.githubusercontent.com/geeks-r-us/anbox-playstore-installer/master/install-playstore.sh

Add required permissions –

chmod u+x install-playstore.sh

Finally, run the script to start the installation process –

./install-playstore.sh

Open Anbox on Ubuntu

Once the installation is successful you can launch Anbox from Ubuntu’s activities dashboard. Search Anbox and click on its icon when appears as you can see in the image below –

anbox

The following image shows the Anbox application manager’s user interface –

anbox

Now you can install and use an Android application from Google Play Store.

How to remove Anobx from Ubuntu

Now for any reason, if you want to remove Anobx from your Ubuntu system then run the given command in your terminal –

snap remove --purge anbox

Conclusion

So I hope you have successfully installed Anbox on your Ubuntu system. Now if you have a query then write us in the comments below.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.