What is Anbox?

Anbox is an open source Android emulator that allows you to run Android apps on regular Linux distributions without virtualization. It was created to provide better performance and integration compared to traditional emulators that use virtual machines.

Some key capabilities of Anbox include:

  • Runs the Android runtime environment directly on top of the Linux kernel
  • Does not require hardware virtualization support
  • Allows Android apps to integrate with your Linux desktop environment
  • Supports ARM translation through libhoudini for better app compatibility
  • Available as snap package for easy installation on most Linux distros

In short, Anbox aims to give a native Android experience on the Linux desktop. Next let‘s walk through how to get it set up.

Installing Anbox

The Anbox installation has two main steps – configuring the Linux kernel modules, and installing the Anbox snap package.

Step 1 – Configure Kernel Modules

Anbox relies on the Android ashmem and binder kernel modules for managing memory and inter-process communication. To check if they are present on your system:

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

If they are missing, you need to install the linux-headers, dkms, and anbox-modules packages with your distro‘s package manager, then build the modules from source.

Here are the commands for popular distros:

# Debian/Ubuntu
$ sudo apt install linux-headers-generic dkms 
$ git clone https://github.com/anbox/anbox-modules.git
$ cd anbox-modules
$ sudo ./INSTALL.sh

# Fedora 
$ sudo dnf install kernel-devel kernel-headers dkms
$ git clone https://github.com/anbox/anbox-modules.git
$ cd anbox-modules
$ sudo ./INSTALL.sh

# Arch Linux
$ sudo pacman -S linux-headers dkms
$ git clone https://github.com/anbox/anbox-modules.git
$ cd anbox-modules
$ sudo ./INSTALL.sh

This will compile and insert the ashmem/binder modules. Reboot your system to verify they loaded properly.

Step 2 – Install Anbox Snap

With the modules ready, we can now install Anbox itself from the Snap store:

$ sudo snap install --devmode --beta anbox

The –devmode flag is needed since Anbox is still in beta. Make sure to refresh it periodically to get updates:

$ sudo snap refresh --beta --devmode anbox

That covers the installation steps! Anbox should now be available as an app from your distro‘s application menu.

Using Anbox

Launching Anbox will open a simple Android home screen. From here you can access installed apps and settings.

Anbox home screen

Out of the box, Anbox only comes with core Android system apps. To install additional apps, we need to use the Android Debug Bridge (ADB) tool.

Installing Apps with ADB

First, install ADB with your distro‘s package manager:

# Debian/Ubuntu 
$ sudo apt install android-tools-adb

# Fedora
$ sudo dnf install android-tools

# Arch Linux
$ sudo pacman -S android-tools

With adb installed, connect to the Anbox runtime:

$ adb devices
List of devices attached 
emulator-5554   offline   # Anbox device

Now you can use adb install to deploy any Android APK:

$ adb install application.apk

However, the lack of Google Play Services will limit app compatibility. Let‘s fix this.

Installing Google Play Store

To install Google apps and services, we‘ll use the anbox-playstore-installer script.

This script downloads the necessary images and tools, then uses adb to deploy them into Anbox. Make sure adb is working before running.

$ git clone https://github.com/geeks-r-us/anbox-playstore-installer.git
$ cd anbox-playstore-installer
$ sudo ./install-playstore.sh

The process will take a few minutes, but afterwards the Play Store and Google services will be available in Anbox!

Google Play Store in Anbox

Now you can sign into your Google account and install apps normally. Enjoy the full Android experience on Linux!

Performance and Limitations

Since Anbox runs the Android environment natively rather than virtualized, the performance is very good – much faster than traditional emulators like Genymotion. Apps open quickly and animations are smooth.

However, there are still some limitations to be aware of:

  • No hardware acceleration – 3D graphics performance in games is poor
  • App compatibility issues – some apps with native binaries won‘t work
  • Multi-touch support is hit-or-miss

These constraints mean Anbox is not well-suited for 3D games or apps that rely on specific hardware features. But general productivity and 2D applications work very well.

For best results, I recommend using Anbox for these categories of apps:

  • Messaging
  • Media / entertainment
  • Simple games
  • Utilities
  • Productivity

It can provide a seamless experience for these day-to-day use cases.

Conclusion

Anbox delivers an intriguing concept – bringing native Android support into the Linux desktop environment. Performance is excellent for 2D applications, and the integration with Linux is solid.

While lack of hardware acceleration does limit its capabilities for intensive 3D gaming, Anbox fills an important niche and continues to mature with ongoing development. It‘s absolutely worth trying for Linux users wanting access to the Android app ecosystem.

I encourage you to test it out! Let me know in the comments if you have any other questions.

Similar Posts