Name Date Size #Lines LOC

..--

Android.bpH A D25-Apr-2025221 1412

OWNERSH A D25-Apr-202547 21

README.mdH A D25-Apr-20252 KiB4937

evdev.rsH A D25-Apr-202510.1 KiB300198

main.rsH A D25-Apr-20257.2 KiB216158

README.md

1# `evemu-record`
2
3This is a Rust implementation of the `evemu-record` command from the [FreeDesktop project's evemu
4suite][FreeDesktop]. It records the descriptor and events produced by a single input device in a
5[simple text-based format][format] that can be replayed using the [`uinput` command on
6Android][uinput] or the FreeDesktop evemu tools on other Linux-based platforms. It is included by
7default with `userdebug` and `eng` builds of Android.
8
9The command-line interface is the same as that of the FreeDesktop version, except for
10Android-specific features. For usage instructions, run `evemu-record --help`.
11
12## Usage example
13
14From a computer connected to the device over ADB, you can start a recording:
15
16```
17$ adb shell evemu-record > my-recording.evemu
18Available devices:
19/dev/input/event0:      gpio_keys
20/dev/input/event1:      s2mpg12-power-keys
21/dev/input/event2:      NVTCapacitiveTouchScreen
22/dev/input/event3:      NVTCapacitivePen
23/dev/input/event4:      uinput-folio
24/dev/input/event5:      ACME Touchpad
25Select the device event number [0-5]: 5
26```
27
28...then use the input device for a while, and press Ctrl+C to finish. You will now have a
29`my-recording.evemu` file that you can examine in a text editor. To replay it, use the [`uinput`
30command][uinput]:
31
32```
33$ adb shell uinput - < my-recording.evemu
34```
35
36## Android-specific features
37
38### Timestamp bases
39
40By default, event timestamps are recorded relative to the time of the first event received during
41the recording. Passing `--timestamp-base=epoch` causes the timestamps to be recorded as Unix
42timestamps, relative to the Unix epoch (00:00:00 UTC on 1st January 1970). While this does not
43affect the playback of the recording, it can make the events in the recording easier to match up
44with those from other log sources, like logcat.
45
46[FreeDesktop]: https://gitlab.freedesktop.org/libevdev/evemu
47[format]: https://gitlab.freedesktop.org/libevdev/evemu#device-description-format
48[uinput]: https://cs.android.com/android/platform/superproject/main/+/main:frameworks/base/cmds/uinput/README.md
49