Skip to content
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

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

Open
chozabu opened this issue Oct 30, 2015 · 3 comments

Comments

@chozabu
Copy link

chozabu commented Oct 30, 2015

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?

@chetbox
Copy link
Owner

chetbox commented Oct 30, 2015

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.

@xuala69
Copy link

xuala69 commented Apr 24, 2017

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.

@chetbox
Copy link
Owner

chetbox commented Apr 24, 2017

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants