We don't need verity_root_hash or verity_salt to be in the prop dict.
Test: `m dist` with aosp_marlin-userdebug
Test: python -m unittest test_verity_utils
Change-Id: I5a9c50f4741dfb1083b3f590136335b6bc0e5216
Generate the transfer command "compute_hash_tree" for incremental
updates of the non-A/B devices that enable verified boot 1.0
Other changes include:
i. factor out verity_utils to use both in build_image and blockimgdiff
ii. add a new flag 'hashtree_info_generator' in sparse_image to generate
the hashtree information.
Bug: 25170618
Test: generate a package for aosp_angler; and run simulator
Change-Id: I4d4d7a3e41dc3da810d2cbf8988e85d187c9ab0e
The image building functions in build_image.py have been returning
(success, result) or special values to indicate the validity of the
result. The same logic can be better expressed by raising exceptions
instead, because
a) using a special value relies on caller to check for that magic
value;
b) exceptions can carry additional messages other than a boolean does,
e.g. the output from the failing command;
c) caller can have cleaner code flow without explicitly checking for
the validity of the result.
This CL changes such functions to raise on errors. The majority of these
functions are internal to build_image.py only, except for BuildImage()
that has a few callers in add_img_to_target_files.py (which all die upon
error anyway).
Test: `m dist`
Test: python -m unittest test_build_image
Test: python -m unittest test_add_img_to_target_files
Test: python -m unittest test_validate_target_files
Test: Inject an error to the depended binaries (e.g. avbtool), and check
that build_image.py exits with error messages.
Change-Id: Ibe4d51e267756bb1a00fa9238a213f9d55fd9b58
(zsh)$ source build/envsetup.sh; lunch 23
will result in selecting #22 because array in zsh starts from 1
instead of 0. This CL is to fix this issue.
Bug: b/117202855
Test: below commands should have the same output:
(zsh)$ source build/envsetup.sh; lunch 23
(zsh)$ source build/envsetup.sh; lunch aosp_walleye-userdebug
Change-Id: I0570585417878bc7c73eda0e1a416232fe147fb4
When AVB is enabled with PRODUCT_USE_DYNAMIC_PARTITION_SIZE, AVB
metadata (e.g., hash tree, fec metadata) will consume _RESERVED_SIZE,
resulting in smaller reserved size in file system (e.g., ext4).
Adding additional space for AVB signing and keep the _RESERVED_SIZE only
for file system. This is done by adding a function to binary search an
optimal partition size for a given image size (disk usage + _RESERVED_SIZE).
Bug: 112322265
Test: Build aosp_arm64-userdebug, calculate the running time of
AVBCalcMinPartitionSize() is about 0.3-0.4 seconds.
Test: python -m unittest test_build_image
Change-Id: I8f0051b57701d6fbba6a9db3756dd194066c74b8
- Don't duplicate the same comment over and over
- Stop defining values that are immediately overwritten
Test: make
Change-Id: I87cb2c2b76bb69a026695e145849f4acee197b94
This changes the paths for partitions modules inside the 'asan'
subdirectory to match those used when not making sanitized builds.
This fixes get_non_asan_path macro, which just strips the 'asan' dir
from the lib paths.
For example, on a device without a product partition, previously
libraries would install install in:
- out/target/product/x/asan/product/lib[64]/y.so (with SANITIZE_TARGET)
- out/target/product/x/system/product/lib[64]/y.so (no SANITIZE TARGET)
Stripping the asan dir would look for the lib in out/.../<x>/product/,
which didn't exist. The new path for SANITIZE_TARGET builds is now
out/target/product<x>/asan/system/product/lib[64]/<y>.so
Bug: 117089649
Test: m; SANITIZE_TARGET=address m (for a device without /product)
Change-Id: Id663c5f284e3b4fc65ed8cb8c2da6bcf6542e034
These files are now unused, patchoat shall be removed soon.
Test: m
Test: Pixel 2 XL boots.
Bug: 77856493
Change-Id: I07babe7e6b2657e340265e74042e958a91678329
This reverts commit 13467f5993.
Reason for revert: Dependencies which broke tests due to exclusion from
LOCAL_JNI_SHARED_LIBS have been added.
Change-Id: I4aca69d7bfa12a132b8334deb61ed350b434f5df
mmm has a smaller view of the world and cannot generate sdk-addon
zip files.
Bug: 116818719
Test: m checkbuild
Change-Id: I9e73c0b84a42aaaa353704d6ab245b449166606d
soong_zip produces more reproducible zip files that are not
affected by umask values or timestamps.
This partially reapplies I2eca2f7618e06c0b5893ff54c79261921fe051d6
with fixes for 64-bit only builds and directories that are changing
during zipping.
Bug: 69500920
Test: m checkbuild
Test: m checkbuild platform
Test: lunch hikey64_only && m platform
Test: contents of zips is unchanged
Change-Id: Iac5c43276f7ae700d4d13d0ef27003d09c1c87e0
soong_zip produces more reproducible zip files that are not
affected by umask values or timestamps.
This partially reapplies I2eca2f7618e06c0b5893ff54c79261921fe051d6.
Bug: 69500920
Test: m checkbuild
Test: contents of zips is unchanged
Change-Id: Idf6fbc94e257dc34af4f5b115d740b7cb9bac015
soong_zip was previously ignoring trailing command line arguments,
but now they are an error. boot_profile_jars.zip had all its
files as trailing arguments instead of as -f flags, previously
resulting in an empty zip, but now causing an error. Fix the
arguments to use -f before each file.
Test: m PRODUCT_DIST_BOOT_AND_SYSTEM_JARS=true out/target/product/sailfish/boot_profile_jars.zip
Change-Id: I8ac4aa4fbca812b8aa2ff9526e1ed7c769dd8420
This is more convenient than the current always-off conditional,
because it doesn't require changing the build system to dump
the installed files.
Bug: 80410283
Test: m dump-files
Change-Id: I7d395750673aff07d2018ffce8321dd280b94ccf