WP-088: Google Play internal testing pipeline: build, sign, upload, install on a family TV
Status: ⏸ On hold (2026-12-05) until
WP-144’s branch split (Jeff: “Yes, check and
hold”). Step 1’s dry run and the TCL release-build launch check passed; build
1 waits so the one uploaded comes from the app’s branch after the split
(§Result). Resuming needs a fresh pre-flight, since the split
moves the TV build to its own branch and this script to the Classics repo.
The Play part is also ⏸ blocked on the organization developer account
(WP-084 D3, which waits
for the corrected D&B record to reach Google, expected by about 2026-12-21).
Approved 2026-11-26 (Jeff: “Approve as proposed”) and reworked onto WP-084’s
account and key decisions on 2026-12-01 (Jeff: “Yes, rework and PR”); see
DECISIONS.
Drafted as WP-086 / EC-009 and renumbered on 2026-11-26, when those numbers
went to the Hotspot Magnet research. Pre-flight READY 2026-12-01
(pre-flight-WP-088-2026-12-01;
execution prompt session-WP-088-2026-12-01).
Phase: 5 (polish & distribution).
Depends on: WP-085 Milestone 1 ✅ (the app’s
own identity, injected at build time; fork PR
barefootbetters/scummvm#13);
WP-104’s icon, banner and theme (in the
build through the same injection); WP-084’s developer account (D3), upload key
and app signing key (D4); WP-079 ✅ (the fork’s TV build path).
Unblocks: WP-084 (its Play release
reuses this script, the app record and the track experience), and every later
Play release of a studio Android app.
Companion EC: EC-011.
Pre-flight required: Yes. It commits a tool script under tools/,
creates the Play app record (which fixes the package id and app signing key
for good), and claims a release-integrity posture.
Targets generation(s): none. No engine code; TerraGlyph is compiled in and
tested with Gen 1 (Showdown) data.
Estimated effort: about 1 day of hands-on work once the account exists.
Goal
Prove the whole distribution path once, end to end, and leave it repeatable: source → build → sign → upload → Google Play internal testing → install → launch → play, ending with a family member installing the app from Google Play onto a Sony Bravia TV and launching a legally obtained game. A second build then reaches the same TV through the same path. This is internal testing, not a public release: no store listing goes live, and no game is bundled.
A local milestone, then three acceptances verified and tracked separately. The WP is done only when all three pass, but one failing doesn’t hide the others: an unfinished import route doesn’t make a working delivery path look broken.
| Milestone / acceptance | Means |
|---|---|
| Build ready (local) | A reproducible, signed, verified AAB built by tools/Build-AndroidRelease.ps1 |
| A. Pipeline | The family tester installs the app from Google Play on the Bravia and it launches |
| B. Gameplay | The tester imports legally obtained game data and a game reaches play |
| C. Update | The tester receives and installs a later version through the same track |
Background
- Where this comes from. Jeff’s 2026-11-26 session prompt: a repeatable Play internal-testing pipeline, local builds first, manual uploads until the path is proven. Internal testing bundles no game, so unlike WP-084 it doesn’t wait for Gate 0.
- What WP-084 already settled (2026-11-30): an organization developer
account for Barefoot Betters (D3); Play App Signing with our own app
signing key, uploaded encrypted with PEPK when the app is created (D4); both
keys generated, with their certificates recorded in
WP-084 §Play signing keys;
and no cloud saves in the Play build (
--disable-cloud, decided 2026-11-30). This WP uses all of them and decides none of them again. - What the fork does (
origin/scooby-engine837ca576da):- The identity comes from Gradle user properties (
tvAppId,tvAppLabel,tvAppResDir,tvAppAssetsDir; WP-085 and WP-104), and the version fromtvAppVersionCodeandtvAppVersionName. The public fork keeps ScummVM’s defaults. make androidbundlereleaserunsgradlew bundleRelease -PsplitAssets. The release build type has nosigningConfig, so the bundle comes out unsigned; an AAB is signed withjarsigner, notapksigner.fatbundle.mkpasses one set ofconfigureflags to every ABI, so it can’t take a per-ABI--with-png-prefix. The script builds arm64-v8a in a subfolder with its ownconfigureand copies its libraries into the Gradle project’slib/(which Gradle packages whole). No fork change.
- The identity comes from Gradle user properties (
- What the TV build needs (observed 2026-12-01): libpng (the grid launcher, the TV default, aborts without it) and FreeType (the theme’s fonts and non-Latin text), both static, per ABI. Until today the build machine had them for armeabi-v7a only, since the TCL runs 32-bit builds; the arm64-v8a copies were built for this WP from the same sources and options (runbook, build machine setup).
- Google’s rules (read 2026-11-26; sources in the
runbook):
- Internal testing: up to 100 testers by email list, available within minutes, “might not be subject to standard Play policy or security reviews”, and it can start before the app is fully set up. Internal tests don’t appear in Play search; testers use the opt-in link.
- Play App Signing is mandatory for new apps, and the app signing key can’t change once the app is published.
- Version codes: at most 2,100,000,000, increasing, never reused.
- TV apps: target API 34 or higher, 32- and 64-bit with 16 KB pages (TV-G6). The fork targets 37 and links with 16 KB pages.
android.hardware.gamepadrequired="true"shows a “Gamepad required” badge on TV but doesn’t block installs.
Scope
In scope
tools/Build-AndroidRelease.ps1(PowerShell 7, drives WSL): exact fork commit in a throwaway worktree; the identity properties checked; releaseconfigureper ABI withskyandterraglyph, libpng, FreeType and--disable-cloud, each checked inconfig.h; version through the fork’s properties (no file edited); both ARM ABIs in one bundle;jarsignerwith the upload key (password by environment variable or no-echo prompt, never on a command line or in a log), and the signing certificate checked against WP-084’s upload key;bundletool validate; package, version, ABIs and the identity assets read back from the bundle; 16 KB alignment checked; artifact, SHA-256 and ledger row in the release folder; no overwrite, no version-code reuse; non-zero exit on any failure; a-DryRunmode with a throwaway key.- The runbook play-internal-testing.md: build machine setup, version codes, the per-release steps, the first-time app and track setup, the family install guide, game-data routes, GPL, troubleshooting, and the move from internal to closed to production.
- The Play app record, created in the organization account with the app’s private name and package id, with our app signing key enrolled by PEPK per WP-084 D4. Play’s App signing page must then show both certificates WP-084 recorded. WP-084 reuses this record.
- The internal testing track and a tester list.
- GPL for internal testing, before any tester receives a build: the exact source of that build available to the testers (the tagged fork commit, plus the private identity input the build injected; see §Notes), the license notices it ships, and the source location in the release notes. The runbook’s GPL checklist.
- Acceptance A (pipeline): build 1 uploaded to internal testing; the family tester opts in, installs it on the Bravia from Google Play, and it launches with its own name and banner.
- Acceptance B (gameplay): on the Bravia, the tester navigates with the gamepad, imports a legally obtained game by a route that works there, and the game reaches play.
- Acceptance C (update): build 2, with a higher version code, through the same track, installs as an update on the Bravia.
Out of scope
- The developer account and both keys: WP-084 D3 and D4 (decided). Jeff registers the account.
- The store listing, Android TV form-factor opt-in, TV review, closed test and production: WP-084.
- Bundling any game data (including BASS and its Gate 0): WP-084. Testers supply their own legally obtained data.
- A new import route. If none of the routes the Bravia offers works (B’s risk below), that’s a finding for WP-085’s open exit criterion 3, not work here.
- API publishing (Gradle Play Publisher, fastlane supply, a service account): later, once manual uploads are routine.
- CI builds: later; the build needs the WSL toolchain.
- Engine or shared ScummVM source changes: none.
Decisions for Jeff
| # | Decision | Answer |
|---|---|---|
| D0 | How this relates to WP-084 and WP-085 | Answered 2026-11-26 (“Approve as proposed”) and reworked 2026-12-01 (“Yes, rework and PR”): internal testing comes before WP-084’s public release; the account and both keys stay WP-084’s (DECISIONS) |
Engineering calls (Claude’s, changeable before the first upload):
- Version codes for Play start at
26041100(2026.4.1-play.1), in ScummVM’s(y)yy.mm.p.bb.ascheme withbb= 10. Sideloaded test builds have used 26041000–26041070 so far (as of 2026-12-01); starting Play well above them keeps the two sequences apart in logs and the ledger, and an update from a sideloaded build is never mistaken for a Play one. Each Play build adds 10; WP-084 continues the same sequence. - The Play build is the release build with
--disable-cloud, the same artifact WP-084 will ship, so internal testing exercises what production will. The 2026-11-30 decision lets test builds keep cloud; internal-test builds aren’t those.
Both re-checked at the pre-flight (2026-12-01) and kept. It added four more:
- Fork tags are annotated (
git tag -a), not signed: no signing key is set up on the build PC, and nobody verifies a signature for an internal test. WP-084’s public source release can revisit it. - The optional TCL launch check runs when
adbreaches the TCL and no package with the exact release id is installed there: the release build type runs R8, and no record shows a release build launched on a device. - bundletool runs from
%USERPROFILE%\tools\bundletool\1.18.3\, the script’s default since 2026-12-01: the%LOCALAPPDATA%copy was written inside the Claude desktop app’s virtualized folder, which WSL can’t see. - Jeff runs each real build in his own terminal, so the upload password never passes through a session.
Pre-flight answers (2026-12-01)
| # | Question | Jeff’s answer |
|---|---|---|
| Q1 | How testers get the private identity input the build injects (GPL) | “Written offer, zip on request (Recommended)”: the release notes give the fork tag and say the build inputs are available from Jeff; on request he sends a zip of them as of that build |
| Q2 | adb push with developer mode on the family Bravia, if no picker route works |
“Yes, dev mode is OK” |
| Q3 | The family tester, and their Google account on the Bravia | “Yes, named and on the Bravia” (named in the 1Password register) |
| — | The organization account’s state | “D&B record pending” |
Dependencies
- WP-085 Milestone 1 ✅ and WP-104’s art and theme: on the build machine as
/root/.gradle/gradle.properties(the four identity properties, values in the private repo’sprivate/tv-app-identity/) and theres/andassets/folders it points to. - The WSL toolchain:
/opt/android-sdk(platform 37, NDK 23.2.8568313), JDK 17+, Oboe 1.11.0, libpng 1.6.59 and FreeType 2.13.3 for both ARM ABIs; bundletool 1.18.3 (%USERPROFILE%\tools\bundletool\1.18.3\, the script’s default; SHA-256a099cfa1543f55593bc2ed16a70a7c67fe54b1747bb7301f37fdfd6d91028e29, matching the GitHub release digest). - WP-084’s upload keystore on the build PC, and its app signing keystore for the one-time PEPK enrolment (both in 1Password).
- The organization developer account (WP-084 D3), registered and verified by Jeff with the studio’s Google account.
- The GPL items in scope 5, in place before build 1 goes to a tester.
- The family tester’s Google account and the Sony Bravia XBR-75X81CH, a
Bluetooth gamepad, and their own legally obtained game data. The TCL 65Q77K
over
adbfor pre-upload checks.
Execution
- Pre-flight (
pre-flight-WP-088-<date>.md). - EC-011 Step 1: dry run, then build 1 with the upload key (build ready). Can run before the account exists.
- EC-011 Step 2: app record and key enrolment, GPL items, upload, tester opt-in, install and launch on the Bravia (acceptance A).
- EC-011 Step 3: game import and launch (acceptance B).
- EC-011 Step 4: second build updates in place (acceptance C). Steps 3 and 4 are independent; a gap in one doesn’t hold the other.
- §Result with evidence for each acceptance; WORK_INDEX updated.
Exit criteria
Build ready (local)
- D0 answered (2026-11-26, reworked 2026-12-01).
- A signed release AAB built by the script from a recorded fork commit: ledger row, SHA-256, the upload certificate matching WP-084’s, both ABIs, 16 KB alignment, libpng and FreeType in both, no cloud (script output captured).
A. Pipeline
- The app record exists with the app signing certificate WP-084 recorded (Play Console’s App signing page, screenshot).
- GPL items in place for build 1: tagged source, the private identity input available to the testers, source location in the release notes.
- The AAB uploaded to the internal testing track and the release rolled out (Play Console screenshot).
- The family tester accepted the opt-in.
- The tester installed the app from Google Play on the Sony Bravia (photo or screenshot of the Play page on the TV, or Play Console’s install report).
- The app launches on the Bravia with its own name and banner.
B. Gameplay
- The tester navigates the library with the gamepad.
- A legally obtained game is imported, detected, and reaches play (the route used is recorded).
C. Update
- A second build with a higher version code installs as an update through the same track; if B passed first, the game and its saves survive it.
- The runbook was followed for build 2 without reconstructing anything; any gaps found are fixed in it.
Each acceptance is recorded on its own in §Result. The WP is done when all three pass. It isn’t done because the script runs or an AAB exists: criteria 3–11 need the real Play delivery and the real TV.
Risks
| Risk | Likelihood | Impact | Mitigation |
|---|---|---|---|
| No import route on the Bravia (B). On the TCL, WP-085 found no route without a computer: no system document picker, USB unreadable by path. The Play build also has no cloud saves (so no cloud import) and no advanced mode (WP-085 D4: test builds only). | med | high for B | Record the Bravia’s facts first (EC-011 Step 2). Routes to try, in order: the system picker if this model has one; a file manager that provides a document picker; adb push with developer mode on the Bravia (allowed: pre-flight Q2). A failure is recorded for WP-085 criterion 3, and A and C go ahead |
| The app record fixes the package id and app signing key for good | low | high | The pre-flight checks the package id against the private record, and the App signing page against WP-084’s certificates, before the first upload |
| A sideloaded build on a test TV blocks the Play install (different signature) | med on the TCL, none on the Bravia | low | Uninstall the sideloaded app before installing from Play; the Bravia has none |
Deliverables
tools/Build-AndroidRelease.ps1.- play-internal-testing.md and EC-011, filled in.
pre-flight-WP-088-<date>.md, §Result.- Never committed: the keystores and their passwords (WP-084 §Play
signing keys says where they live), the tester register (names and emails,
as a 1Password secure note; never in a repo or a synced folder), any game
data, and the app’s private name and package id. The release artifacts and
ledger hold no secrets and go to
C:\pcloud\scooby-engine\releases\android\.
Notes
- Public/private boundary. The app’s name and package id stay off this
public page (naming decision);
the script takes the package id as a parameter and refuses any
org.scummvm.*bundle. Its file names and ledger, which carry the id, stay in the private release folder. - How the identity reaches the build is WP-085’s pre-flight Q1 (“Inject at build time (Rec)”), extended by WP-104. A private build-time overlay over ScummVM’s own resource names was tested for this WP on 2026-11-26 and not adopted: every overridden resource had to cover every configuration the fork has, so an upstream merge adding a locale or density would have brought “ScummVM” back. WP-085’s route points the manifest at resource names ScummVM doesn’t use instead.
- GPL. Giving the app to family testers is conveying it. The fork is
public on GitHub; tag each built commit (the ledger names it) so the exact
source is one link away. The injected identity input (
res/,assets/including the theme, and the properties) is part of what produces the binary, so testers must be able to get it too. WP-084 owns the full licenses screen and the source release for the public listing. - Evidence discipline. Every device claim comes from a run that happened and was captured (DECISIONS 2026-11-21).
- Reuse. The script pattern and track process aren’t TerraGlyph-specific; another studio Android app needs only its own parameters (package id, engines, release folder). No multi-project build system is built here.
Result
⏸ On hold, 2026-12-05. Execution opened on 2026-12-04 (execution prompt); the details and captures are in EC-011 Step 1.
Build ready: held before build 1.
- Pre-execution checks passed: no change to the governing files since
09edd36, no other session on WP-088, no ledger yet, bundletool’s SHA-256 right from Windows and WSL, the upload keystore present and unchanged. - Dry runs passed on the fork at
323e89d12f(2026-12-04) and1dfbfb7375(2026-12-05): both ABIs, sky and terraglyph, libpng, FreeType, no cloud, 16 KB aligned. - The release build launches on a TV (pre-flight call 4, run early): a universal APK cut from the 2026-12-05 dry-run bundle and signed with a throwaway key installed on the TCL, launched cold in 1.96 s into the grid launcher with the app’s own name, banner and theme, with no crash, and was uninstalled. R8 and resource shrinking break nothing the launcher reaches.
- Build 1 with the upload key wasn’t made. Jeff asked whether it was still needed; the answer was not yet. The account is expected around 2026-12-21, and WP-144’s Phase C moves the TV app’s fork work to its own branch first, so a build made now would never be the one uploaded and would use up 26041100. Jeff: “Yes, check and hold.”
- Criterion 2 stays open.
A, B, C: not started (the account, and the hold).
To resume: after WP-144 Phase C (and Phase D, if the script has moved by then), re-run the pre-flight against the app’s branch and the script’s new home, then EC-011 Step 1’s build 1, close to the account’s verification. Not yet seen with the real upload key: the script’s no-echo password prompt, its certificate check passing, and the release folder and ledger being written.