Skip to content

FINGERPRINT-PLAN: F3 stops after storageproxyd and rolls back only its copies - #520

Merged
derekross merged 1 commit into
derekross:mainfrom
only21mil:build/fp-f3-stop-rollback
Nov 8, 2026
Merged

derekross merged 1 commit into
derekross:mainfrom
only21mil:build/fp-f3-stop-rollback

Conversation

@only21mil

@only21mil only21mil commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

What and why

Follow-up to the review of #490 (device/cheetah/FINGERPRINT-PLAN.md FB1, F3, F19.0):

  • F3 stop and rollback. F3 now has a real Stop line, the same as F19.1's: stop if storageproxyd already ran on this install. Its rollback pointed at F19.3's, which removes all of /var/lib/omamobile-fp, where Trusty's TD lives once storageproxyd has run. It now removes only what F3 writes: persist-ss/ and mfg_data.img. F19.3's rollback is unchanged.
  • The laptop copy of mfg_data is back. tools/nv-backup doesn't take mfg_data, so F3 copies it with a read-only dd from the partition found by PARTNAME (refused unless it reads ro=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.
  • FB1 and F19.0 use 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. B is defined once, in section 6's variables.

Device and build

  • Phone: none: docs only
  • Kernel release (uname -r): n/a
  • Packages changed, with versions: none

Checks (no phone needed)

  • tools/pr-check origin/main passes
  • tests/all passes
  • tests/packages passes (or the packages I touched: none, docs only)
  • Each changed package has its version bumped, and the new version is in the commit subject (no package changed)
  • Commits have area prefixes and bodies that say why; any AI help is a Co-Authored-By: or Assisted-by: trailer, never a Signed-off-by:

On the phone

  • I ran this on my own phone, booted into this build: no, docs only
  • Runbook steps passed (plan, step, result): none run; the 2026-10-13 F3 and 2026-11-02 F19 results are unchanged
  • What I did not test: none of the changed steps ran on a phone (FB1, F3's new mfg_data copy, F19.0)
  • Nothing in this change writes outside slot B and userdata, weakens the storage guard, or reads registers from userspace (AGENTS.md §1)
tools/phone-smoke report

Not applicable: a docs-only change (CONTRIBUTING.md §6.5).

Generated with Claude Opus 5.5 in T3 Code Nightly

…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>
@derekross

Copy link
Copy Markdown
Owner

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 rm are a good fix. I checked tools/nv-backup --check against FB1 and F19.0: it covers the same six partitions, refuses writable or mounted ones and exits non-zero on a difference, so your Pass and Stop lines fit, and FB1 now uses the newest backup. The read-only mfg_data copy with the ro=1 check is a good addition.

Two small optional things in the new copy, not needed for the merge: (umask 077; ...) around the redirect would keep the file private from the start rather than after the chmod, and if the remote test refuses, an empty file stays behind (your Stop line covers it). Checks pass and it merges cleanly, so I'll merge it.

@derekross
derekross merged commit 749b8c8 into derekross:main Nov 8, 2026
2 checks passed
@only21mil

Copy link
Copy Markdown
Contributor Author

Thanks my friend. Making both changes now.

@only21mil

only21mil commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor Author

Note

🤖 Opus 5.5 replying on behalf of Victor.

Both suggestions are in #531. The copy is now made under (umask 077; ...) as "$F.part", and renamed to "$F" with mv -T only when the remote command succeeds, so a refused ro=1 check, a failed dd or a failed rename leaves no file; chmod 600 was removed because the file is created private. Tested on the laptop with a fake phone-ssh; nothing ran on a phone.

derekross pushed a commit that referenced this pull request Nov 9, 2026
…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>
robertzas pushed a commit to robertzas/omarchy-mobile that referenced this pull request Nov 14, 2026
…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>
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants