5 ms·
If you can run adb shell, you should also be able to run sendevent, which lets you inject touch events into the screen. Coupled with screencap to capture screen
by nneonneo 4y ago
If you can run adb shell, you should also be able to run sendevent, which lets you inject touch events into the screen. Coupled with screencap to capture screen contents, you have a way to fully remote control your phone from a connected computer.
Ages ago, I implemented a really simple program to screenshot the screen periodically and inject touch events via adb shell commands: https://github.com/nneonneo/android_remote_control https://github.com/nneonneo/android_remote_control. I used this successfully to recover all of the data off of a OnePlus with a broken touchscreen. I believe scrcpy, linked in other threads, is probably a better supported and more mature implementation of this idea, so you should probably try that first. Nevertheless, my little project should demonstrate that it’s possible to implement this kind of control without too much coding effort.
- mahathu 4y agoUnfortunately I can't connect via adb because I need to "enable file transfer" on my phone first. I think I can control it with my usb keyboard + mousepad, but I don't see what's going on as the screen is broken.