{"id":18747884,"url":"https://github.com/drosocode/atvremote","last_synced_at":"2025-06-14T04:35:42.322Z","repository":{"id":57655551,"uuid":"454035775","full_name":"drosoCode/atvremote","owner":"drosoCode","description":"Android TV remote control tool","archived":false,"fork":false,"pushed_at":"2024-06-05T04:26:37.000Z","size":111,"stargazers_count":25,"open_issues_count":4,"forks_count":8,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-26T16:39:02.909Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/drosoCode.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-01-31T14:22:12.000Z","updated_at":"2025-01-15T17:19:45.000Z","dependencies_parsed_at":"2024-11-07T16:48:54.002Z","dependency_job_id":null,"html_url":"https://github.com/drosoCode/atvremote","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drosoCode%2Fatvremote","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drosoCode%2Fatvremote/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drosoCode%2Fatvremote/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drosoCode%2Fatvremote/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/drosoCode","download_url":"https://codeload.github.com/drosoCode/atvremote/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248642308,"owners_count":21138350,"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-11-07T16:31:50.284Z","updated_at":"2025-04-12T22:34:27.254Z","avatar_url":"https://github.com/drosoCode.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Android TV remote\n\n## About this project\nThis tool implements the remote control protocol for Android TV and Google TV.\n\nThe v1 is for the old [Android TV Remote Control](https://www.apkmirror.com/apk/google-inc/remote-control/) app \u003cbr\u003e\nThe v2 is for the newer [Google TV](https://play.google.com/store/apps/details?id=com.google.android.videos) app used when your android tv's [remote services](https://www.apkmirror.com/apk/google-inc/android-tv-remote-service-android-tv/) version is \u003e= 5 \u003cbr\u003e\nThe [anymote protocol](https://code.google.com/archive/p/anymote-protocol/) (old protocol for google tv \u003c 2014) is not supported.\n\n## Quickstart\nCheck on your android tv device the `Remote Services` version (in Settings \u003e Apps \u003e See all apps \u003e Android TV Remote Service).\nIf the version is \u003e= 5, you sould use the v2 protocol.\n\nFirst, start the pairing process `./atvremote -ip=\"192.168.1.20\" -version=2 -pair`\u003cbr\u003e\nThen, you can send a list of keypress like this (this sould open the settings) `./atvremote -ip=\"192.168.1.20\" -version=2 command=\"HOME;HOME;UP;RIGHT;RIGHT;ENTER`\n\n\n## Usage\n\nYou can use this project as a library (see the [godoc](https://pkg.go.dev/github.com/drosocode/atvremote) page) or directly in cli (see the [releases](https://github.com/drosoCode/atvremote/releases) page).\nIn CLI mode, you must at least specify the IP to your android tv box.\nHere is the list of the supported flags:\n\n|Name|Required|Default|Description|Example|\n|----|--------|-------|-----------|-------|\n|pair|No|False|Pairing mode (if not specified the tool will start in command mode and assume that the pairing have already been done)|`-pair`\n|ip|Yes|None|IP or hostname of your android tv device| `-ip=\"192.168.1.20\"`|\n|cert|No|`./cert.pem`|Path to your certificate file (will be created in pairing mode)| `-cert=\"./cert.pem\"`|\n|key|No|`./key.pem`|Path to your private key file (will be created in pairing mode)| `-key=\"./key.pem\"`|\n|version|No|`1`|Protocol version| `-version=1`|\n|command|No|None|List of keypress to emulate (see below)| `-command=\"HOME;HOME;UP;RIGHT;RIGHT;ENTER\"`|\n|open|No|None|Open an app using an intent (V1 Only)|`-open=\"com.netflix.ninja/.MainActivity\"`|\n|link|No|None|Open a link (V2 Only)|`-open=\"https://netflix.com/title/\"`|\n|info|No|None|Print a json object of the device's infos (V2 Only)|`-info`|\n\n### Additional information\n - Command flag: a string with alphanumeric characters will automaticaly be converted to keypresses. You can also send some specific keypresses defined in [pkg/common/types.go](https://pkg.go.dev/github.com/drosocode/atvremote/pkg/common#pkg-types) prefixed with `KEYCODE_` and separated with semicolons. There are some shortcuts for the most common keys (UP, DOWN, LEFT, RIGHT, HOME, BACK, VOLP, VOLM, MUTE, PWR, ENTER).\n For examle this string `a;UP;bc;KEYCODE_TV_INPUT_HDMI_1` will be parsed as `[RemoteKeyCode_KEYCODE_A, RemoteKeyCode_KEYCODE_DPAD_UP, RemoteKeyCode_KEYCODE_B, RemoteKeyCode_KEYCODE_C, KEYCODE_TV_INPUT_HDMI_1]` (see [pkg/common/parsekey.go](https://github.com/drosoCode/atvremote/blob/main/pkg/common/parsekey.go#L13) for more info).\n - Open flag: an activity in in the format `yourpackagename/.activityname`.\n - Link flag: You can start an app using a deeplink defined in its appmanifest (like described [here](https://developer.android.com/training/app-links/deep-linking)). By default, if no deeplink is found, the link will open in a browser.\n\n\n## Acknowledgments\nThis project wouldn't have been possible without these awesome projects which reverse-engineered these protocols.\n - [Aymkdn](https://github.com/Aymkdn)'s wiki on the protocols [V1](https://github.com/Aymkdn/assistant-freebox-cloud/wiki/Google-TV-(aka-Android-TV)-Remote-Control) and [V2](https://github.com/Aymkdn/assistant-freebox-cloud/wiki/Google-TV-(aka-Android-TV)-Remote-Control-(v2))\n - [louis49](https://github.com/louis49/androidtv-remote)'s [androidtv-remote](https://github.com/louis49/androidtv-remote) js implementation (especially for the v2 proto files)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrosocode%2Fatvremote","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdrosocode%2Fatvremote","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrosocode%2Fatvremote/lists"}