# achar0/tv-vibehack architecture

> Architecture diagram of the GitHub repository achar0/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/achar0/tv-vibehack
- Repository: https://github.com/achar0/tv-vibehack

## Overview

tv-vibehack combines a native Android TV launcher with host-side tools for inspecting and managing TV packages. In the launcher workflow, the TV user enters the home screen, which assembles the app dock and Stremio shelf; the user can then navigate overlays, launch apps, and adjust ambient presentation. Separately, an operator connects from a computer to inspect a TV or apply and reverse package-disable lists. The launcher sources shown support several internal calls; other launcher capabilities are documented in the README, so their implementation links are left out where not evidenced.

Main entry points: [`launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java`](https://github.com/achar0/tv-vibehack/blob/fire-tv/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java) (Home screen), [`launcher/app/src/main/java/com/gathin/tvhome/TvAccessibilityService.java`](https://github.com/achar0/tv-vibehack/blob/fire-tv/launcher/app/src/main/java/com/gathin/tvhome/TvAccessibilityService.java) (Remote shortcuts), [`launcher/app/src/main/java/com/gathin/tvhome/AppAdapter.java`](https://github.com/achar0/tv-vibehack/blob/fire-tv/launcher/app/src/main/java/com/gathin/tvhome/AppAdapter.java) (App tiles), [`tools/b64push.py`](https://github.com/achar0/tv-vibehack/blob/fire-tv/tools/b64push.py) (Chunked upload)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_launcher["TV launcher"]
  node_home["Home screen<br/>[MainActivity.java]"]
  node_app_tiles["App tiles<br/>[AppAdapter.java]"]
  node_settings_calendar["Settings and calendar<br/>[MainActivity.java]"]
  node_accessibility["Remote shortcuts"]
  node_stremio["Stremio app"]
  node_poster_service["Poster images"]
end

subgraph group_presentation["Ambient presentation"]
  node_glass["Focus glass<br/>[GlassView.java]"]
  node_dock["Dock styling"]
  node_clock_dream["Clock screensaver<br/>[ClockDream.java]"]
end

subgraph group_management["TV management"]
  node_tv_client["ADB client<br/>[tv.py]"]
  node_chunk_upload["Chunked upload<br/>[b64push.py]"]
  node_disable_packages["Disable packages<br/>[disable.sh]"]
  node_restore_packages["Restore packages<br/>[restore.sh]"]
end

subgraph group_lists["Device profiles"]
  node_device_lists["TV package lists"]
end

node_tv_user(("TV user"))
node_operator(("TV operator"))
node_android_tv["Android TV"]

node_tv_user -->|"opens home"| node_home
node_home -->|"builds tiles"| node_app_tiles
node_home -->|"positions focus"| node_glass
node_home -->|"adds decoration"| node_dock
node_tv_user -->|"opens overlays"| node_settings_calendar
node_home -->|"hosts overlays"| node_settings_calendar
node_app_tiles -->|"launches app"| node_stremio
node_app_tiles -->|"fetches posters"| node_poster_service
node_tv_user -->|"presses media key"| node_accessibility
node_accessibility -->|"opens app"| node_stremio
node_accessibility -->|"redirects home"| node_home
node_home -->|"allows settings"| node_accessibility
node_tv_user -->|"uses screensaver"| node_clock_dream
node_operator -->|"runs commands"| node_tv_client
node_tv_client -->|"connects by ADB"| node_android_tv
node_operator -->|"applies list"| node_disable_packages
node_operator -->|"restores packages"| node_restore_packages
node_disable_packages -->|"reads list"| node_device_lists
node_restore_packages -->|"reads list"| node_device_lists
node_operator -->|"uploads large files"| node_chunk_upload
node_chunk_upload -->|"uses connection"| node_tv_client
node_chunk_upload -->|"transfers chunks"| node_android_tv

click node_home "https://github.com/achar0/tv-vibehack/blob/fire-tv/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java"
click node_app_tiles "https://github.com/achar0/tv-vibehack/blob/fire-tv/launcher/app/src/main/java/com/gathin/tvhome/AppAdapter.java"
click node_settings_calendar "https://github.com/achar0/tv-vibehack/blob/fire-tv/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java"
click node_accessibility "https://github.com/achar0/tv-vibehack/blob/fire-tv/launcher/app/src/main/java/com/gathin/tvhome/TvAccessibilityService.java"
click node_glass "https://github.com/achar0/tv-vibehack/blob/fire-tv/launcher/app/src/main/java/com/gathin/tvhome/GlassView.java"
click node_dock "https://github.com/achar0/tv-vibehack/blob/fire-tv/launcher/app/src/main/java/com/gathin/tvhome/DockDecoration.java"
click node_clock_dream "https://github.com/achar0/tv-vibehack/blob/fire-tv/launcher/app/src/main/java/com/gathin/tvhome/ClockDream.java"
click node_tv_client "https://github.com/achar0/tv-vibehack/blob/fire-tv/tools/tv.py"
click node_chunk_upload "https://github.com/achar0/tv-vibehack/blob/fire-tv/tools/b64push.py"
click node_disable_packages "https://github.com/achar0/tv-vibehack/blob/fire-tv/tools/disable.sh"
click node_restore_packages "https://github.com/achar0/tv-vibehack/blob/fire-tv/tools/restore.sh"
click node_device_lists "https://github.com/achar0/tv-vibehack/tree/fire-tv/examples"

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_home,node_app_tiles,node_settings_calendar,node_accessibility,node_stremio,node_poster_service,node_tv_user toneBlue
class node_glass,node_dock,node_clock_dream toneAmber
class node_tv_client,node_chunk_upload,node_disable_packages,node_restore_packages toneMint
class node_device_lists toneRose
class node_operator,node_android_tv toneIndigo
```

## Components

### TV launcher

- [Home screen](https://github.com/achar0/tv-vibehack/blob/fire-tv/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java): `launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java`
- [App tiles](https://github.com/achar0/tv-vibehack/blob/fire-tv/launcher/app/src/main/java/com/gathin/tvhome/AppAdapter.java): `launcher/app/src/main/java/com/gathin/tvhome/AppAdapter.java`
- [Settings and calendar](https://github.com/achar0/tv-vibehack/blob/fire-tv/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java): `launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java`
- [Remote shortcuts](https://github.com/achar0/tv-vibehack/blob/fire-tv/launcher/app/src/main/java/com/gathin/tvhome/TvAccessibilityService.java): `launcher/app/src/main/java/com/gathin/tvhome/TvAccessibilityService.java`
- **Stremio app**
- **Poster images**

### Ambient presentation

- [Focus glass](https://github.com/achar0/tv-vibehack/blob/fire-tv/launcher/app/src/main/java/com/gathin/tvhome/GlassView.java): `launcher/app/src/main/java/com/gathin/tvhome/GlassView.java`
- [Dock styling](https://github.com/achar0/tv-vibehack/blob/fire-tv/launcher/app/src/main/java/com/gathin/tvhome/DockDecoration.java): `launcher/app/src/main/java/com/gathin/tvhome/DockDecoration.java`
- [Clock screensaver](https://github.com/achar0/tv-vibehack/blob/fire-tv/launcher/app/src/main/java/com/gathin/tvhome/ClockDream.java): `launcher/app/src/main/java/com/gathin/tvhome/ClockDream.java`

### TV management

- [ADB client](https://github.com/achar0/tv-vibehack/blob/fire-tv/tools/tv.py): `tools/tv.py`
- [Chunked upload](https://github.com/achar0/tv-vibehack/blob/fire-tv/tools/b64push.py): `tools/b64push.py`
- [Disable packages](https://github.com/achar0/tv-vibehack/blob/fire-tv/tools/disable.sh): `tools/disable.sh`
- [Restore packages](https://github.com/achar0/tv-vibehack/blob/fire-tv/tools/restore.sh): `tools/restore.sh`

### Device profiles

- [TV package lists](https://github.com/achar0/tv-vibehack/tree/fire-tv/examples): `examples`

### Other components

- **TV user**
- **TV operator**
- **Android TV**

## Connections

- TV user → Home screen: opens home (evidence: `README.md`)
- Home screen → App tiles: builds tiles (evidence: `launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java`)
- Home screen → Focus glass: positions focus (evidence: `launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java`)
- Home screen → Dock styling: adds decoration (evidence: `launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java`)
- TV user → Settings and calendar: opens overlays (evidence: `README.md`)
- Home screen → Settings and calendar: hosts overlays (evidence: `README.md`)
- App tiles → Stremio app: launches app (evidence: `launcher/app/src/main/java/com/gathin/tvhome/AppAdapter.java`)
- App tiles → Poster images: fetches posters (evidence: `launcher/app/src/main/java/com/gathin/tvhome/AppAdapter.java`)
- TV user → Remote shortcuts: presses media key (evidence: `README.md`)
- Remote shortcuts → Stremio app: opens app (evidence: `launcher/app/src/main/java/com/gathin/tvhome/TvAccessibilityService.java`)
- Remote shortcuts → Home screen: redirects home (evidence: `launcher/app/src/main/java/com/gathin/tvhome/TvAccessibilityService.java`)
- Home screen → Remote shortcuts: allows settings (evidence: `launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java`)
- TV user → Clock screensaver: uses screensaver (evidence: `README.md`)
- TV operator → ADB client: runs commands (evidence: `README.md`)
- ADB client → Android TV: connects by ADB (evidence: `tools/tv.py`)
- TV operator → Disable packages: applies list (evidence: `README.md`)
- TV operator → Restore packages: restores packages (evidence: `README.md`)
- Disable packages → TV package lists: reads list (evidence: `README.md`)
- Restore packages → TV package lists: reads list (evidence: `README.md`)
- TV operator → Chunked upload: uploads large files (evidence: `README.md`)
- Chunked upload → ADB client: uses connection (evidence: `tools/b64push.py`)
- Chunked upload → Android TV: transfers chunks (evidence: `tools/b64push.py`)
