{"id":13428648,"url":"https://github.com/JakeWharton/adb-event-mirror","last_synced_at":"2025-03-16T01:32:48.822Z","repository":{"id":38395342,"uuid":"278755524","full_name":"JakeWharton/adb-event-mirror","owner":"JakeWharton","description":"Mirror the touch/key/button events of one device onto one or more other devices in real-time","archived":false,"fork":false,"pushed_at":"2022-04-06T00:05:47.000Z","size":3590,"stargazers_count":889,"open_issues_count":5,"forks_count":43,"subscribers_count":18,"default_branch":"trunk","last_synced_at":"2024-10-14T12:24:55.247Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JakeWharton.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-07-10T23:56:45.000Z","updated_at":"2024-10-05T19:48:53.000Z","dependencies_parsed_at":"2022-08-25T05:11:53.759Z","dependency_job_id":null,"html_url":"https://github.com/JakeWharton/adb-event-mirror","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JakeWharton%2Fadb-event-mirror","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JakeWharton%2Fadb-event-mirror/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JakeWharton%2Fadb-event-mirror/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JakeWharton%2Fadb-event-mirror/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JakeWharton","download_url":"https://codeload.github.com/JakeWharton/adb-event-mirror/tar.gz/refs/heads/trunk","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243814905,"owners_count":20352037,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T01:01:02.188Z","updated_at":"2025-03-16T01:32:48.360Z","avatar_url":"https://github.com/JakeWharton.png","language":"Kotlin","funding_links":[],"categories":["HarmonyOS","Libraries","Kotlin"],"sub_categories":["Windows Manager"],"readme":"# ADB Event Mirror\n\nConsume the output of `getevent` from one device and redirect it to one or more devices as\nindividual `sendevent` commands. This allows you to mirror the interaction of one device on another.\n\nThe script makes no attempt at normalizing resolution, density, orientation, or layout differences.\nIt works best with emulators which have been created with the exact same configuration.\n\n[![A video demo showing the below usage commands in action](demo.gif)](demo.gif)\n\n## Usage\n\n```\n$ adb devices\nList of devices attached\nemulator-5554\tdevice\nemulator-5556\tdevice\n\n$ adb -s emulator-5554 shell getevent | /path/to/adb-event-mirror.main.kts emulator-5556\nready!\n\nEVENT /dev/input/event1 3 57 0\nEVENT /dev/input/event1 3 48 7\nEVENT /dev/input/event1 3 58 129\nEVENT /dev/input/event1 3 53 25812\nEVENT /dev/input/event1 3 54 31666\nEVENT /dev/input/event1 0 0 0\nEVENT /dev/input/event1 3 58 0\nEVENT /dev/input/event1 3 57 4294967295\nEVENT /dev/input/event1 0 0 0\n ⋮\n```\n\nIn order for the script to work you must have both `kotlin` and `adb` available on your shell path.\n\nSince the script reads events from stdin, you can also record events and replay them later.\n\n```\n$ adb shell getevent \u003e clear_recents.txt\n\n$ cat clear_recents.txt | /path/to/adb-event-mirror.main.kts emulator-5554\nready!\n\nEVENT /dev/input/event1 3 57 0\n ⋮\n```\n\n\n## Install\n\n**Mac OS**\n\n```\n$ brew install JakeWharton/repo/adb-event-mirror\n```\n\n**Other**\n\nDownload `adb-event-mirror-main.kts` from\n[latest release](https://github.com/JakeWharton/adb-event-mirror/releases/latest).\nOn MacOS, Linux, and Windows Linux subsystem you can `chmod +x` and execute the file directly.\nOn regular Windows run `kotlin adb-event-mirror.main.kts`.\n\n\n# License\n\n    Copyright 2020 Jake Wharton\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJakeWharton%2Fadb-event-mirror","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FJakeWharton%2Fadb-event-mirror","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJakeWharton%2Fadb-event-mirror/lists"}