Support payload larger than 4GiB.
The data_offset and data_length field in protobuf are updated from
uint32 to uint64, thanks to the variable length encoding in protobuf,
this change is backward compatible, this does not change the format
of the payload manifest in any way, new client with this change will
be able to use 64 bits data_offset, while old client will get the
field as if it was casted to uint32_t.
Bug: 119222724
Test: generate and apply a 5GiB payload
Change-Id: Ie5cc8a9b75ef3a9fa4cb1cda4d403ef9fc174cb3
diff --git a/update_metadata.proto b/update_metadata.proto
index 42e7654..b0e8154 100644
--- a/update_metadata.proto
+++ b/update_metadata.proto
@@ -175,11 +175,14 @@
PUFFDIFF = 9; // The data is in puffdiff format.
}
required Type type = 1;
+
+ // Only minor version 6 or newer support 64 bits |data_offset| and
+ // |data_length|, older client will read them as uint32.
// The offset into the delta file (after the protobuf)
// where the data (if any) is stored
- optional uint32 data_offset = 2;
+ optional uint64 data_offset = 2;
// The length of the data in the delta file
- optional uint32 data_length = 3;
+ optional uint64 data_length = 3;
// Ordered list of extents that are read from (if any) and written to.
repeated Extent src_extents = 4;