Home Downloads How to run Android Apps in Linux without an Emulator

How to run Android Apps in Linux without an Emulator

Running Android apps on Linux without an emulator is possible thanks to innovative solutions like Anbox and Waydroid. These tools integrate Android apps into the Linux environment, offering a native-like experience. This guide explores how to set up and use these platforms, enhancing your Linux system with Android app functionality.

by Emmanuel
Published: Updated:
Run Android Apps on Linux

As an operating system, Linux continues to be regarded as one of the most powerful platforms in the world, thanks to its stability, security and flexibility. Additionally, its cousin, Android (which runs on the Linux kernel) powers most smart phones today, with the highest number of applications of any mobile operating system.

It’s great to think that we could bring these two together at such a basic level – to run an Android application on a Linux machine without an emulator. Good news, because yes we can! In this blog post, I’ll walk you through the steps to get it running. The key steps require the use of a few tools, each of which form an important step in achieving Android app compatibility on a Linux machine.

How to run Android applications in Linux without an emulator

Way before Microsoft could bring native android support to Windows 11, Linux spoiled the party. Linux is built with a compatibility layer that enables users to run android apps on any Linux distro called WayDroid. The layer offers an enhanced performance than an optimized android emulator. Using it creates the impression like Android apps are natively running on the Linux machine. Enough of talk; let’s now put this into action.

Run apps in Linux without an emulator

Step 1: Visit WayDroid’s official website

Step 2: Screen redirection

This should redirect you to such a screen:

Click on install on the Waydroid page

Click on install on the Waydroid page

Step 3: Click install

Then click on install, as highlighted above. This should automatically scroll down to such a page:

it will scroll down

It will scroll down

You should locate a blue highlighted “docs ” link on the abovementioned page.

Step 4: Open in a new tab

Right-click on it and select the “open link in a new tab” as shown below:

open link in a new tab

Open the link in a new tab

Then scroll down to your PC’s distro type; in our case, we will scroll to Ubuntu/Debian and derivatives:

scroll to your preferred distro

Scroll to your preferred Distro

Step 5: Install prerequisites

Here, you must first install the Client URL, well known as (CURL). This command-line utility enables the transfer of data over several network protocols. It communicates with a web or app server by specifying a relevant URL and the data intended to be received or sent. Libcurl, a portable client-side URL transfer library, powers curl.

To do this, open up your terminal by hitting the “Ctrl+Alt+T” keyboard shortcut combinations. After that, run the following command:

sudo apt install curl ca-certificates -y
install curl

install curl

Note: When asked if you want to proceed with the software installation, type “Y/y” and then press “Enter” on your keyboard. Alternatively, you can just hit the “Enter” button on your keyboard, and the installation should be underway.

Step 6: Export the distro command

Next, issue the following command based on your Linux distro. If you are using the latest Debian, select “bullseye,” and for Ubuntu users, use jammy for the Distro. In case you get a “Permission denied” error on the way, just run the “sudo su” command and then proceed with the commands:

export DISTRO="jammy"
export command

export command

Step 7: Download WayDroid’s GPG key

After you are done with that, run the following-given command to help in downloading WayDroid’s GPG key on your Linux distro.

sudo curl --proto '=https' --tlsv1.2 -Sf https://repo.waydro.id/waydroid.gpg --output /usr/share/keyrings/waydroid.gpg
echo "deb [signed-by=/usr/share/keyrings/waydroid.gpg] https://repo.waydro.id/ $DISTRO main" | sudo tee /etc/apt/sources.list.d/waydroid.list
sudo apt update
download gpg key

Download GPG key

Step 8: Upgrade the system cache repo

After that, you can run the following command in case there are packages in your system that need to be upgraded:

sudo apt upgrade
upgrade system

Upgrade system

Step 9: Install WayDroid

In the end, you should be set to set up WayDroid on your Linux machine. To do this, run the command and press “Y/y”, and hit the “Enter” button whenever prompted to proceed:

sudo apt install waydroid -y
install waydroid

Install WayDroid

And that should install WayDroid on our Linux system. Let us now focus on how we can start our WayDroid.

How to start WayDroid

Step 10: Start WayDroid services

Now that we are almost done. We need to fire up some WayDroid services before executing Android applications on our Linux PC without an emulator. Interestingly, there are a couple of ways to get this done. As per WayDroid’s official website, you can manually start the service by issuing the following command:

sudo waydroid container start
manually start the service

Manually start the service

At the tail end, run the following command, and WayDroid’s Graphical User Interface will open up on your Linux computer. You can now enjoy the Android applications on your Linux PC. By the way, you can also start WayDroid from the app drawer:

waydroid show-full-ui
show ui

Show UI

And WayDroid should comfortably run.

Alternatively, you can go to WayDroid’s home page and copy the highlighted command to your terminal:

use this command

Use this command

Or copy and paste the following command in your terminal as displayed here:

sudo systemctl enable --now waydroid-container
enable waydroid

