Tutorial

How to Install Anbox on Linux Mint?

Published on August 4, 2022
author

Jayant Verma

How to Install Anbox on Linux Mint?

This article goes over the steps to install Anbox on Linux Mint. Ever wondered how cool it would be to be able to run android applications on your Linux system? Well, Anbox helps you do exactly that.

Anbox is short for Android in a box and it is exactly what it sounds like! Anbox is a free and open-source environment that enables you to run Android applications on your Linux distribution.

It follows a container-based approach to run the android operating system on Linux.

Steps to Install Anbox on Linux Mint

Here’s a quick summary of the step to install Anbox on your Linux Mint:

  1. First, Install snapd
  2. Install the required kernel modules
  3. Install the Anbox package on Linux Mint
  4. Steps to uninstall Anbox from Mint

You can install Anbox on your system from the Snap Store. As of now, Snap is the only way to get Anbox. The organization does not officially support any other distribution method of Anbox at the moment.

In case you haven’t heard about Snaps, don’t worry. Snaps are just software packages that are simple to create and install.

1. Install Snap

Snap is available for the following releases of Mint :

  • 18.2 (Sonya)
  • 18.3 (Sylvia)
  • 19 (Tara)
  • 19.1 (Tessa)
  • 20 (Ulyana)

To install Snap on Linux Mint 20, you need to remove /etc/apt/preferences.d/nosnap.pref  first. The reason being, this file blocks the installation of snap.

This is done with the command :

sudo rm /etc/apt/preferences.d/nosnap.pref
sudo apt update

To install snapd on your system use the apt command as shown below:

$ sudo apt install snapd

Alternatively, you can download it form the Software Manager application. Search for snapd and click Install.

Install Snap
Install Snap

2. Install Kernel Modules

Before installing Anbox, you need to install two kernel modules. This is necessary to support the mandatory kernel subsystems ashmem and binder for the Android container.

You can do this with the following commands:

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

This will install anbox-modules-dkms package on your system.

After this, you need to manually load the kernel modules. This loading is a one-time thing. You can do this with the following commands:

sudo modprobe ashmem_linux
sudo modprobe binder_linux

This will add two new nodes in your system.

/dev/ashmen
/dev/binder 

3. Install Anbox on Linux Mint

Now after installing Snaps and the necessary modules on your system, you can install Anbox on your system using :

sudo snap install --devmode --beta anbox

Install inbox

To update to a newer version use the command:

sudo snap refresh --beta --devmode anbox

To get information about the anbox snap use the command:

snap info anbox 
Anbox Snap Info
Anbox Snap Info

4. Steps to Uninstall Anbox

If you need to uninstall Anbox, use the command :

 $ snap remove anbox

After uninstalling anbox, you can also uninstall the kernel modules using :

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

Running these commands will successfully uninstall Anbox from your system.

That’s it!

In this tutorial, you saw how to install Anbox on your Linux Mint system. Do let us know if you have any questions in the comments below.

Thanks for learning with the DigitalOcean Community. Check out our offerings for compute, storage, networking, and managed databases.

Learn more about our products

About the authors
Default avatar
Jayant Verma

author

While we believe that this content benefits our community, we have not yet thoroughly reviewed it. If you have any suggestions for improvements, please let us know by clicking the “report an issue“ button at the bottom of the tutorial.

Still looking for an answer?

Ask a questionSearch for more help

Was this helpful?
 
JournalDev
DigitalOcean Employee
DigitalOcean Employee badge
June 26, 2021

