* Apply OTA certificate patch to the boot image if no `vendor_boot`
image exists.
* Only manually decompress ramdisk cpio archives if the boot image
header version is 4. `magiskboot` automatically decompresses older
header versions.
Fixes: #5
Signed-off-by: Andrew Gunnerson <chillermillerlong@hotmail.com>
openssl 1.1 does not support autodetecting whether the input file is PEM
or DER encoded.
Issue: #2
Signed-off-by: Andrew Gunnerson <chillermillerlong@hotmail.com>
The Pixel 7 series' init_boot image is signed with a SHA256_RSA2048
signature and avbroot can't use that algorithm because it expects RSA
4096 keys.
Signed-off-by: Andrew Gunnerson <chillermillerlong@hotmail.com>
Devices launching with Android 13, like the Pixel 7 series, put the
ramdisk containing first stage init in the init_boot partition instead
of the boot partition.
Signed-off-by: Andrew Gunnerson <chillermillerlong@hotmail.com>
This is more secure and reliable compared to forcibly enabling fastbootd
in recovery. All of the normal AVB and OTA update flows are preserved,
except with the user's custom keys.
Signed-off-by: Andrew Gunnerson <chillermillerlong@hotmail.com>