A tool like Android getevent that is being developed for use in XtMapper to support waydroid.
Download executable binary from releases.
It is advisable to build the client from source instead so that it can link against the system libraries.
Install the latest version of XtMapper from https://github.com/Xtr126/wayland-getevent/releases/tag/latest only.
$ chmod a+x ./client
$ ./client | sudo waydroid shell -- sh /sdcard/Android/data/xtr.keymapper/files/xtMapper.sh --wayland-client
-
This hack may be needed if xtMapper.sh can't be found. It will also fail to write the script if waydroid container is rooted. In that case unroot the waydroid container and try again. The app doesn't require root access to work.
Or write the script manually with the command from Alternate method:$ echo 'exec <app_process command here> "$@"' | sudo tee ~/.local/share/waydroid/data/media/0/Android/data/xtr.keymapper/files/xtMapper.sh
-
If cursor is invisible, enable cursor on subsurface
$ waydroid prop set persist.waydroid.cursor_on_subsurface true
-
This will create an invisible wayland window named "XtMapper" from which keyboard and mouse input events are captured and then forwarded to XtMapper.
-
For it to work as intended, it's size should be same as that of the waydroid window and overlay the waydroid window.
-
Auto Profiling should be disabled in settings.
Depends on libwayland-client and libxkbcommon. You will need to have some system dependencies such as a C compiler installed for compiling it from source with make.
# Arch Linux
sudo pacman -S wayland-protocols libxkbcommon
# Ubuntu
sudo apt install wayland-protocols libwayland-client0 libwayland-dev libxkbcommon-dev
Download the source
git clone https://github.com/Xtr126/wayland-getevent
cd wayland-getevent
Run make to build the client binary
$ make
A script build.sh is included to download all dependencies and build a static binary without requiring libxkbcommon, wayland to be installed on system. Requires meson and ninja.
$ ./build.sh