Please guide to install AnBox on Linux-Mint. After installing found two links 1. Anbox Application Manager and 2. Android Setting on my Mint Start screen but in both case if I start them a Starting screen pops-up and after 2-3 secs goes off. Not starting. Have followed all possible instructions but no wayout. Here the “snap info anbox” msg: rudra@rudra-Satellite-C850:~$ snap info anbox name: anbox summary: Android in a Box publisher: Simon Fels (morphis) store-url: https://snapcraft.io/anbox contact: https://anbox.io license: unset description: | Runtime for Android applications which runs a full Android system in a container using Linux namespaces (user, ipc, net, mount) to separate the Android system fully from the host. You can find further details in our documentation at https://github.com/anbox/anbox/blob/master/README.md commands: - anbox - anbox.android-settings - anbox.appmgr - anbox.collect-bug-info - anbox.shell services: anbox.container-manager: simple, enabled, active snap-id: Nr9K6UJaIOD8wHpDEQl16nabFFt9LLEQ tracking: latest/edge refresh-date: today at 12:40 IST channels: latest/stable: – latest/candidate: – latest/beta: 4-56c25f1 2020-01-02 (186) 391MB devmode latest/edge: 4+gitrad377ff 2021-05-27 (213) 405MB devmode installed: 4+gitrad377ff (213) 405MB devmode rudra@rudra-Satellite-C850:~$ I’m very new to Linux, please guide me. regards.

- Rudra

    JournalDev
    DigitalOcean Employee
    DigitalOcean Employee badge
    June 18, 2021

    Nie można dalej działać bo w terminalu jest taki komunikat $ sudo add-apt-repository ppa:morphis/anbox-support Nie można dodać prywatnego archiwum pakietów: „‘To PPA nie obsługuje focal’”

    - Adam

      JournalDev
      DigitalOcean Employee
      DigitalOcean Employee badge
      June 6, 2021

      Linux Mint 20.1 Cinnamon Cannot add PPA: ‘‘This PPA does not support focal’’

      - JournalDevEntryIncorrect

        JournalDev
        DigitalOcean Employee
        DigitalOcean Employee badge
        May 28, 2021

        Doesn’t work with Mint 19.1: ERROR: could not insert ‘ashmem_linux’: Operation not permitted

        - wilddouglascounty

          JournalDev
          DigitalOcean Employee
          DigitalOcean Employee badge
          February 28, 2021

          doesn’t work at all for mint 20, because focal isn’t supported by that PPA.

          - user

            JournalDev
            DigitalOcean Employee
            DigitalOcean Employee badge
            December 26, 2020

            when i try to install anbox iget this error. . what can i do?

            - ty

              JournalDev
              DigitalOcean Employee
              DigitalOcean Employee badge
              October 22, 2020

              sudo add-apt-repository ppa:morphis/anbox-support Cannot add PPA: ‘‘This PPA does not support focal’’.

              - Iftekhar Riyad

                JournalDev
                DigitalOcean Employee
                DigitalOcean Employee badge
                September 13, 2020

                sudo add-apt-repository ppa:morphis/anbox-support Impossible d’ajouter le PPA : ‘‘Ce PPA ne prend pas focal en charge’’.

                - totor

                  JournalDev
                  DigitalOcean Employee
                  DigitalOcean Employee badge
                  September 3, 2020

                  ERROR (dkms apport): kernel package linux-headers-5.4.0-45-generic is not supported Error! Bad return status for module build on kernel: 5.4.0-45-generic (x86_64) From Mint 19.3

                  - Andrew

                    JournalDev
                    DigitalOcean Employee
                    DigitalOcean Employee badge
                    August 26, 2020

                    thanks i will try those free steps to install anbox

                    - GILDAS

                      Try DigitalOcean for free

                      Click below to sign up and get $200 of credit to try our products over 60 days!

                      Sign up

                      Join the Tech Talk
                      Success! Thank you! Please check your email for further details.

                      Please complete your information!

                      Become a contributor for community

                      Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

                      DigitalOcean Documentation

                      Full documentation for every DigitalOcean product.

                      Resources for startups and SMBs

                      The Wave has everything you need to know about building a business, from raising funding to marketing your product.

                      Get our newsletter

                      Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.

                      New accounts only. By submitting your email you agree to our Privacy Policy

                      The developer cloud

                      Scale up as you grow — whether you're running one virtual machine or ten thousand.

                      Get started for free

                      Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

                      *This promotional offer applies to new accounts only.