Enable WayDroid

Then click the “Activities” button on your desktop and search for WayDroid as shown below:

click on waydroid

Click on WayDroid

Clicking on the WayDroid icon should pop up the following window:

select android type

Select Android type

On the Android type, you can either select VANILLA or GAPPS. We suggest you choose GAPPS as it allows you to install Android apps later when using WayDroid.

Then click on “Download” as shown below:

click on download

Click on Download

This will take some time, depending on your Internet speed. Then click on the green highlighted button”Done”:

click on done

Click on Done

Then go and start the application by clicking on the “Activities” menu and selecting “Waydroid” as shown below:

click on waydroid

Click on WayDroid Again

And you should have your Android system up and running on your Linux software:

android system up and running

Android system up and running

Proceed and install Android apps on Linux and enjoy the near-native experience.

Let’s poke at this other approach to do what we have just looked at. Here we will be using Anbox.

How to run Android apps using Anbox

Anbox is software that puts the Android OS into a container, abstracts hardware access, and merges core system services into a GNU/Linux system. Each Android app will be integrated with your OS like any other native application. Anbox app is built on top of LXCv(Linux Containers) tech to segregate the system from the host; the system is from time to time updated with the current version of the Android open source project.

Now, let us see Anbox’s features.

Features of Anbox:

  • It is secure – Anbox places its Android apps into a tightly sealed box without direct access to hardware on your data.
  • It is convergent – Anbox scales across different form factors akin to what Android does. It functions on a laptop and a mobile phone.
  • It is performant – Anbox runs Android without hardware virtualization and flawlessly bridges over hardware acceleration features.
  • The project is open source – Anbox’s entire source code is freely available and licensed under the terms of GPLv3 and Apache license; it has no limitations.
  • It is integrated – Tightly integrated with the host operating system to offer a rich feature set.

Emulators vs. Anbox

A significant difference between Anbox and other emulators, for instance, Genymotion, is that while others need to run on an emulator that generates its system, with its virtual hardware, kernel, and more, Anbox, on the other hand, runs an android system using the same hardware, kernel and more to host without any emulation layer, permitting better integration with the host OS.

Installation of Android apps

While play store installation is generally possible, Anbox does not ship with what is installed since Google does not permit anyone to ship their apps on an uncertified device. The vendor did not sign an agreement with them. As such, you may be asking, why should I set up software that supports other applications but can’t install them? You can solve your problem if you have an Android Debug Bridge (ADB) set up on your system, and then you just need to do: $ adb install path/to/my-app.apk, And your software should be integrated with the host system. An ADB is a tool used to debug Android-based devices.

Let us now see how we can install Anbox on our Linux system.

How to install Anbox on a Linux system

Anbox is only distributed as a .snap app. DevOps selected this option because of its straightforward nature to distribute the software to users, regular and delta updates, easy and fast packaging, and other options. There is no plan to create a Flatpak by the Anbox team, but they accept contributors who would love to port it to Flatpak. Because Anbox is still not in the stable distribution list, it does not use proper confinement for snaps. As such, it is only possible to set up on dev mode, which is not a much secure mode to install as it disables confinement of apps installed, but this should be resolved in the coming days or months.

Here are the steps to follow up to set it on your system using snaps.

Issue the following command to install it:

sudo snap install --devmode --beta anbox
install anbox

Install anbox

Or fetch the script using the following command:

wget https://raw.githubusercontent.com/anbox/anbox-installer/master/installer.sh -O anbox-installer ​
fetch file

Fetch file

And that should do it!

Just click on “Activities,” then search for “Anbox,” and click on the icon to open it

open the anbox

Open the Anbox

Anbox up and running:

anbox up and running

Anbox is up and running

Final thoughts

And that is how you cleanly set up and run Android apps on your Linux PC. The Linux version of the Distro you are using does not matter whether it is Debian, Ubuntu, or another distro. As mentioned earlier, the performance of Android apps is exceptional.

The above approaches have shown us that even if you don’t own an Android device, you can still run some apps or games, for instance, Gmail, Whatsapp, and many more. We hope this guide came in handy for you guys! And that is all from us. In case of any questions, please let us know in the comment section below.

You may also like

1 comment

ParthaE June 21, 2023 - 10:33 PM

Thankyou for this article!

Reply

Leave a Comment

fl_logo_v3_footer

ENHANCE YOUR LINUX EXPERIENCE.



FOSS Linux is a leading resource for Linux enthusiasts and professionals alike. With a focus on providing the best Linux tutorials, open-source apps, news, and reviews written by team of expert authors. FOSS Linux is the go-to source for all things Linux.

Whether you’re a beginner or an experienced user, FOSS Linux has something for everyone.

Follow Us

Subscribe

©2016-2023 FOSS LINUX

A PART OF VIBRANT LEAF MEDIA COMPANY.

ALL RIGHTS RESERVED.

“Linux” is the registered trademark by Linus Torvalds in the U.S. and other countries.