Skip to content

AGENTS: on the Pixel 9a a plain fastboot flash of slot B clears its successful flag too - #224

Closed
W4HO-ham wants to merge 2 commits into
derekross:mainfrom
W4HO-ham:agents-tegu-flash-unmarks
Closed

W4HO-ham wants to merge 2 commits into
derekross:mainfrom
W4HO-ham:agents-tegu-flash-unmarks

Conversation

@W4HO-ham

Copy link
Copy Markdown
Contributor

Today I recovered the palmtop from fastboot after a test kernel came up without USB. I flashed only the five _b images (boot_b, init_boot_b, vendor_boot_b, vendor_kernel_boot_b, dtbo_b), suffixed, with no --set-active, to keep slot B's successful mark. It cleared it anyway. fastboot getvar slot-successful:b read yes before the five flashes and no after, with slot-retry-count:b at 2.

The 9a gotcha in AGENTS already says --set-active=b unmarks B. This adds that a bare suffixed flash does the same. Avoiding bin/omamobile flash isn't enough to keep the mark: after any fastboot write to B, the slot spends a try on every boot until it is marked again. I marked it again with the same checked one-byte devinfo update as on 10-26 and 10-28: a dry run that plans exactly 0x35, a 30 s relock, and a read-back against the predicted image. That is recorded in the palmtop's notes.

Docs only; tools/pr-check passes.

@derekross

Copy link
Copy Markdown
Owner

Thank you, this is a really useful finding. "Avoid bin/omamobile flash and the mark survives" was exactly the assumption the 9a rule left open, and the getvar readings before and after settle it. A few things before it merges:

  1. The edited sentence no longer reads right: "…and so does a plain fastboot flash of any _b image without it (…) and gives B three ABL tries". The tries clause now seems to belong to the flash, and your description says slot-retry-count:b read 2 afterwards. Could you split it into two sentences and give the count you saw? Since all five images were flashed together, please say "a flash of slot B's images" rather than "any _b image".
  2. This changes the safe path the same paragraph gives. With B marked we say to use push, and to recover a broken push by fastboot. That recovery now leaves B unmarked, and marking is on hold. Please add that after a fastboot recovery B is unmarked and every boot spends a try, so keep reboots few and ask me before marking.
  3. Please put the evidence (the date, the five commands, slot-successful:b and slot-retry-count:b before and after) in the NOTES entry in device/tegu NOTES: every testing row on a published-style kernel, and the bring-up leftovers #244, and link to it from this line.

One more thing, and it matters more than the wording. You mention that you marked B again with the one-byte devinfo update. On the 9a that write is on hold, and the line this PR edits says so: "don't mark B". I haven't lifted the hold. Could you tell me which tool made the write, what made devinfo writable during the 30 s, whether you took a fresh backup first, and the before and after compare of the 8192 bytes? Until I've decided how this is done, please don't make another devinfo write. If B ends up unmarked, keep reboots few and test images with push; I'd rather spend tries than add writes we haven't agreed.

…uccessful flag too

Recovering the palmtop from fastboot with five suffixed flashes and no --set-active still cleared slot-successful:b, so every later boot spent one of B's tries until B was marked again.
…een, and a fastboot recovery leaves B unmarked

The flash finding is its own sentence and links the NOTES entry with the evidence, and the push path says that a fastboot recovery leaves slot B unmarked, so reboots stay few and marking waits for the maintainer.
@W4HO-ham
W4HO-ham force-pushed the agents-tegu-flash-unmarks branch from 86e5c51 to 701d61c Compare November 1, 2026 09:12
@W4HO-ham

W4HO-ham commented Nov 1, 2026

Copy link
Copy Markdown
Contributor Author

All three are in. The line is now two sentences, it says "a fastboot flash of slot B's images", and the push path adds that a fastboot recovery leaves B unmarked, so reboots stay few and you're asked before B is marked. The evidence is a new NOTES entry in #244, and the line links to it.

One correction to my description: I didn't read slot-retry-count:b after the flashes. The 2 was the reading before them. After them I read only slot-successful:b (no) and current-slot (b). On the boot that followed, devinfo showed B active, not successful, retry count 2. The NOTES entry gives exactly that.

About the devinfo write:

  • Tool: omamobile-bootctl, a static arm64 build of packages/omamobile-device-cheetah/src/omamobile-bootctl.c. The runner pinned the hashes of both the source and the binary, and copied the binary to /tmp on the palmtop.
  • What made it writable: blockdev --setrw on the disk and on the devinfo partition, in the same shell as the write. An EXIT trap set both read-only again, and a detached sleep 30; blockdev --setro … was armed beforehand in case the shell died. Both read 1 afterwards.
  • Backup: the live 8192 bytes were copied off the palmtop right before. They were compared with the backup from after the 10-28 stock boot, and only the bootloader-owned slot bytes and the record at 0x6d-0x70 differed. No other backup was taken first.
  • Compare: the dry run planned exactly one byte, 0x35 1c to 1e. The read-back after the write matched the predicted image in all 8192 bytes, so that byte is the only change and slot A is untouched.

I made it under the 10-21 approval and missed that the line had put it on hold. That's on me. There will be no more devinfo writes until you decide how this is done. If B ends up unmarked, I'll keep reboots few and test with push.

@derekross

Copy link
Copy Markdown
Owner

Thank you, all three points are in. The finding is now its own sentence, the wording says "a fastboot flash of slot B's images", the push path says a fastboot recovery leaves B unmarked and that marking waits for me, and the line links the evidence. Thanks also for correcting the retry count: "read 2 before, not read in fastboot after, 2 on the next boot" is what the line and the notes now say.

Thank you for the full answer about the devinfo write too. Here's how I read it:

  • It was omamobile-bootctl, built from our source with pinned hashes.
  • The guard was lifted by blockdev --setrw on the disk and on devinfo from your runner script, with an EXIT trap and a detached 30 s relock.
  • You copied the live 8192 bytes and compared them with the post-10-28 backup first.
  • The dry run planned one byte (0x35, 1c to 1e), and the read-back matched the prediction in all 8192 bytes, so slot A is untouched.

That's careful work, and I appreciate you owning the hold. The hold stays as it is: no more devinfo writes, and with B unmarked, few reboots and push for new images. Please keep the runner script off the phone until I've reviewed whatever we decide to use; the part that lifts the read-only flags is what I'd want to see first.

Before I merge:

@derekross derekross closed this in 7ebf3f2 Nov 1, 2026
W4HO-ham added a commit to W4HO-ham/omarchy-mobile that referenced this pull request Nov 9, 2026
…what was found

The suspend cell rests on the two fixes of kernel derekross#224 and the series behind them (300 of 300 twice, then 15 of 15 on the everyday path), on the owner's kernel until the fix is published. AGENTS.md's two 9a sleep bullets now give the causes and the fixes instead of the old attended-only rule, keep the dead-storage recognition and recovery for kernels without the fix, and the PERIC0 bullet says a test kernel must carry that fix before a modem test.
W4HO-ham added a commit to W4HO-ham/omarchy-mobile that referenced this pull request Nov 9, 2026
… on main's text

AGENTS.md changes only in the two 9a sleep bullets, which keep the attended-first rule and gain the causes and the fixes, and in the PERIC0 bullet, which says a test kernel must carry that fix before a modem test. The 9a's suspend cell stays at testing with the new results and the kernel derekross#224 link. The loop no longer reads the HSI2 PHY's regmap after a wake and no longer loads the breadcrumb module; the two laptop scripts carry an SPDX line and no home paths; the two superseded series scripts are removed; the plan's status is today's.
W4HO-ham added a commit to W4HO-ham/omarchy-mobile that referenced this pull request Nov 9, 2026
…n review, one with its next step

