-
-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Any fixes for waydroid? #35
Comments
Fix to that specific issue is already upstreamed: waydroid/waydroid#826
It's up to the user to set that property and use the keymapper. But that's not an ideal solution since the mouse will be locked to Android only then. Linux host wont be able to access the mouse.
I was thinking about a way like running a daemon on Linux host side for mouse capture and communicating with the app running in the Android container. Feel free to share any ideas you have. |
I tried right now using waydroid Android 13 image. Cannot reproduce that issue on my end. |
might be something unusual in your waydroid session. |
No modifications to the system image or using waydroid_script. I tested on a fresh install. |
I reinstalled the android 11 image (fresh install) I thought of an idea where the "linux host" can apply the property and reconnect the mouse and keyboard when focused to session and the keymapped app (e.g. a mobile game) and disable it when out of session or not in the keymapped app i'm not a programmer but this idea may be good. my system runs ubuntu 22.04 |
As the name of the file implies, it is used to read mouse events from /dev/input/eventX.
Yes, I thought the same except the applying of the property. |
hello! any progress for the implementation for the idea? |
I was trying if I can use the same interface that waydroid hwcomposer uses (wl_pointer_events) through the existing named pipes in /dev/input provided to the container. If it succeeds then no need to use uevent property or evdev. |
what is wl_pointer_events and hwcomposer and whats the relation with hwcomposer? |
hwcomposer refers to HWC or Hardware Composer HAL of Android. In waydroid hwcomposer is used to display Android GUI on wayland, receiving input and more. wl_pointer_events is some API or interface that waydroid hwcomposer also seems to use. |
Hey, a month ago, I managed to make XtMapper detect input events on Waydroid by using a patched getevent binary that I compiled myself. The patch allows getevent to process devices that don't have a driver id and driver version set, which is the case for Waydroid, and is the reason why XtMapper cannot detect any input. With this patch applied, the input devices got detected by XtMapper as they normally should, but the mouse movement became extremely slow and laggy, the CPU load was constantly at 100%, and the host system (not just Waydroid) was really struggling to be responsive. The slowdown ended as soon as I killed the I had to exclude After some trial and error I added a condition to skip the input device if its name is not After that, XtMapper started reacting to keyboard input, and I was able to bind some keys. They still didn't trigger any touches, though. As I understand, Knowing this, I got myself familiar with how to compile an APK of XtMapper locally and did that, but I didn't patch it as I wasn't quite sure where to begin and what exactly I was looking for. I thought of inserting some debug output here and there to narrow down the possible area of search, but never did that, being busy with something else. I intended to share my findings after doing that, but since you're trying to figure this out yourself now, I'm sharing this to save you some effort in case you haven't made the same discoveries yet. The patch and the build scripts are in the attached zip archive: XtMapper-getevent-r0.zip Of course, running XtMapper shouldn't require any binaries to be replaced, it's a temporary measure to allow fixing the other broken parts. Once they are done, this particular thing about input devices not having the IDs / versions / names should be fixed on Waydroid side as these devices are created by it. P.S. Sorry for not providing a proper Makefile, I simply copy-pasted the one-liners I used for compiling and starting getevent to avoid losing them. Also, I don't have a full-fledged Android build system set up since I don't compile ROMs / system images, so I used the compiler commands directly, hope that's okay. P.P.S. Regarding this line, I can't remember why I changed it. Remove it if you don't find it useful. - printf("%s: ", device_names[i]);
+ printf("%s ", device_names[i]); |
where do i place these files? |
Thanks for your work.
Yes, that change is required only for older versions of XtMapper that used its own getevent binary instead of system getevent.
So, I think, for waydroid we should not use getevent. But write additional native code exclusively for reading from wl_pointer_events and wl_keyboard_events using same API, it should help. |
So no "linux host" stuff and let the android app read from those? |
Yes, but it is suitable only for keyboard events. I tried and EVIOCGRAB doesn't work on wl_pointer_events (so mouse cannot be locked). Have to run something on the host for mouse events. But waydroid hwcomposer can capture mouse events from it waydroid/android_hardware_waydroid@a50dbb4 |
whats eviocgrab |
|
Turns out that I can use |
Glad I could help.
Good idea! |
Never mind, trying to restart inputflinger causes whole android system to "soft reboot" so that's also not a solution for now. In the meantime, I'll look into linux based solutions like wev (wayland event viewer) that use the wayland socket. Since the waydroid container has access to wayland socket. |
why do you want to stop inputflinger from recieving. is it to prevent conflict |
Yes, as it was reported in #13. When mouse cursor moves, ongoing touch events are cancelled/ignored. |
Interesting, I thought this was a bug in Mantis (which I currently use while XtMapper isn't working yet). |
As seamlessly supporting pointer capture is not possible in waydroid at the moment, only keyboard can be supported for now. |
Update: Work is ongoing in https://github.com/Xtr126/wayland-getevent to create a static binary that can be run in the waydroid container. |
Hello,bros.Could XtMapper support Magisk-Delta?Waydroid could install Magisk-Delta through Waydroid-Script or you can put magisk files into Overlay by yourself.But when I run the XtMapper and give root access through Magisk-Delta,It tells me Don't have root access through KernelSU.Could mogul fixed it?Thanks! |
Magisk should work when you grant root access to XtMapper. Xtmapper doesn't use anything specific to kernelSU. And you can activate XtMapper on waydroid without magisk or kernelSU by any of these two commands: |
Now, XtMapper works perfectly fine with waydroid using the wayland client to grab input events. |
did you test it in the 2.0 release |
When I was attempting to build "wayland-getevent", I get this: and do i have to build the client from "dev" branch? and how do i get the latest apk from https://github.com/Xtr126/XtMapper/actions |
No, 2.0 release doesnt have support for wayland client.
You must have the dependencies installed before building:
There is no client in dev branch, only in that repo.
By clicking on latest workflow run and downloading "Debug APK" from artifacts section. You must be logged in to github to download artifacts |
https://nightly.link/Xtr126/XtMapper/workflows/android/dev?preview |
i did sudo apt install wayland-protocols libwayland-client0 libwayland-dev and still same error when doing the make command |
can you give me a precompiled binary? |
never mind i was able to compile it |
did instructions for wayland client installation and activating the script got me this:
|
and wl_registry@2: error 0: invalid version for global wl_seat (16): have 5, wanted 7 |
and clicking start in latest debug |
Thanks for reporting, I fixed the wl_seat issue. (I use kwin_wayland and didn't got that error).
Also fixed now. |
have you found a way to fix the libmouse_read.so issue. |
Latest wayland-getevent repo failed to build |
I will try it on Ubuntu and fedora
Github actions can build it successfully on Ubuntu : https://github.com/Xtr126/wayland-getevent/actions/runs/6243675100 You can download the artifact for the client binary. |
I tested Ubuntu and experienced the same issue. But as it works fine on other distros (Arch Linux), I believe it is Ubuntu fault and not going to waste time on it for now. |
An error found only when running on waydroid on ubuntu 20.04/22 so far
Alright so I found a fix df9af2a it will be fixed for Ubuntu in next release. Ubuntu being weird as always. Thanks for reporting it. |
This comment was marked as off-topic.
This comment was marked as off-topic.
yeah it works on my ubuntu system, time to try out some games minor inconveniences: |
Try again with latest APK. Later I'll figure out a way for it to interact with the service so that the window can be hidden when not required. |
can you make the input receiving while editing keymap profile on the waydroid window and not the keymap wayland window |
I have done some workarounds in #9 in the latest version, but i experienced the same errors OP got (libmouse_read.so error.)
even i installed the APK from #6 but same problem
There hasn't been an update on #9 since 03/26.
Have you found another way without exclusive access?
Also did you consider "persist.waydroid.uevent" property in waydroid which makes direct access to hotplugged devices.
Are the fixes upstream?
The text was updated successfully, but these errors were encountered: