Repository navigation
tools: the chroot extractors say why build.prop can't be read - #795
Merged
derekross merged 1 commit intoNov 15, 2026
Merged
Conversation
When debugfs can't copy the vendor partition's build.prop, tools/extract-vendor-chroot and tools/extract-fingerprint-vendor stop with "build.prop can't be read from vendor.img" and throw debugfs's own message away, so the reader learns that the read failed but not why. As the maintainer suggested on derekross#676, the error now ends with debugfs's last line on stderr, its reason: a missing file, a full work directory, an image cut short, a damaged inode. The line is kept in a variable rather than a file in the work directory, which may be the thing that is full; debugfs's stdout still goes to the terminal, and a failed copy where debugfs printed only its banner gets no reason. Nothing else changes, exit statuses included. Tested: tests/chroot-extractors, extended with the reason from a stand-in debugfs, the banner-only case, and real debugfs on made-up ext4 images without build.prop and cut short, whose expected reason is read from debugfs itself, byte for byte, so another wording still passes (6 of its 8 checks fail with main's tools; it also passes with e2fsprogs 1.47.2 and 1.47.4); tests/extract-vendor-firmware; tests/all; tools/pr-check origin/main. Both tools run by hand on made-up images for five causes, before and after. Not tested: a real factory image. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
|
Thank you, @only21mil. This is exactly what I hoped for from the note on #676. The refusal still rests on One for later, not for this PR: |
5 of 9 tasks
derekross
pushed a commit
that referenced
this pull request
Nov 18, 2026
When debugfs can't copy build.prop out of an ext4 vendor.img the tool refused with one fixed line, so a missing file, a full work directory and a damaged image read the same. The refusal now ends with debugfs's last line, as extract-vendor-chroot and extract-fingerprint-vendor have since #795: "build.prop can't be read from vendor.img: dump: No space left on device while writing file; use -f to override". The EROFS path, -f, the exit status and every other refusal are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
When
tools/extract-vendor-chrootortools/extract-fingerprint-vendorcan't copybuild.propout ofvendor.img, they say so but drop debugfs's message, so the reader doesn't learn why. Following the maintainer's note on #676, both now end that error with debugfs's last line. It is kept in a variable, as a full work directory is one of the reasons; stdout and exit statuses don't change, and a banner alone gives no reason. For an image debugfs can't open, that last line isdump: Filesystem not open(the cause is on the line before); I kept to the last line, as asked.tools/extract-vendor-firmwaredrops it too, but the note named these two, so I left it.AI agents made every run below. Reproduction: both real tools with the host's debugfs (1.47.2) on made-up ext4 images (
mkfs.ext4 -d) in cheetah image zips, sandboxed with the checkout'stools/on PATH. One outside fault per case: nobuild.prop, the image cut at 1 MiB, its inode damaged, the superblock damaged, or a 12 MiB tmpfs work directory the images fill; a good image with room is the control. On main 1a28cf3 all five print the same bare line in both tools; on 5bfb9f0 only those ten lines change, each ending with the reason. Both runs, untrimmed, are in the block.Regression test (a stand-in, not the reproduction):
tests/chroot-extractorschecks the whole error line with a stand-in debugfs (a full disk; only the banner) and with the host's debugfs on made-up images withoutbuild.propand cut short. With main's tools under it (XVC=,XFP=), 6 of 8 checks fail; the banner pair fails once the banner check is removed.Bash removes trailing newlines; other whitespace is kept. The suite also passes with Arch's e2fsprogs 1.47.4. Rechecked against main
6649b766:git merge-treeis clean, and both runs match the transcripts.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
super.imgsources; e2fsprogs releases other than 1.47.2 and 1.47.4userdata, weakens the storage guard, or reads registers from userspace (AGENTS.md §1)tools/phone-smokereportNot applicable: laptop tools that never run 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 5bfb9f0; each transcript below names its own commit.
Setup: Ubuntu 26.04 on x86_64, debugfs 1.47.2; the made-up images are built afresh for each commit, and the tools run in a sandbox with that commit's
tools/first on PATH.Steps: build the made-up image zips → run both tools on each of the four faulty images → on the good image with the 12 MiB work directory → on the good image with room
Before, on main 1a28cf31:
After, on 5bfb9f04:
Links: the maintainer's note on #676; the regression test,
tests/chroot-extractorsat 5bfb9f0. The scripts that build the images and drive the tools are not published; the reproduction paragraph above says what they do.Not shown:
super.imgsources.Generated with Claude Opus 5.5 in T3 Code Nightly