Repository navigation
Conversation
The maintainer's follow-up on derekross#576: the failing-step test fails install, cpio's pack and lz4's compress, but not the decompress of the ramdisk the bundle ships (lz4 -dc). A stand-in that fails only that call showed what happens: - the key check (lz4 -dc | cpio -it | grep -c ... || true) swallowed the failure and counted the ramdisk as holding no keys; - the append's { lz4 -dc ... && cat extra.cpio; } | lz4 -l failed under pipefail, so the install did stop before anything was flashed, but its message blamed the recompress ("lz4 couldn't recompress ..."). The ramdisk is now decompressed once, by its own step with its own message ("lz4 couldn't decompress vendor_kernel_boot.img's ramdisk"), and the key check and the append read that file. lz4 gets the same stream as before (the shipped archive, then the key's cpio), so the image is the hook's byte for byte: the byte comparison passes with install under umask 077 (the test's), 022 and 002. tests/install-phone-initramfs adds lz4 -dc to the failing steps: before this change it failed on the message; with the new die replaced by "|| true" the install carries on and the test fails at "refuses". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thank you for following this up from #576. Decompressing once and letting both the key check and the append read that file is the right shape, and the message now names the step that failed. I ran both of your failing-first cases here: main's tool with your test fails on the message, and with the new One thought for a follow-up if you feel like it, no need to hold this: the listing a line below is still |
|
Note 🤖 Opus 5.5 replying on behalf of Victor. The listing is its own step in #623. It reproduced on main: in a bundle whose ramdisk is a truncated cpio inside valid lz4, |
…erekross#596) Follow-up to derekross#576: the shipped ramdisk is decompressed once, and a decompress that fails stops the install there, before the plan is shown and before any fastboot write. The key check and the append both read that one copy.
What and why
Follows the maintainer's suggestion on #576: the failing-step test in
tests/install-phone-initramfsfailedinstall, cpio's pack and lz4's compress, but not the decompress of the ramdisk the bundle ships (lz4 -dc).A stand-in that fails only that call showed two things:
lz4 -dc … | cpio -it | grep -c … || true) hid the failure and counted the ramdisk as holding no SSH keys;{ lz4 -dc … && cat extra.cpio; } | lz4 -l …) failed under pipefail, so the install already stopped before the plan and before any flash, but its message said "lz4 couldn't recompress …".The ramdisk is now decompressed once, as its own step with its own message ("lz4 couldn't decompress vendor_kernel_boot.img's ramdisk", with lz4's own reason on stderr), and the key check and the append read that file. lz4 gets the same stream as before (the shipped archive, then the key's cpio), so the image is still the hook's byte for byte. The change stays inline, because the bundle ships
installalone (L-497).The test adds
lz4 -dcto the failing steps. Before the fix it failed on the message; with the newdiereplaced by|| truethe install carries on and the test fails at "refuses" (L-419).tests/install-phone-initramfspasses with the install under umask 077 (the test's), 022 and 002, against android-tools' mkbootimg.Device and build
uname -r): n/aChecks (no phone needed)
tools/pr-check origin/mainpassestests/allpasses (500 ok, 0 not ok)tests/packages: no package touchedversionbumped, and the new version is in the commit subject (no package changed)Co-Authored-By:orAssisted-by:trailer, never aSigned-off-by:On the phone
userdata, weakens the storage guard, or reads registers from userspace (AGENTS.md §1):flash()and its allowlist are unchanged, and the new failure stops before the plan is showntools/phone-smokereportNot applicable: install-phone runs on the laptop (CONTRIBUTING.md §6.5).
Generated with Claude Opus 5.5 in T3 Code Nightly