Commit Graph

827 Commits

Author SHA1 Message Date
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
Andrew Gunnerson cef29fd280 CHANGELOG.md: Add entry for PR #499
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2025-08-23 17:18:00 -04:00
Andrew Gunnerson 58155513af format/payload: Fix out-of-order multithreaded writes
This was a regression from d874921a69.
extract_images()'s open_output parameter was requesting a WriteSeek
instead of a WriteAt, so it received multiple instances of Arc<File>
all with the same underlying File (and file offset).

Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2025-08-23 17:08:23 -04:00
Andrew Gunnerson 01cdd0b0d3 CHANGELOG.md: Add entry for PR #497
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2025-08-22 22:37:07 -04:00
Andrew Gunnerson e39d023855 format/cpio: Fix integer underflow panic in debug builds
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2025-08-22 22:35:48 -04:00
Andrew Gunnerson 05c86af298 CHANGELOG.md: Add entry for PR #496
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2025-08-22 22:21:45 -04:00
Andrew Gunnerson 759ed7fae5 Use try_for_each where possible
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2025-08-22 22:11:32 -04:00
Andrew Gunnerson f6aac1c12f deny.toml: Remove unused git repo URL
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2025-08-22 22:07:31 -04:00
Andrew Gunnerson e5b754c786 CHANGELOG.md: Add entry for PR #495
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2025-08-22 22:07:31 -04:00
Andrew Gunnerson d874921a69 Replace file reopen concept with ReadAt/WriteAt traits
File reopening was conflating ownership of file-like types with the fact
that they support parallel reads and writes at arbitrary offsets.

The Reopen trait has now been replaced with ReadAt and WriteAt traits,
which are implemented for types that support parallel I/O. If a type
compatible with the standard Read/Write/Seek traits is needed, a new
UserPosFile type can act as the bridge by storing its own userspace file
offset. For the opposite bridge, there's MutexFile, which implements
ReadAt/WriteAt by using locks to make the operations sequential. This is
only really used in the tests though.

This eliminates the need for the PSeekFile and SharedCursor types. The
standard File and Cursor types can be used instead, and if shared
ownership is needed, Arc can be used.

Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2025-08-22 22:07:11 -04:00
Andrew Gunnerson 390dce5f0c CHANGELOG.md: Add entry for PR #492
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2025-08-21 18:57:08 -04:00
Andrew Gunnerson 6d939bda25 Use seek_relative where possible
This will not make a meaningful performance difference for our use case,
but does not make things any more complex either.

Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2025-08-21 18:55:21 -04:00
Andrew Gunnerson a40d6ea379 CHANGELOG.md: Add entry for PR #489
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2025-08-21 00:50:00 -04:00
Andrew Gunnerson 7d0bb378a6 Switch to rawzip crate for zip file handling
rawzip is a lower-level zip file library that is much more suited for
avbroot's use case. Its speed improvements aren't too important since
OTAs only have a handful of files, but it is a simpler layer of
abstraction and exposes more about zip file internals. We also no longer
need to maintain a perpetual fork of the zip library.

The only caveat is that rawzip (much like avbroot) is built around
writing zip files in a streaming fashion. To support `--zip-mode
seekable`, the output file is post-processed to copy the relevant data
descriptor fields to the local header. The unused data descriptors
remain in the file to avoid needing to shift file data, but this does
not violate the spec and Android's libziparchive accepts it just fine.

Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2025-08-20 21:12:27 -04:00
Andrew Gunnerson 3ed38b8d29 ci.yml: Set RUSTDOCFLAGS to statically link doctests
Prior to Rust 1.89, these tests were just skipped when cross-compiling.
Now, they are actually compiled and ran. Unfortunately, doctests don't
use the normal RUSTFLAGS environment variable, so we also need to set
RUSTDOCFLAGS or else the resulting dynamically linked executable will
fail to run on a non-Android host.

Upstream change: https://github.com/rust-lang/cargo/pull/15462

Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2025-08-19 20:13:56 -04:00
Ivan 0717981d62 README.ru.md: Update translation
* https://github.com/chenxiaolong/avbroot/commit/f393d7adc42e43b2857a60c3b5fd404b14f042c4
* https://github.com/chenxiaolong/avbroot/commit/2f964bf113512bd7ff33eb3e47116305a262e9fc
* https://github.com/chenxiaolong/avbroot/commit/a2fe6fc9d882d4fd955d03b3a2046c5a41d5840c
* https://github.com/chenxiaolong/avbroot/commit/2683781737230b98172de335a6597363c6d71ff2

Signed-off-by: Ivan <reddxae@proton.me>
2025-08-14 12:20:38 +03:00
Ivan 556f86e4df README.md: Use "device" as a generic reference, clarifying & style improvements
* Use "device" as a generic reference instead of "phone" throughout the project description as more than just phones can support custom AVB functionality.
* Finalize the clarification on signing key generation in the initial setup section introduced by commit https://github.com/chenxiaolong/avbroot/commit/2f964bf113512bd7ff33eb3e47116305a262e9fc.
* The "warning" in the merging snapshots section is marked in bold and uppercase, aligning with the rest of the text, while less important "notes" don't stand out in the same way.

Signed-off-by: Ivan <reddxae@proton.me>
2025-08-14 12:19:38 +03:00
Andrew Gunnerson c019ccad1c Version 3.20.0
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
v3.20.0
2025-08-10 22:35:40 -04:00
Andrew Gunnerson 192e737dd3 CHANGELOG.md: Add entry for PR #487
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2025-08-10 22:24:42 -04:00
Andrew Gunnerson 339267149f Update dependencies and fix clippy lints
if-let chains!

Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2025-08-10 22:21:24 -04:00
Andrew Gunnerson 21c2536759 CHANGELOG.md: Add entry for PR #486
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2025-08-10 22:10:31 -04:00
Andrew Gunnerson 185f02c209 cli/avb: verify-device: Use bootloader's reported key digest by default
This removes the need for the user to explicitly specify a public key to
verify against.

Issue: #482

Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2025-08-10 22:03:09 -04:00