Skip to content

waydroid

Installation

# sudo pacman -S linux-xanmod-anbox linux-xanmod-anbox-headers
sudo pacman -S linux-zen linux-zen-headers
sudo rm -rf /var/lib/waydroid /home/.waydroid ~/waydroid ~/.share/waydroid ~/.local/share/applications/*aydroid* ~/.local/share/waydroid
sudo systemctl stop waydroid-container
# I find that waydroid from arch official repo performs poorly (4th March 2025). So I recommend and use waydroid-git
paru -S waydroid-git
sudo waydroid init -s GAPPS

# waydroid-extras: https://aur.archlinux.org/waydroid-script-git.git
# For amd use libndk
sudo waydroid-extras install libndk widevine magisk

sudo systemctl enable waydroid-container
sudo systemctl start waydroid-container

# Using cage since I use xorg.
# cage waydroid show-full-ui
waydroid show-full-ui

Google Play certification

https://docs.waydro.id/faq/google-play-certification

Multi-window mode

source: https://docs.waydro.id/usage/waydroid-prop-options

waydroid prop set persist.waydroid.multi_windows true

Shadowfight Arena 4

Setup udev waydroid to detect Joystick

waydroid prop set persist.waydroid.udev true
waydroid prop set persist.waydroid.uevent true

Emulate Joystick

git clone https://github.com/iosonofabio/virtual_gamepad
paru -S python-uinput python-pynput

# For script to work load uinput
sudo modprobe uinput
# Load module on boot
sudo echo uinput >> /etc/modules-load.d/uinput.conf

# To use script without sudo:
sudo groupadd uinput
sudo usermod -aG uinput "$USER"
sudo chmod g+rw /dev/uinput
sudo chgrp uinput /dev/uinput
sudo usermod -aG input "$USER"

For permissions (uinput group owning /dev/uinput) to persist across reboot:

/etc/udev/rules.d/99-uinput.rules
KERNEL=="uinput", GROUP="uinput", MODE="0660"

Play

waydroid show-full-ui
play.sh

virtual_gamepad.py with hjkl bindings

cd ~/admin
python -m venv gamepad
cd gamepad
source bin/activate
pip install --upgrade pip
pip install python-uninput evdev
git clone https://github.com/vectorspacexyz/virtual_gamepad
cd virtual_gamepad
python virtual_gamepad.py

play.sh

~/bin/play.sh
#!/bin/bash

cd ~/admin/gamepad
source bin/activate
python virtual_gamepad/virtual_gamepad.py

taunts with xdotool and xbindkeys

I don't think there's a way to get taunts working just with joystick. You need to make use of the mouse and screen. I did this using xdotool and xbindkeys.

~/.xbindkeysrc
"~/bin/taunts.sh z"
    m:0x0 + c:52
    z

"~/bin/taunts.sh x"
    m:0x0 + c:53
    x

"~/bin/taunts.sh c"
    m:0x0 + c:54
    c

"~/bin/taunts.sh v"
    m:0x0 + c:55
    v
~/bin/taunts.sh
#!/bin/bash

if [[ $1 == "z" ]];
then
  xdotool mousemove 3326 937
  xdotool mousedown 1
  xdotool mousemove 3285 921
  sleep 0.1
  xdotool mouseup 1
elif [[ $1 == "x" ]];
then
  xdotool mousemove 3326 937
  xdotool mousedown 1
  xdotool mousemove 3326 852
  sleep 0.1
  xdotool mouseup 1
elif [[ $1 == "c" ]];
then
  xdotool mousemove 3326 937
  xdotool mousedown 1
  xdotool mousemove 3435 921
  sleep 0.1
  xdotool mouseup 1
elif [[ $1 == "v" ]];
then
  xdotool mousemove 3326 937
  xdotool mousedown 1
  xdotool mousemove 3285 1001
  sleep 0.1
  xdotool mouseup 1
fi

I found the appropriate location for mouse using xdotool getmouselocation --shell.

I run xbindkeys with xbindkeys -n so that I simply ctrl-c the script to revert keybindings.

Logs

vector@ThinkpadP14s ~/.local/share/waydroid/data $ sudo waydroid init -s GAPPS
[10:10:01] Downloading https://sourceforge.net/projects/waydroid/files/images/system/lineage/waydroid_x86_64/lineage-18.1-20250510-GAPPS-waydroid_x86_64-system.zip/download
[Downloading] 883.23 MB/883.44 MB     6866.1 kbps(approx.)[10:12:39] Validating system image
[10:12:40] Extracting to /var/lib/waydroid/images
[10:12:48] Downloading https://sourceforge.net/projects/waydroid/files/images/vendor/waydroid_x86_64/lineage-18.1-20250510-MAINLINE-waydroid_x86_64-vendor.zip/download
[Downloading] 197.46 MB/197.75 MB    12713.57 kbps(approx.)[10:13:00] Validating vendor image
[10:13:00] Extracting to /var/lib/waydroid/images

Weird waydroid issues

https://github.com/waydroid/waydroid/issues/1576

Solved this by first setting up sound.

sudo pacman -S pipewire wireplumber pipewire-pulse pipewire-alsa
# systemctl --user enable pipewire
reboot

Comments