JakeWharton / adb-event-mirror

Mirror the touch/key/button events of one device onto one or more other devices in real-time
Apache License 2.0
885 stars 43 forks source link

Fixed Issue-21 Broken script due to wrong event mapping #23

Open SaqibJDev opened 2 years ago

SaqibJDev commented 2 years ago

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.

JakeWharton commented 2 years ago

Will look this week. Thanks!

SaqibJDev commented 2 years ago

@JakeWharton did you get a chance to look at this PR?

SaqibJDev commented 2 years ago

@JakeWharton any update? :)