Repository navigation
tools: the image extractors work from a path with a space - #625
Merged
derekross merged 1 commit intoNov 11, 2026
Merged
Conversation
debugfs reads its -R command with its own parser, which splits at blanks. The factory-image extractors put host paths (the work directory, the output staging directory, the temporary directory) into those commands bare, so a path with a space broke them: - extract-vendor-firmware: with the output under such a path, every file read as missing from a good image; with only the work directory there, build.prop was not read and the device check was skipped, so another phone's vendor image was staged without -f. - extract-vendor-chroot, extract-fingerprint-vendor: "vendor.img has no build.prop" for a good image. - extract-camera-data --apex: a traceback when TMPDIR has a space. Each host path now goes in double quotes, with any double quote in it doubled, which is debugfs's own quoting. Paths without a space give the same files as before. Tested with tests/extract-vendor-firmware's real ext4 image under a directory named with a space and a double quote (fails before, passes after), and by running each tool on mkfs.ext4 images of made-up files from a directory with a space. Not tested on a Google factory image. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
|
Thanks, @only21mil. I ran this on today's main with the host's real Two follow-ups, neither for this PR:
Merging. |
This was referenced Nov 11, 2026
Contributor
Author
|
Note 🤖 Opus 5.5 replying on behalf of Victor. Both follow-ups are open:
|
derekross
pushed a commit
that referenced
this pull request
Nov 11, 2026
install-phone named the three host files of its debugfs command file bare, and debugfs splits commands at blanks, so a `--work` directory with a space stopped the install with "writing firstboot.conf into the image copy failed" before anything was flashed. Each host path now goes in debugfs's double quotes with any double quote doubled, as #625 did for the image extractors. `tests/install-phone` installs from a `--work` path with a space and a quote and reads the three files back. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
5 of 9 tasks
robertzas
pushed a commit
to robertzas/omarchy-mobile
that referenced
this pull request
Nov 14, 2026
) debugfs splits its -R command at blanks, and the factory-image extractors put host paths into it bare, so a work, output or temporary directory with a space made good images read as broken and let extract-vendor-firmware skip its device check. Each host path now goes in debugfs's own double quotes; tests/extract-vendor-firmware runs its real ext4 image from a directory with a space and a quote. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
robertzas
pushed a commit
to robertzas/omarchy-mobile
that referenced
this pull request
Nov 14, 2026
install-phone named the three host files of its debugfs command file bare, and debugfs splits commands at blanks, so a `--work` directory with a space stopped the install with "writing firstboot.conf into the image copy failed" before anything was flashed. Each host path now goes in debugfs's double quotes with any double quote doubled, as derekross#625 did for the image extractors. `tests/install-phone` installs from a `--work` path with a space and a quote and reads the three files back. 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
The factory-image extractors break when a laptop path has a space. debugfs splits its
-Rcommand at blanks, and the tools put host paths (work dir, staging dir,TMPDIR) into it bare:extract-vendor-firmware: with the output under such a path, every file reads as missing from a good image. With only-wthere,build.propisn't read and the device check is skipped, so a Pixel 7 vendor image is staged as cheetah's without-f.extract-vendor-chrootandextract-fingerprint-vendor: "vendor.img has no build.prop" for a good image.extract-camera-data --apex: a Python traceback whenTMPDIRhas a space.Each host path now goes in double quotes, with any
"doubled (debugfs's own quoting). Paths without a space behave as before.Device and build
uname -r): not applicableChecks (no phone needed)
tools/pr-check origin/mainpassestests/allpassestests/packagespasses (or the packages I touched: ...): no package touchedversionbumped, and the new version is in the commit subject: no package changedCo-Authored-By:orAssisted-by:trailer, never aSigned-off-by:tests/extract-vendor-firmwaregets a check on its real ext4 image with-wand-ounder a directory nameda "spaced" dir. It fails on main ("fw_bcmdhd.bin is missing") and passes here. Its stand-in debugfs now reads the quotes too.Real runs of each tool with a space in the path, on ext4 images made by
mkfs.ext4 -dfrom made-up files. Before, on main:After, on this branch (chroot and fingerprint now stop where main stops with a plain path: the made-up system image has no runtime APEX):
On the phone
userdata, weakens the storage guard, or reads registers from userspace (AGENTS.md §1)tools/install-phone(writes the phone's image) andtools/releasealso run debugfs; they are left alone here.Generated with Claude Opus 5.5 in T3 Code Nightly