# chazypr/tv-vibehack architecture

> Architecture diagram of the GitHub repository chazypr/tv-vibehack, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/chazypr/tv-vibehack
- Repository: https://github.com/chazypr/tv-vibehack

## Overview

TV Vibe Hack is an Android TV home-screen replacement plus model-specific setup and recovery tools. Its main user workflow is pressing Home to reach the launcher, navigating app and input tiles with the remote, then opening an app, HDMI source, or Live TV. The TCL setup workflow installs and selects the launcher; a separate restore script returns to Google TV. The sampled Java shows the launcher’s catalog, input refresh, and remote-key handling. Wallpaper, customization, and model-specific setup capabilities are documented in the README but their implementation scripts were not sampled.

Main entry points: [`launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java`](https://github.com/chazypr/tv-vibehack/blob/main/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java) (Home launcher), [`launcher/app/src/main/java/com/gathin/tvhome/AppAdapter.java`](https://github.com/chazypr/tv-vibehack/blob/main/launcher/app/src/main/java/com/gathin/tvhome/AppAdapter.java) (App and tile catalog), [`launcher/app/src/main/java/com/gathin/tvhome/RemoteShortcutService.java`](https://github.com/chazypr/tv-vibehack/blob/main/launcher/app/src/main/java/com/gathin/tvhome/RemoteShortcutService.java) (YouTube key handler), [`launcher/app/src/main/java/com/gathin/tvhome/LiveTv.java`](https://github.com/chazypr/tv-vibehack/blob/main/launcher/app/src/main/java/com/gathin/tvhome/LiveTv.java) (Live TV helper)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_launcher["Launcher experience"]
  node_launcher_home["Home launcher<br/>[MainActivity.java]"]
  node_dock_decoration["Dock decoration"]
  node_focus_outline["Focus outline<br/>[GlassView.java]"]
  node_remote_shortcut["YouTube key handler"]
end

subgraph group_content["Apps and inputs"]
  node_app_catalog["App and tile catalog<br/>[AppAdapter.java]"]
  node_live_tv["Live TV helper<br/>[LiveTv.java]"]
end

subgraph group_device_tools["TV setup tools"]
  node_tcl_install["TCL install workflow<br/>[install.sh]"]
  node_tcl_restore["TCL restore workflow<br/>[restore.sh]"]
  node_adb_client["ADB command client<br/>[tv.py]"]
  node_package_tools["Package disable and restore<br/>[disable.sh]"]
  node_xiaomi_config["Xiaomi debloat list<br/>[debloat.txt]"]
end

subgraph group_device["TV platform"]
  node_tv_apps["Installed TV apps"]
  node_tv_inputs["TV inputs and tuner"]
  node_android_tv["Android TV device"]
end

node_remote_user(("TV remote user"))

node_remote_user -->|"opens Home"| node_launcher_home
node_launcher_home -->|"reloads tiles"| node_app_catalog
node_launcher_home -->|"tracks input changes"| node_tv_inputs
node_app_catalog -->|"queries launchable apps"| node_tv_apps
node_app_catalog -->|"adds input tiles"| node_tv_inputs
node_launcher_home -->|"uses tuner helper"| node_live_tv
node_live_tv -->|"finds tuner input"| node_tv_inputs
node_app_catalog -->|"launches selected app"| node_tv_apps
node_remote_user -->|"presses YouTube key"| node_remote_shortcut
node_remote_shortcut -->|"launches YouTube"| node_tv_apps
node_remote_user -->|"navigates tiles"| node_launcher_home
node_tcl_install -->|"installs and selects"| node_android_tv
node_tcl_restore -->|"restores original home"| node_android_tv
node_adb_client -->|"runs ADB commands"| node_android_tv
node_package_tools -->|"changes packages"| node_android_tv
node_xiaomi_config -->|"supplies package list"| node_package_tools

click node_launcher_home "https://github.com/chazypr/tv-vibehack/blob/main/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java"
click node_app_catalog "https://github.com/chazypr/tv-vibehack/blob/main/launcher/app/src/main/java/com/gathin/tvhome/AppAdapter.java"
click node_dock_decoration "https://github.com/chazypr/tv-vibehack/blob/main/launcher/app/src/main/java/com/gathin/tvhome/DockDecoration.java"
click node_focus_outline "https://github.com/chazypr/tv-vibehack/blob/main/launcher/app/src/main/java/com/gathin/tvhome/GlassView.java"
click node_live_tv "https://github.com/chazypr/tv-vibehack/blob/main/launcher/app/src/main/java/com/gathin/tvhome/LiveTv.java"
click node_remote_shortcut "https://github.com/chazypr/tv-vibehack/blob/main/launcher/app/src/main/java/com/gathin/tvhome/RemoteShortcutService.java"
click node_tcl_install "https://github.com/chazypr/tv-vibehack/blob/main/examples/tcl-c6k/install.sh"
click node_tcl_restore "https://github.com/chazypr/tv-vibehack/blob/main/examples/tcl-c6k/restore.sh"
click node_adb_client "https://github.com/chazypr/tv-vibehack/blob/main/tools/tv.py"
click node_package_tools "https://github.com/chazypr/tv-vibehack/blob/main/tools/disable.sh"
click node_xiaomi_config "https://github.com/chazypr/tv-vibehack/blob/main/examples/xiaomi-mi-tv-4a/debloat.txt"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_launcher_home,node_dock_decoration,node_focus_outline,node_remote_shortcut,node_remote_user toneBlue
class node_app_catalog,node_live_tv toneAmber
class node_tcl_install,node_tcl_restore,node_adb_client,node_package_tools,node_xiaomi_config toneMint
class node_tv_apps,node_tv_inputs,node_android_tv toneRose
```

## Components

### Launcher experience

- [Home launcher](https://github.com/chazypr/tv-vibehack/blob/main/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java): `launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java`
- [Dock decoration](https://github.com/chazypr/tv-vibehack/blob/main/launcher/app/src/main/java/com/gathin/tvhome/DockDecoration.java): `launcher/app/src/main/java/com/gathin/tvhome/DockDecoration.java`
- [Focus outline](https://github.com/chazypr/tv-vibehack/blob/main/launcher/app/src/main/java/com/gathin/tvhome/GlassView.java): `launcher/app/src/main/java/com/gathin/tvhome/GlassView.java`
- [YouTube key handler](https://github.com/chazypr/tv-vibehack/blob/main/launcher/app/src/main/java/com/gathin/tvhome/RemoteShortcutService.java): `launcher/app/src/main/java/com/gathin/tvhome/RemoteShortcutService.java`

### Apps and inputs

- [App and tile catalog](https://github.com/chazypr/tv-vibehack/blob/main/launcher/app/src/main/java/com/gathin/tvhome/AppAdapter.java): `launcher/app/src/main/java/com/gathin/tvhome/AppAdapter.java`
- [Live TV helper](https://github.com/chazypr/tv-vibehack/blob/main/launcher/app/src/main/java/com/gathin/tvhome/LiveTv.java): `launcher/app/src/main/java/com/gathin/tvhome/LiveTv.java`

### TV setup tools

- [TCL install workflow](https://github.com/chazypr/tv-vibehack/blob/main/examples/tcl-c6k/install.sh): `examples/tcl-c6k/install.sh`
- [TCL restore workflow](https://github.com/chazypr/tv-vibehack/blob/main/examples/tcl-c6k/restore.sh): `examples/tcl-c6k/restore.sh`
- [ADB command client](https://github.com/chazypr/tv-vibehack/blob/main/tools/tv.py): `tools/tv.py`
- [Package disable and restore](https://github.com/chazypr/tv-vibehack/blob/main/tools/disable.sh): `tools/disable.sh`
- [Xiaomi debloat list](https://github.com/chazypr/tv-vibehack/blob/main/examples/xiaomi-mi-tv-4a/debloat.txt): `examples/xiaomi-mi-tv-4a/debloat.txt`

### TV platform

- **Installed TV apps**
- **TV inputs and tuner**
- **Android TV device**

### Other components

- **TV remote user**

## Connections

- TV remote user → Home launcher: opens Home (evidence: `README.md`)
- Home launcher → App and tile catalog: reloads tiles (evidence: `launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java`)
- Home launcher → TV inputs and tuner: tracks input changes (evidence: `launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java`)
- App and tile catalog → Installed TV apps: queries launchable apps (evidence: `launcher/app/src/main/java/com/gathin/tvhome/AppAdapter.java`)
- App and tile catalog → TV inputs and tuner: adds input tiles (evidence: `launcher/app/src/main/java/com/gathin/tvhome/AppAdapter.java`)
- Home launcher → Live TV helper: uses tuner helper (evidence: `launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java`)
- Live TV helper → TV inputs and tuner: finds tuner input (evidence: `launcher/app/src/main/java/com/gathin/tvhome/LiveTv.java`)
- App and tile catalog → Installed TV apps: launches selected app (evidence: `launcher/app/src/main/java/com/gathin/tvhome/AppAdapter.java`)
- TV remote user → YouTube key handler: presses YouTube key (evidence: `launcher/app/src/main/java/com/gathin/tvhome/RemoteShortcutService.java`)
- YouTube key handler → Installed TV apps: launches YouTube (evidence: `launcher/app/src/main/java/com/gathin/tvhome/RemoteShortcutService.java`)
- TV remote user → Home launcher: navigates tiles (evidence: `README.md`)
- TCL install workflow → Android TV device: installs and selects (evidence: `README.md`)
- TCL restore workflow → Android TV device: restores original home (evidence: `README.md`)
- ADB command client → Android TV device: runs ADB commands (evidence: `README.md`)
- Package disable and restore → Android TV device: changes packages (evidence: `README.md`)
- Xiaomi debloat list → Package disable and restore: supplies package list (evidence: `README.md`)
