Calculate verity hash tree.
Calculate verity hash tree in FilesystemVerifierAction based on configs
specified in protobuf, and write it to target partition before reading
from those blocks.
A new error code kVerityCalculationError was added to report error if
it fails.
Bug: 28171891
Test: update_engine_unittests
Change-Id: I492885a0655bf51043902f578720fffd87e6a3cf
diff --git a/update_metadata.proto b/update_metadata.proto
index a0f278b..f90ec3c 100644
--- a/update_metadata.proto
+++ b/update_metadata.proto
@@ -248,6 +248,29 @@
// Whether a failure in the postinstall step for this partition should be
// ignored.
optional bool postinstall_optional = 9;
+
+ // On minor version 6 or newer, these fields are supported:
+
+ // The extent for data covered by verity hash tree.
+ optional Extent hash_tree_data_extent = 10;
+
+ // The extent to store verity hash tree.
+ optional Extent hash_tree_extent = 11;
+
+ // The hash algorithm used in verity hash tree.
+ optional string hash_tree_algorithm = 12;
+
+ // The salt used for verity hash tree.
+ optional bytes hash_tree_salt = 13;
+
+ // The extent for data covered by FEC.
+ optional Extent fec_data_extent = 14;
+
+ // The extent to store FEC.
+ optional Extent fec_extent = 15;
+
+ // The number of FEC roots.
+ optional uint32 fec_roots = 16 [default = 2];
}
message DeltaArchiveManifest {