android-mouse-cursor icon indicating copy to clipboard operation
android-mouse-cursor copied to clipboard

Could use ADB when wired(, or even over wifi?) to send reliable input touch signals

Open chozabu opened this issue 10 years ago • 3 comments

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?

chozabu avatar Oct 30 '15 15:10 chozabu

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.

chetbox avatar Oct 30 '15 15:10 chetbox

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.

xuala69 avatar Apr 24 '17 10:04 xuala69

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.

chetbox avatar Apr 24 '17 16:04 chetbox