Software & AppsOperating SystemLinux

How To Install Android Emulator on Ubuntu 20.04.3 Without Genymotion or Virtualbox

Ubuntu 21

In this article, we will guide you on how to install an Android emulator on Ubuntu 20.04.3 without using Genymotion or VirtualBox. The Android emulator we will be using is Anbox, a container-based approach to emulate the full Android operating system on your Linux machine.

Introduction to Anbox

Anbox, which stands for “Android in a Box”, is a free and open-source tool that allows you to run Android applications on your Linux system without the slowness of virtualization. It uses Linux namespaces (user, pid, uts, net, mount, ipc) to run a full Android system in a container and communicates with the host system for hardware access.

Installing Anbox

Before we start, please ensure your system is updated by running the following command in the terminal:

sudo apt update && sudo apt upgrade

This command will fetch the list of available updates (apt update) and then install these updates (apt upgrade).

Installing Anbox using snap

  1. Open a terminal and run the following commands:
sudo add-apt-repository ppa:morphis/anbox-support
sudo apt update
sudo apt install anbox-modules-dkms

These commands add a new PPA (Personal Package Archive) to your system (add-apt-repository), update your package list (apt update), and then install the Anbox modules (apt install anbox-modules-dkms). The anbox-modules-dkms package contains the kernel modules necessary for Anbox to run.

  1. Load the newly installed kernel modules into the kernel:
sudo modprobe ashmem_linux
sudo modprobe binder_linux

The modprobe command is used to load kernel modules into the Linux Kernel. Here, we are loading ashmem_linux and binder_linux modules which are necessary for Anbox to run.

Installing Anbox using apt

For Ubuntu Focal, Hirsute, Impish, and Jammy, you can install Anbox using apt:

  1. Open a terminal and run the following commands:
sudo add-apt-repository multiverse
sudo apt update
sudo apt install anbox

These commands add the multiverse repository to your system (add-apt-repository multiverse), update your package list (apt update), and then install Anbox (apt install anbox).

Running Anbox

Once Anbox is installed, you can launch it like any other installed application. However, please note that Anbox does not provide direct access to hardware. It uses Linux namespaces to run a full Android system in a container and communicates with the host system for hardware access.

Uninstalling Anbox

If you wish to remove Anbox and all its components, you can run the following commands:

  1. If you installed Anbox using snap:
sudo snap remove anbox
  1. If you installed Anbox using apt:
sudo apt remove --purge anbox
sudo apt autoremove

These commands will remove Anbox and any associated packages (apt remove --purge anbox), and then remove any unused packages (apt autoremove).

Please note that removing Anbox will also remove any Android applications or data that you have installed within the Anbox container.

Conclusion

In this article, we’ve shown you how to install an Android emulator on Ubuntu 20.04.3 without using Genymotion or VirtualBox. Anbox is a powerful tool that allows you to run Android applications on your Linux system with minimal overhead. Whether you’re a developer looking to test apps or a gamer looking to play on a larger screen, Anbox offers a simple and effective solution.

Can I install Anbox on Ubuntu versions other than 20.04.3?

Yes, you can install Anbox on Ubuntu versions like Focal, Hirsute, Impish, and Jammy as mentioned in the article.

Does Anbox provide direct access to hardware?

No, Anbox uses Linux namespaces to run a full Android system in a container and communicates with the host system for hardware access.

Will uninstalling Anbox remove my installed Android applications and data?

Yes, uninstalling Anbox will also remove any Android applications or data that you have installed within the Anbox container.

Can I use Anbox to test Android apps as a developer?

Yes, Anbox can be used by developers to test Android applications on their Linux system.

Is Anbox a suitable option for gaming on a larger screen?

Yes, Anbox can be used by gamers to play Android games on a larger screen using their Linux system.

Leave a Comment

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