Allow parsing boot image with header version 3
The boot image header version no longer contains a page_size field;
and it assumes the block size is always 4096. Also, the order of the
header fields are different in version 3 from the previous versions.
While the position of "header_version" is fixed at position #9 across
all image headers.
This cl handles header version 3 separately from the previous versions.
Also create a stub implementation since the parsing of boot image is only
used in android.
Bug: 152371989
Test: unit tests, generate incremental OTA for the affected package, build with stub file
Change-Id: Iea2145e0c234216f9ee42c571bd53dc93b4b9d2e
diff --git a/Android.bp b/Android.bp
index 21ba507..e3116f5 100644
--- a/Android.bp
+++ b/Android.bp
@@ -492,6 +492,9 @@
"update_metadata-protos_exports",
],
+ header_libs: [
+ "bootimg_headers",
+ ],
static_libs: [
"libavb",
"libbrotli",