Commit Graph

848 Commits

Author SHA1 Message Date
Andrew Gunnerson 9214a832cd patch/boot: Add support for DSU on dedicated recovery devices
On devices with dedicated recovery partitions, first_stage_ramdisk
exists in the ramdisks, but is unused. The first stage switch root
operation is just skipped. To properly add a public key for DSU on these
devices, the top level /avb directory needs to be used.

Fixes: #536

Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2026-01-08 19:21:55 -05:00
Andrew Gunnerson dc9244f014 CHANGELOG.md: Add entry for PR #541
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2026-01-07 20:28:21 -05:00
Andrew Gunnerson 7017bc66dd format/lp: Allow empty images to list extents
Android's DSU mechanism uses this in /metadata/gsi/dsu/dsu/lp_metadata.
The file is an empty image that references the userdata block device and
the extents point to preallocated space for the partition images in
/data/gsi/dsu/dsu.

This commit also relaxes the metadata_max_size limit to 512 KiB since
these DSU LP images set the field to 256 KiB:

https://android.googlesource.com/platform/system/core/+/refs/tags/android-16.0.0_r4/fs_mgr/libfiemap/metadata.cpp#35

Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2026-01-07 20:26:14 -05:00
Andrew Gunnerson bff45fc53c CHANGELOG.md: Add entry for PR #540
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2026-01-07 20:13:44 -05:00
Andrew Gunnerson 0e5ba0f0e2 patch/boot: Always normalize ramdisk archives
Previously, some of the boot image patches did not sort the cpio entries
and (re)assign inode numbers. In practice, this makes no difference, but
it is still not the intended behavior.

Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2026-01-07 20:10:37 -05:00
Andrew Gunnerson 237f59fd9b Version 3.23.3
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
v3.23.3
2025-12-01 21:02:12 -05:00
Andrew Gunnerson b0b00a4c54 CHANGELOG.md: Add entry for PR #530
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2025-12-01 20:58:15 -05:00
Andrew Gunnerson b9a70efb15 Update dependencies
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2025-12-01 20:54:47 -05:00
Andrew Gunnerson aeef2936d8 CHANGELOG.md: Add entry for PR #529
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2025-12-01 20:49:24 -05:00
Andrew Gunnerson 3adab80893 Bump Magisk version upper bound to 30700
There are no breaking changes.

Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2025-12-01 20:48:16 -05:00
Andrew Gunnerson 4069429361 Version 3.23.2
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
v3.23.2
2025-11-04 20:55:17 -05:00
Andrew Gunnerson 74193c1c9f CHANGELOG.md: Add entry for PR #524
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2025-11-04 20:54:42 -05:00
Andrew Gunnerson 0f8cef2daa ci.yml: Add aarch64-pc-windows-msvc target
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2025-11-04 18:10:05 -05:00
Andrew Gunnerson 8731df4504 CHANGELOG.md: Add entry for PR #523
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2025-11-04 18:08:35 -05:00
Andreas Papon fda11b4262 Add aarch64-unknown-linux-gnu target. 2025-11-04 20:08:05 +01:00
Andrew Gunnerson f0970aa80c Version 3.23.1
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
v3.23.1
2025-10-02 19:37:41 -04:00
Andrew Gunnerson 4f0db5a7c4 CHANGELOG.md: Add entry for PR #521
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2025-10-02 19:28:22 -04:00
Andrew Gunnerson 57374e2e41 Bump Magisk version upper bound to 30500
There are no breaking changes.

Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2025-10-02 19:27:19 -04:00
Andrew Gunnerson f4e5c55fe9 Version 3.23.0
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
v3.23.0
2025-09-30 20:39:13 -04:00
Andrew Gunnerson 850ce86388 CHANGELOG.md: Add entry for PR #520
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2025-09-30 20:16:31 -04:00
Andrew Gunnerson c16636a68c Update dependencies
The only breaking changes are a few types from lzma-rust2 being renamed.

Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2025-09-30 20:15:20 -04:00
Andrew Gunnerson 26812cd43a CHANGELOG.md: Add entry for PR #519
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2025-09-30 20:08:55 -04:00
Andrew Gunnerson 135cd320ce Bump Magisk version upper bound to 30400
30300 introduced a new RECOVERYMODE config option, which we
unconditionally disable because we never patch init_boot.cpio within
the vendor_boot image.

Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2025-09-30 20:07:34 -04:00
Andrew Gunnerson 919f621833 CHANGELOG.md: Add entry for PR #517
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2025-09-21 19:03:34 -04:00
Andrew Gunnerson 2c1d86cd96 deny.toml: Remove outdated override for ring license
Issue: #516

Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2025-09-21 18:52:15 -04:00
Andrew Gunnerson 91074ae4c8 Update dependencies and fix clippy 1.90 lints
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2025-09-21 18:51:25 -04:00
Andrew Gunnerson a5c628b66f Version 3.22.0
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
v3.22.0
2025-08-27 23:47:22 -04:00
Andrew Gunnerson 156c96d3d4 CHANGELOG.md: Add entry for PR #512
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2025-08-27 23:46:31 -04:00
Andrew Gunnerson 2460d1807d Update dependencies
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2025-08-27 23:24:42 -04:00
Andrew Gunnerson 728d333951 CHANGELOG.md: Add entry for PR #511
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2025-08-27 23:11:10 -04:00
Andrew Gunnerson 39661a994d Cargo.toml: Specify minimum supported toolchain version
Fixes: #506

Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2025-08-27 23:08:58 -04:00
Andrew Gunnerson d6b19b69f7 CHANGELOG.md: Add entry for PR #510
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2025-08-27 22:58:44 -04:00
Andrew Gunnerson 96806cba36 cli: Allow skipping unpacking of images
This is useful if the file format metadata is the only thing that the
user needs.

Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2025-08-27 22:54:44 -04:00
Andrew Gunnerson 5c474a1e98 CHANGELOG.md: Add entry for PR #509
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2025-08-27 22:40:38 -04:00
Andrew Gunnerson 4cf546e5ca cli/payload: Compute CoW size estimates during packing
This was overlooked during the initial implementation. Payload images
using VABC, but without CoW size estimates, are unflashable outside of
recovery.

Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2025-08-27 22:06:44 -04:00
Andrew Gunnerson 8f71b61b21 Version 3.21.0
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
v3.21.0
2025-08-23 21:18:59 -04:00
Andrew Gunnerson fa8d9eb58c CHANGELOG.md: Add entry for PR #505
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2025-08-23 20:15:19 -04:00
Andrew Gunnerson 39afcf485f Fix clippy lints
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2025-08-23 20:14:52 -04:00
Andrew Gunnerson a3eb8284c8 CHANGELOG.md: Add entry for PR #504
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2025-08-23 20:08:01 -04:00
Andrew Gunnerson e2708d39dd format/payload: Make compression factor required only for CoW v3
It turns out that even though newer versions of delta_generator set this
field for CoW v2 (unused), older versions did not.

