How to Install Anbox in Ubuntu Linux
Tags: android, opensource, howto, linux
Published: 2018-09-29 08:00:54

---
title: How to Install Anbox in Ubuntu Linux
published: true
tags: Android,FOSS,HowTo,Linux
canonical_url: https://fossnaija.com/how-to-install-anbox-in-ubuntu-linux/
---

[![how_to_install_anbox_banner](https://i2.wp.com/fossnaija.com/wp-content/uploads/2018/09/how_to_install_anbox_banner.png?resize=665%2C416&ssl=1)](https://i2.wp.com/fossnaija.com/wp-content/uploads/2018/09/how_to_install_anbox_banner.png?ssl=1)

 

[Anbox](https://fossnaija.com/anbox-running-android-applications-natively-ubuntu-linux/) is a contained android emulating platform for Linux systems. Simply put Anbox allows you to run android applications natively-ish on Linux systems. In this post I will show you how to install it on Ubuntu Linux systems.

The only way, for now, to get Anbox is through its snap version. So to install Anbox your system need to support [**snaps**](https://dev.to/xeroxism/how-to-install-and-use-snap-applications-in-linux-12da-temp-slug-6115022). In the demonstration in this post Ubuntu 16 is used; which supports snap packages out-of-the-box. In fact, [according to the Anbox Project](https://github.com/anbox/anbox/blob/master/docs/install.md) they **“only have packages prepared for Ubuntu in a PPA on Launchpad.** ”.

If you don’t know about snaps [get an introduction of what snaps are, how to install support for them on your distribution and how to use them](https://dev.to/xeroxism/how-to-install-and-use-snap-applications-in-linux-12da-temp-slug-6115022).

# **Install Anbox [STEPS]:**

The installation of Anbox consists of two steps.

## **1. Install necessary kernel modules**

In order to support the mandatory kernel subsystems **ashmem** and **binder** for the Android container you have to install two DKMS based kernel modules. The source for the kernel modules is maintained by the Anbox project [here](https://github.com/anbox/anbox/blob/master/docs/install.md).

In order to add the [PPA](https://fossnaija.com/how-to-install-software-using-ppa-ubuntu/) to your Ubuntu system please run the following commands:

 

```
$ sudo add-apt-repository ppa:morphis/anbox-support
$ sudo apt update
$ sudo apt install anbox-modules-dkms
```

 

These will add the PPA to your system and install the anbox-modules-dkms package which contains the ashmem and binder kernel modules. They will be automatically rebuild everytime the kernel packages on your system update. After you installed the anbox-modules-dkms package you have to manually load the kernel modules. The next time your

system starts they will be automatically loaded.

```
$ sudo modprobe ashmem_linux
$ sudo modprobe binder_linux
```

 

Now you should have two new nodes in your systems /dev directory:

 

```
$ ls -l /dev/{ashmem,binder}
```

/dev/ashmem

/dev/binder

## **2. Install the Anbox snap:**

The second step will install the Anbox snap from the store and will give you everything you need to run the full Anbox experience.

Doing this is very simple enter the following command:

```
$ snap install --devmode --beta anbox
```

 

If you haven’t logged into the Ubuntu Store yet, the snap command will ask you to use sudo snap … in order to install the snap:

```
$ sudo snap install --devmode --beta anbox
```

 

The **–devmode** is required because the Anbox snap is not yet fully confined. Accord to the the project: “Work has started with the upstream snapd project to get support for full confinement. As a side effect of using **–devmode** the snap will not automatically update.”

If you want to update to a newer version you can run:

 

```
$ snap refresh --beta --devmode anbox
```

 

Information about the currently available versions of the snap is available via:

 

```
$ snap info anbox
```

 

## 

## **When You want to Uninstall Anbox**

## 

If you want to remove Anbox from your system you first have to remove the snap:

**NOTE:** By removing the snap you remove all data you stored within the snap from your system. There is no way to bring it back.

 

```
$ snap remove anbox
```

 

Once the snap is removed you have to remove the installed kernel modules as well:

 

```
$ sudo apt install ppa-purge
$ sudo ppa-purge ppa:morphis/anbox-support
```

 

After which Anbox would have been removed from your system.

You head to your Ubuntu dash an type in “anbox” and then click on the “” with the android logo to launch it. The default apps available include: Contact, Gallery, Files, Email Music, Calculator, Clock, Settings and Email.

 

[![anbox default apps](https://i0.wp.com/fossnaija.com/wp-content/uploads/2018/09/anbox-default-apps.png?resize=665%2C351&ssl=1)](https://i0.wp.com/fossnaija.com/wp-content/uploads/2018/09/anbox-default-apps.png?ssl=1)

**Happy Linux’NG!**

The post [How to Install Anbox in Ubuntu Linux](https://fossnaija.com/how-to-install-anbox-in-ubuntu-linux/) appeared first on [Foss Naija](https://fossnaija.com).