Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions device/cheetah/NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,71 @@

Findings from real hardware, newest first. `BRINGUP-M1.md` is the research map written before first 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
`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; 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

- **The speaker watchdog had muted media at every boot since 10-26 22:28**
Expand Down
16 changes: 16 additions & 0 deletions device/cheetah/device.conf
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +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
# 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"
# 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
Expand Down
2 changes: 1 addition & 1 deletion docs/RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:<name>_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:<name>_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.<image>.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`) |
Expand Down