As XFCE still doesn't work (at least in my case with Wayland, and that's my prefered desktop, I still use X11. I want to use some Android application on my Desktop computer. However, Waydroid, the Android virtual machine for Linux is made for Wayland display (so the name Way(land) + (An)droid). Weston is of good help to make it working.
Update 2028-09-01, I managed to have XFCE4 working on Wayland on this hardware, probably due to recent XFCE updates. It use labwc as compositor, that depend itself on wlroots. Still have some limitation (keyboard forced to english, no mean to switch (keyboard and iBus should depend on labwc or wlroots layers), parameters not available at least on menus, no screensaver/locker, see also one of the XFCE4 author's blog entry for more details), so I will wrote a new article about some tweaks in this case
WARNING!! Waydroid start some components at root level, it may contains some Google ads/private data or NSA spies, that's probably better to use it on a VM or a system without sensitive content
If you have other Aarch64 hardware you can skip this, but in my case, I use since about 6 month now a Rockchip RK3588 based (ARM 64bits) Radxa ITX board as main computer There is relatively good management of Vulkan 1.4 and Zink since this summer in GIT version, a stable base is available in Mesa 25.2.0 since 2025-08-06) for the Mali-G610 MP4 GPU included in the SoC. the RK3588 NPU start to be managed by the Rocket driver since 2025-07-28 in mainline Mesa, will be available in this first state in following release of Mesa.
Table of Content
- Compilation of Mesa driver if needed in case of RK3588
- Run Waydroid on X11
- Waydroid in a window on Wayland
- Android reboot and network problem after resizing window
- Copy APK in the Waydroid directory
Compilation of Mesa driver if needed in case of RK3588
I will add the receipe for Debian, as Debian 13 Trixie is out since yesterday, and still use Mesa 25.1.x.
For ArchLinux, I used a tuned version of Arch Linux Mesa driver. The 25.2.0 will most probably be available soon on Arch Linux ARM, but at the current state, git version add new features everydays, and it's quite stable. X11 has still some slowdown on desktop with Gallium Panftost driver (worst with PanVK vulkan driver), in regard to software LVVMpipe driver or on it's Wayland counterpart. However some 3d appliations are faster and are more supported, thanks to Zink (OpenGL to Vulkan translation layer).
- My adapted version of PKGBUILD of mesa-git on RK3588 is available here.
- Update 2025-09-10: VDPAU has been removed from mesa: PKGBUILD of of mesa-git for RK3588 without VDPAU
- Update 2025-09-15, use AUR release I made: mesa-rk35xx-git instead.
Used system:
- ArchLinux was installed using SputnikRocket installer if I'm not wrong, but without edk2 (useless UEFI), PKGBUILDs for rockchip compiled from x8__64
- I also triend BredOS is another option for Arch Linux on aarch64, if I remember.
- I used the linux rockchip Armbian kernel as kernel, by copying it from Armbian/debian distro.
simple unarchive this go in the directory and make the package with:
makepkg
Some dependencies could be needed, makepkg will ask for them. Install them with pacman, then restart the makepkg.
then install it with:
sudo pacman -U mesa-git-25.3.0_devel.<version_of_the_buil>-aarch64.pkg.tar.xz
Choose between standard OpenGL driver or Zink/Vulkan 1.4 driver for desktop:
There are several choices here, use Zink+Vulkan by default on the whole X11 desktop or just for needed applications.
Wayland and lot of other applications will simply work with current state of Mesa for RK3588's Mali G610 GPU, this will not the case of applications like Blender that will need a more advanced driver.
You can simply set before a command
export MESA_LOADER_DRIVER_OVERRIDE=zink
export GALLIUM_DRIVER=zink
/pyt
On ArchLinux, add this two variable on begining of the script /etc/lightdm/Xsession, just after the 3 first comment lines (see below) :to have it by default on X11. I un/comment these 2 export lines when needed for testing, you have just to quit your session and restart it to have this settings take effect on any X11/Xorg based desktop.
#!/bin/sh
#
# LightDM wrapper to run around X sessions.
export MESA_LOADER_DRIVER_OVERRIDE=zink
export GALLIUM_DRIVER=zink
echo "Running X session wrapper"
Run Waydroid on X11
You need first to compile Waydroid and all its dependencies:
yay -S waydroid
python-pyclip is needed for clipboard manager support.
pacman -S python-pyclip
Then you need Wayland+Weston
pacman -S weston
Note: I use weston here as that's the default demo compositor of Wayland, but it works with
swayorlabwctoo. In fact probably any simple wayland compositor.
- warning!!! Resize first the Weston/Wayland window at a good enough size for working, I will explain why for after and how to resolve the issue So you can launch weston, just as it, and resize it manually before starting waydroid.
weston &
To avoid this kind of problem you need to found how to force fixed window size. To not forget to have the resize before, you can create the window with the good size with arguments on command line:
weston --width=1240 --height=860 &
You can also use the --fullscreen option instead of --width and --height:
weston --fullcreen &
Warning!!! when you have set the WAYLAND_DISPLAY option, weston will not start again, in the shell session, simply type
unset WAYLAND_DISPLAYor launch another terminal session. By passing it to command line without export, as here, you will not have this problem
Then you can export its wayland DISPLAY number, as it's not 0 as it's the case on pure Wayland session.
It's possible to simply launch waydroid without exporting WAYLAND_DISPLAY variable this way:
WAYLAND_DISPLAY=wayland-1 waydroid first-launch
Et voilà!!!
Waydroid in a window on Wayland
It's also possible to limit Waydroid to a window in wayland. Just use the same technic, creating as example Weston window by typing weston after launching your usual desktop session, and then use the WAYLAND_DISPLAY=wayland-1 waydroid first-launch (wayland-0 will be the current root wayland).
Android reboot and network problem after resizing window
Warning, if you resize the Waydroid/Weston/Wayland window when Android is already started, Android will be restarted automatically and the network will not work anymore. To resolve this, follow this steps:
- Stop Android with the Android interface.
- In a terminal type:
waydroid session stop
- Then restart waydroid:
waydroid first-session
Think to stop waydroid session after each usage end, as lot of process will continue to runs in background.
To set the network and its network resolver, waydroid uses this script:
/usr/lib/waydroid/data/scripts/waydroid-net.sh
As we can see in it use by default an LXC_BRIDGE that uses DNSmasq as default cache/resolver
USE_LXC_BRIDGE="true"
LXC_BRIDGE="${vnic}"
LXC_BRIDGE_MAC="00:16:3e:00:00:01"
LXC_ADDR="192.168.240.1"
LXC_NETMASK="255.255.255.0"
LXC_NETWORK="192.168.240.0/24"
LXC_DHCP_RANGE="192.168.240.2,192.168.240.254"
LXC_DHCP_MAX="253"
LXC_DHCP_CONFILE=""
LXC_DHCP_PING="true"
LXC_DOMAIN=""
LXC_USE_NFT="true"
LXC_IPV6_ADDR=""
LXC_IPV6_MASK=""
LXC_IPV6_NETWORK=""
LXC_IPV6_NAT="false"
Copy APK in the Waydroid directory
The user Waydroid directory is not easy to found, it is placed in ~/.local/share/waydroid/. Not all directories are accessible from host OS user either, you have to sudo a bit in some cases. In my case the Android VM main user has the user 1023 and group 1023.
There is two way to copy files to this directory.
By sudo cp
The easier way I found, to put apk (for installation) or other files in an acessible place in Android VM is the following one. $HOME expression will be evaluaded before the sudo is effectively launched here).
I first get the F-Droid.apk from F-Droid site main page, then, put in an accessible directory and chown the owner/group
sudo cp -a F-Droid.apk $HOME/.local/share/waydroid/data/media/0/Download/
sudo chown 1023:1023 $HOME/.local/share/waydroid/data/media/0/Download/F-Droid.apk
You will now able to see this apk in the Download directory under Android and to install it. By using the file manager.
Note: After puting the file in the directory, you will need to go out of the folder and go in again, in default file manager at least. Android is not very good at updating current folders, and this is a recurrent problem, despite it is based on Linux kernel, that inotify, as described in (man 7 inotify) feature for this for maybe at least 20 years, and most applications use it on GNU/Linux distributions. The inotify-tools available in all distributions, allow you to script this in simple bash scripts. Python has pyinotify (Arch python-pynotify, Debian python3-pynotify), aionotify (Arch AUR: python-ainotify, Debian python3-ainotify) or more appealing asyncninotify (Arch AUR python-asyncinotify, no Debian 13 Trixie module) modules, among others, Ruby and most other languages too. It's also possible to poll every seconds for changes using watch function.
By sudo mount --bind
This doesn't work well, but the official documentation suggests to mount bind shared folders for standard folders (Documents, Downloads, Music, Pictures, Videos) and that you can also create new shared folders. You can keep the same name or use a different names for the folders, like here with different letters cases. Anyway, update seems to be worst than in sudo copy case, can't see any update, even after going out and back in the destination folder. Maybe doesn't work with recent version of Android?
mkdir ~/droidshare
sudo mkdir ~/.local/share/waydroid/data/media/0/Droidshare
sudo mount --bind ~/droidshare ~/.local/share/waydroid/data/media/0/Droidshare
