docs / models / 75U8QTUK / V0000.09.60I.Q0813 / findings

11 β€” Boot persistence verified: re_sshd service autostart

2026-11-07, owner-authorized, supervised reboot. Root SSH on :8008 now comes back automatically after a reboot, with no browser and no manual re-arm. The native Home, its merged apps+inputs list and the Dusk wallpaper all survived the same reboot. Verified boot stays green.

Preconditions checked before writing anything

Two separate questions

Before After
Root SSH (dropbear :8008) Died on reboot; 83+82 re-arm via browser (findings/08) Auto re-arms at every boot
Native Home (app.js on /APPS) Assumed persistent, never tested; a boot redeploy could overwrite it Verified survived, byte-identical

Mechanism

Proven on 75UR9S, 55A7KAU and 43E7DS. This unit has the identical machinery, confirmed by source inspection before deploying:

Chain at every boot:

phoenix (uid 314, group 616)
  └─ serviceManager β†’ startAutoStartServices("basic", …/serviceList.json)
       └─ re_sshd (autoStart: true) β†’ services/re_sshd/index.js
            β”œβ”€ await super.start()        ← emits 'started'
            └─ if no :8008 LISTEN in /proc/net/tcp:
                 /var/run/superwatch_socket (4-byte LE length prefix)
                 β”œβ”€ "90:83:90;re.installer"                    β†’ 90:0
                 └─ "91:82:91;/APPS/installer.ipk;re.installer;" β†’ 91:0
                      └─ opkg β†’ postinst uid 0 β†’ dropbear on 8008

Retries every 5 s for 3 minutes in case superwatch is not up yet. Evidence is written to /APPS/.re_sshd/boot_marker.txt and /tmp/re_sshd_boot.log.

Build-specific corrections (the important discovery)

The sibling sources do not port verbatim to V0000.09.60I.Q0813:

75UR9S / 55A7KAU This build
Constructor (name, dest) registerService calls new Service(sid_path) β€” one argument; use (entry)
start() logs, fires arm(), never emits 'started' await super.start() is mandatory: this serviceManager awaits the 'started' event for each autostart service before starting the next, so omitting it would stall the entire autostart list (including system services)
SDK import @sdk/baseService.js (75UR9S) / globalThis.PHOENIX_LIB (55A7KAU) @sdk/baseService.js, registered by run_env.js β†’ BASIC_JS_LIB
dropbear check 75UR9S reads the root-owned pidfile /proc/net/tcp (1F48 / state 0A); a uid-314 pidfile read can fail and loop the install forever
Package ids 82/83 (75UR9S), 54/53 (55A7KAU) 83/82
serviceList.json hot-reload none none β€” deploy is non-disruptive; entries activate at next boot

The hook re-runs the already installed re.installer IPK β€” the same documented root-lane mechanism as findings/07/08, not a new payload.

Files deployed (all byte-verified)

File Destination md5
source/re_sshd/index.js …/services/re_sshd/index.js 57876eac454bce2fadd2e7cf136ae12b
source/re_sshd/package.json …/services/re_sshd/package.json 535e620096d8d05201209476a5bf175d
source/re_sshd/serviceList.json …/services/serviceList.json b1512afe5efa2db3753315b92b17cc2b
source/re_sshd/boot-persist.sh /var/local/alvidaa/boot-persist/boot-persist.sh 3d90b8251db7cfb815d69cc44c38158e
pristine list …/services/serviceList.json.pristine + private Mac copy firmware/75u8qtuk/boot-persist/ 8ad68a4ddc0afee959ec651391a165e4

Only change to serviceList.json is one appended entry {"id":"re_sshd","autoStart":true,"isKeepAlive":false}. Files are owned 314:314, mode 0640 (dir 0750), matching the sibling services. The marker file is pre-created and owned 314:314 so the uid-314 service can append despite its root-owned parent directory.

Pre-flight validation: node --check and both JSONs locally; bash -n on the helper; the TV's own Node v20.19.4 parsed index.js with --check exit 0; ./scripts/check.sh clean. Deploy was non-disruptive (no hot-reload): SystemUI, SSH and app.js were unchanged immediately after.

Reboot evidence

Sent /bin/sync then a detached /sbin/reboot over SSH at uptime 84000.41.

SSH silent ~10 s β†’ back at uptime 16.39 (uptime reset = real reboot)
uid 0, CapEff 000001ffffffffff

/APPS/.re_sshd/boot_marker.txt:
2026-11-07T21:39:11.416Z re_sshd start pid=2650 uid=314
2026-11-07T21:39:33.578Z attempt 1 uninstall=[90:0] install=[91:0]
2026-11-07T21:39:38.581Z ARMED: dropbear up

Teardown

One command restores the pre-change state (takes effect at next boot; the currently running dropbear is unaffected):

ssh -p 8008 -i server/keys/vidaa_75u8qtuk_ed25519 root@<tv-ip> \
  '/bin/sh /var/local/alvidaa/boot-persist/boot-persist.sh teardown'

That restores serviceList.json.pristine (byte-identical), removes services/re_sshd/ and the marker. Status check:

'/bin/sh /var/local/alvidaa/boot-persist/boot-persist.sh status'

The full root-lane teardown (remove /APPS/.re_sshd, /APPS/shell, /APPS/installer.ipk, sw2.js, the re.installer package and the firewall rule) remains as documented in findings/07. Manual re-arm fallback remains tools/u7q/web/rearm.html + tools/u7q/web/server.py (restart the server if needed).

Trade-off (deliberate)

Previously "root dies on reboot" was a built-in kill switch. Now TCP 8008 is open LAN-wide at every cold boot (key-only, dedicated ed25519 key in server/keys/, gitignored), and a persistent uid-314 service holds group 616 (superwatch socket) access. This is strictly more attack surface, accepted by the owner. The hook writes only to /APPS and /var/local; verified boot is untouched.

Ground rules

Owner's own TV, LAN-local, no DRM circumvention, no OTA writes, no /OAD staging, no rootfs writes, no device identifiers committed, keys stay in server/keys/, server/pair.py not run (Sidee holds the single MQTT session). Every discovery recorded here the same hour. Commit kept local β€” pushing would update upstream PR #28 and is not done without asking.