No description
  • Kotlin 98.5%
  • Just 1.5%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-10-09 15:51:23 +03:00
app init 2026-10-09 15:51:23 +03:00
gradle/wrapper init 2026-10-09 15:51:23 +03:00
.gitignore init 2026-10-09 15:51:23 +03:00
build.gradle.kts init 2026-10-09 15:51:23 +03:00
gradle.properties init 2026-10-09 15:51:23 +03:00
gradlew init 2026-10-09 15:51:23 +03:00
gradlew.bat init 2026-10-09 15:51:23 +03:00
Justfile init 2026-10-09 15:51:23 +03:00
README.md init 2026-10-09 15:51:23 +03:00
settings.gradle.kts init 2026-10-09 15:51:23 +03:00

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 return true so 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_EVENTS is signature-only, so remap-to-arbitrary-key uses input keyevent via su / 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.