docs / models / 50A51HUV / 09.01O.P0813

50A51HUV / 09.01O.P0813 β€” the root chain, from a web page to a root shell

Research and original write-up: @carteakey.

Applies only to the 50A51HUV running 09.01O.P0813 (VIDAA U09.01, US/CAN). For the other model guides, see the model index (HE40 and 100U7Q). Those chains are separate and do not transfer from this one.

To our knowledge this is the first publicly documented root path for 2024+ VIDAA firmware (everything published before is pre-2021; see SECURITY.md for the disclosure stance). It was developed live on one TV β€” a 2024+ MTK9602 set β€” so treat every stage as model-specific and read the findings/ directory for the details before running anything. Read AGENTS.md if an AI session is doing the walking.

The chain, one line:

official-app cert ──► MQTT bridge ──► browser file bridge ──► ../ escape
     ──► unauthenticated local API ──► rc.local boot hook ──► root at boot
     ──► busybox + dropbear over /dev/tcp ──► key-only SSH

Every stage depends only on the previous one. Nothing touches a read-only partition; verified boot stays locked and green the whole way.

Stage 0 β€” talk to the TV (the 2024 auth wall)

2024+ firmware rejects the 2018-era credentials every guide uses (MQTT rc 5, "your TV mode is no longer compatible"). Two locks:

  1. Client-certificate identity β€” the broker only accepts the current official VIDAA Smart TV app's cert (CN=VidaaAppAndroidV01), extractable from the APK's keystore (res/raw/client_mobile_android.p12, openssl pkcs12 -legacy).
  2. Dynamic per-connect credentials β€” MAC-digest client_id, XOR-masked username, digit-sum-salted password; after the 4-digit PIN, long-lived tokens (2-day access / 30-day refresh) mean you pair once.

Protocol traps that will eat your afternoon: wildcard MQTT subscriptions are silently denied (exact topics only), and list responses are JSON arrays where a dict-check drops them silently.

Details: findings/01-mqtt-bridge.md

Stage 1 β€” foothold: the browser file bridge

The TV browser exposes ~85 Hisense_* shims plus HiUtils_createRequest to any page it opens. The file APIs resolve against websdk/ β€” which is enough to write websdk/Appinfo.json, i.e. install a web app as a native TV app (that's how the alvidaa launcher installs itself).

Details: findings/03-bridge-internals.md

Stage 2 β€” the sandbox escape, by reading an errno

A failed absolute read leaks the chroot base in its errno: open("/APPS//etc/passwd") β†’ ENOENT. The jail glues /APPS/ onto every path β€” so ../ walks out to the real root. Read + write as uid 314, filesystem-wide, from any page.

Details: findings/03-bridge-internals.md

Stage 3 β€” map the machine

Details: findings/04-privilege-map.md

Stage 4 β€” the door

rc.local (root, every boot) executes /var/local/otaTest.sh if present β€” an OTA test hook left armed in production firmware, in a directory the bridge can write. Writing one file = arbitrary code as root at next boot.

launcher/recon.html (v1β†’v8) is the tool that found all of this, and launcher/hookinstall.html + the server's /api/open install new hook versions remotely over MQTT β€” zero physical contact after the first page load.

Details: findings/05-root-primitive.md

Stage 5 β€” root, and the honest lessons

Details: findings/05-root-primitive.md

Stage 6 β€” the shell (the five-lock gauntlet)

Static dropbear 2025.88 cross-compiled with zig cc (arm-linux-musleabihf), shipped to the hook, fetched at boot over bash /dev/tcp. Five locks, each cleared by one hook version:

Lock Counter
FIREWALL_IN_EULAON drops all but MQTT/ICMP/loopback; blacklists 22, 23, 4444, 9222, 12321 v5: accept rules at top of INPUT, re-applied in a boot loop
dropbear's -D replaces .ssh key at /var/local/roothome/authorized_keys
login shell validated against /etc/shells (absent); root's shell is a script v6: patch the check
checkpubkeyperms() vs the firmware's own chmod 777 /var/local v8: patch the walk
root's login shell is the USB-key gate script (session prints 1 and quits) v10: patched build execs /bin/sh directly

Result: ssh -p 2222 -i server/keys/tv_root_ed25519 root@<tv-ip> β€” key-only, every boot. The wrapper server/tv (or tools/tvshell.py) makes it one command.

Details: findings/06-ssh-gauntlet.md

What root is for

Operational rules (learned the loud way)

  1. R0 first: freeze OTA before touching anything else β€” an update that reseals the hole mid-project is the only true game-over. Applied Oct 30, no hook churn: /var/local/tvrc (sourced by the boot hook) now closes the DNS bypass in-kernel β€” all outbound 53/853 to anywhere but AdGuard is REJECTed, v4 verified live (1.1.1.1 answers Operation not permitted) β€” and blocks the OTA host (ota-tv.vidaahub.com β†’ 131.189.69.51; CDN IPs rotate, so the DNS close is the durable layer). Note: /OAD/AppUpgradeSwitch.json already reads upgradeFlag: 0, but the service rewrites it from the server. Open item: ip6tables doesn't exist on this firmware, so the IPv6 fallback resolvers are closed only by AdGuard being first in resolv.conf β€” router-side RA control would finish the job.
  2. Keep a backup of the previous hook (otaTest.v1.bak) on the TV. A kill-switch is planned for v11; it is not established for the current hook β€” recovery today is rm /var/local/otaTest.sh over SSH, which is equivalent. Full rollback ladder (hook β†’ UI restore from the canary .bak + Pi-side tar β†’ factory reset β†’ partition dumps for file-level restore; verified boot makes reflash impossible and unnecessary) is in the post's "What if it breaks?" section.
  3. One MQTT session per credential set, one agent on the TV at a time.
  4. Never commit server/keys/; never publish vendor binaries.
  5. The endgame is the teardown: delete the hook, fresh boot, verified boot still green, stock in every way that matters.