Problem:
The mapping of the input events is not always the same for every emulator. For example, in my case, the /dev/input/event3 (virtio_input_multi_touch_1) from host emulator was mapped to /dev/input/event10 (virtio_input_multi_touch_8) to mirror emulator using the event type alone.
Solution:
Compute the event type to name mapping for the host and mirror serials and perform a lookup for the correct mirror event type.
Downside:
In order to compute the mapping of the host, the host serial has to be provided in the script command.
Next steps:
@JakeWharton If you approve this PR, I can create a follow-up PR to run the adb getevent command from the script directly.
Problem: The mapping of the input events is not always the same for every emulator. For example, in my case, the
/dev/input/event3
(virtio_input_multi_touch_1) from host emulator was mapped to/dev/input/event10
(virtio_input_multi_touch_8) to mirror emulator using the event type alone.Solution: Compute the event type to name mapping for the host and mirror serials and perform a lookup for the correct mirror event type.
Downside: In order to compute the mapping of the host, the host serial has to be provided in the script command.
Next steps: @JakeWharton If you approve this PR, I can create a follow-up PR to run the
adb getevent
command from the script directly.