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
Merge PR #264: opt-in quick settings panel for the remote's Settings button
Gathin23b18519f90902
diff --cc README.mdindex 1830e6594,3b9ebe1ff..3e71e7064--- a/README.md+++ b/README.md@@@ -275,7 -232,7 +275,7 @@@ the install script finds `~/Android/Sdk- **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 and choose Module cards 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 or keycodes 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`). With `settings_key_panel` the gear opens a [small quick settings panel](docs/quick-settings-panel.jpg) instead, over Home or any app: TV settings, Picture, Network, Apps and Launcher settings.++- **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`). With `settings_key_panel` the gear opens a [small quick settings panel](docs/quick-settings-panel.jpg) instead, over Home or any app: TV settings, Display, Network, Apps and Launcher settings.- **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 --cc launcher/app/src/main/java/com/gathin/tvhome/Config.javaindex 7bf7f9608,2b3511969..96e48018d--- a/launcher/app/src/main/java/com/gathin/tvhome/Config.java+++ b/launcher/app/src/main/java/com/gathin/tvhome/Config.java@@@ -70,9 -70,8 +74,10 @@@ final class Configint columns, int rowsBelowDock, boolean animations, boolean advancedEffects,boolean shamsiDate, boolean moduleCards, boolean reducedMotion, String vpnApp,boolean showHomeSettingsShortcut, int backgroundColor, int skyIntensity,- File wallpaper, boolean overlayApplied, Festival festival) {- int[] settingsKeycodes, boolean settingsKeyPanel, File wallpaper, boolean overlayApplied) {++ int[] settingsKeycodes, boolean settingsKeyPanel, File wallpaper, boolean overlayApplied,++ Festival festival) {this.dockApps = Collections.unmodifiableList(dockApps);+ this.fillDock = fillDock;this.hiddenApps = Collections.unmodifiableList(hiddenApps);this.liveTvPackage = liveTvPackage;this.liveTvAction = liveTvAction;@@@ -90,9 -89,10 +95,11 @@@this.showHomeSettingsShortcut = showHomeSettingsShortcut;this.backgroundColor = backgroundColor;this.skyIntensity = skyIntensity;+ this.settingsKeycodes = settingsKeycodes;+ this.settingsKeyPanel = settingsKeyPanel;this.wallpaper = wallpaper;this.overlayApplied = overlayApplied;+ this.festival = festival;}/** The folder the theme tools push into; null when external storage is unavailable. */@@@ -160,14 -162,11 +171,15 @@@if (wallpaper != null && !(wallpaper.isFile() && wallpaper.length() > 0)) wallpaper = null;// A theme can also switch the wallpaper off while the file is still there.if (json != null && json.has("wallpaper") && !bool(json, "wallpaper", true)) wallpaper = null;+ // A festive skin comes only from a theme; config.xml has no festival.+ Festival festival = json == null ? Festival.NONE : Festival.parse(string(json, "festival", ""),+ string(json, "festival_until", ""), string(json, "greeting", ""), string(json, "accent_color", ""));- return new Config(dock, hidden, liveTv, liveTvAction, panelService, panelAction, inputAction,+ return new Config(dock, fillDock, hidden, liveTv, liveTvAction, panelService, panelAction, inputAction,Math.max(1, columns), Math.max(0, rowsBelow), animations, advancedEffects,shamsi, moduleCards, reducedMotion, vpn, homeSettings, background,- Math.max(0, Math.min(100, skyIntensity)), wallpaper, applied, festival);- Math.max(0, Math.min(100, skyIntensity)), settingsKeycodes, settingsKeyPanel, wallpaper, applied);++ Math.max(0, Math.min(100, skyIntensity)), settingsKeycodes, settingsKeyPanel, wallpaper, applied,++ festival);}private static void syncThemeChoices(SharedPreferences choices, File dir, File config) {@@@ -251,6 -250,21 +263,21 @@@}}- /** Keycodes 1 to 400 only; a list with anything else in it is ignored as a whole. */++ /** Positive keycodes only (vendor remotes use codes in the thousands); a list with anything else in it is ignored as a whole. */+ private static int[] intArray(JSONObject o, String key, int[] fallback) {+ Object v = o.opt(key);+ if (!(v instanceof JSONArray)) return fallback;+ JSONArray a = (JSONArray) v;+ int[] out = new int[a.length()];+ for (int i = 0; i < a.length(); i++) {+ Object item = a.opt(i);+ if (!(item instanceof Number)) return fallback;+ out[i] = ((Number) item).intValue();- if (out[i] < 1 || out[i] > 400) return fallback;++ if (out[i] < 1) return fallback;+ }+ return out;+ }+private static List<String> stringList(JSONObject o, String key, List<String> fallback) {Object v = o.opt(key);if (!(v instanceof JSONArray)) return fallback;diff --cc launcher/app/src/main/res/values/config.xmlindex 89b686f96,d2336b782..959b86d0f--- a/launcher/app/src/main/res/values/config.xml+++ b/launcher/app/src/main/res/values/config.xml@@@ -56,6 -52,10 +56,10 @@@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>+ <!-- What those Settings buttons open: false, the TV's Settings; true, a small glass panel at the top right- with TV settings, Launcher settings, Apps (re-enable an app) and Network, over whatever is on screen.++ with TV settings, Display, Network, Apps (re-enable an app) and Launcher settings, over whatever is on screen.+ Both keys can also be set from a theme's config.json ("settings_key_keycodes": [83]). -->+ <bool name="settings_key_panel">false</bool><!-- Show the Solar Hijri (Shamsi) date used in Iran and Afghanistan, e.g. "27 Mehr 1405", above theGregorian date. -->diff --cc launcher/app/src/main/res/values/strings.xmlindex 2dd46921a,1d9082b8e..dd579ee75--- a/launcher/app/src/main/res/values/strings.xml+++ b/launcher/app/src/main/res/values/strings.xml@@@ -35,6 -33,10 +35,10 @@@<string name="follow_theme">Follow theme (reset on-TV choices)</string><string name="follow_theme_hint">Uses the current theme or built-in layout and motion settings. Pushing or resetting a theme also clears your on-TV choices.</string><string name="tv_settings">TV system settings</string>- <string name="quick_picture">Picture</string>++ <string name="quick_picture">Display</string>+ <string name="quick_network">Network</string>+ <string name="quick_apps">Apps</string>+ <string name="quick_apps_hint">Re-enable</string><string name="on">On</string><string name="off">Off</string><string name="enable">Enable</string>diff --cc themes/README.mdindex 12ab84c75,34b8fc131..1ea46d3c8--- a/themes/README.md+++ b/themes/README.md@@@ -44,10 -42,8 +44,12 @@@ is ignored, and a file that doesn't par| `background_color` | `#RRGGBB` | Colour behind everything; black by default || `sky_intensity` | 0 to 100 | Time-of-day backdrop: a dark gradient that follows the clock, 0 hides it (default) || `wallpaper` | bool | Show `wallpaper.jpg` from the theme folder (`true`), or ignore it (`false`) |+| `festival` | string | Turns on a festive skin: the network pill becomes a diya whose flame follows the connection, Inputs a temple bell, Settings a marigold, and the first Home of the day gets a petal shower. `dussehra` and `diwali` have built-in greetings |+| `festival_until` | `YYYY-MM-DD` | Last day the festive skin shows; it switches itself off after that. A malformed date turns it off |+| `greeting` | string | Replaces the time-of-day greeting while the festive skin is on |+| `accent_color` | `#RRGGBB` | Colour of the focus glow while the festive skin is on; diya gold if not set |+ | `settings_key_keycodes` | list of keycodes | Remote buttons that open Settings, for `HomeKeyService` (TCL Google TV gear: `[83]`) |-| `settings_key_panel` | bool | Those buttons open a small quick settings panel (TV settings, Picture, Network, Apps, Launcher settings) instead of the TV's Settings |++| `settings_key_panel` | bool | Those buttons open a small quick settings panel (TV settings, Display, Network, Apps, Launcher settings) instead of the TV's Settings |## Wallpapers