Generate partition timestamps in ota_from_target_files
Test: make an OTA package
Bug: 162553432
Change-Id: I17b9f1b24307255b1e5115de12fa516126b32365
diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py
index 56785d6..c77d8c6 100644
--- a/tools/releasetools/common.py
+++ b/tools/releasetools/common.py
@@ -118,7 +118,7 @@
AVB_VBMETA_PARTITIONS = ('vbmeta_system', 'vbmeta_vendor')
# Partitions that should have their care_map added to META/care_map.pb
-PARTITIONS_WITH_CARE_MAP = (
+PARTITIONS_WITH_CARE_MAP = [
'system',
'vendor',
'product',
@@ -126,7 +126,7 @@
'odm',
'vendor_dlkm',
'odm_dlkm',
-)
+]
class ErrorCode(object):
@@ -729,10 +729,14 @@
fingerprint = build_info.GetPartitionFingerprint(partition)
if fingerprint:
d["avb_{}_salt".format(partition)] = sha256(fingerprint.encode()).hexdigest()
-
+ try:
+ d["ab_partitions"] = read_helper("META/ab_partitions.txt").split("\n")
+ except KeyError:
+ logger.warning("Can't find META/ab_partitions.txt")
return d
+
def LoadListFromFile(file_path):
with open(file_path) as f:
return f.read().splitlines()