Repository navigation
FINGERPRINT-PLAN: F3 stops after storageproxyd and rolls back only its copies - #520
Conversation
…s copies Follow-up to Derek's review of derekross#490. F3's rollback pointed at F19.3's, which removes all of /var/lib/omamobile-fp. Once storageproxyd has run, that directory also holds Trusty's TD, so the rollback could delete it. F3's quote already said to run it only where storageproxyd never ran; it now has that as a real Stop line (F19.1's), and its rollback removes only what F3 writes on the phone: mfg_data.img and persist-ss/. F19.3's rollback is unchanged (the maintainer's to fix). derekross#490 dropped F3's laptop copy of mfg_data, which tools/nv-backup doesn't take. F3 takes it again with a read-only dd from the partition found by PARTNAME (this root has no by-partlabel), refused unless the block device reads ro=1, and checks its hash against F19.3's phone copy, so a phone without the 10-13 copy keeps one. FB1 still compared against the 10-12 backup, and FB1 and F19.0 each carried their own checksum loop. Both now run `tools/nv-backup --check "$B"` against the newest backup (B, now in section 6's variables): it finds the partitions by PARTNAME, refuses a writable or mounted one and reports SAME or DIFFERENT for each. Docs only; nothing ran on a phone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks, Victor. The F3 rollback was a real trap: pointing at F19.3's rollback could have removed Trusty's TD once storageproxyd had run, so the Stop line and the narrower Two small optional things in the new copy, not needed for the merge: |
|
Thanks my friend. Making both changes now. |
|
Note 🤖 Opus 5.5 replying on behalf of Victor. Both suggestions are in #531. The copy is now made under |
…531) Follow-up to Derek's two optional suggestions on #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 #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>
…s copies (derekross#520) Follow-up to Derek's review of derekross#490. F3's rollback pointed at F19.3's, which removes all of /var/lib/omamobile-fp. Once storageproxyd has run, that directory also holds Trusty's TD, so the rollback could delete it. F3's quote already said to run it only where storageproxyd never ran; it now has that as a real Stop line (F19.1's), and its rollback removes only what F3 writes on the phone: mfg_data.img and persist-ss/. F19.3's rollback is unchanged (the maintainer's to fix). derekross#490 dropped F3's laptop copy of mfg_data, which tools/nv-backup doesn't take. F3 takes it again with a read-only dd from the partition found by PARTNAME (this root has no by-partlabel), refused unless the block device reads ro=1, and checks its hash against F19.3's phone copy, so a phone without the 10-13 copy keeps one. FB1 still compared against the 10-12 backup, and FB1 and F19.0 each carried their own checksum loop. Both now run `tools/nv-backup --check "$B"` against the newest backup (B, now in section 6's variables): it finds the partitions by PARTNAME, refuses a writable or mounted one and reports SAME or DIFFERENT for each. Docs only; nothing ran on a phone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…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>
What and why
Follow-up to the review of #490 (device/cheetah/FINGERPRINT-PLAN.md FB1, F3, F19.0):
/var/lib/omamobile-fp, where Trusty's TD lives once storageproxyd has run. It now removes only what F3 writes:persist-ss/andmfg_data.img. F19.3's rollback is unchanged.mfg_datais back.tools/nv-backupdoesn't takemfg_data, so F3 copies it with a read-onlyddfrom the partition found byPARTNAME(refused unless it readsro=1), sets it to mode 600, and checks its hash against F19.3's copy on the phone. A phone with no 10-13 copy keeps one this way.tools/nv-backup --check "$B". It replaces the two hand-written checksum loops, and FB1 now checks against the newest backup (11-02) instead of 10-12.Bis defined once, in section 6's variables.Device and build
uname -r): n/aChecks (no phone needed)
tools/pr-check origin/mainpassestests/allpassestests/packagespasses (or the packages I touched: none, docs only)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
mfg_datacopy, F19.0)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