Run :
adb shell getevent -pl
Search for : "ABS_MT_TRACKING_ID" - example :
add device 2: /dev/input/event5
name: "mtk-tpd"
events:
KEY (0001): KEY_W KEY_E KEY_U KEY_O
KEY_S KEY_L KEY_Z KEY_V
KEY_M KEY_UP KEY_LEFT KEY_RIGHT
KEY_DOWN KEY_MENU KEY_BACK KEY_HOMEPAGE
KEY_SEARCH BTN_TOUCH
ABS (0003): ABS_X : value 0, min 0, max 720, fuzz 0, flat 0, resolution 720
ABS_Y : value 0, min 0, max 1280, fuzz 0, flat 0, resolution 1280
ABS_PRESSURE : value 0, min 0, max 255, fuzz 0, flat 0, resolution 0
ABS_MT_TOUCH_MAJOR : value 0, min 0, max 100, fuzz 0, flat 0, resolution 0
ABS_MT_TOUCH_MINOR : value 0, min 0, max 100, fuzz 0, flat 0, resolution 0
ABS_MT_POSITION_X : value 0, min 0, max 720, fuzz 0, flat 0, resolution 0
ABS_MT_POSITION_Y : value 0, min 0, max 1280, fuzz 0, flat 0, resolution 0
ABS_MT_TRACKING_ID : value 0, min 0, max 10, fuzz 0, flat 0, resolution 0
As you see, event5 is responsible for Touchpad
2.1 run :
adb shell
$ su
$ cd /mnt/sdcard
$ cat /dev/input/event5 > events
2.2 Make your move! swipe or touch ... it's your game
you can stop recording by pressing Ctrl+C
2.3. Play your recording
to play your events, run
$ cat events > /dev/input/event5
The other method is to use x and y coordinates
adb shell input swipe [X1] [Y1] [X2] [Y2] [duration(ms)]
Example :
adb shell input swipe 500 630 714 722 100
The Problem is adb shell input swipe is so slow
Hi Adem, thanks for you tips on recording events in Android with Adb.
I can record events and play then, but only one at a time.
Is it possible to record and run a series of events?
Thanks