-
-
Notifications
You must be signed in to change notification settings - Fork 37
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
Incorporate ADB lib to work around devices with gesture api disabled #24
Comments
There will be 1 or more seconds delay |
Oh damn, I thought it'd be fast enough on localhost. Thanks for the PoC though. Seems like the input.jar itself introduces some delay and combined with network it lags a lot. Some more poking around yields this - https://android.googlesource.com/platform/frameworks/base/+/android-4.4.2_r1/cmds/input/src/com/android/commands/input/Input.java#247 We can use those private methods and call the input API directly to remove any lag at all without root, however, SELinux policies will block us on the INJECT_EVENT permission. I can't think of a way without root to achieve this 😞 |
This method only works for me (on the Sonim XP3plus flip phone) after connecting to the phone with USB adb and sending adb tcpip 5555. Until then the adb daemon on the phone only listens on USB, not TCPIP, and MATVT can't connect to it. The way around it would seem to be with Wireless ADB, but on Android 11 there are two problems with this: The daemon listens on random ports, and the client needs to provide a pairing code in order to connect. The tananaev library doesn't provide this functionality, and in fact seems to be outdated and a dead project. This is really more of an issue with tananaev'a adblib. Thank you again @virresh for your creative solution to use this library to get around the Android 11 issues. |
Oh I see. Randomized ports are definitely painful :( There might yet be another work-around for that by re-implementing the whole ADB protocol in a java library (I saw some libraries that do this), write a usb emulation driver and then invoke But all that is kinda tedious to maintain. It has several loop holes and too much dependency which might break easily which is very hard to maintain. Mentioning this possibility here just in case someone is interested in hacking around on this idea further. |
Just noticed a solution to the port problem here. I will try to implement it in my branch |
Oh, interesting. |
ADB lib - https://github.com/tananaev/adblib
This would send shell input commands directly to the input jar on devices with wireless adb enabled.
The text was updated successfully, but these errors were encountered: