517 Commits

Author SHA1 Message Date
Andrew Gunnerson f479fe1a08 Version 3.2.0
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
v3.2.0
2024-05-18 21:19:04 -04:00
Andrew Gunnerson df7b76bc59 CHANGELOG.md: Add entry for PR #289
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2024-05-18 21:13:27 -04:00
Andrew Gunnerson e342b93902 cli/ota: Build list of boot patchers directly in patch_subcommand()
This way, all of the patchers are constructed in the same place and we
don't have to pass their parameters through multiple functions.

Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2024-05-18 21:11:11 -04:00
Andrew Gunnerson d7439e15ae Add support for adding AVB public key to DSU trusted keys
This allows the user to boot GSIs signed by the same key. The option is
disabled by default because some Android builds disable DSU support by
removing all keys to reduce the attack surface. We don't want to
reenable DSU support on these builds unless the user asks for it.

Closes: #286

Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2024-05-18 21:07:16 -04:00
Andrew Gunnerson 0f16f30dfb CHANGELOG.md: Add entry for PR #288
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2024-05-18 17:47:26 -04:00
Andrew Gunnerson 178c025eca Fix clippy 1.78.0 lints
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2024-05-18 17:44:01 -04:00
Andrew Gunnerson d6ac94c430 Update all dependencies
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2024-05-18 17:25:26 -04:00
Andrew Gunnerson 2de260a66c CHANGELOG.md: Add entry for PR #287
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2024-05-18 17:06:49 -04:00
Andrew Gunnerson e9ba770a15 Switch to my fork of the bzip2-rs library
This includes a fix for yet another infinite-loop-on-drop bug in the
bzip2::write::BzDecoder implementation. This could be easily triggered
when interrupting an avbroot command while it is extracting a bzip2
compressed payload.bin chunk.

Fixes: #285

Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2024-05-18 16:46:58 -04:00
Andrew Gunnerson 3940b31acb Version 3.1.3
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
v3.1.3
2024-05-02 19:19:43 -04:00
Andrew Gunnerson e87ee7c4ad CHANGELOG.md: Add entry for PR #279
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2024-05-02 19:19:21 -04:00
Andrew Gunnerson 0f8e30da37 Merge pull request #279 from chenxiaolong/mac-universal
ci.yml: Build universal binary for macOS
2024-05-02 19:17:31 -04:00
Andrew Gunnerson ae0863e319 ci.yml: Build universal binary for macOS
Fixes: #278

Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2024-05-02 19:10:16 -04:00
Andrew Gunnerson 46662796a0 Version 3.1.2
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
v3.1.2
2024-04-27 17:47:09 -04:00
Andrew Gunnerson 237d4e9b11 CHANGELOG.md: Add entry for PR #277
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2024-04-27 17:46:37 -04:00
Andrew Gunnerson 5adff50b01 cli/ota: Fix incorrectly quoted output and clippy warning
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2024-04-27 14:31:53 -04:00
Andrew Gunnerson 905eb9245c CHANGELOG.md: Add entry for PR #276
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2024-04-27 14:30:49 -04:00
Andrew Gunnerson e22f9f5676 tests: Remove all binary test data files
In light of the recently discovered backdoor in the xz project where a
part of the malicious code was distributed in the test files, let's
remove all of our test files and generate them at runtime. While our
test files are very simple and consist mostly of zeros, someone who is
not very familiar with these binary formats would have a harder time
examining them and making sure they aren't malicious. With this change,
the data structures are now plainly visible in the test code.

The files generated at runtime are byte-for-byte identical to the test
files being removed. One can verify by comparing the sha512 checksums of
the files with the sha512 checksums hardcoded in the new test code.

Closes: #265

Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2024-04-27 14:15:08 -04:00
Andrew Gunnerson 17162df1e7 Merge #273: README: Add Russian localization 2024-04-23 21:52:56 -04:00
Ivan Katrovsky b4ea4dfc9c Fix typo 2024-04-24 02:57:08 +03:00
Ivan Katrovsky 5572493acf Added Russian localization
The main page of the repository is now available in Russian.
2024-04-23 18:24:08 +03:00
Andrew Gunnerson 9d38748221 CHANGELOG.md: Add entry for PR #253
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2024-04-14 22:07:18 -04:00
Andrew Gunnerson fd0408dffe Use fastboot flashall to flash partitions initially
`fastboot flashall` is identical to the `fastboot update` command used
by the Pixel factory images, except it reads from a directory instead of
a zip file. It knows how to flip between the fastboot and fastbootd
modes without user intervention.

Fixes: #252

Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2024-04-14 21:59:30 -04:00
Andrew Gunnerson af0fb1d9b4 Update Github Actions dependencies
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2024-04-14 18:21:54 -04:00
Andrew Gunnerson 8c965552e8 Merge pull request #269 from schnatterer/feature/extend-docs
README: Add minor clarifications
2024-04-07 17:36:11 -04:00
Johannes Schnatterer 2532476583 README: Add minor clarifications 2024-04-07 21:32:42 +02:00
Andrew Gunnerson cf77999d95 README.md: Fix grammar
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2024-03-12 18:12:02 -04:00
Andrew Gunnerson 0ade50f49e README.md: Remove mention of my_engineering image
Patching the image was never implemented because it's specific to
OnePlus devices where the bootloader does not respect the custom root of
trust.

Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2024-03-12 17:54:39 -04:00
Andrew Gunnerson 0bad6f8c6f Version 3.1.1
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
v3.1.1
2024-03-05 21:59:41 -05:00
Andrew Gunnerson 4ce4863237 CHANGELOG.md: Add entry for PR #261
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2024-03-05 21:59:07 -05:00
Andrew Gunnerson f615bf48cc crypto: reformat_pem: Strip out irrelevant lines
x509_cert is unable to parse files that contains non-empty lines outside
of the BEGIN CERTIFICATE and END CERTIFICATE markers.

Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2024-03-05 21:42:02 -05:00
Andrew Gunnerson b505b14574 CHANGELOG.md: Add entry for PR #257
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2024-02-03 20:38:39 -05:00
Andrew Gunnerson e2adff6eed hashtree: Precompute salted SHA-256 context
With the dm-verity hash tree format, each digest is salted, meaning it
first hashes the salt byte string and then the actual data. Previously,
the salt was being rehashed for each digest operation. Instead, the
salted SHA-256 context can be computed once and then cloned when needed.

The performance improvement is pretty minor, but it's worth doing anyway
since it's not any more complex.

Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2024-02-03 20:20:15 -05:00
Andrew Gunnerson 10370692d0 Version 3.1.0
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
v3.1.0
2024-02-03 18:51:51 -05:00
Andrew Gunnerson 73b6e9b177 CHANGELOG.md: Add entry for PR #256
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2024-02-03 18:51:15 -05:00
Andrew Gunnerson 8d25e28ea3 Fix clippy warnings and formatting
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2024-02-03 18:36:20 -05:00
Andrew Gunnerson 82fc1336f7 Update all dependencies
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2024-02-03 18:32:59 -05:00
Andrew Gunnerson 953c0c1c5b CHANGELOG.md: Add entry for PR #251
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2024-02-03 18:23:35 -05:00
Andrew Gunnerson c3b073cece Add tracing support
Instead of println'ing everything, this commit switches the code base to
using the tracing library. There are now proper log levels and multiple
logging output formats. A bunch of new debug and trace-level messages
have also been added to help with future troubleshooting.

By default, the output is kept nice and short. Spans won't be shown
unless the log level is set to debug or lower.

Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2024-02-03 18:16:57 -05:00
Andrew Gunnerson 565efc5ee5 CHANGELOG.md: Add entry for PR #255
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2024-02-03 14:58:39 -05:00
Andrew Gunnerson 6ef8e548a3 Add support for Magisk v27.0
Upstream Magisk now xz-compresses files in modifies in the ramdisk. This
commit also implements the same in avbroot's MagiskRootPatcher.

Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2024-02-03 14:35:57 -05:00
Andrew Gunnerson 80549346ea README.md: Temporarily suggest manual procedure for initially flashing system.img
We'll switch to using `fastboot flashall` in the future once that has
been implemented and tested.

Fixes: #252

Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2024-01-31 17:39:13 -05:00
Andrew Gunnerson 275b18b2a5 CHANGELOG.md: Add entry for PR #247
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2023-12-31 16:29:40 -05:00
Andrew Gunnerson 0a68966594 Switch from xz2 to liblzma
liblzma is a maintained fork of xz2. We can now get rid of our own fork
of xz2.

Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2023-12-31 16:20:30 -05:00
Andrew Gunnerson 9ef5629556 CHANGELOG.md: Add entry for PR #246
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2023-12-30 19:25:49 -05:00
Andrew Gunnerson 1db09eb896 Merge pull request #246 from chenxiaolong/remove_modules
Remove oemunlockonboot module
2023-12-30 19:24:06 -05:00
Andrew Gunnerson a134d7f889 Remove oemunlockonboot module
The module has been split out into another repo [1] so that it can be
versioned separately. It now also supports Magisk's automatic update
mechanism.

Closes: #235

[1] https://github.com/chenxiaolong/OEMUnlockOnBoot

Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2023-12-30 19:16:05 -05:00
Andrew Gunnerson 833ca931e8 Version 3.0.0
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
v3.0.0
2023-12-29 20:57:22 -05:00
Andrew Gunnerson 9b6677d28a CHANGELOG.md: Remove entry for PR #220
It was obsoleted by #226.

Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2023-12-29 20:55:06 -05:00
Andrew Gunnerson 12e59fcf53 CHANGELOG.md: Add entry for PR #245
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2023-12-29 20:52:30 -05:00