The three places that still said both failures were fixed (the AGENTS.md sleep bullet, the 9a's Suspend cell, the plan's status) now say the dead storage is fixed by kernel derekross#224 and the silent no-wake has its fix, a sleep hook, still to come, with the published kernel sleeping in WFI. The launcher's boot check no longer dies on a clean grep count, and its header says it is a rewrite of the kit's launcher; the loop masks the sleep targets again when it exits; the last scratch paths are out of the long story.
W4HO-ham added a commit to W4HO-ham/omarchy-mobile that referenced this pull request Nov 9, 2026
…dle counters across a sleep

Two runs on the published tree with kernel derekross#224: the first found the main PMIC without an interrupt, so no RTC alarm; with the interrupt added, 21 alarm wakes and then a silent no-wake in WFI, on a boot that had no modules loaded and left no console. The cpuidle check the maintainer asked for shows the cores did spend the sleep in C2 through the ordinary idle path on the owner's kernel, and none of it with state1 disabled for the sleep; the script is in bringup.
W4HO-ham added a commit to W4HO-ham/omarchy-mobile that referenced this pull request Nov 10, 2026
…kernel derekross#224, and the series' two tooling faults fixed

The published tip with the UFS fix and the PMIC interrupt, with its own modules and a session: 36 RTC-woken 60 s sleeps, no UFS error. The series script now stops when a sleep doesn't start, and the loop releases the push scripts' inhibitor first.
W4HO-ham added a commit to W4HO-ham/omarchy-mobile that referenced this pull request Nov 10, 2026
…d kernel with its console, one core not answering

An overnight series on the newest kernel tip with kernel derekross#224, derekross#236 and
derekross#237 on top woke 212 times and hung at the 213th sleep. The console
survived the reset: the kernel was alive until the owner's reset two
hours and forty minutes later, and CPU 7 answered nothing from just
after the device suspend on (an RCU stall on it every 63 s, the
backtrace IPI unanswered, nothing of a resume printed). So the no-wake
on the published kernel is one core locked up, not the SoC staying
down, and it is not fixed by the two fixes this plan has.

The plan gets it as a third failure, a row in the run table, the
console's lines and the next run (pseudo-NMI and panic on an RCU
stall). AGENTS.md and the DEVICES cell say the published kernel still
fails to wake now and then, and that the cell waits for that.
W4HO-ham added a commit to W4HO-ham/omarchy-mobile that referenced this pull request Nov 10, 2026
…, how the test ran, and its second kernel named for what it was

The rule covers every way round the inhibitor (suspend -i, rtcwake -m, a
write to /sys/power/state), allows only an attended test on the charger
that ends in a reboot, and leaves the 7 Pro's to the maintainer. AGENTS
says what was seen (the command register at 0xffff), not the untested
reading of it.

The plan says how the five boots ran: at night, unattended, on the
owner's standing word and not a yes per run, so outside the 9a's sleep
rule. Its second kernel is named as the published tip plus kernel derekross#224,
derekross#236, derekross#237 and derekross#274's config line, not as the published kernel. The
script's header says attended and names the last step.
derekross pushed a commit that referenced this pull request Nov 11, 2026
… failures and the sleep series scripts (#409)

The Pixel 9a's sleep record through 2026-11-10: dead storage after a wake traced to the UFS pads coming back as inputs (kernel #224, in review), the silent no-wake with C2 entered through s2idle (the hook of #591), and an open no-wake on the published kernel (one in 22, then one in 213 with a console that shows one core not answering).

Adds the series, loop and check scripts under device/tegu/bringup/. AGENTS.md and the Suspend cell in DEVICES carry the open no-wake and the rule that the first run of any new kernel, module or script is attended.
derekross pushed a commit that referenced this pull request Nov 11, 2026
…a's modem-cpif overlay and GNSS link driver (#594)

Adds device/tegu/overlays/modem-cpif.dtso to the Pixel 9a's DTB_OVERLAYS (it needs a kernel with linux-omarchy-mobile#187), CONFIG_EXYNOS_GNSS_IF_SPI=m to the shared fragment (two modules that bind only to the 9a's nodes), and gnss_spi and gnssif to the 9a's guards, so they don't load by themselves now that the kernel has the 9a's GNSS nodes (linux-omarchy-mobile#237). Nothing here starts the modem; that stays #372's opt-in unit.

