Repository navigation
Conversation
A bundle's install plan (manifest.json, which tools/install-phone and the desktop and web installers follow) took BOOT_IMAGES and UFS_RW from the descriptor checking only a name pattern and that each image's _b partition is on the descriptor's own UFS_RW. So a descriptor naming modem in BOOT_IMAGES with modem_b in UFS_RW gave a bundle whose install.writes held modem_b, beside a "never" list naming modem; the same for vbmeta, and UFS_RW alone could carry modem_b into the storage-guard allowlist. tools/make-bundle --unsigned finished with exit 0 in each case. Only slot B's five boot images and userdata are ours (AGENTS.md §1). bundle-manifest now accepts BOOT_IMAGES only from boot, init_boot, vendor_boot, vendor_kernel_boot and dtbo, and UFS_RW only from their _b partitions and userdata, each list on its own: the set bin/omamobile's load_device and initramfs/init's ufs_rw_load already hold. It replaces the name-pattern check. make-bundle runs it before the new bundle is moved in, so a refusal keeps the earlier bundle. Tested on the laptop only, no phone: tests/make-bundle gains a case (modem, vbmeta and modem_b descriptors refused with the name, the earlier bundle unchanged) that fails on main's tool and passes here; removing either new check fails it. tools/pr-check, tests/make-bundle, tests/make-bundle-keys and tests/all pass. Every descriptor in device/ is inside the set. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Main's format 2 work (c462357) conflicted in tools/bundle-manifest and tests/make-bundle. The resolution runs main's five-image check for both formats instead of keeping a second list. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thank you, @only21mil, and thank you for merging main in after #848 landed: that made this easy to read. What is left is exactly right. #848 put the two checks under I ran Merging. I'll write the squash message myself, because the first commit's text describes the change as it was before #848 (it says the name-pattern check is replaced, and main's is still there). |
What and why
On main c462357,
tools/make-bundlebuilds a release bundle whose install plan writes a partition AGENTS.md §1 rules out, ifdevice.conflists it.tools/bundle-manifestchecks its five-image list (IMAGES_ACTIVE) only for format 2 (INSTALL_SLOT=active, no device yet). For format 1 it only checks that eachBOOT_IMAGESentry's_bpartition is on the descriptor's ownUFS_RW. SomodeminBOOT_IMAGESwithmodem_binUFS_RWgives a signedmanifest.jsonwhoseinstall.writesholdsmodem_b, beside aneverlist namingmodem.UFS_RWalone also putsmodem_binstorage_guard_allowlist. The bundle's owninstallrefuses that descriptor, but the plan is still signed. No descriptor in the tree does this.tools/bundle-manifestnow runs the same two checks, unchanged, for both formats:BOOT_IMAGESonly from boot, init_boot, vendor_boot, vendor_kernel_boot and dtbo, andUFS_RWonly from their_bpartitions and userdata. Format 2's checks and messages stay as they are. It runs beforetools/make-bundlemoves the new bundle in, so a refusal names the entry and the earlier bundle stays. All quoted, non-emptyBOOT_IMAGESdescriptors still bundle.The branch is daeb6c5 with main c462357 merged in (a36ed70).
AI agents made every run below. Reproduction: the real
tools/make-bundle --unsignedfrom agit archiveof each commit, withtests/make-bundle's stand-in images and one made-up descriptor per case. On c462357 all three cases build; on a36ed70 each stops.Regression test (a stand-in, not the reproduction): a new
tests/make-bundlecase. Descriptors naming modem, vbmeta, ormodem_binUFS_RWalone are refused with the name, and the earlier bundle'sSHA256SUMSstays the same. It fails on main's tool, and moving the checks back underINSTALL_SLOT=activefails it.Device and build
uname -r): no phoneChecks (no phone needed)
tools/pr-check origin/mainpasses (AI agent)tests/allpasses (AI agent)tests/packagespasses (or the packages I touched: none, so not run)versionbumped, and the new version is in the commit subject: no package changedCo-Authored-By:orAssisted-by:trailer, never aSigned-off-by:On the phone
tools/install-phone, the desktop installer or the web page reading such a manifest; anything on a phoneuserdata, weakens the storage guard, or reads registers from userspace (AGENTS.md §1)tools/phone-smokereportNot applicable: a laptop tool that never runs on a phone (CONTRIBUTING.md §6.5).
AI agents made every run in this description, on an x86_64 desktop running Ubuntu 26.04. The tests and checks ran on a36ed70:
tools/pr-check origin/main,tests/make-bundle,tests/make-bundle-keys,tests/install-phone,tests/install-slot-descriptorandtests/all, the last two with a stand-infastbootthat exits 1 onPATH(this machine has none). Each transcript below names its own commit.Setup: Ubuntu 26.04 on x86_64, bash 5.3, Python 3.14; a fresh
git archiveof each commit per case, made its own git repository with one empty commit, astests/make-bundledoes.The driver replaces the owner and group names in make-bundle's closing
ls -lwithuserandgroup, and drops the colour codes of its==>anderror:lines; nothing else is edited.Steps: write the case's
device/testdev/device.conf→ stand-inkernel-out/(kernel.release, images/DEVICE, one.imgperBOOT_IMAGESentry) and root image with its.sha256and.MANIFEST→DEVICE=testdev KERNEL_OUT=kernel-out KERNEL_DIR=. tools/make-bundle --unsigned --version 2026.11.01 --rootfs out/...img.zst→ print the exit code andmanifest.json's install writes, allowlist and never listBefore, on main c4623572:
After, on a36ed701:
Links: main c4623572, the change daeb6c5a and the merge a36ed701, the regression test
tests/make-bundle, and the allowlist the maintainer described on #567.Not shown:
tools/install-phone, the desktop installer or the web page reading such a manifesttests/allin CI's Arch Linux imageINSTALL_SLOT=active); main's format 2 cases intests/make-bundlepassGenerated with Claude Opus 5.5 in T3 Code Nightly