No description
- Kotlin 98.5%
- Just 1.5%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| app | ||
| gradle/wrapper | ||
| .gitignore | ||
| build.gradle.kts | ||
| gradle.properties | ||
| gradlew | ||
| gradlew.bat | ||
| Justfile | ||
| README.md | ||
| settings.gradle.kts | ||
TV Remapper — Android TV / Google TV button remapper
Remap any (interceptable) remote button to a different action, or to nothing (effectively disabling it). Works system-wide via an AccessibilityService.
What it does
- Capture a remote key (foreground capture + service "last seen key" fallback for keys like HOME / ASSIST that never reach a normal activity).
- Remap to: Disabled (swallow the key), Launch app, System global action (Back/Home/Recents/…), Media control (play/pause/next/volume/mute), or re-inject a different keycode via shell (root/Shizuku only).
- Disable = consume the key event in
TVRemapService.onKeyEvent()and returntrueso nothing else happens.
Honest limitations (stock Google TV)
- Not literally every button. Power, mic/Assistant hotword and some
vendor Netflix-style wake keys are consumed below the Accessibility layer.
Everything the service sees in
onKeyEvent(DPAD, media, Guide/Info/DVR, programmable app keys, volume) can be remapped or disabled. - Key injection needs privilege.
INJECT_EVENTSis signature-only, so remap-to-arbitrary-key usesinput keyeventviasu/ Shizuku shell and silently no-ops on non-rooted devices. Prefer Launch-App / Global / Media actions on stock devices.
Build
./gradlew :app:assembleDebug
# APK: app/build/outputs/apk/debug/app-debug.apk
(Requires Gradle 9.5.x — pinned via the wrapper — plus JDK 17, auto-provisioned by the Foojay toolchain resolver on first build.)
Install on TV (adb connect <tv-ip> first for Google TV):
adb install -r app/build/outputs/apk/debug/app-debug.apk
Then on the TV: open TV Remapper → Enable service (Accessibility), come back, Add / remap button, press the key, pick the action.
Min SDK 26 (Android 8 / TV Oreo), target/compile 35.