Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/JakeWharton/adb-event-mirror
Mirror the touch/key/button events of one device onto one or more other devices in real-time
https://github.com/JakeWharton/adb-event-mirror
Last synced: about 2 months ago
JSON representation
Mirror the touch/key/button events of one device onto one or more other devices in real-time
- Host: GitHub
- URL: https://github.com/JakeWharton/adb-event-mirror
- Owner: JakeWharton
- License: apache-2.0
- Created: 2020-07-10T23:56:45.000Z (over 4 years ago)
- Default Branch: trunk
- Last Pushed: 2022-04-06T00:05:47.000Z (over 2 years ago)
- Last Synced: 2024-10-14T12:24:55.247Z (about 2 months ago)
- Language: Kotlin
- Size: 3.42 MB
- Stars: 889
- Watchers: 18
- Forks: 43
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
Awesome Lists containing this project
- awesome-kotlin - adb-event-mirror - Mirror the touch/key/button events of one device onto one or more other devices in real-time (Libraries)
README
# ADB Event Mirror
Consume the output of `getevent` from one device and redirect it to one or more devices as
individual `sendevent` commands. This allows you to mirror the interaction of one device on another.The script makes no attempt at normalizing resolution, density, orientation, or layout differences.
It works best with emulators which have been created with the exact same configuration.[![A video demo showing the below usage commands in action](demo.gif)](demo.gif)
## Usage
```
$ adb devices
List of devices attached
emulator-5554 device
emulator-5556 device$ adb -s emulator-5554 shell getevent | /path/to/adb-event-mirror.main.kts emulator-5556
ready!EVENT /dev/input/event1 3 57 0
EVENT /dev/input/event1 3 48 7
EVENT /dev/input/event1 3 58 129
EVENT /dev/input/event1 3 53 25812
EVENT /dev/input/event1 3 54 31666
EVENT /dev/input/event1 0 0 0
EVENT /dev/input/event1 3 58 0
EVENT /dev/input/event1 3 57 4294967295
EVENT /dev/input/event1 0 0 0
⋮
```In order for the script to work you must have both `kotlin` and `adb` available on your shell path.
Since the script reads events from stdin, you can also record events and replay them later.
```
$ adb shell getevent > clear_recents.txt$ cat clear_recents.txt | /path/to/adb-event-mirror.main.kts emulator-5554
ready!EVENT /dev/input/event1 3 57 0
⋮
```## Install
**Mac OS**
```
$ brew install JakeWharton/repo/adb-event-mirror
```**Other**
Download `adb-event-mirror-main.kts` from
[latest release](https://github.com/JakeWharton/adb-event-mirror/releases/latest).
On MacOS, Linux, and Windows Linux subsystem you can `chmod +x` and execute the file directly.
On regular Windows run `kotlin adb-event-mirror.main.kts`.# License
Copyright 2020 Jake Wharton
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.