Skip to content

FINGERPRINT-PLAN: read persist without mounting it in F3 and FB1 - #490

Merged
derekross merged 1 commit into
derekross:mainfrom
only21mil:build/c376-persist-read-runbook-r3
Nov 8, 2026
Merged

derekross merged 1 commit into
derekross:mainfrom
only21mil:build/c376-persist-read-runbook-r3

Conversation

@only21mil

Copy link
Copy Markdown
Contributor

What and why

FINGERPRINT-PLAN F3 still mounted persist with plain -o ro through /dev/disk/by-partlabel, which this root doesn't have. A read-only ext4 mount still replays a dirty journal and cleans up orphan inodes when the block device is writable (ext4_load_journal(), ext4_orphan_cleanup() in upstream fs/ext4), so it can write the calibration partition. Section 4 of the plan already says persist is only read with debugfs, and F19.3 and the runner already work that way. F3 was the one step left behind.

  • F3: it now takes its phone copies from F19.3 (debugfs, persist never mounted) and its laptop backup from tools/nv-backup, which finds persist by PARTNAME and copies it in verified chunks (REINSTALL-RUNBOOK 4a: a single stream over USB failed 5 of 5 times). It says that mfg_data isn't one of nv-backup's partitions. Its Rollback now includes F19.3's. It is marked superseded by F19.1-F19.3, like F4, and is run by hand only on an install where storageproxyd has never run.
  • FB1: it finds its partitions by PARTNAME, the same line F19.0 uses.
  • FINGERPRINT-RESEARCH F3: marked historical. Its copy commands, which used the same plain -o ro mount, are removed, and it points to the plan.

The 2026-10-13 F3 result (from an ro,noload mount) and every human gate (F3 re-run, F4, F19.4) are unchanged. This records no new phone result.

F3 now relies on Derek Ross's work: F19 and section 4's debugfs rule (6d8501f) and the runner's debugfs copies (#358). This change only points F3 at them.

Before and after

Both captures come from the same read-only script, run on main and on this branch. It prints the commands in the two fingerprint documents that mount persist or use /dev/disk/by-partlabel, then F3's commands and its Rollback. Before, on main (7172296): six such commands in the plan and four in the research, with F3 mounting persist plain -o ro.

The commands on main that mount persist or use by-partlabel, and F3's old commands

After, on this branch: none in either file. F3 points to F19.3 and runs tools/nv-backup, and its Rollback includes F19.3's.

The same check on this branch: no such commands, and F3's new commands and Rollback

Device and build

  • Phone: none: docs only.
  • Kernel release (uname -r): N/A, nothing ran on a phone.
  • Packages changed, with versions: none.

Checks (no phone needed)

  • tools/pr-check origin/main passes
  • tests/all passes (10 skips for tools missing on the laptop: docker image, mkbootimg, dtc, lz4, repo-add, bsdtar, root image)
  • tests/packages: N/A, no package changed
  • No package changed, so no version bump
  • The commit has an area prefix and a body that says why; AI help is a Co-Authored-By: trailer, never a Signed-off-by:

I also checked the changed snippets against a stand-in phone tree, with stubs for phone-ssh, debugfs and dd, and with mount, umount, modprobe and blockdev stubbed so that any call fails. Neither file has a command left that mounts persist or reads /dev/disk/by-partlabel. F19.3's commands, which F3 now points to, dump with debugfs from the PARTNAME node and never mount. FB1 hashes the PARTNAME nodes and ignores a decoy persist_backup. tests/nv-backup passes. The same checks fail on main's plan.

On the phone

  • I ran this on my own phone, booted into this build: no. These revised commands have not run on a phone. F3's 2026-10-13 result and F19's 2026-11-02 results stay as recorded.
  • Runbook steps passed: none run.
  • What I did not test: any phone run of F3, FB1 or tools/nv-backup from these steps.
  • Nothing in this change writes outside slot B and userdata, weakens the storage guard, or reads registers from userspace (AGENTS.md §1)

Generated with Claude Opus 5.5 and GPT-6.1 Sol in T3 Code Nightly

F3's commands still mounted persist plain `-o ro` through
/dev/disk/by-partlabel, which this root doesn't have. A read-only ext4
mount replays a dirty journal and cleans up orphan inodes whenever the
block device is writable, so it can write the calibration partition,
and section 4 already says persist is only read with debugfs.

F3 now takes its phone copies from F19.3 (debugfs, as the runner does)
and its laptop backup from tools/nv-backup, which finds persist by
PARTNAME and copies it in verified chunks (one long stream over USB
failed 5 of 5 times, REINSTALL-RUNBOOK 4a). FB1 finds its partitions by
PARTNAME, as F19.0 does. The research's F3 points to the plan.

The 2026-10-13 F3 result and the human gates are unchanged. Checked
against an inert fixture and tests/nv-backup; nothing ran on a phone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@derekross

Copy link
Copy Markdown
Owner

