google-tv-button-remap
БесплатноБез исполняемых скриптовНе проверенRemap a Google TV Streamer remote button without root: capture the app-button key with an accessibility filter and launch another app.
от uberstone290 установок в других каталогахОб этом скилле
Google TV Streamer button remap (no root)
Triggers: "remap the Netflix button", "make the Netflix button open
Goal: a physical remote app-button opens a different app, without root, with no visible flash of the stock app.
The whole job is: identify the keycode → build a tiny AccessibilityService that consumes that key → install and enable it → verify with a physical press.
1. Identify the button's keycode
adb shell getevent -lt, have the operator press the button once; the MSC_SCAN 000c00XX line is the HID usage (page 0x0C). Resolve it from the remote's keylayout (dumpsys input names it): the Google reference remote uses /system/usr/keylayout/Vendor_18d1_Product_9451.kl:
- YouTube =
0x0C0077→BUTTON_3(190) - Netflix =
0x0C0078→BUTTON_4(191) - ★ =
0x0C0186→MACRO_1
Completion: you have the integer keycode (e.g. 191).
2. Know what you're replacing
The button is not handled by an app. A privileged service resolves it to a package and launches it. Confirm on your device:
adb shell input keyevent 191
adb logcat -d | grep -E 'ActivityTaskManager: START|from uid'
On the Streamer: com.google.android.chromecast.chromecastservice (uid 1000) → launcher …launcherx:coreservices → GlobalAppLaunchManager → am start -a com.netflix.action.NETFLIX_KEY_START. The trigger broadcast android.intent.action.GLOBAL_BUTTON is guarded by com.google.android.permission.GLOBAL_BUTTON (system|signature) — not spoofable, and pm disable of the launcher receiver throws SecurityException. So the only place to cut in is the raw key event.
Completion: you can name the uid/package that handles the button.
3. Build the key-consuming accessibility service
Request the key-event filter, then consume the target key in onKeyEvent and launch your app.
res/xml/accessibility_service_config.xml:
<accessibility-service xmlns:android="http://schemas.android.com/apk/res/android"
android:accessibilityEventTypes="typeWindowStateChanged"
android:accessibilityFeedbackType="feedbackGeneric"
android:accessibilityFlags="flagRequestFilterKeyEvents"
android:canRequestFilterKeyEvents="true"
android:description="@string/service_desc" />
Manifest — the service must declare the accessibility binding permission:
<service android:name=".RemapService" android:exported="true"
android:permission="android.permission.BIND_ACCESSIBILITY_SERVICE">
<intent-filter>
<action android:name="android.accessibilityservice.AccessibilityService" />
</intent-filter>
<meta-data android:name="android.accessibilityservice"
android:resource="@xml/accessibility_service_config" />
</service>
Service core (consume DOWN+UP; pass every other button through):
@Override
public boolean onKeyEvent(KeyEvent e) {
if (e.getKeyCode() == 191 /* KEYCODE_BUTTON_4 */) {
if (e.getAction() == KeyEvent.ACTION_UP) launch(targetPackage);
return true; // the launcher never sees it — no flash
}
return false;
}
Why no flash: the consume happens at the input-filter stage, upstream of Google's handler, so the stock app is never started.
Completion: the app builds and its service is declared.
4. Install non-incrementally and enable
adb install --no-incremental app-release.apk
adb shell settings put secure enabled_accessibility_services <pkg>/<pkg>.RemapService
adb shell settings put secure accessibility_enabled 1
Undo any time: adb shell settings put secure enabled_accessibility_services ''.
See references/build-apk-without-gradle.md (in this repo) for building/signing the APK with no Gradle/SDK.
Completion: dumpsys accessibility lists the service under Bound services.
5. Verify — with a PHYSICAL press
adb shell input keyevent KEYCODE_HOME
# operator presses the PHYSICAL button once, then:
adb shell dumpsys activity activities | grep -m1 topResumedActivity
adb logcat -d | grep -E 'Launching com\.|GlobalKeyReceiver|NETFLIX_KEY_START'
Pass: topResumedActivity is your target app and there is no Launching com.<stock> line.
Traps (each one caused a false negative — clear both before concluding anything)
adb shell input keyeventnever reachesonKeyEvent. Injected events trigger the launcher but bypass the accessibility key filter. Only a physical press is delivered. Any scripted test will wrongly conclude the button cannot be intercepted.- Install non-incrementally (
--no-incremental). An incremental (fastdeploy) install left the service's code unloaded and silent.
Also: A11yInputFilter … Enabled features of Display [0] = [KeyboardInterceptor] is your own service's fi
Установить google-tv-button-remap в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл google-tv-button-remap?
Remap a Google TV Streamer remote button without root: capture the app-button key with an accessibility filter and launch another app.
Как установить скилл google-tv-button-remap?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл google-tv-button-remap запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic