Hello guys, Today I would write an article about how to install Anbox in your Elementary OS? Have you heard about Anbox? Yes, Anbox is like an Android Emulator but it’s different. So let’s read my article below here.

What is Anbox

Anbox is a container-based approach to boot a full Android system on a regular GNU/Linux system like Ubuntu. In other words: Anbox will let you run Android on your Linux system without the slowness of virtualization.

Why Anbox

There are may Android emulator out there but why we must choose Anbox for our Elementary OS:

  • Fast Perfomance
    Anbox doesn’t neeed any virtualization so the perfomance is really fast and efficient. You can run your apk or android application like native in linux.

  • Manage App via Command line
    You are able to manage your android application through command line with the help of ADB. So there is possibility to make Anbox for your dev/test environment with docker containers.

Example to install APK

1
sudo adb install /path/your-file.apk

Example to uninstall some of your APK

1
sudo adb uninstall com.whatsapp
  • Maintained by Canonical
    Anbox is an Open Source software, there are may contributor maintain it. But today anbox has the cloud based version which is maintained by Canonical.

Cons of using Anbox

  • Designed for PC
    Anbox is designed for PC so you must choose to use application who support landscape mode. If not, then the screen will not displayed full.

  • Mostly Game is Broken
    Mostly games crashing in Anbox, because Anbox using Android’s QEMU/EmuGL source which only supports GLESv1/v2, and a lot of games use GLESv3 exclusively

  • Beta Release
    Anbox still new and there is no stable release version until this time.

  • Lack of Support
    Anbox is free to use and still beta release, so the support is very minimum. You can see at their github repository and there are many many issues are opened.

How to Install Anbox

There are many ways to install Anbox, but they’re suggest us to install Anbox from Snap Package.

  1. Install via Snap

    1
    sudo snap install --devmode --beta anbox
  2. Check Driver
    After successfully installation, you have to check the ashmem and binder driver.

    1
    anbox system-info

See at kernel, the ashmem and binder must be true, if not then you have to install this

1
2
3
4
5
sudo add-apt-repository ppa:morphis/anbox-support
sudo apt update
sudo apt install anbox-modules-dkms
sudo modprobe ashmem_linux
sudo modprobe binder_linux
  1. Done

Install APK via Command line

You have to install ADB first, then you are able to install apk directly via command line.

  1. Install ADB

    1
    sudo apt install android-tools-adb
  2. Start ADB Device

    1
    adb devices

If adb devices already running, then you are able to install apk via command line.

1
adb install /path/your-apk-file.apk

Install Playstore

Anbox doesn’t have playstore as default, so we have to install it manually.

  1. Install Playstore

    1
    2
    3
    4
    sudo apt install wget curl lzip tar unzip squashfs-tools
    wget https://raw.githubusercontent.com/geeks-r-us/anbox-playstore-installer/master/install-playstore.sh
    chmod +x install-playstore.sh
    ./install-playstore.sh
  2. Enable Google Play Services
    Playstore is required us to sign in with Google Services, so we have to enable it first.

    1
    Go to Settings > Apps > Google Play Services > Permissions and enable all available permissions.
  3. Done

Uninstall Anbox

In case if you want to remove Anbox completely.

1
2
3
snap remove anbox
sudo apt install ppa-purge
sudo ppa-purge ppa:morphis/anbox-support

Troubleshoot

I will list all the Anbox problem at here. And currently for this time, I mostly got problem with No Internet Connection in Elementary OS every time after I turn on my PC.

  1. No Internet Connection
    1
    2
    sudo snap stop anbox
    sudo snap start anbox

Conclusion

My experience using Anbox is very great. It feels like I run native android application in my linux. My PC temperature is cool, So far difference when I use Genymotion or Android emulator.

Anbox has problem with running a game, actually I’ve read many people have successful to run a popular game with Anbox like PUBG, Ragnarok M Eternal Love, etc. After trying hard to research, and yes, I still failed to run any 2D/3D game via Anbox. I don’t know how to solve this, maybe there is an issues with my graphic card (I use NVidia) or GLES version (still mystery).

So if you looking for android emulator that run a game, Anbox is not a best tool for you. But, you can try the Anbox Cloud Based since they’re support to run 2D/3D game. But I think to use Anbox Cloud Based is not free. Just try to contact them at here.

This tutorial are tested and successfully to run Anbox in elementary OS Hera.

My specs:

  • Elementary OS 5.6 Hera based on Ubuntu 18 Bionic
  • Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
  • Linux version 4.15.0-112-generic

If you found any problem by following this tutorial, just feel free to leave a comment below. I will help you as soon as possible.

Thank you so much for reading my article.