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
  • AlmightySnoo 🐢🇮🇱🇺🇦@lemmy.world
    link
    fedilink
    English
    arrow-up
    3
    ·
    edit-2
    1 年前

    Cool thanks! I also played around with Waydroid and it’s amazing, it can run Android games at near native speed provided they have x86 binaries (otherwise it’s going to be using Arm emulation, which is very slow). I pasted your script on termbin to get rid of the & escaping by Lemmy: https://termbin.com/x704