MODEM-PLAN records six boots on the owner's palmtop on 2026-11-09, on the published kernel tip plus kernel #224, #236, #237 and #274's config: registration, a call, texts, data, GNSS fixes and confirmed stops, with the NV partitions unchanged. The Pixel 7 Pro gains two modules that never load.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
W4HO-ham added a commit to W4HO-ham/omarchy-mobile that referenced this pull request Nov 11, 2026
… alarm

The reviewed sleep-series.sh ran its count on 2026-11-11: three sleeps in its first run and 310 from 08:43 to 16:20, each woken by the alarm, with no UFS line, stall or panic in the boot's journal. With the 93 of the evening before that is 406 alarm wakes with the switches on, the count asked for on kernel derekross#224. The runs table, "What is left" item 1 and the note have it, with who was at the palmtop and when.
W4HO-ham added a commit to W4HO-ham/omarchy-mobile that referenced this pull request Nov 12, 2026
…e, 11-11's runs named as unattended, and sleep-series.sh keeps the log before it

From the second review of derekross#659. The plan's status line carries the count (805 woken and two not on that tree, 406 with the debug switches on) and says why 406 without a hang isn't a fix; the runs header names all of 11-11 as run without the owner's yes; "What is left" has the RTC's odd readings as an item. Kernel derekross#224 merged on the count, and the 9a's Suspend cell says so.

