bk138 / droidVNC-NG

VNC server app for Android that does not require root privileges.
GNU General Public License v2.0
1.22k stars 177 forks source link

Touch/Mouse and keyboard don't work anymore #170

Closed djfanatix closed 9 months ago

djfanatix commented 10 months ago

If you'd like to put out an incentive for fixing this bug, you can do so at https://issuehunt.io/r/bk138/droidVNC-NG

Describe the bug Since this week, Touch/Mouse and keyboard don't work anymore. No input is possible anymore through VNC. ( I also use webkey, and there it also doesn't work anymore), some kind of android update disabled it maybe.

It has been working fine for over a year

Your environment (please complete the following information):

Additional context

bk138 commented 10 months ago

Thanks for your report! A few questions to clear up the issue:

djfanatix commented 10 months ago

Yes, I removed the app and reinstall, tried another version, tried re-enabling input permissions.

What is a11y?

The config settings in accessibility are greyed out, does this has something to do with it?

Scherm­afbeelding 2023-09-05 om 11 36 13
bk138 commented 10 months ago

Thanks for your quick reply!

If it also does not work with an older droidVNC-NG version that used to work, the culprit probably is somewhere else.

Try to compare the parts that changed on your device between statuses "working" and "non-working" and roll them back one by one, retesting. This way you can find out the cause.

PS: a11y is short for Accessibility

msgloucester commented 10 months ago

I am having same issue with a different setup (new setup) - please let me know whether to start another thread.

I am new user of droidVNC-NG (indeed also of Android), longtime user of VNC / Windows / Unix, etc.

VNC Server: Emteria OS v 13.4.0 = Android 13 on an Rpi4-8GB. Connected by ethernet, same subnet as Viewer. Running droidVNC-NG v 2.1.3.

VNC client: TightVNC for Windows viewer 2.8.8.1. On Windows 11.

Using the host machine directly (directly attached HDMI monitor, standard mouse (wireless), and keyboard (BT)), all works as expected. Viewer machine shares same monitor (different input) and has independent directly attached kbd and mouse. Once host VNC server is started (granting accessibility permissions etc.), Client on Windows connects immediately. Viewer screen and visuals are fine full screen or windowed. From keyboard/mouse and keyboard of Viewer machine via VNC: the three keyboard shortcuts ESC / Home / Ctrl-Shift-ESC work. The VNC virtual cursor moves around, but the host's cursor does not follow. Left/middle/right click: nothing. Wheel scroll: nothing. When I move the mouse directly connected to the host, the host's cursor moves on the VNC viewer's screen, and the directly connected mouse and kbd continue to work as expected. I can view via the Viewer, but the Viewer cannot interact except for the three special key combos. (No, do not have "view only" selected on server or viewer.)

I rebooted host a few times (having read https://github.com/bk138/droidVNC-NG/issues/147) but same behavior. I need to reauth the host each time by connecting directly, as I haven't done the permanent override. Changing VNC viewer's encoding, and both server and viewer settings for rendering cursors changes visuals in expected ways, but not the issue of no mouse input.

I have not yet tried re-install of droidVNC-NG 2.1.3. Does it matter whether I use Google or F-Droid store?

I will also try downgrade (though I have no history of a working setup), but please advise where to find / how to install earlier releases. Sorry, I'm new to the basics of Android apps.

bk138 commented 10 months ago

@msgloucester Thanks for that very good and detailed problem description! From what I can tell, the accessibility service is enabled correctly as the keyboard shortcuts work. It just doesn't seem to inject pointer input correctly. It's a separate issue than this one, I guess. FWIW, the code injecting pointer input is https://github.com/bk138/droidVNC-NG/blob/master/app/src/main/java/net/christianbeier/droidvnc_ng/InputService.java#L380 - it seems that dispatchGesture() might not be working correctly on your platform. Maybe you can share some logs? Also, RPi w/ Android honestly is kind of a "special" platform, are you able to try out another Android distro/ROM?

msgloucester commented 9 months ago

Thanks! I will see what logs say, once I get a proper shell (still working out ssh pty/tty issues). If I can get a more conventional Android platform to test, I will then be able to compare logs. Shortcut pointers welcomed to log location and (if applicable) increasing server log level.

bk138 commented 9 months ago

@msgloucester Logs are an in-memory ring buffer which you can access with logcat, see https://developer.android.com/tools/logcat and https://riptutorial.com/adb/example/14878/displaying-and-filtering-with-logcat .

bk138 commented 9 months ago

Tentatively closing this, please post new info here once available so we can re-open.