How to install Anbox on GNU/Linux | Tutorial


How to install Anbox on GNU/Linux

We’re going to cover the process of installing Anbox on a Linux distro. Other than that, we’ll go to through the steps how to install and run Android apps as well. In order to install the Anbox, your system must support snaps. If you don’t have snaps installed, you need to install it but that’ll be covered in the text bellow. I installed Anbox on Ubuntu and Mint and for me it worked perfectly fine on those systems. That’s why we’ll go through the steps and show you how to install Anbox on Ubuntu and on Linux Mint. Also, Anbox is by default supported on Ubuntu(developers posted that on their site), but you can install it on Linux Mint as well – Makes sense since Mint is based on Ubuntu. Anbox can be installed on other Linux distros but then, you’ll need to compile the installation by yourself and at the moment, developers do not support other distros. There are few requirements  that we need to have in order to install Anbox:

  1. Linux distro which support snaps
  2. Installed kernel modules for Anbox
  3. Anbox software
  4. Android ADB tools

What is Anbox?

Anbox is a software which runs Android system in a container and that way it allows you to run Android apps on your Linux system. The way is built, is that the software integrates an app with the system and tries to run the app like a native software installed on the PC. That’s one way to run Android apps on your PC. Other way is with an emulator software, also a very good and popular method. The emulator method is already covered on this site and tested, you can check it out following this link.

Install Kernel modules

First what we need to do is to install the Kernel modules for the Anbox. We need to add repositories for those kernel modules as well. Start the terminal and run these commands:

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

Now we need to load the kernel modules. Use these commands:

$ sudo modprobe ashmem_linux
$ sudo modprobe binder_linux

This will also create two new nodes. You can check the modules are loaded correctly with this command:

$ ls -1 /dev/{ashmem,binder}

And you need to get an output like this(image bellow):

linux mint install anbox

That is it for the Kernel installation, now we can move on to the next step and that is to install Anbox.

Install the Anbox snap

In order to install the Anbox – run this command in the terminal:

$ snap install --devmode --beta anbox

install anbox linux

If for some reason, the terminal returns the output – unrecognized command: snap, that means that the snap on your system is not installed. You can simply install it with command:

$ sudo apt install snapd

Installation takes about few minutes to complete. After you have installed the Anbox and have completed other steps from the top, restart your PC in order for the changes to take effect. After restart, Anbox should appear in the start menu and you can start it.

install anbox ubuntu

Once the Anbox is running properly, we can continue to the next step and that is – installing Android apps. When you run the Anbox, you’ll notice that it’s a bit different from the emulators and also that it does not have Google play store pre-installed as well. Installing apps in Anbox is a procedure as well. We need to install the Android ABD tools and we’re going to use ADB commands in order to install or delete our apps. To acquire an android app – we can use this site – Android APK. We’ll need to download apk files of the apps and install them using terminal.

Installing Android apps on Anbox

First, from terminal, run this command in order to install Android ADB tools:

$sudo apt install android-tools-adb android-tools-fastboot

Then from apk mirror site download an app you wish. You’ll notice when you open the app page, it will have a button – see all available apps. At least, some apps will have that button. It depends if the app has versions for multiple architectures. Once you downloaded the app, start the terminal again, navigate to the location where you’ve placed the app and run this command:

install anbox linux mint

linux ubuntu install anbox

$adb install nameoftheappfileyoudownloaded

After the install command, type in the name of the app file you have downloaded. With this command, you install the apps. The terminal will let you know once the app is installed. The app will be displayed in the Anbox automatically as soon the installation finishes and then you can run the app. You can also install and run games with Anbox but some games will not run(such as games that have downloadable content). As an example, I installed the Gmail app.

install anbox debian

 

If you wish to uninstall the app, for that we need the terminal again. Stay in the location of the downloaded app and use the command:

$adb uninstall nameoftheappfileyoudownloaded

Summary

Anbox is a great tool and very useful but I believe it is more focused and intended for developing usage, so that software developers can run  and test their apps they develop. Also it is fully open-source, there are no limits how you can use it, more secure than most of the emulators since it run apps in containers and that way apps can’t access your hardware information for an example. On top of that when you add the procedure of installing apps. Nevertheless, it is still a great tool. But, if you need to run Android apps in much simpler way or just to play Android games from the play store on your Linux machine – you can follow this link where you can learn how to install and use a Linux emulator – Run Android apps with an emulator.

Thank you very much for your time. Hope you found this info useful.


You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *