[How To] Install/Run Waydroid on Xfce (or other non-Wayland desktops)

2023-12-13-02-25

Intro

Waydroid is by far the most performant android emulator on Linux. There’s only one catch: it requires a Wayland session.

While this would seemingly be prohibitive for desktops like Xfce, Mate, Cinnamon, (or KDE or Gnome in an X11 session), there is an incredibly easy way to bypass this limitation and enjoy the blazing fast performance of Waydroid in these non-Wayland desktops.

Note: This has only been tested on Xfce, but it should work on other desktops

Instructions

1. Install Waydroid and your android image of choice
  • As of this post, these are available in the AUR. Use your AUR helper of choice.
  • Note: if you want google apps to be available, use waydroid-image-gapps instead of waydroid-image
pikaur
pikaur -S waydroid waydroid-image
yay
yay -S waydroid waydroid-image
pamac
pamac build waydroid waydroid-image

2. Initialize and start Waydroid/Container
sudo waydroid init
sudo systemctl enable waydroid-container #only run this if you want the background waydroid service to automatically run at startup
sudo systemctl start waydroid-container

3. Install and launch Weston
  • Weston is a wayland compositor. When launching it from an existing X11 session, it will run “nested” in it’s own window
sudo pacman -S weston
weston

4. Show the Waydroid UI within Weston
  • Resize/maximize the Weston window as desired
  • From within the running Weston window, open Terminal (icon in the top-left), then run:
waydroid show-full-ui

If all went well, you should now have Waydroid running and visible within the Weston window.


5. Closing Waydroid
  • Close Weston window and run:
sudo systemctl stop waydroid-container

6. Starting Waydroid going forward
  • Make sure the background service is running
sudo systemctl start waydroid-container
  • Launch Weston
weston
  • Show Waydroid UI (from Terminal in Weston)
waydroid show-full-ui

Optional

If you installed waydroid-image-gapps, google applications will refuse to run until you add it to your google account. Instructions for doing that can be found here.


Enjoy :slight_smile:

2 Likes

Just make sure the packages are up to date.
As of now:

aur/waydroid-image-gapps 18.1_20231125-1 (+12 1.84) (Out-of-date: 2023-12-03) 

I have yet to run into any restrictions or issues using slightly outdated android images with waydroid.

In addition, updates seem to be fairly frequent (there were 4 updates in the month of November alone), with the last one being only 2 weeks ago.

I would not say this is a point of concern for these packages.

I don’t think it would either - they are images and is run as image.

1 Like