Debloat any Android or Google TV over Wi-Fi and get an Apple TV-style home.
Python adbadblockandroid-tvandroid-tv-launcherapple-tvbloatware-removalclaude-codedebloatfire-tvgoogle-tvlauncherprivacysmart-tvsony-braviatclvibe-codingxiaomi
HomeKeyService: open Settings by keycode too (settings_key_keycodes)
Ivan Manolov840d28fb1841
diff --git a/README.md b/README.mdindex 6d01fbc8c..89712e18c 100644--- a/README.md+++ b/README.md@@ -216,7 +216,7 @@ the install script finds `~/Android/Sdk` and the `java` on your PATH.- **Module cards** let any TV app declare its own tile (label, caption, glow). The launcher asks you once per app, Keep hidden by default, and remembers the answer for that app's signing key and card name. Hold OK on Settings to change your mind. How to make one: [`docs/modules.md`](docs/modules.md); the contract: [`docs/specs/card.md`](docs/specs/card.md).- **Clock screensaver**: a drifting clock over the glow, so nothing burns in. Pick "Clock" in the TV's screensaver settings, or over ADB:`tools/tv.py 'settings put secure screensaver_components com.gathin.tvhome/.ClockDream; settings put secure screensaver_enabled 1'`-- **Remote keys**: an optional accessibility service keeps the remote's Input button working on Google TV (`INPUT_KEY_SERVICE=1` at install), another fixes sticks whose Home key sends ALL_APPS and opens Settings from the remote's gear button, even one Android does not map (`HOME_KEY_SERVICE=1`, scancodes in `config.xml`).+- **Remote keys**: an optional accessibility service keeps the remote's Input button working on Google TV (`INPUT_KEY_SERVICE=1` at install), another fixes sticks whose Home key sends ALL_APPS and opens Settings from the remote's gear button, even one Android does not map (`HOME_KEY_SERVICE=1`, scancodes or keycodes in `config.xml`).- **Navigation** is deliberate: Up and Down move one row, the top buttons never fall through to tiles and Down from them returns to the dock tile you came from, the last focused app is remembered, and installing or removing an app refreshes the tiles while Home is open.- **Artwork**: app banners load at xhdpi or better, so low-density TV UIs do not downsample them before the focus zoom.diff --git a/launcher/app/src/main/java/com/gathin/tvhome/HomeKeyService.java b/launcher/app/src/main/java/com/gathin/tvhome/HomeKeyService.javaindex e00f10e6f..ad79b3b2d 100644--- a/launcher/app/src/main/java/com/gathin/tvhome/HomeKeyService.java+++ b/launcher/app/src/main/java/com/gathin/tvhome/HomeKeyService.java@@ -17,18 +17,21 @@ import android.view.accessibility.AccessibilityEvent;*/public class HomeKeyService extends AccessibilityService {- /** Scancodes of remote buttons that should open Settings (config.xml, settings_key_scancodes). */+ /** Remote buttons that should open Settings (config.xml, settings_key_scancodes and settings_key_keycodes). */private int[] settingsScancodes = new int[0];+ private int[] settingsKeycodes = new int[0];@Overrideprotected void onServiceConnected() {super.onServiceConnected();settingsScancodes = getResources().getIntArray(R.array.settings_key_scancodes);+ settingsKeycodes = getResources().getIntArray(R.array.settings_key_keycodes);}private boolean isSettingsKey(KeyEvent event) {if (event.getKeyCode() == KeyEvent.KEYCODE_SETTINGS) return true;for (int code : settingsScancodes) if (event.getScanCode() == code) return true;+ for (int code : settingsKeycodes) if (event.getKeyCode() == code) return true;return false;}diff --git a/launcher/app/src/main/res/values/config.xml b/launcher/app/src/main/res/values/config.xmlindex c0dc9181d..fccf00bd9 100644--- a/launcher/app/src/main/res/values/config.xml+++ b/launcher/app/src/main/res/values/config.xml@@ -46,6 +46,12 @@`tools/tv.py 'getevent -lt'` while pressing the button. Leave empty to omit. --><integer-array name="settings_key_scancodes"></integer-array>+ <!-- The same by Android keycode, for buttons whose scancode is shared. TCL Google TV remotes send their+ Settings button as keycode 83 (KEYCODE_NOTIFICATION, which the stock Google TV home turned into its quick+ settings panel) on scancode 240 (KEY_UNKNOWN), the scancode several TCL buttons share. Find the keycode+ with `tools/tv.py 'logcat -v time -s InputReader:D'` while pressing the button. Leave empty to omit. -->+ <integer-array name="settings_key_keycodes">+ </integer-array><!-- Show the Solar Hijri (Shamsi) date used in Iran and Afghanistan, e.g. "27 Mehr 1405", above theGregorian date. -->