I want to be able to record all of the times I touch the screen of my android phone and play it back (without root). Using this guy's answer, I managed to record a playback of times I touched my phone using adb.
However, when playing it back, all the touches I made came out immidietly, without waiting for stuff on the phone. For example, if I wanted to enter my app and do some clicking on it, it starts the app, but don't wait for the app to load , just inputs all the touches at once and closes.
I tried recording the touches with adb shell getevent -t
(using timestamps) but when I tried to play it back I got use: sendevent device type code value
I tried using sleep(2)
after every major touch, and got /sdcard/sendevent_input.sh[17]: syntax error: '2' unexpected
I tried using shell input touchscreen tap x y
and playing it back every few seconds, and I managed to replay two touches, but then for some reason the touches went random (I only recorded records with ABS_MT_POSITION using adb shell getevent -lt
, and thought the orientation is the problem, so tried using x y, y x, 1080 - x 1920 - y and 1920 - y 1080 -x but all of them didn't work).
All I want is to record my touches with adb (and no root) and play them.
How?
I have made a java application which does the same. This will record and insert delays, and can play back. Save script for alter use as well.This tool whill use a modified sendevent
to overcome the slowness in playback.
Android Record N Play
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With