Repository navigation
bin/omamobile: pack header-v0 boot images for android-v0 - #507
Conversation
The OnePlus 6 (enchilada) ABL boots an Android boot image header v0: a gzip kernel with the DTB appended, no dtbo and no vendor_boot. Until now nothing in the tree could make one, so every path refused BOOT_METHOD=android-v0 and the port's first-light image was built by hand. load_device now accepts android-v0 with its own required keys and the six header fields (PAGESIZE, BASE and the offsets), checked as numbers; BOOT_IMAGES must be boot alone and boot_b must be on UFS_RW. images packs boot.img with the pinned mkbootimg.py: gzip -9n of Image with the (overlaid) DTB appended, the shared initramfs as the ramdisk, CMDLINE and the descriptor's offsets. mkdtboimg is only required for android-v4. The port stays RAM-only: fastboot, flash and push refuse android-v0 and point at `fastboot boot`, and the installer still refuses the method, until the slot-B install and its CONTRIBUTING.md 3.1 entry are agreed. Also in device/enchilada/NOTES.md and docs/DEVICES.md, from review on derekross#445 and derekross#432: link the maintainer's decision on restoring stock; say the firewall failure booted from boot_b after --set-active=b; and drop the guess that each rescue boot spends one of slot A's tries (after one more rescue boot A was still at 5 and B at 7). Tested: tests/boot-method (enchilada images reach the kernel check; fastboot, flash, push and both installer modes refuse; bad header fields refused; no phone access) and tests/images-layout, which gains an android-v0 layout test (one boot.img, header v0, page size and load addresses, kernel = gzip Image + DTB, ramdisk = initramfs, deterministic) while the gs201/gs101 baseline still matches 1e7a998 byte for byte. Against the 7.1.0-rc1-sdm845 build used for first light on 2026-11-04, images gives a boot.img byte-identical to the one that was booted then with `fastboot boot` (sha256 78d7bd1a...0d98c). Nothing was sent to the phone for this change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thank you, Matt. This is the packer #432 was waiting for, and it's careful in the right places. The new method gets its own checked keys, What I ran:
One thing for later, not for this PR: #505 (the Xiaomi Mi 8, also an SDM845) packs a header-v1 image with its own script. I'll ask there whether it can use this path, so the tree keeps one packer. I'll merge it as is. Thanks again. |
|
Thanks, Derek, and thanks for checking the Pixel 7 Pro images and On #505: going from header v0 to v1 should only take a header-version key in the descriptor plus the recovery-dtbo fields v1 adds, so I'm happy to help fit the Mi 8 into this path if that's useful there. Next from me is the LUN-aware |
The OnePlus 6 (enchilada) ABL boots an Android boot image header v0: a gzip kernel with the DTB appended, no dtbo and no vendor_boot. Until now nothing in the tree could make one, so every path refused BOOT_METHOD=android-v0 and the port's first-light image was built by hand. load_device now accepts android-v0 with its own required keys and the six header fields (PAGESIZE, BASE and the offsets), checked as numbers; BOOT_IMAGES must be boot alone and boot_b must be on UFS_RW. images packs boot.img with the pinned mkbootimg.py: gzip -9n of Image with the (overlaid) DTB appended, the shared initramfs as the ramdisk, CMDLINE and the descriptor's offsets. mkdtboimg is only required for android-v4. The port stays RAM-only: fastboot, flash and push refuse android-v0 and point at `fastboot boot`, and the installer still refuses the method, until the slot-B install and its CONTRIBUTING.md 3.1 entry are agreed. Also in device/enchilada/NOTES.md and docs/DEVICES.md, from review on derekross#445 and derekross#432: link the maintainer's decision on restoring stock; say the firewall failure booted from boot_b after --set-active=b; and drop the guess that each rescue boot spends one of slot A's tries (after one more rescue boot A was still at 5 and B at 7). Tested: tests/boot-method (enchilada images reach the kernel check; fastboot, flash, push and both installer modes refuse; bad header fields refused; no phone access) and tests/images-layout, which gains an android-v0 layout test (one boot.img, header v0, page size and load addresses, kernel = gzip Image + DTB, ramdisk = initramfs, deterministic) while the gs201/gs101 baseline still matches 45e7109 byte for byte. Against the 7.1.0-rc1-sdm845 build used for first light on 2026-11-04, images gives a boot.img byte-identical to the one that was booted then with `fastboot boot` (sha256 78d7bd1a...0d98c). Nothing was sent to the phone for this change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
What and why
The OnePlus 6 (enchilada) ABL boots a header-v0 boot image: a gzip kernel with the DTB appended, no dtbo, no vendor_boot. Nothing in the tree could make one, so this adds it to
omamobile imagesforBOOT_METHOD=android-v0.load_deviceaccepts android-v0 and checks the six header fields (PAGESIZE,BASE, the offsets) as numbers.BOOT_IMAGESmust bebootalone, andboot_bmust be onUFS_RW.imagespacksboot.imgwith the pinnedmkbootimg.py: gzipImage+ DTB, the shared initramfs,CMDLINE, the descriptor's offsets.fastboot,flashandpushrefuse android-v0 and point atfastboot boot, and the installer still refuses it.It also includes the two notes from #445 and the retry-count correction from #432: a link to the decision on restoring stock, the firewall failure booted from
boot_bafter--set-active=b, and the dropped guess that each rescue boot spends a try.docs/RELEASES.mdlists the new keys.Refs #432 (the "packer" PR named there).
Device and build
uname -r): 7.1.0-rc1-sdm845 (the first-light build in device/enchilada/NOTES.md)Checks (no phone needed)
tools/pr-check origin/mainpassestests/allpassestests/packagespasses (or the packages I touched: none touched)versionbumped, and the new version is in the commit subject (no packages)Co-Authored-By:orAssisted-by:trailer, never aSigned-off-by:tests/boot-methodcovers the refusals and bad header fields.tests/images-layoutadds an android-v0 layout test: oneboot.img, header v0, page size, load addresses, kernel = gzip Image + DTB, ramdisk = initramfs, same bytes on a second run. The gs201/gs101 images still match 1e7a998 byte for byte.On the phone
imagesgives aboot.imgbyte-identical to the onefastboot booted at first light on 2026-11-04 (sha25678d7bd1a…0d98c, the NOTES entry).fastboot bootof an image from this exact commit (it is the same bytes as above); linux-omarchy-mobile on this phoneuserdata, weakens the storage guard, or reads registers from userspace (AGENTS.md §1)🤖 Generated with Claude Code