Thank you for this. F3 was the last place in the fingerprint plan that still mounted persist, and pointing it at F19.3's debugfs copies and at tools/nv-backup is the right fix. I checked the ext4 reasoning against fs/ext4/orphan.c in our tree: a read-only mount does clean up orphans unless the block device itself is read-only, so "never mount it, even -o ro" is right. FB1's new line is the same as F19.0's, and the research file now sends readers to the plan. Policy and tests pass, and it merges cleanly.

I'll merge it as it is. Three small things you could add here, or I can take them in a follow-up:

  1. F3's rollback now includes F19.3's, which removes all of /var/lib/omamobile-fp. On an install where storageproxyd has already run, that directory also holds Trusty's TD. Your quote says to run F3 only where storageproxyd never ran. Could F3 repeat F19.1's stop ("Stop if storageproxyd already ran on this install") as a real Stop line? And could the rollback remove only what the step writes, mfg_data.img and persist-ss/? F19.3's rollback has the same problem, and that one is mine to fix.
  2. F3 used to copy mfg_data to the laptop as well. A PARTNAME-found dd of mfg_data into ~/android/reference would keep that, for a phone that has no 10-13 copy. This one is optional.
  3. FB1 still compares against the 10-12 backup, though the newest is 11-02. tools/nv-backup --check "$B" could replace the loop in FB1 and F19.0. That predates your change, so no need to do it here.

MODEM-PLAN and RADIOS-CAMERA-PLAN still have a few /dev/disk/by-partlabel lines. If you'd like to give them the same treatment in another PR, that would be welcome.

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

only21mil commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor Author

Note

🤖 Opus 5.5 replying on behalf of Victor.

Thanks for the review. Both follow-ups are up:

Both are docs only: tools/pr-check and tests/all pass, and nothing ran on a phone.

derekross pushed a commit that referenced this pull request Nov 8, 2026
The Arch root on the phone has no /dev/disk/by-partlabel, so the M0
commands that read the radio partitions through it fail there: M0.1's
checksum loop (both plans), M0.5's blockdev --getro check and 1.6's
name-to-device listing. #490 fixed the same lookup in FINGERPRINT-PLAN,
and the maintainer asked for these two plans to get the same treatment.

Each command now finds its partition the way FB1 and F19.0 do, by
PARTNAME in /sys/class/block/*/uevent, and 1.6 lists those PARTNAME
lines in place of the by-partlabel symlinks. 1.6's "take a fresh
backup" note now points at tools/nv-backup, which finds the partitions
the same way. No step does anything else differently: the same
partitions are read, nothing is mounted or written.

MODEM-PLAN's M0 result note (2026-10-12) records what was run that day
and is left as it was.

Checked: the changed shell snippets parse (bash -n, sh -n), the lookup
picks sda5 for efs over efs_backup on a fake sysfs, tools/pr-check
origin/main and tests/all. Docs only; no phone was used.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
derekross pushed a commit that referenced this pull request Nov 8, 2026
…s copies (#520)

Follow-up to Derek's review of #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).

#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
…ekross#490)

F3's commands still mounted persist plain `-o ro` through
/dev/disk/by-partlabel, which this root doesn't have. A read-only ext4
mount replays a dirty journal and cleans up orphan inodes whenever the
block device is writable, so it can write the calibration partition,
and section 4 already says persist is only read with debugfs.

F3 now takes its phone copies from F19.3 (debugfs, as the runner does)
and its laptop backup from tools/nv-backup, which finds persist by
PARTNAME and copies it in verified chunks (one long stream over USB
failed 5 of 5 times, REINSTALL-RUNBOOK 4a). FB1 finds its partitions by
PARTNAME, as F19.0 does. The research's F3 points to the plan.

The 2026-10-13 F3 result and the human gates are unchanged. Checked
against an inert fixture and tests/nv-backup; 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
…rekross#519)

The Arch root on the phone has no /dev/disk/by-partlabel, so the M0
commands that read the radio partitions through it fail there: M0.1's
checksum loop (both plans), M0.5's blockdev --getro check and 1.6's
name-to-device listing. derekross#490 fixed the same lookup in FINGERPRINT-PLAN,
and the maintainer asked for these two plans to get the same treatment.

Each command now finds its partition the way FB1 and F19.0 do, by
PARTNAME in /sys/class/block/*/uevent, and 1.6 lists those PARTNAME
lines in place of the by-partlabel symlinks. 1.6's "take a fresh
backup" note now points at tools/nv-backup, which finds the partitions
the same way. No step does anything else differently: the same
partitions are read, nothing is mounted or written.

MODEM-PLAN's M0 result note (2026-10-12) records what was run that day
and is left as it was.

Checked: the changed shell snippets parse (bash -n, sh -n), the lookup
picks sda5 for efs over efs_backup on a fake sysfs, tools/pr-check
origin/main and tests/all. Docs only; no phone was used.

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>
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