How to Run Android Apps on Linux with Waydroid

For those eager to experience their favorite Android applications on a Linux desktop, Waydroid emerges as an innovative solution. This container-based architecture enables users to run Android apps with remarkable efficiency, offering near-native performance and seamless integration into the Linux environment.

Introduction to Waydroid

Waydroid stands out by booting a complete Android system directly on your Linux machine. Unlike traditional emulators that often consume excessive resources, Waydroid leverages Linux containers (LXC) to deliver a lightweight and speedy experience. This means that Android applications can run natively, enhancing their performance and responsiveness.

Compatible with various Linux distributions and CPU architectures, Waydroid also utilizes Android’s Mesa technology to optimize graphics performance. By allowing the container to tap into the host system’s GPU, it ensures that applications operate smoothly, making it an attractive option for Linux users.

Waydroid Installation

Before diving into the installation process, ensure that your system is running a Wayland session, especially if you are using Ubuntu 22.04 or later. You can verify this by opening a terminal and executing the following command:

echo $XDGSESSIONTYPE

This command will reveal your current session type. Additionally, confirm that your system is up to date and that you have the necessary prerequisites installed, such as curl:

sudo apt update && sudo apt install curl ca-certificates -y

Next, add the official Waydroid repository to your system:

curl -s https://repo.waydro.id | sudo bash

If your distribution isn’t automatically detected, you may need to specify your version manually (for example, -s jammy for Ubuntu 22.04).

To complete the installation, execute the following command:

sudo apt install waydroid -y

After installation, Waydroid can be launched from your Applications menu.

For Fedora users, the installation can be accomplished using the DNF package manager:

sudo dnf install waydroid

Note: Installation commands may vary slightly on other distributions like Arch Linux. It is advisable to refer to the official Waydroid documentation for specific instructions tailored to your system.

Setting Up Waydroid

Upon launching Waydroid for the first time, you may encounter a setup window prompting you to download an Android image. This image serves as the Android system operating within the container. You can choose between a Vanilla image (without Google services) or the GAPPS image (with Google Play Services).

If you wish to access applications from the Google Play Store, select GAPPS. After making your selection, click Download and patiently await the completion of the process.

Once the download is finished, click Done to automatically launch Waydroid. Should it not launch, you can easily relaunch it from your menu. Although it may take a moment, a virtual Android environment will soon materialize.

By default, the device is untrusted, necessitating registration to utilize the Google Play Store. To register, open your Linux terminal and enter:

sudo waydroid shell

Within the Waydroid shell, execute the following command to retrieve your Android ID:

ANDROIDRUNTIMEROOT=/apex/com.android.runtime ANDROIDDATA=/data ANDROIDTZDATAROOT=/apex/com.android.tzdata ANDROIDI18NROOT=/apex/com.android.i18n sqlite3 /data/data/com.google.android.gsf/databases/gservices.db "select * from main where name = "androidid";"

This command will return a string of numbers—be sure to copy this value.

Next, navigate to the Google Uncertified Device Registration page, paste your Android ID, complete the robot verification, and click Register.

Finally, close and reopen Waydroid, or run the following commands sequentially:

waydroid session stop
waydroid session start

Your device is now registered, allowing you to install and utilize Android apps, including those available on the Google Play Store.

Installing Android Apps on Waydroid

If you selected the GAPPS image during setup, you can directly access the Google Play Store from within Waydroid. Simply log in with your Google account and install applications just as you would on a standard Android device.

To uninstall an app, follow the same procedure as you would on your Android device, such as clicking Uninstall.

This intuitive process simplifies app management, making it as straightforward as on your mobile device.

If you prefer not to use the Google Play Store, you can manually install apps using APK files or explore alternative app stores like F-Droid, which often feature lightweight and privacy-focused applications.

To install an APK, download it from a trusted source, then open your terminal, navigate to the folder containing the APK, and execute:

waydroid app install your_app.apk

Be sure to replace your_app.apk with the actual file name. The installation process should complete within moments.

AppWizard
How to Run Android Apps on Linux with Waydroid