Add ApkVerityBuilder to contruct the verity tree
Test: Locally add some code in PackageManagerService to generate the
verity tree. Root hash and the tree is consistent with the output
of apksig.
Test: With local mod, with apk size of 400/100/20/5 MB, verification
time is about the same for the existing algorithm before and after
the refactoring.
Test: With local mod, with a 400 MB apk, verification time of the new
algorithm is slower (2s) than the 1MB-based algorithm (600ms).
Bug: 30972906
Change-Id: Ie429cf9b80884e56a8e0882e1c125c8a3f8feab4
8 files changed