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 ofwaydroid-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
(if using the gapps image, run this instead: sudo waydroid init -s GAPPS
)
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