Pre-Flight — WP-085 — 2026-11-26

Filled-in copy of docs/reference/pre-flight for WP-085, run from the pre-flight session prompt. Verdict at the bottom. The execution prompt is session-WP-085-2026-11-26.

Nothing had been done before this session (checked 2026-11-26): no pre-flight-WP-085-* file on main, no wp-085-tv-app-pipeline branch locally or on the fork’s origin, no fork worktree, no fork PR mentioning WP-085, and no other session running it. Every device and toolchain fact below comes from a command run in this session.


Pre-flight intent

Validating readiness for WP-085. Not implementing, not building, not installing anything on the TV. Verdict only, plus the claim (the fork worktree) and the execution prompt.

Dependency check

Prereq Status in WORK_INDEX Locked on Notes
WP-079 ✅ GO 2026-11-22 Read from the index row: Showdown closeout GO. Its TV build path is proven on the TCL 65Q77K per the smart-TV guide

Rule check: the only prereq is done. WP-085 is a Phase 5 (polish and distribution) WP; it needs no rights holder because it distributes no game.

Repo + disc state

Pre-execution checks from the session prompt:

Working trees:

Android-port facts, re-confirmed in the worktree at ff490ad9449f:

Fact Where
applicationId "org.scummvm.scummvm" dists/android/build.gradle:27
applicationIdSuffix ".debug" (debug build type) dists/android/build.gradle:96
namespace = "org.scummvm.scummvm" dists/android/build.gradle:17
app_name = “ScummVM” (app_name_debug = “ScummVM (debug)”) dists/android/res/values/strings.xml:3-4
Label @string/app_name${nameSuffix}, icon @mipmap/scummvm, TV banner @drawable/leanback_icon dists/android/AndroidManifest.xml:67,69,73,93
GAMES_BUNDLE_DIRECTORY copied into assets/games/ backends/platform/android/android.mk:59-61
androidbundlerelease → ./gradlew bundleRelease -PsplitAssets backends/platform/android/android.mk:84,96
DLC store URL commented “temporary mock api” backends/dlc/scummvmcloud.cpp:89
DLC store created only in the SDL backend backends/platform/sdl/sdl.cpp:108-109 (and kFeatureDLC at :233); no DLC reference in backends/platform/android/
SAFFSTree.java present backends/platform/android/org/scummvm/scummvm/SAFFSTree.java

Toolchain (WSL 2, Ubuntu 26.04.1 LTS, kernel 6.18.58.1; SDK at /opt/android-sdk, with ANDROID_SDK_ROOT and ANDROID_NDK_ROOT exported in root’s login profile):

Item Output
SDK platform ls $ANDROID_SDK_ROOT/platforms → android-37.0
NDK ls …/ndk → 23.2.8568313; source.properties Pkg.Revision = 23.2.8568313
Build tools, platform tools build-tools/36.0.0; adb 1.0.41 (37.0.3-16887417)
Command-line tools cmdline-tools/latest Pkg.Revision=23.0, including apkanalyzer (used by EC-008 Step 3)
JDK OpenJDK 17.0.21.1
Oboe 1.11.0 (/opt/build/oboe), headers in the NDK sysroot (16 files)
Oboe arm64-v8a /opt/build/oboe-build (ANDROID_PLATFORM=android-21); installed liboboe.a SHA-256 a9003f2c…eb5e3e, same as the build output
Oboe armeabi-v7a /opt/build/oboe-build-v7a (ANDROID_PLATFORM=android-16, ANDROID_ABI=armeabi-v7a); installed liboboe.a SHA-256 399a790e…f843dd61, same as the build output. llvm-nm -u lists only __stack_chk_fail and __stack_chk_guard, no __vsprintf_chk

