From 64e6d425e02b612e3f2bcacf9296bf600793e4a7 Mon Sep 17 00:00:00 2001 From: Jeremy Joplin Date: Wed, 28 Oct 2026 00:55:02 -0600 Subject: [PATCH 1/2] device/cheetah, RELEASES: AVB footers on boot and init_boot (#11) A second Pixel 7 Pro, installed with tools/install-phone, never started slot B: the phone ended in Fastboot Mode with "Enter reason: BL1 requested", slot-retry-count:b 1 and no USB gadget, the symptom of issue #11. Its slot A runs stock CP3A.261005.002.A1 and both slots ABL 15902555, but vbmeta_b was left from BP2A.250605.031.A2 (Android 16, June 2025). Both vbmetas chain boot and init_boot. With the descriptor's AVB_FOOTERS (stock CP3A's rollback index and security patch, AOSP's test key, as lynx does), bin/omamobile images gives those two images hash footers, and after bin/omamobile flash the phone booted, ran first boot and marked slot B successful. Nothing else changed between the two: rebuilt from the same kernel output, vendor_boot, vendor_kernel_boot and dtbo are byte for byte the same, and boot and init_boot match up to their padding and footer. The maintainer's phone (ABL 15199429) and the Pixel 7 in #79 (15902555) boot footer-less images, so the trigger may be the older vbmeta_b; the NOTES entry records what is verified and what isn't. RELEASES' row for AVB_FOOTERS no longer says the Pixel 7 Pro's bootloader takes images without one. Tested: tests/all (168 ok); on the phone, the boot above and tools/phone-smoke (every check ok, cameras skipped). Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01TTVics5jHkiz34wzjZWkb9 --- device/cheetah/NOTES.md | 44 ++++++++++++++++++++++++++++++++++++++ device/cheetah/device.conf | 12 +++++++++++ docs/RELEASES.md | 2 +- 3 files changed, 57 insertions(+), 1 deletion(-) diff --git a/device/cheetah/NOTES.md b/device/cheetah/NOTES.md index 68b1e0810..bf54a51d4 100644 --- a/device/cheetah/NOTES.md +++ b/device/cheetah/NOTES.md @@ -2,6 +2,50 @@ Findings from real hardware, newest first. `BRINGUP-M1.md` is the research map written before first boot. +## 2026-10-28: a phone with an older stock vbmeta on slot B needs AVB footers on boot and init_boot + +A second Pixel 7 Pro (cheetah MP1.0 B0), installed with +`tools/install-phone` from a build of `f5da1df`, kernel +`7.3.0-rc6-omamobile-push1-g1cb4bd36f3be`. + +- **The phone before the install** [V, `fastboot getvar`; `avbtool + info_image` on `vbmeta_a` and `vbmeta_b`, read over SSH from the guarded + root after the install]: stock `CP3A.261005.002.A1` on slot A; ABL + `cloudripper-17.0-15902555` on both slots (slot B's written from that + factory image's bootloader image, then read back with slot B current). + The rest of slot B was left from an earlier stock build: `vbmeta_b` is + `BP2A.250605.031.A2` (Android 16, rollback index 1749081600), its radio + `g5300q-250320-250425-B-13407682`. `vbmeta_a` is the factory image's + `vbmeta.img` byte for byte, zero-padded to the partition (rollback index + 1791158400). Both chain `boot` (rollback index location 2) and + `init_boot` (location 4), flags 0. +- **Without footers, slot B never started** [V]: the phone ended in + Fastboot Mode with "Enter reason: BL1 requested", `slot-retry-count:b` 1 + and `slot-successful:b` no, and no USB gadget reached the laptop in four + minutes. The symptom of issue #11. +- **With `AVB_FOOTERS`, it boots** [V]: `boot` and `init_boot` get hash + footers from `bin/omamobile images` (AOSP's test key; stock CP3A's + rollback index 1791158400 and security patch 2026-10-05; padded to 64 + and 8 MiB). After `bin/omamobile flash` the Omarchy splash came up, the + root grew to the whole of `userdata`, `omamobile-firstboot` finished and + `omamobile-boot-success` marked slot B successful. Nothing else changed + between the two: rebuilt from the same kernel output, `vendor_boot`, + `vendor_kernel_boot` and `dtbo` are byte for byte the same, and `boot` + and `init_boot` match up to their padding and footer. Each was flashed + once. +- **Not known** [I]: whether the June 2025 `vbmeta_b` is what makes ABL + refuse a chained partition with no footer. The maintainer's phone boots + footer-less images on ABL 15199429 (device/lynx/NOTES.md), and so does + the Pixel 7 in #79 on 15902555; neither record says which build its + `vbmeta_b` holds. Issue #11's phone (ABL 15199429) booted after `fastboot oem + disable-verity` and `fastboot oem disable-verification` instead. +- **Rollback index** [I]: `vbmeta_b`'s index (1749081600) is below the + CP3A index slot A booted with, and slot B boots with it, so this + unlocked ABL doesn't refuse a lower vbmeta index. The footers carry + stock CP3A's index, so on this phone they ask for nothing above what + stock has stored; on a phone running an older stock build they are + above its stock's (see the comment in `device.conf`). + ## 2026-10-27: the muted speakers were the open-loop coil estimate, not sleep; the static was the boost converter; the earpiece is the top speaker - **The speaker watchdog had muted media at every boot since 10-26 22:28** diff --git a/device/cheetah/device.conf b/device/cheetah/device.conf index a1472b866..222578ff4 100644 --- a/device/cheetah/device.conf +++ b/device/cheetah/device.conf @@ -52,6 +52,18 @@ VENDOR_CMDLINE="console=tty0 earlycon=exynos4210,0x10A00000 clk_ignore_unused pd VENDOR_PAGESIZE=0x800 OS_VERSION=17.0.0 OS_PATCH_LEVEL=2026-07 +# vbmeta chains boot and init_boot (stock: SHA256_RSA4096 footers, +# rollback index locations 2 and 4). On a phone whose vbmeta_b was left +# from an older stock build, unlocked ABL stopped in fastboot ("BL1 +# requested", issue #11) on slot B images with no footer; with these +# footers it boots them (NOTES 2026-10-28). Sizes from fastboot getvar +# partition-size; rollback index and security patch from stock +# CP3A.261005.002.A1's footers (avbtool info_image). +AVB_FOOTERS="boot:0x4000000 init_boot:0x800000" +# Never above stock's: a higher index the bootloader stores would lock +# stock's own boot and init_boot out of slot A (anti-rollback). +AVB_ROLLBACK_INDEX=1791158400 +AVB_SECURITY_PATCH=2026-10-05 # --- Storage guard --- # The boot images Omarchy Mobile writes, always to slot B (the _b suffix is added diff --git a/docs/RELEASES.md b/docs/RELEASES.md index ac95d4de3..7ca0793c2 100644 --- a/docs/RELEASES.md +++ b/docs/RELEASES.md @@ -73,7 +73,7 @@ Bring-up tools (`*-stage`, `display-hz`, `usbc-deadman`) stay per plan: they pok | `VENDOR_CMDLINE` | `console=tty0 earlycon=exynos4210,0x10A00000 …` | `vendor_boot` command line (kernel arguments really go in `/chosen/bootargs`) | | `VENDOR_PAGESIZE` | `0x800` | Page size of `vendor_boot` (and `vendor_kernel_boot`, where the device has one) | | `OS_VERSION`, `OS_PATCH_LEVEL` | `17.0.0`, `2026-07` | The `init_boot` header values (the `boot` header's, on a device without `init_boot`) | -| `AVB_FOOTERS` | (zuma and the Pixel 7a: `boot:0x4000000 init_boot:0x800000`) | Optional. For a bootloader whose `vbmeta` chains these partitions and, even unlocked, refuses one with no AVB footer (zuma; the Pixel 7a too, though the Pixel 7 Pro's bootloader, the same build, takes images without one). `image:partition_size`, each a `BOOT_IMAGES` entry, once; the size is the slot's partition size in bytes (stock's footer, `avbtool info_image`, or `fastboot getvar partition-size:_b`), a multiple of 4096. `images` adds a hash footer to each, padding it to that size, signed with AOSP's test key (an unlocked bootloader accepts any key); needs `external/avb` under `SRC_DIR` (or `AVBTOOL`, `AVB_KEY`) and `openssl` | +| `AVB_FOOTERS` | (zuma, the Pixel 7a and the Pixel 7 Pro: `boot:0x4000000 init_boot:0x800000`) | Optional. For a bootloader whose `vbmeta` chains these partitions and, even unlocked, refuses one with no AVB footer (zuma; the Pixel 7a; a Pixel 7 Pro whose `vbmeta_b` was left from an older stock build, device/cheetah/NOTES.md 2026-10-28, though the maintainer's Pixel 7 Pro takes images without one). `image:partition_size`, each a `BOOT_IMAGES` entry, once; the size is the slot's partition size in bytes (stock's footer, `avbtool info_image`, or `fastboot getvar partition-size:_b`), a multiple of 4096. `images` adds a hash footer to each, padding it to that size, signed with AOSP's test key (an unlocked bootloader accepts any key); needs `external/avb` under `SRC_DIR` (or `AVBTOOL`, `AVB_KEY`) and `openssl` | | `AVB_ROLLBACK_INDEX`, `AVB_SECURITY_PATCH` | `1791158400`, `2026-10-05` | Required with `AVB_FOOTERS`, refused without it: stock's rollback index and `com.android.build..security_patch` from its footers. Never set the index above stock's: an index the bootloader stores locks stock's own images out of slot A. The `os_version` property is `OS_VERSION`'s major | | `BOOT_METHOD` | `android-v4` (default when omitted) | Generic images, flash, push and installer accept only `android-v4`; other methods are refused before phone access. `ram-only` marks a probe with no persistent install support | | `BOOT_IMAGES` | `boot init_boot vendor_boot vendor_kernel_boot dtbo` | The images written to slot B (the `_b` suffix is added by the tools and is not configurable). `boot`, `vendor_boot` and `dtbo` are always there. Without `init_boot`, `boot` carries the empty generic ramdisk and the OS version; without `vendor_kernel_boot`, `vendor_boot` carries the DTB and the initramfs (the Pixel 6: `boot vendor_boot dtbo`) | From 39369187590765e3290aa7c95878b87efebe55ce Mon Sep 17 00:00:00 2001 From: Jeremy Joplin Date: Thu, 29 Oct 2026 22:04:30 -0600 Subject: [PATCH 2/2] device/cheetah, RELEASES: CP2A's rollback index, and what triggers the footers From the review of #104. The trigger is a vbmeta_b that chains boot and init_boot, as stock's does, not the age of this phone's vbmeta_b: libavb reads a chained partition with no footer from its first byte, finds an invalid vbmeta header and returns ERROR_INVALID_METADATA, which result_should_continue() never lets an unlocked boot past (a wrong key or hash it does; external/avb c5066a9). The maintainer's vbmeta_b lists them as hash descriptors instead, which is why that phone boots footer-less images. The descriptor comment, the NOTES entry and RELEASES' row now say so. The footers now carry CP2A.260705.006's rollback index and security patch (1783209600, 2026-07-05), the oldest stock an owner runs on slot A (review lesson L-225), matching OS_PATCH_LEVEL, instead of CP3A's. Tested on this phone, whose slot A runs CP3A (1791158400): rebuilt, boot and init_boot differ from the CP3A-footer images only in the footer, the other images are byte for byte the same, and after bin/omamobile push slot B booted (orange, no failed units, slot still successful) and tools/phone-smoke passed with cameras skipped. Tested: tests/all (168 ok), tools/pr-check. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01TTVics5jHkiz34wzjZWkb9 --- device/cheetah/NOTES.md | 65 +++++++++++++++++++++++++------------- device/cheetah/device.conf | 26 ++++++++------- docs/RELEASES.md | 2 +- 3 files changed, 59 insertions(+), 34 deletions(-) diff --git a/device/cheetah/NOTES.md b/device/cheetah/NOTES.md index bf54a51d4..da55318f4 100644 --- a/device/cheetah/NOTES.md +++ b/device/cheetah/NOTES.md @@ -2,7 +2,25 @@ Findings from real hardware, newest first. `BRINGUP-M1.md` is the research map written before first boot. -## 2026-10-28: a phone with an older stock vbmeta on slot B needs AVB footers on boot and init_boot +## 2026-10-29: footers with CP2A's rollback index boot on a phone with CP3A on slot A + +- **A footer index below slot A's boots** [V]: the descriptor now carries + CP2A.260705.006's footer values as the review of #104 gives them, + rollback index 1783209600 (2026-07-05) and security patch 2026-07-05, + the oldest stock build an owner runs on slot A. Rebuilt with them, `boot` and `init_boot` + differ from the CP3A-footer images only in the footer, and the other + three images are byte for byte the same. `bin/omamobile push` wrote and + verified slot B, and the phone booted it: `androidboot.slot_suffix` + `_b`, `verifiedbootstate` orange, no failed units, slot B still marked + successful, `tools/phone-smoke` ok (cameras skipped: no data). Slot A + runs CP3A, whose footers and vbmeta carry 1791158400, so this unlocked + ABL accepts footer indexes below the CP3A one; libavb treats an index + below the stored one as a rollback error, which an unlocked boot may + continue past + [V: `result_should_continue()` in external/avb `c5066a9`]. Whether ABL + stores the indexes while unlocked is still untested. + +## 2026-10-28: a phone whose vbmeta_b chains boot and init_boot, as stock's does, needs AVB footers on them A second Pixel 7 Pro (cheetah MP1.0 B0), installed with `tools/install-phone` from a build of `f5da1df`, kernel @@ -24,27 +42,30 @@ A second Pixel 7 Pro (cheetah MP1.0 B0), installed with and `slot-successful:b` no, and no USB gadget reached the laptop in four minutes. The symptom of issue #11. - **With `AVB_FOOTERS`, it boots** [V]: `boot` and `init_boot` get hash - footers from `bin/omamobile images` (AOSP's test key; stock CP3A's - rollback index 1791158400 and security patch 2026-10-05; padded to 64 - and 8 MiB). After `bin/omamobile flash` the Omarchy splash came up, the - root grew to the whole of `userdata`, `omamobile-firstboot` finished and - `omamobile-boot-success` marked slot B successful. Nothing else changed - between the two: rebuilt from the same kernel output, `vendor_boot`, - `vendor_kernel_boot` and `dtbo` are byte for byte the same, and `boot` - and `init_boot` match up to their padding and footer. Each was flashed - once. -- **Not known** [I]: whether the June 2025 `vbmeta_b` is what makes ABL - refuse a chained partition with no footer. The maintainer's phone boots - footer-less images on ABL 15199429 (device/lynx/NOTES.md), and so does - the Pixel 7 in #79 on 15902555; neither record says which build its - `vbmeta_b` holds. Issue #11's phone (ABL 15199429) booted after `fastboot oem - disable-verity` and `fastboot oem disable-verification` instead. -- **Rollback index** [I]: `vbmeta_b`'s index (1749081600) is below the - CP3A index slot A booted with, and slot B boots with it, so this - unlocked ABL doesn't refuse a lower vbmeta index. The footers carry - stock CP3A's index, so on this phone they ask for nothing above what - stock has stored; on a phone running an older stock build they are - above its stock's (see the comment in `device.conf`). + footers from `bin/omamobile images` (AOSP's test key; that day stock + CP3A's rollback index 1791158400 and security patch 2026-10-05; padded + to 64 and 8 MiB). After `bin/omamobile flash` the Omarchy splash came + up, the root grew to the whole of `userdata`, `omamobile-firstboot` + finished and `omamobile-boot-success` marked slot B successful. Nothing + else changed between the two: rebuilt from the same kernel output, + `vendor_boot`, `vendor_kernel_boot` and `dtbo` are byte for byte the + same, and `boot` and `init_boot` match up to their padding and footer. + Each was flashed once. +- **What triggers it: a vbmeta that chains them.** libavb reads a chained + partition with no footer as if vbmeta began at its first byte, finds an + invalid header and returns `ERROR_INVALID_METADATA`, which it never lets + an unlocked boot continue past. A wrong key (`ERROR_PUBLIC_KEY_REJECTED`) + or hash (`ERROR_VERIFICATION`) it does let through, and a vbmeta with + `VERIFICATION_DISABLED` set skips its descriptors [V: + `load_and_verify_vbmeta()` and `result_should_continue()` in + external/avb `c5066a9`]. The maintainer's `vbmeta_b` lists `boot` and + `init_boot` as hash descriptors rather than chaining them, which is why + that phone boots footer-less images (review of #104). This phone's `vbmeta_b` being from an older build doesn't + matter: stock's current vbmeta chains them the same way. So any Pixel 7 + Pro whose `vbmeta_b` is stock's needs the footers, and a vbmeta that + doesn't chain them, or has verification disabled, never reads them. + Issue #11's phone booted after `fastboot oem disable-verification`, + which by its name sets that flag [I]. ## 2026-10-27: the muted speakers were the open-loop coil estimate, not sleep; the static was the boost converter; the earpiece is the top speaker diff --git a/device/cheetah/device.conf b/device/cheetah/device.conf index 222578ff4..84fea2c34 100644 --- a/device/cheetah/device.conf +++ b/device/cheetah/device.conf @@ -52,18 +52,22 @@ VENDOR_CMDLINE="console=tty0 earlycon=exynos4210,0x10A00000 clk_ignore_unused pd VENDOR_PAGESIZE=0x800 OS_VERSION=17.0.0 OS_PATCH_LEVEL=2026-07 -# vbmeta chains boot and init_boot (stock: SHA256_RSA4096 footers, -# rollback index locations 2 and 4). On a phone whose vbmeta_b was left -# from an older stock build, unlocked ABL stopped in fastboot ("BL1 -# requested", issue #11) on slot B images with no footer; with these -# footers it boots them (NOTES 2026-10-28). Sizes from fastboot getvar -# partition-size; rollback index and security patch from stock -# CP3A.261005.002.A1's footers (avbtool info_image). +# Stock's vbmeta chains boot and init_boot (rollback index locations 2 +# and 4). libavb takes a chained partition with no AVB footer as invalid +# metadata, which an unlocked bootloader doesn't let through, so on a +# phone whose vbmeta_b chains them, as stock's does, slot B images with +# no footer stop in fastboot ("BL1 requested", issue #11; NOTES +# 2026-10-28). A vbmeta_b that lists them as hash descriptors, or has +# verification disabled, never reads these footers. Sizes from fastboot +# getvar partition-size. AVB_FOOTERS="boot:0x4000000 init_boot:0x800000" -# Never above stock's: a higher index the bootloader stores would lock -# stock's own boot and init_boot out of slot A (anti-rollback). -AVB_ROLLBACK_INDEX=1791158400 -AVB_SECURITY_PATCH=2026-10-05 +# The oldest stock build an owner runs on slot A, CP2A.260705.006: its +# footers' rollback index and security patch, matching OS_PATCH_LEVEL. A +# pull request never raises them: an index the bootloader stores above an +# older stock's would lock that stock's own boot and init_boot out of +# slot A (anti-rollback). +AVB_ROLLBACK_INDEX=1783209600 +AVB_SECURITY_PATCH=2026-07-05 # --- Storage guard --- # The boot images Omarchy Mobile writes, always to slot B (the _b suffix is added diff --git a/docs/RELEASES.md b/docs/RELEASES.md index 7ca0793c2..e64088e66 100644 --- a/docs/RELEASES.md +++ b/docs/RELEASES.md @@ -73,7 +73,7 @@ Bring-up tools (`*-stage`, `display-hz`, `usbc-deadman`) stay per plan: they pok | `VENDOR_CMDLINE` | `console=tty0 earlycon=exynos4210,0x10A00000 …` | `vendor_boot` command line (kernel arguments really go in `/chosen/bootargs`) | | `VENDOR_PAGESIZE` | `0x800` | Page size of `vendor_boot` (and `vendor_kernel_boot`, where the device has one) | | `OS_VERSION`, `OS_PATCH_LEVEL` | `17.0.0`, `2026-07` | The `init_boot` header values (the `boot` header's, on a device without `init_boot`) | -| `AVB_FOOTERS` | (zuma, the Pixel 7a and the Pixel 7 Pro: `boot:0x4000000 init_boot:0x800000`) | Optional. For a bootloader whose `vbmeta` chains these partitions and, even unlocked, refuses one with no AVB footer (zuma; the Pixel 7a; a Pixel 7 Pro whose `vbmeta_b` was left from an older stock build, device/cheetah/NOTES.md 2026-10-28, though the maintainer's Pixel 7 Pro takes images without one). `image:partition_size`, each a `BOOT_IMAGES` entry, once; the size is the slot's partition size in bytes (stock's footer, `avbtool info_image`, or `fastboot getvar partition-size:_b`), a multiple of 4096. `images` adds a hash footer to each, padding it to that size, signed with AOSP's test key (an unlocked bootloader accepts any key); needs `external/avb` under `SRC_DIR` (or `AVBTOOL`, `AVB_KEY`) and `openssl` | +| `AVB_FOOTERS` | (zuma, the Pixel 7a and the Pixel 7 Pro: `boot:0x4000000 init_boot:0x800000`) | Optional. For a phone whose `vbmeta_b` chains these partitions, as stock's does: libavb takes a chained partition with no AVB footer as invalid metadata, which an unlocked bootloader doesn't let through (zuma; the Pixel 7a; the Pixel 7 Pro, device/cheetah/NOTES.md 2026-10-28). A `vbmeta_b` that lists them as hash descriptors, or has verification disabled, never reads the footers. `image:partition_size`, each a `BOOT_IMAGES` entry, once; the size is the slot's partition size in bytes (stock's footer, `avbtool info_image`, or `fastboot getvar partition-size:_b`), a multiple of 4096. `images` adds a hash footer to each, padding it to that size, signed with AOSP's test key (an unlocked bootloader accepts any key); needs `external/avb` under `SRC_DIR` (or `AVBTOOL`, `AVB_KEY`) and `openssl` | | `AVB_ROLLBACK_INDEX`, `AVB_SECURITY_PATCH` | `1791158400`, `2026-10-05` | Required with `AVB_FOOTERS`, refused without it: stock's rollback index and `com.android.build..security_patch` from its footers. Never set the index above stock's: an index the bootloader stores locks stock's own images out of slot A. The `os_version` property is `OS_VERSION`'s major | | `BOOT_METHOD` | `android-v4` (default when omitted) | Generic images, flash, push and installer accept only `android-v4`; other methods are refused before phone access. `ram-only` marks a probe with no persistent install support | | `BOOT_IMAGES` | `boot init_boot vendor_boot vendor_kernel_boot dtbo` | The images written to slot B (the `_b` suffix is added by the tools and is not configurable). `boot`, `vendor_boot` and `dtbo` are always there. Without `init_boot`, `boot` carries the empty generic ramdisk and the OS version; without `vendor_kernel_boot`, `vendor_boot` carries the DTB and the initramfs (the Pixel 6: `boot vendor_boot dtbo`) |