alvidaa

AGENTS.md β€” working on alvidaa with an AI session

This repo is routinely driven by AI coding sessions (the whole project was built that way β€” see STORY.md). If you are an agent (or a human driving one), this file is your briefing.

What this repo is

Two lanes share one TV:

  1. The launcher (product lane): a self-installing home screen for Hisense VIDAA TVs β€” one canvas page + a Python/Pi server speaking the TV's RemoteNow MQTT channel. Safe, reversible, the 90% use case.
  2. The research (root lane): how root was gained on 2024+ firmware and what it unlocked. Own-TV-only, documented in docs/models/50A51HUV/09.01O.P0813/findings/.

Ground rules (non-negotiable)

Map

Path What
server/vidaa_server.py HTTP + WebSocket + MQTT bridge; /api/open loads any URL on the TV; /api/recon receives probe reports
server/pair.py the 2024 pairing handshake (cert + dynamic credentials)
server/tv root one-shot/interactive wrapper over dropbear (PATH-fixed)
bridge/ on-TV Go daemon: loopback HTTP + WS + local MQTT session (see bridge/README.md)
launcher/recon.html the probe page pattern (v1–v8 in git history)
launcher/hookinstall.html, hookcheck.html remote hook install/verify
docs/models/50A51HUV/09.01O.P0813/findings/01…09,11–12 and docs/research/10-patched-firmware-playbook.md canonical record: bridge, privilege map, root primitive, SSH gauntlet, root summary, images, endpoints, patched firmware playbook, firmware notes, cobalt runtime & overlay traps
docs/launcher/ launcher deployment, the on-TV launcher v2 roadmap, and the two-lane architecture (LANES.md)
docs/project/ the project story, AI prompt ladder and blog draft
docs/research/ cross-model inventory, method catalogue, tested-models guide and playbook
scripts/check.sh read-only health check: generated tables vs JSON, python/shell syntax, relative doc links, duplicate firmware rows
scripts/report.py tested-model report scaffolder: validates the firmware id, refuses duplicates, scaffolds the guide tree, appends the inventory row, runs the generators + check
scripts/gen-site.py renders the markdown in place into site/ for GitHub Pages (.github/workflows/pages.yml)
TODO.md open work, ordered β€” loose ends and the catalogue refactor plan
firmware/ENDPOINTS.md live endpoint/kill-list working copy (gitignored)

Canonical recipes

Onboarding a new TV/model

  1. Fingerprint: SSDP descriptor (transport_protocol=), then Hisense_GetFirmWareVersion() / Hisense_GetChipSetName() from any page in the TV browser.
  2. Launcher lane first (generation-dependent, not SoC-dependent): pair, serve, self-install. See findings 01.
  3. Root lane only after 1–2 are green, and expect SoC-specific differences (this chain is MTK9602/armv7; HiSilicon models differ in partitions and tools). See findings 03–07 for the method, not just the constants.
  4. Add the unit to docs/research/inventory.json (single source of truth) and run scripts/gen-inventory.py β€” the README compact matrix and the full table in docs/research/TESTED-MODELS.md both regenerate from it. By PR.