09 β Device DNS resolver (dnsmasq, lane W) + the boot re-arm failure states (2026-11-09)
Owner-scoped ad/telemetry blocking moves from per-IP REJECTs to a
domain-level resolver: dnsmasq 2.91 (static armv7) shipped by the
re.installer postinst, answering NXDOMAIN for the
ADSFW_HOSTS-derived families over loopback. Deployed and verified
pre-reboot on this unit; the same-day caveat β the boot re-arm lanes
did not re-fire after the forced reboot, so the resolver (and
everything root-scoped) currently needs a manual re-arm; every failure
state, evidence and probe is recorded below. Untracked-era artifacts:
tools/u7q/scripts/build_dnsmasq.sh (zig crossbuild),
tools/u7q/bin/dnsmasq (gitignored, built locally), the dns stage in
tools/u7q/scripts/make_min_installer.py v1.0.4,
launcher/phase3-arm14.html (deploy page), launcher/phase3-diag-e7q.html
(diagnostics), launcher/hookswap-e7qtuk.html (hook v2 swap).
Phase-0 probe (pre-deploy, root read via the dropbear lane)
/etc/resolv.confis a symlink to/var/local/etc/resolv.conf(rw p49) β resolver file is directly writable (cp -ffollows the link); busybox has noreadlinkapplet.iptablesat/usr/local/bin/iptables;nat OUTPUTpolicy ACCEPT, empty; owner match module present (probe rule insert/delete OK).busybox mount -o bindsupported ([r]bind);pidofpresent.- Package baseline:
re.installer 1.0.0(mtk9603).
The dns stage (v1.0.4, backgrounded, boot-timed sleep 25)
Lane order W β A β B, decided at runtime, never both mounted:
- Capture the vendor upstream first β
resolv.conf.origin/APPS/.re_sshdβ guarded bygrep nameserver 127.0.0.1so our own lane is never captured back as upstream. - Lane W:
cp -f $D/resolv.conf.w /etc/resolv.conf(the symlink target on rw flash) βnameserver 127.0.0.1. - Lane A: busybox
mount -o bindof a one-line file over/etc/resolv.conf(no underlying write), with a stale-bind umount rinse first. - Lane B: nat
REDIRECT --to-ports 5353(udp+tcp,-C-guarded) +-m owner --uid-owner 314 -j RETURNexempting the resolver's own upstream queries (loop-free); verified before use via a filter-table insert/delete of the same match. - dnsmasq runs
--no-daemon &β this static build rejects--daemonat option parse ("bad command line options"; v1.0.3 ran the stage with--daemonand the safe-degrade path restored the vendor lane within ~30 s of boot β the degrade design already proved itself in production). - Verify (
nslookupvia 127.0.0.1): benignvidaa-base-auth-eu.vidaahub.commust resolve through upstream; blockedrsc-ads.vidaahub.commust come back NXDOMAIN. On failure after 4 tries the stage restores the vendor resolver (flush REDIRECTs / umount / restore file) and logsDNS DEGRADE. dnsblock.confis generated at IPK-build time fromADSFW_HOSTS(address=/domain/per family) β single source of truth, no second host list;--local-servicekeeps answers off-LAN.
Deploy + measured result (pre-reboot, verified 2026-11-09 ~13:5xβ14:1x)
- Delivery over the root-SSH pipe (
cat ipk | ssh β¦ 'cat > file', md5 verified) +opkg installneedsLD_LIBRARY_PATH=/usr/local/lib(vendored opkg needslibarchive.so.13, absent from a dropbear PATH), and the package'sArchitecturemust be mtk9603 (the builder's default mtk9655 gets rejected: "incompatible architecture"). - Upgrade chain 1.0.0 β 1.0.1 β 1.0.2 β 1.0.3 β 1.0.4 all confirmed ("Upgradingβ¦ Configuringβ¦"); each configure re-ran the postinst.
- Measured steady state before the reboot:
resolv.conf= loopback;nslookup rsc-adsβ¦127.0.0.1β NXDOMAIN; benign resolve works; 15 OUTPUT REJECTs (3 freeze + 12 adsfw) present; NO nat rules (lane W, no iptables needed); dnsmasq pid + dnsmasq.log present. - bump-order lesson: the dns artifacts must be
mv'd into$Dbefore the stages' gates evaluate β v1.0.1/1.0.2's stage order ran "dns missing" on first configure (the mv step came later in the script); v1.0.3 reordered (mv β stages). - The
--arch mtk9603flag (and lib path) belong in the docs. The phase3-arm14 page lane is the intended deploy vehicle but was inert today β see failure states.
Failure states discovered the same day (all evidence via root reads
or the browser page lane)
busybox reboot -fis NOT a working reboot recipe on 09.09D: the kernel reset took the whole session down and the TV came back with the network stack dark (8008 closed on every address; ICMP/MQTT fine on later cycles). The findings-12 recipe (reboot -f) belongs to the 09.01 reference build β 55E7QTUK's verified recovery is the owner mains cycle (as findings/08 recorded), and a clean remote reboot command remains unverified on this branch.- The serviceList autostart lane went silent.
/APPS/pkgs/tv.vidaa.jsservice.basic/CHA/services/re_sshdpackage +serviceList.jsonentry (autoStart) are intact (root-era reads), and the module loads (/tmp/re_sshd_boot.log"module loaded", seen at 14:11 after a configure), butboot_marker.txtβ written only bystart()β is ENOENT through every boot today. The module's next line after the marker-append isrequire(globalThis.PHOENIX_LIB + '/baseService.js'); on this 09.09D build that appears unresolved at service require time, so the module class never exports and phoenix never starts it. The 55A7KAU blueprint comment (09.09O: services resolve the SDK through the phoenix globals) is honored in the file, but the 09.09D branch behaves as if the global is absent in this context. Open item: verifyPHOENIX_LIBpresence via a page-lane read of a stub module log, then patchindex.jsaccordingly (a require-free export is the low-risk version). - superwatch 53/54 replies
34:0 / 35:0(accepted) but the install does not execute. The page lane sent uninstall (54) + install (53) of/APPS/installer.ipk(content verified delivered, md5-checksum over the ssh lane) throughalvarm2at 14:32 and 14:34 β both replies framedresult 0β yetinstaller_log.txtstays at 14:09 and no dropbear ever appears. The vendor opkg machinery invoked through the superwatch/socket path is failing silently (my directopkgruns succeed; the difference sits in the environment the vendor path spawns with). Open item. - The otaTest hook lane's exec is still blocked. The v1 hook
(findings/04, pre-root era) sits on disk at
/var/local/otaTest.sh, its own log (/var/local/otaTest.log) ENOENT forever, its ports (2222/8770) closed and its DoH freeze never re-inserted after boots β/etc/rc.d/rc.local'ssh /var/local/otaTest.sh &stanza is not reaching execution on this build (04's SELinux-exec block appears to persist post-root for the rc.local context; the boot lane that worked on the reference model does not on this one). - Current state:
installer_log.txt= 14:09 (the last successful configure);resolv.confback to vendor nameservers (the DHCP rewrite at boot undoes lane W β the stage is designed to re-fight it on every boot, but only runs with root); firewall and adsfw REJECTs gone; dropbear down. Ads rendering and the OTA lane are open until a re-arm run happens.
The v2 hook (in place, unverified)
/var/local/otaTest.sh was replaced via the browser write lane by the
thin re-arm wrapper (v1 archived verbatim to
/var/local/otaTest.v1.bak β rollback cp .bak over the file): it
waits on hook.off, then re-runs the packaged postinst
(/APPS/pkgs/opkgmeta/info/re.installer.postinst) so every boot gets
freeze + adsfw + dns + dropbear in one shot without a second dropbear
stack. First boot after this is in place did NOT produce
/APPS/.re_sshd/boot_hook.log β same exec-block family as (4). The
wrapper stays in place for a future root-context fix; kill-switch is
touch /var/local/hook.off.
Recovery playbook (owner, next session)
- Boot until the network is up (owner mains cycle).
- No SSH needed if the superwatch machinery came up healthy with the
boot β open the arm page with a fresh query param and the trigger
completes the whole chain on its own (verified 2026-11-09 15:16:
fetch β install 1.0.4 β postinst β
dns verified via 127.0.0.1 (lane W)indnsfw.log, NXDOMAIN confirmed, 3 freeze REJECTs, dropbear fresh pid). Servepub/from any LAN origin the TV can reach and openphase3-arm14.html?v=<new>. - If SSH answers instead, the opkg one-liner does the same:
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH; opkg install /APPS/installer_e.ipkβ the configure re-runs the postinst and restores freeze + adsfw + the resolver (idempotent). - Then re-verify
resolv.confloopback + NXDOMAIN + rules as in the deploy section. Killing the resolver stays one command:/APPS/.re_sshd/dnsmasq-stop.sh.
Stall forensics (2026-11-09 14:26β15:16, resolved by boot)
The silent vendor install had one page-readable diagnostic:
ipk_install.sh initializes /tmp/ipk_install_result (touch +
chmod 640 + chown 314:314 β readable from the browser fileRead lane
by design) before anything else. During the stall window that file was
empty: the script had reached its init but its $(opkg
--force-reinstall β¦) line never returned, so neither the success write
nor an error JSON ever landed. The mounted page could confirm this in
one read (../tmp/ipk_install_result). A mains cycle + re-trigger
cleared it: the identical chain completed, which brackets the stall to
the boot-spawned vendor machinery state, not to our package, IPK
content, or wire format. When it recurs, the empty result file is the
first check.