This repository was archived by the owner on May 12, 2026. It is now read-only.
Commit 53913c4
fix(firmware): set vbmeta AVB flags to 0x01 to prevent Android 16 fastboot lock
The vbmeta patch routine previously forced AVB flags to 0x03. On Android 16 base builds (for example Xiaomi 17), this can lead to persistent fastboot boot failure after flashing.
This change updates _patch_vbmeta() to write 0x01 at the AVB flags offset (123) instead of 0x03, preserving the intended AVB relaxation while avoiding the device-specific fastboot lock behavior.
What changed:
- Updated FLAGS_TO_SET from b"\x03" to b"\x01" in FirmwareModifier._patch_vbmeta().
- Added a focused regression test that creates a synthetic vbmeta image with AVB magic and verifies byte offset 123 is patched to 0x01.
Verification:
- .venv/bin/pytest -q tests/core/test_firmware_modifier.py
- .venv/bin/pytest -q tests/test_workflow.py
Co-authored-by: Codex <codex@openai.com>1 parent 2d58b55 commit 53913c4
2 files changed
Lines changed: 36 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
| 98 | + | |
| 99 | + | |
99 | 100 | | |
100 | 101 | | |
101 | 102 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
0 commit comments