Device: the TCL 65Q77K. Jeff opened Wireless debugging. adb pair to the address he read off failed with protocol fault (couldn't read status message), but the PC was already trusted: the TV reconnected on its own over mDNS, as the smart-TV guide describes. (The address Jeff read off differed from the one mDNS reported, which is the likely cause of the pairing error.) Captured 2026-11-26, with the TV’s LAN address and serial replaced as in the guide:

adb mdns services
adb-<serial>            _adb._tcp               <tv-ip>:5555
adb-<serial>-<id>       _adb-tls-pairing._tcp   <tv-ip>:<pairing-port>
adb-<serial>-<id>       _adb-tls-connect._tcp   <tv-ip>:<connect-port>

adb devices -l
adb-<serial>-<id>._adb-tls-connect._tcp device product:G08_4K_US model:Smart_TV_Pro device:G08

getprop ro.product.cpu.abilist     = armeabi-v7a,armeabi
getprop ro.product.cpu.abilist64   = (empty)
getprop ro.build.version.release   = 14   (SDK 34)

So execution builds android-arm-v7a only (the 32-bit Oboe above). The TV already has org.scummvm.scummvm.debug (the WP-079 smoke build); the WP-085 app’s own id installs beside it.

Bluetooth peripherals: not confirmed. Jeff hasn’t yet confirmed that the keyboard, mouse and gamepad are on hand and paired. dumpsys input at capture time listed only the TV’s own devices: its Bluetooth remote (BT_RC923A_B1), IR receiver, keypad, and virtual remote and search devices. No external keyboard, mouse or gamepad was connected. They’re first needed at EC-008 Step 1, so the execution prompt makes them a pre-execution check with a dumpsys input capture (§Verdict).

ISO / extract paths in use (all outside every repo):

Showdown: P:\scooby-engine\Showdown.iso  (ISO SHA-256 B9CF0618…F4FDDAEF;
          \scooby\Scooby.exe SHA-256 1328454334…AF7478, the WP-079/EC-006 identity;
          showdown.cd present). Mounted read-only to hash, then unmounted.
BASS:     P:\games\BeneathASteelSky\bass-cd-1.2.zip  (69,377,781 bytes;
          SHA-256 53209b9400eab6fd7fa71518b2f357c8de75cfeaa5ba57024575ab79cc974593: MATCH).
          Downloaded 2026-11-26 from downloads.scummvm.org on Jeff's go.

Showdown is Jeff’s own disc data. It’s never hosted, and reaches the TV only by a non-public route (USB or adb push).

Questions put to Jeff

Asked 2026-11-26, recommendation first. The answers are the option labels Jeff picked.

# Question Jeff’s answer
Q1 Keeping the package id private on the public fork “Inject at build time (Rec)”
Q2 The test-package repo’s name “tv-test-packages (Rec)”, so barefootbetters/tv-test-packages. It’s created on Jeff’s go during Milestone 3, not in this session
Q3 Placeholder icon and banner for sideloaded test builds “Placeholders OK (Rec)”
(data) Download the BASS zip to P:\games\BeneathASteelSky\ “Yes, download it (Rec)”

Q1, checked against the code. The id, label, icon and banner can all come from Gradle properties without changing namespace:

Engineering calls (Claude’s, with reasoning)

1. Download, verify and extract in Java, not a port of backends/dlc/.

2. D4, keeping the advanced mode out of the Play build: build-type source sets.

3. Where extracted packages live: getFilesDir()/packages/<id>/<version>/, with downloads staged in getFilesDir()/packages/.staging/.

Scope lock

Anything not listed is forbidden.

Fork (C:\claude-worktrees\scummvm-wp-085-tv-app-pipeline, branch wp-085-tv-app-pipeline):

dists/android/**                      (build.gradle, AndroidManifest.xml, res/, proguard-rules.pro)
backends/platform/android/**          (Java incl. advanced/ and advanced-stub/, android.cpp/.h, jni-android.*, android.mk)
configure                             (only if the build needs it; say why in the commit)
ports.mk                              (only if the build needs it; say why in the commit)

Public docs repo (barefootbetters/terraglyph-engine):

docs/reference/tv-package-manifest.md            (new: the manifest format, WP-085 §Deliverables)
docs/work-packets/WP-085-tv-app-pipeline.md      (§Result, exit criteria, status)
docs/execution-checklists/EC-008-tv-app-pipeline.md
docs/work-packets/WORK_INDEX.md                  (the WP-085 row and current-state line)
docs/reference/pre-flight-WP-085-2026-11-26.md   (§Lessons learned only)

Private repo (barefootbetters/scooby-engine-private):

private/tv-app-identity/**            (the injected values, a properties template, placeholder art)
private/commercial-strategy.md        (only to link the identity record)

Local only, never staged: /root/.gradle/gradle.properties, the identity res directory outside the fork, build outputs, captures with device serials, and everything under P:\games\ and P:\scooby-engine\.

Forbidden (any change fails the WP):

Exit check (before every commit):

git diff --cached --name-only      # each repo; match against the lists above
git diff origin/scooby-engine..HEAD --name-only   # the fork branch, before the PR

Also grep the staged diff for the private name and id before every fork or public commit. Any hit is a leak: git restore --staged and remove it.

Risk review

Risk Likelihood Impact Mitigation
Package id or name leaks through the public fork (Q1) med high Values only in the Gradle user properties and the private repo; the fork keeps org.scummvm.scummvm defaults; the staged-diff grep for the private name and id before every commit; the PR text is reviewed for both before it opens
The app downloads executable code (WP-085 exit criterion 6) low high Packages are data zips only. The extractor refuses entries ending .so, .dex, .jar or .apk, and files that start with ELF (7F 45 4C 46) or dex (dex\n) magic. The §Result code-review note greps the fork diff for DexClassLoader, PathClassLoader, InMemoryDexClassLoader, System.load, Runtime.exec and PackageInstaller (expected: none)
Zip-slip: an entry like ../../x writes outside the package dir low high Each entry’s canonical path must stay under the target dir, or the package is refused; EC-008 Step 3’s wrong-hash test gets a second negative test with such an entry
Game data reaches git low high Staging stays on P:\, outside every repo; the fork’s .gitignore doesn’t cover zips, so git diff --cached --name-only before every commit is the guard
Collision on the shared checkouts low med Fork work only in the claimed worktree; docs work in worktrees; explicit-path staging
The TCL’s system file picker is missing or limited (Milestone 2’s first gap) med med Record it as a gap; adb push and the cloud dialog are the other routes; at least one route must work without a computer (exit criterion 3)
The 32-bit Oboe link fails (__vsprintf_chk) low med The installed armeabi-v7a liboboe.a was built for android-16 and has no _chk symbol beyond the stack protector (checked above); if it recurs, rebuild per the smart-TV guide
The test build is the debug build, so Milestone 4’s update test is debug over debug med low Bump versionCode between the two sideloaded builds; the release path is WP-084’s
Two apps claim the scummvm: intent scheme (AndroidManifest.xml, the SplashActivity filter) beside the installed org.scummvm.scummvm.debug low low Note it if a chooser appears; changing the scheme is out of scope
Device evidence claimed without a capture (the 2026-11-21 lesson) low high No EC-008 box checked without a logcat excerpt, command output or screenshot; Jeff’s live confirmations are quoted as his
Peripherals unavailable at Step 1 med med The execution prompt’s pre-check captures dumpsys input showing each one before Step 1

Verdict

One item carried forward, not a blocker: Jeff’s confirmation that the Bluetooth keyboard, mouse and gamepad are on hand and paired. None was connected at capture time. They’re first used in EC-008 Step 1’s input checks, after the Milestone 1 build and install, so the execution prompt makes a dumpsys input capture showing all three a pre-execution check. The session stops there if any is missing.

Reviewer: Claude (Opus 5.5), pre-flight session for Jeff Date: 2026-11-26

A READY verdict authorizes opening the execution session. It doesn’t authorize any change beyond the §Scope lock. It goes stale if public main or origin/scooby-engine moves in a way that touches WP-085, EC-008 or the Android port (wp-lifecycle §Phase 2).

After execution: lessons learned

Filled in 2026-11-27, after execution (WP-085 §Result).

  1. Find out which adb reached the TV. This pre-flight recorded adb 1.0.41 (37.0.3) without saying whose: it was Windows adb (winget platform-tools), not WSL’s. WSL runs in NAT mode, where adb mdns services finds nothing, which cost a round trip at execution. Builds run in WSL; the TV is driven from Windows.
  2. Check the build’s optional libraries against the UI it targets. The pre-flight checked Oboe, but not PNG. ScummVM’s grid launcher aborts without libpng (“No PNG support compiled”). It crashed the app on the TV, and the WP-079 app too once its grid view was turned on. A grep USE_PNG config.h would have caught it.
  3. Probe the platform before planning import routes. cmd package query-activities -a android.intent.action.OPEN_DOCUMENT_TREE shows in one command that this Google TV has no system picker: only com.android.tv.frameworkpackagestubs handles it. Run as the app, ls on the USB stick shows Android 14 blocks reading it by path. Both are pre-flight checks. They’d have shown that exit criterion 3 depends on the cloud route alone.
  4. Test input on the real remote early. The TCL remote reports every press twice, and its ring sends OK when pressed near the edge. A D-pad gesture designed on paper failed by hand. Record getevent -lt from each input device at Step 1.
  5. Two apps that look alike on one TV get confused. The WP-079 debug app (ScummVM) sat next to the test app, and live checks twice ran in the wrong one. Hide the other app for the run (pm disable-user, data kept), or give the test app art that’s clearly different from the start.
  6. Confirm what the peripherals are before Step 1. “Keyboard, mouse, gamepad” turned out to be one keyboard-with-touchpad, with no gamepad. A dumpsys input with Jeff at the TV, before building, would have shown it.