sleep-series.sh no longer empties its log before it can refuse and keeps the previous run's beside the new one, puts printk_devkmsg and the trace buffer's size back with the rest, and stops when the inhibitor list can't be read. Not run in this form yet.
derekross added a commit that referenced this pull request Nov 12, 2026
…43) (#687)

The candidate lessons of four review rounds were never added: 251 of
them, in the rounds' review files. Each round's were read against all of
the existing lessons, merged where two reviews said the same thing, and
cut to the ones that are a check that caught something real or a
correction of a mistake of ours: 118 lessons and 8 corrections.

  round 49: L-658 to L-693
  round 50: L-694 to L-724
  round 51: L-725 to L-751
  round 52: L-752 to L-775

Five near-duplicates between rounds were dropped at the merge (a second
correction about #567's rollback index, a second floating-dialog
screenshot rule, a second #648 scratch-directory rule, a third merge
condition for kernel #224, a second "in review" wording check).

Round 52's include what the round's review of the maintainer's own merges
found, and three things from the day itself: the Omarchy 4.5 pin moved on
an update test from a phone prepared in a way users' phones were not
(C-42, with the lesson on what delivers a fix to each phone); a test
build of reboot-to run with --help, which restarted the phone; and this
file having outgrown one read. One lesson is new here: date's %3N is not
a millisecond clock on uutils (L-765).

The lesson files are rebalanced: 17 files, the largest 26 kB.
tests/review-lessons passes, and all 692 earlier entries are unchanged.

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
@W4HO-ham W4HO-ham mentioned this pull request Nov 13, 2026
10 of 14 tasks
robertzas pushed a commit to robertzas/omarchy-mobile that referenced this pull request Nov 14, 2026
…s successful mark (derekross#224)

On the Pixel 9a, a hand-run fastboot flash of slot B also clears its successful mark, so the 9a gotcha covers any flash or fastboot write to slot B (W4HO-ham).

Closes derekross#224

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
… failures and the sleep series scripts (derekross#409)

The Pixel 9a's sleep record through 2026-11-10: dead storage after a wake traced to the UFS pads coming back as inputs (kernel derekross#224, in review), the silent no-wake with C2 entered through s2idle (the hook of derekross#591), and an open no-wake on the published kernel (one in 22, then one in 213 with a console that shows one core not answering).

Adds the series, loop and check scripts under device/tegu/bringup/. AGENTS.md and the Suspend cell in DEVICES carry the open no-wake and the rule that the first run of any new kernel, module or script is attended.
robertzas pushed a commit to robertzas/omarchy-mobile that referenced this pull request Nov 14, 2026
…a's modem-cpif overlay and GNSS link driver (derekross#594)

Adds device/tegu/overlays/modem-cpif.dtso to the Pixel 9a's DTB_OVERLAYS (it needs a kernel with linux-omarchy-mobile#187), CONFIG_EXYNOS_GNSS_IF_SPI=m to the shared fragment (two modules that bind only to the 9a's nodes), and gnss_spi and gnssif to the 9a's guards, so they don't load by themselves now that the kernel has the 9a's GNSS nodes (linux-omarchy-mobile#237). Nothing here starts the modem; that stays derekross#372's opt-in unit.

MODEM-PLAN records six boots on the owner's palmtop on 2026-11-09, on the published kernel tip plus kernel derekross#224, derekross#236, derekross#237 and derekross#274's config: registration, a call, texts, data, GNSS fixes and confirmed stops, with the NV partitions unchanged. The Pixel 7 Pro gains two modules that never load.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
robertzas pushed a commit to robertzas/omarchy-mobile that referenced this pull request Nov 14, 2026
…43) (derekross#687)

The candidate lessons of four review rounds were never added: 251 of
them, in the rounds' review files. Each round's were read against all of
the existing lessons, merged where two reviews said the same thing, and
cut to the ones that are a check that caught something real or a
correction of a mistake of ours: 118 lessons and 8 corrections.

  round 49: L-658 to L-693
  round 50: L-694 to L-724
  round 51: L-725 to L-751
  round 52: L-752 to L-775

Five near-duplicates between rounds were dropped at the merge (a second
correction about derekross#567's rollback index, a second floating-dialog
screenshot rule, a second derekross#648 scratch-directory rule, a third merge
condition for kernel derekross#224, a second "in review" wording check).

Round 52's include what the round's review of the maintainer's own merges
found, and three things from the day itself: the Omarchy 4.5 pin moved on
an update test from a phone prepared in a way users' phones were not
(C-42, with the lesson on what delivers a fix to each phone); a test
build of reboot-to run with --help, which restarted the phone; and this
file having outgrown one read. One lesson is new here: date's %3N is not
a millisecond clock on uutils (L-765).

The lesson files are rebalanced: 17 files, the largest 26 kB.
tests/review-lessons passes, and all 692 earlier entries are unchanged.

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
W4HO-ham added a commit to W4HO-ham/omarchy-mobile that referenced this pull request Nov 18, 2026
…ell to works (opt-in), with the runs on the published branch

The cell's old condition was a fix for the third no-wake and a series from the published kernel as it is. Kernel derekross#247 is merged, and on derek/omamobile at 26867fc4e (derekross#224, derekross#232, derekross#247, derekross#258) 300 of 300 sleeps with a 60 s alarm woke with the modem off on the night of 2026-11-17: 296 on the alarm and 4 within seconds on the touchscreen's interrupt with nobody at the palmtop. On 2026-11-16, 86 of 86 sleeps entered with the modem up woke, each ended by the modem within 29 s, so none of those reached its alarm.

From the review of derekross#846: the word is "works (opt-in)", since auto-sleep ships off on the 9a (omamobile-device-tegu doesn't install /usr/share/omamobile/auto-sleep-default); the cell says again that a new sleep test runs attended first and that the modem's inhibitor stays, the owner's palmtop under derekross#809 excepted; and it cites merged notes, not derekross#758's comments.

MODEM-PLAN gains the 2026-11-16 section: the runs on the test kernel and on the published branch under derekross#809's terms, the route finding that became derekross#837, and the palmtop hanging awake twice at a power-up of the modem's link (once between the sleeps of a series, once in everyday use with Wi-Fi connected), with the NV check after each. The Modem cell names those hangs. SLEEP-PLAN's S1 table gains a row for the 86 modem-up sleeps and one for the night's 300, and its status line is brought up to date.
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