Waydroid is an excellent tool that lets you access Android apps like native applications on your Linux machine, following a container-based philosophy similar to the Android subsystem in Windows and capable of booting the full Android system.

It has access to Linux namespaces (user, pid, uts, net, mount, ipc), and within the container, Android has direct access to the system hardware. Currently, the provided Android OS will be based on Lineage OS 21 (Android 11), so certain discontinued apps might not work.

Yet, it's an amazing tool to experience a full-fledged Android system running on your Linux system. So, stick with this article till the end to learn how to install it on Ubuntu with a few usage examples.

How to Install Waydroid on Ubuntu

1. First, open your terminal and execute the following command to install the required packages:

  • sudo apt install curl ca-certificates

Output:

installing required packages for waydroid

2. Add the Waydroid repository using the provided script.

  • curl https://repo.waydro.id | sudo bash

Output:

adding waydroid repository

If the script fails to detect your distribution version, you can manually provide an option by appending -s <DISTRO>. Currently supported values are: focal, jammy, kinetic, lunar, mantic, bookworm, bullseye, and sid.

3. At last, install Waydroid.

  • sudo apt install waydroid

Output:

installing waydroid

4. Once the installation is finished, launch Waydroid from the application menu, and then the following window will appear. Here, keep the values for "System OTA" and "Vendor OTA" as default, and for "Android Type", you can decide between "Vanilla" (without Google Services/Apps) and "Gapps" (with Google Services/Apps), and then click on the "Download" button.

waydroid home window

5. Once the Android image is successfully downloaded and configured, click on the "Done" button.

android image installed and configured in waydroid

How to Access the Android System

Once you have successfully installed Waydroid and configured the Android image by following the previously mentioned steps, relaunch Waydroid from the application menu, and it will launch the Android system on your desktop.

android screen on linux desktop

As you can see, it occupies the full width and height of your desktop screen, which is quite annoying. Therefore, you can adjust the Android size to your preferred width and height by tweaking the values in the following command.

  • Specify the width (in this case, 650).
  • waydroid prop set persist.waydroid.width 650
  • Specify the height (in this case, 720).
  • waydroid prop set persist.waydroid.height 720

Once you are done applying these changes, make sure to close the current Android session using the following command:

  • waydroid session stop

Output:

resizing the android resolution in waydroid

Now, relaunch it from the application menu to see the changes.

android system with new resolution

How to Install, List, and Remove Android Apps

If you selected Vanilla at the time of initializing Waydroid, then there's no Google Play Store to install Android apps. Instead, you can use a third-party app store, such as F-Droid.

So, to install it or any other app, first download its APK file, then execute the following Waydroid command to begin the installation process, and later, to list all the installed applications, run the next command.

  • Checking the path where the APK file is located.
  • ls ~/Downloads/
  • Installing the APK file.
  • waydroid app install ~/Downloads/F-Droid.apk
  • Listing all installed Android apps.
  • waydroid app list

Output:

installing android app and list all installed apps

Once the Android app is installed, you can find and launch it from the application menu, just like a native application.

checking android apps in application menu

If you want to remove an Android app, simply specify its package name in the following command:

  • waydroid app remove packageName

Mount Host System Directory in Android

To mount the host system directory (let's say, ~/Documents) on your Android system (let's say, the Documents folder), simply run the following command:

  • sudo mount --bind ~/Documents ~/.local/share/waydroid/data/media/0/Documents/

Output:

mounting host system directory in android system

Here is a picture of the shared directory from the host system to the Android system.

accessing host system mounted directory in android system

How to Remove Waydroid

This article would be incomplete without showing the removal steps. So, if you ever wanted to remove Waydroid, then simply stop the Android session and container by running.

  • waydroid session stop
  • sudo waydroid container stop

And then remove the Waydroid.

  • sudo apt remove --autoremove waydroid

Output:

removing waydroid from ubuntu

Execute the following command to remove the leftover files and directories:

  • sudo rm -rf /var/lib/waydroid ~/waydroid ~/.share/waydroid ~/.local/share/applications/*aydroid* ~/.local/share/waydroid

If you don't want to reinstall it in the future, you can also remove the source repository and key.

  • sudo rm /etc/apt/sources.list.d/waydroid.list /usr/share/keyrings/waydroid.gpg