Cartucho / android-touch-record-replay

How to record and replay touchscreen events on an Android device.
Apache License 2.0
229 stars 49 forks source link

Permission denied - when replaying touch events #23

Open usamaabrar22 opened 4 years ago

usamaabrar22 commented 4 years ago

Hi, I've tried this code and was able to record touch events on my Android 8.0 (without root). However, executing the replay_touch_events.sh file do pushes the file to phone but doesn't execute it on phone. It gives error "Permission denied". I have checked this on Genymotion emulator as well, and the progress and error is same.

I have carefully checked this problem mentioned in other similar "Issues" section of this repo. but apparently no solution mentioned there solved my problem.

This error is weird because adb shell input tap x y works fine. Can you help me on this issue? I want to know how to handle this "Permission Denied" error.

Cartucho commented 4 years ago

@usamaabrar22 could you try using the executable for 64 bit? Could you also show a PrintScreen of the error message?

saket commented 4 years ago

I'm seeing a similar error when trying to run replay_touch_events.sh on my Pixel:

Looking for touchscreen device...
/dev/input/event3
/dev/input/event2
Touchscreen device found! -> /dev/input/event2
---/data/local/tmp/mysendevent-arm64---
recorded_touch_events.txt: 1 file pushed, 0 skipped. 50.5 MB/s (27010 bytes in 0.001s)
could not open /dev/input/event2, Permission denied

Changing permissions using chmod seems to have no effect

adb shell chmod +x /data/local/tmp/mysendevent-arm64
tzvc commented 3 years ago

@saket how did you end up solving the issue, I have the same issue on my pixel 4

saket commented 3 years ago

@theochampion I unfortunately couldn't

breezewish commented 3 years ago

I believe it is due to a new security policy. See https://github.com/openstf/minitouch/issues/49

tzwasd commented 2 years ago

Workaround: If you have a rooted device, you can insert su -c in adb shell command like this to run binaries with root privileges.

hakman-dev commented 2 years ago

Workaround: If you have a rooted device, you can insert su -c in adb shell command like this to run binaries with root privileges.

su -c has 0 effect sadly.

lqforgithub commented 1 year ago

Workaround: If you have a rooted device, you can insert su -c in adb shell command like this to run binaries with root privileges.

It works on my phone.