android-mouse-cursor
android-mouse-cursor copied to clipboard
Could use ADB when wired(, or even over wifi?) to send reliable input touch signals
Mentioned on http://stackoverflow.com/questions/4386449/send-touch-event-from-adb-to-a-device
is
adb shell input tap x y
could we not use this method?
You could, but I don't believe your app will be able to call out to the shell to invoke input because it does not have appropriate permissions. (INJECT_EVENTS is a system permission.) When running adb shell from your computer you have higher privileges than a running app.
One avenue that may be worth exploring is using adb shell to connect to adbd on the device over TCP on localhost. It would require USB debugging and is probably a huge security hole, but might achieve what we want.
I tried testing your project and after following all the instructions, i get nothing. i changed the ip address in the python file with that of my phone's and run the python code online here https://www.tutorialspoint.com/execute_python_online.php and then nothing happened.What could i possibly have done wrong? yes the phone and the pc are on the same network and my phone is running on android 4.4 kitkat.
You'll need to run the python file on your computer (not on a website) and make sure they're connected to the same network.