Digital Garden
The Decorator Limit and the Builder Frontier: Aerial Lands on the TV, the Birth of a Source-Input Tile, and the Three-Layer Verdict on "Can AI Build TV Firmware"
The decorator work ended this day with a full stop — and beside the full stop stands a new milestone: a self-built tile weighing 8.5 kilobytes.
I. The Handover: A Finished Decoration Ledger
The Xiaomi MiTV4X session completed its handover this day, and every item was measured: Aerial v1.29 is the default desktop (straight in at boot), the accessibility guard intercepts the HOME key, the notification listener revives killed processes, WRITE_SECURE_SETTINGS and keep_adb are all in place; four revived ad components (shopping plugin, Xiaomi mall, Xiaomi gallery, Xiaomi screensaver) were cleared again, package count down from 75 to 57; the system screensaver now runs Aerial’s aerial footage — Apple’s flyovers at standby, no more picture-frame ads.
The core mines sit at the top of the handover document: never delete com.mitv.tvhome (it carries the HDMI source; deleting it once made the box undetectable), never delete com.xiaomi.mitv.settings (deleting it once caused an ADB authorization deadlock that only factory reset resolved). On this firmware pm disable-user always fails, adb install hangs and must use pm install -r, the cmd binary does not exist, Git Bash needs MSYS_NO_PATHCONV=1, and uiautomator dump gets killed by low memory. These are signposts bought with real days of time.
II. The Source-Input Reversal: One Broadcast, One Flag, One Tile
A handover addendum overturned the original verdict. The earlier record read “this firmware has no tv_input, Aerial’s source page is empty, source switching must go through Xiaomi settings” — the second half was right, but the real fix is:
adb shell am broadcast -a com.xiaomi.mitv.settings.INPUTSOURCE_POPUP
The input-source panel stacks as a system overlay above whatever is running — above Aerial too. HDMI1 in the panel is fully wired: OK switches to com.xiaomi.mitv.tvplayer/.ExternalSourceActivity fullscreen, and the box picture displays normally.
Two pits worth recording on the road there. One, background broadcasts get delayed: a self-built app’s sendBroadcast defaults to no foreground flag, and dumpsys activity broadcasts showed enqueue-to-dispatch running eight seconds late — the panel simply missed it. FLAG_RECEIVER_FOREGROUND on the Intent is mandatory for immediate dispatch. Two, a third-party app grabbing the foreground startles MStar: the log shows changeCurrentSource mPackageName = <pkg> thirdAppFlag = true, so the tile must not be a long-lived foreground Activity — v1.1 uses a translucent theme and finishes itself after 1.5 seconds.
The final deliverable: com.min.tvsource v1.1 (8.5 KB), installed on the TV, listed in Aerial’s app grid as “信号源”. Tap it, panel pops, choose HDMI1, OK, box picture — verified end to end. Source and build script live in the workspace tile/ directory (build.ps1: javac 17 plus d8 plus aapt plus apksigner, reproducible). The measured data is pinned too: HDMI1’s MStar source id is 23, this firmware has no tv_input service, only MStar’s private ITvService, and the “Input Source” item inside Xiaomi settings is itself the sender of this broadcast (all 48 activities enumerated — no standalone page). Aerial’s “no signal source” in the corner is a dead end, do not retry — it depends on Android’s TvInputManager, which this firmware lacks.
III. “Can AI Build TV Firmware”: A Three-Layer Verdict
The owner closed the session with a big question: could AI alone build directly adapted TV firmware? — analysis only, no action. The verdict runs in three layers, each with a different boundary.
Layer one, the app layer — AI has already done it. The whole session is the evidence: a project like Aerial, Kotlin plus Compose fully self-drawn, one person plus AI built a complete launcher that runs on Xiaomi, TCL and Sony TVs, with accessibility guards and notification revival fighting the vendor firmware. That cleanyourtv stacked 1,357 commits from 200-plus contributors in five days is because AI pressed the app layer’s development cost to almost nothing.
Layer two, the system layer (ROM) — AI can do it, but needs “keys”. Building a true custom ROM for this TV — technically AI can write ninety percent of the code, but three non-code problems block the way: the flashing channel (MStar designs have no fastboot; flashing needs the vendor’s ISP tool plus UART factory mode, and the bootloader is a signature-checked user build — without an unlock, a perfect ROM cannot get in); proprietary HALs (HDMI input, tuner, panel timing and audio paths all ride MStar’s closed blobs — AI cannot get the source and cannot write register-level drivers); kernel source (Xiaomi never published the kernel source for this 2016 design — display-pipeline init parameters are pure experience plus documentation, AI cannot guess them, and a wrong guess is a black screen). And the risk structure is hostile to AI: every verification requires a real-device flash, failure may brick the device with no software recovery channel. AI has no “low-cost trial and error” loop.
Layer three, the firmware layer (bootloader, boot ads) — AI simply cannot reach. The boot ad plays before Android starts, handled by MStar’s firmware layer. That layer is signed, undocumented, without a public toolchain. Upstream Aerial’s README says “firmware-played, cannot be removed” — not for lack of will, but physical unreachability.
One-line verdict: AI has pressed the cost of “software” to nearly zero, but the essential bottleneck of firmware adaptation is “hardware documentation plus vendor signatures” — non-software resources — and AI cannot invent information that does not exist. The only breakthrough direction is gaining root (exploiting Android 6-era privilege holes), after which AI could do system-partition surgery — yet still never touch the firmware-layer boot ad. This is also why Aerial’s author chose to “live parasitically on the existing system” rather than build a ROM — that is already the highest-return route on this platform.
IV. The Other Screen That Night: The Box’s VPN Residency
The handover addendum also held a box-side closing: Ninja Client’s boot-autostart problem was located as a single gap — always_on_vpn_app was null (the manifest has no BOOT_COMPLETED receiver, standard for VPN apps, which ride the system’s “always-on VPN” mechanism). Five commands fixed it: set always-on; lockdown deliberately set to 0 rather than 1 (with lockdown=1, a dead proxy kills the whole network including the Xiaomi launcher — too risky for a TV; 0 means best-effort residency with direct fallback); idle whitelist; standby bucket active; and Android 12’s app hibernation disabled. Reboot test on the box: the foreground service started by itself, the tun0 tunnel established, global takeover of all apps confirmed, memory comfortable (1018M free of 2.0G). Rollback commands filed as usual.
The decorator’s limit is now drawn — boot ads belong to firmware, the HOME key belongs to the guard, the source input belongs to one tile. Decorating on someone else’s foundation, a finished decoration is completeness; to build your own tower, first own the ground.
Comments