Prevent AVB signing from using _RESERVED_SIZE
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
Loading
Please register or sign in to comment