In order to get an Android-only app working on a desktop computer I installed Weston and Waydroid which worked, but as I (and the target machine) run Mint 21 it’s not as simple as just running Waydroid and having it work, plus there is no way to close out Waydroid from within itself. In order to make it easier to start and stop I made this little script, run it once to start and again to stop. Edit as needed obviously but this should work as-is.

Edit: the & is not correct, lemmy is doing that, edit it to remove the amp; parts

#!/bin/bash
PID=$(pgrep "weston")
if [ "$?" -eq "0" ]; then
    waydroid session stop
    kill $PID
    exit
fi
weston --width=1920 --height=1080 --socket=wayland-1 &>/dev/null &
sleep 5
WAYLAND_DISPLAY=wayland-1 XDG_SESSION_TYPE=wayland waydroid show-full-ui
  • Rikj000
    link
    fedilink
    English
    arrow-up
    4
    ·
    edit-2
    1 year ago

    Hi, I’ve been struggling with similar things lately.

    So I spent the day writing out a launcher tool similar to yours, but a bit more full featured :)

    Check it out at: https://github.com/Rikj000/XWaydroid

    Right now it only works for KWin_Wayland though,
    which in my experience has been more stable / easy to work with compared to Weston/Cage.

    However I’m open to merge in support for them too :D