Repository navigation
FINGERPRINT-PLAN: F3's laptop mfg_data copy is private from creation - #531
Merged
Merged
Conversation
Follow-up to Derek's two optional suggestions on derekross#520. F3's laptop copy of mfg_data was created with the default umask and made private only afterwards by chmod 600, and when the phone's ro=1 check refused (or dd failed) the redirect had already left an empty file behind. The copy is now created under (umask 077; ...) as "$F.part" and renamed to "$F" only when the remote command exits 0; otherwise the .part is removed and the step says so. chmod 600 is dropped: the file is only ever created under umask 077, and mv keeps its mode. The Expect and Stop lines say a refused or failed copy keeps no file. The phone side is unchanged and read-only: PARTNAME lookup, the ro=1 check, dd with no of=. Tested on the laptop with the snippet taken from the plan and a fake phone-ssh running its remote script on a fake sysfs: success leaves one mode-600 file matching the source, and a refused ro=0, an unreadable device, a dd that dies mid-stream and a missing partition each leave no file. The derekross#520 snippet left a 0-byte file on refusal. Docs only; nothing ran on a phone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
6 of 9 tasks
Owner
|
Thank you, Victor: quick, and exactly what I had in mind. The copy is private from the moment it exists, and a refused or failed read now leaves nothing behind instead of an empty file that looks like a backup. I checked that |
robertzas
pushed a commit
to robertzas/omarchy-mobile
that referenced
this pull request
Nov 14, 2026
…erekross#531) Follow-up to Derek's two optional suggestions on derekross#520. F3's laptop copy of mfg_data was created with the default umask and made private only afterwards by chmod 600, and when the phone's ro=1 check refused (or dd failed) the redirect had already left an empty file behind. The copy is now created under (umask 077; ...) as "$F.part" and renamed to "$F" only when the remote command exits 0; otherwise the .part is removed and the step says so. chmod 600 is dropped: the file is only ever created under umask 077, and mv keeps its mode. The Expect and Stop lines say a refused or failed copy keeps no file. The phone side is unchanged and read-only: PARTNAME lookup, the ro=1 check, dd with no of=. Tested on the laptop with the snippet taken from the plan and a fake phone-ssh running its remote script on a fake sysfs: success leaves one mode-600 file matching the source, and a refused ro=0, an unreadable device, a dd that dies mid-stream and a missing partition each leave no file. The derekross#520 snippet left a 0-byte file on refusal. Docs only; nothing ran on a phone. 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
Follow-up to Derek's two optional suggestions on #520, in device/cheetah/FINGERPRINT-PLAN.md F3 (the laptop copy of
mfg_data):(umask 077; ...), so the copy is created private instead of being made private afterwards.chmod 600is dropped: the file is only ever created under that umask, andmvkeeps its mode."$F.part"and is renamed to"$F"only when the remote command exits 0 (tools/phone-sshpasses the exit status through) andmv -Tsucceeds. If either step fails, the failure branch removes the.partand prints "refused or failed; no file kept"; an interruption can leave the.partbehind. Before, a refusedro=1check left an empty file.The phone side is unchanged and read-only: PARTNAME lookup, the
ro=1check,ddwith noof=.Tested on the laptop only, with the snippet taken from the plan and a fake
phone-sshthat runs its remote script on a fake sysfs: success leaves one mode-600 file with the source's bytes; a refusedro=0, an unreadable device, addthat dies mid-copy and a missing partition each leave no file. The #520 snippet, for comparison, left a 0-byte file on refusal.Device and build
uname -r): n/aChecks (no phone needed)
tools/pr-check origin/mainpassestests/allpassestests/packagespasses (or the packages I touched: none)versionbumped, 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)tools/phone-smokereportNot applicable: a docs-only change (CONTRIBUTING.md §6.5).
Generated with Claude Opus 5.5 in T3 Code Nightly