Fixes: #493

Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2025-08-23 20:03:33 -04:00
Andrew Gunnerson a5f13826e7 CHANGELOG.md: Add entry for PR #503
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2025-08-23 19:21:42 -04:00
Andrew Gunnerson 963456c194 patch/boot: Replace function pointers with opener trait
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2025-08-23 19:19:55 -04:00
Andrew Gunnerson 842a2feb88 CHANGELOG.md: Add entry for PR #502
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2025-08-23 19:02:00 -04:00
Andrew Gunnerson 8bb1f771af format/payload: Remove unnecessary function pointer in extract_images()
The list of output files that are needed are known beforehand. There's
no need to dynamically open them.

Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2025-08-23 18:47:05 -04:00
Andrew Gunnerson ab51654dad CHANGELOG.md: Add entry for PR #498
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2025-08-23 18:43:26 -04:00
Andrew Gunnerson d75b87d3df Update dependencies
The e2e checksums were updated because the new lzma-rust2 version has
slight differences in compression ratio.

Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2025-08-23 18:18:39 -04:00
Andrew Gunnerson 73e0404662 CHANGELOG.md: Add entry for PR #501
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2025-08-23 18:18:27 -04:00
Andrew Gunnerson ebb4f18add Use try_for_each where possible (round 2)
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2025-08-23 18:17:46 -04:00
Andrew Gunnerson bee8d80df0 CHANGELOG.md: Add entry for PR #500
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2025-08-23 18:12:08 -04:00
Andrew Gunnerson fdb19e3b97 format/payload: Use dynamic dispatch for large functions
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2025-08-23 17:54:05 -04:00