android-touch-record-replay icon indicating copy to clipboard operation
android-touch-record-replay copied to clipboard

Permission denied - when replaying touch events

Open usamaabrar22 opened this issue 4 years ago • 8 comments

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.

usamaabrar22 avatar Jan 29 '20 08:01 usamaabrar22

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

Cartucho avatar Mar 26 '20 07:03 Cartucho

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

saket avatar Aug 26 '20 05:08 saket

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

tzvc avatar Nov 15 '20 09:11 tzvc

@theochampion I unfortunately couldn't

saket avatar Nov 15 '20 18:11 saket

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

breezewish avatar Oct 03 '21 01:10 breezewish

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

tzwasd avatar Jan 18 '22 10:01 tzwasd

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.

hakman-dev avatar Jul 29 '22 11:07 hakman-dev

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.

lqforgithub avatar Oct 19 '23 01:10 lqforgithub