in

How to run Android apps on Linux

We have a plethora of Android emulators for Windows. But What about Linux? Here, we are going to show you how to run Android apps on Linux. So, if you are one of those who enjoy using Linux and have been looking for a way to play say your favourite Android games on Linux, this guide is for you.

The Linux operating system may not be as easy to use as Windows with many easy to used Android emulators available, but one can still run his or here best Android apps and games on it as well.

Andbox, the Android emulator for Linux

Anbox puts the Android operating system into a container, abstracts hardware access and integrates core system services into a GNU/Linux system. Every Android application will be integrated with your operating system like any other native application.

So, to run any Android application on your Linux OS, then Anbox is the tool you’ll need to install.

Features of Anbox

Open Source

The whole source code is available as Open Source and licensed under the terms of the Apache and GPLv3 license.

No limits

As Anbox is running an entire Android system, conceptually any application can run.

Secure

Anbox puts Android apps into a tightly sealed box without direct access to hardware or your data.

Performant

Runs Android without hardware virtualization and seamlessly bridges over hardware acceleration features.

Integrated

Tightly integrated with the host operating system to offer a rich feature set.

Convergent

Anbox scales across different form factors similar to Android does. It works on a laptop and a mobile phone.

Installing Anbox to run Android apps on Linux

run Android apps on Linux

Although you can find Anbox on other Linux distros, Snaps is still the easiest way to get set up. 

Also, you will need to first install some kernel modules on your computer for this tool to work if you are not running Ubuntu 20.04.

Anbox modules installation

As we said earlier, for those running a version of Ubuntu below 20.04, you will have to install some modules first to get things working.

Anbox Modules installation on Arch Linux

AUR is the best way to install required modules on Arch Linux. Below are the commands you will need to run:


sudo pacman -S git base-devel

The first command will install the base-devel and git on your system. Next, you the following command to git clone the Anbox kernel modules packages.


git clone https://aur.archlinux.org/anbox-git.git

Now, you will have to navigate to the anbox-git folder and run the package build process using the commands below.


cd anbox-git
makepkg –sri

And finally, load the kernel modules using these comands


sudo modprobe ashmen_linux
sudo modprobe binder_linux

Installing the modules on Ubuntu

To install the necessary modules on Ubuntu we’ll be using PPA. Use the following commands


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

Manually load the kernel modules next using the command below


sudomodprobe ashmen_linux
sudo modprobe binder_linux

Installing Anbox with Snap

The above steps was for those using older versions of Linux distrubitions. So, after installing all the necessary modules, we can now install the Anbox from Snaps Store which comes pre-built in Ubuntu.

Make sure that you have snapd installed and running on your system, and run the following command to install Anbox.

sudosystemctl status snapd

sudo snap install –devmode –beta anbox

After installing Anbox, to be able to install apps, you will have to install Android Debug Bridge(ADB) to manually push Android APKs to your virtual Android installed in Anbox.

Also, Android Studio is required and to install it, we first of all have to install Java.

Installing Java, Android Studio and ADB

To install Android Studi as we mentioned earlier, Java is required. Install Java using the command below

sudo apt install openjdk-11-jdk

Next, download Android studio for Linux from here and then open the terminal and navigate to the “Downloads” folder using the command below:

cd~/Downloads

Now extract the Android studio compressed file and navigate to the bin folder and install Android Studio using the commands below from the terminal.

cdandroid-studio/bin

./studio.sh

After Android studio has completely installed, install now ADB and start the server. Use these comands:

sudo apt installandroid-tools-adb

adb start-server

run Android apps on Linux
Anbox running

Installing Android apps

Once the Andbox has been installed sucessfully, you can then download any APK file and push it to the Anbox using ADB.

Run the command adb devices and the server will start and list out Anbox as an emulated device. Now, you’re ready to install your app.

You can download any apk file from APKPure or APKMirror and then push it using the following command. But not that, you will need to first have to navigate to the folder containing the apk.

Also, be sure to locate an x86 APK. Even though you’re emulating Android, you’re still on a regular 64bit CPU, not ARM.


adb install app-name.apk

Report


What do you think?

10 points
Upvote Downvote
N.L Tayoh

Written by N.L Tayoh

One with a great passion for tech. A blog writer loves animes more than any real TV shows/series!. Good in Android & computer maintenance, Web designing...

Leave a Reply