Make build_image output consistent for partitions w/o build.prop
Bug: 331405669 Change-Id: I01a673e7c842a5042d85f079e29c680c4d7b589c
This commit is contained in:
parent
eb59dd9cbd
commit
4dc089971b
1 changed files with 7 additions and 0 deletions
|
@ -955,6 +955,13 @@ def LoadInfoDict(input_file, repacking=False):
|
|||
d["build.prop"] = d["system.build.prop"]
|
||||
|
||||
if d.get("avb_enable") == "true":
|
||||
build_info = BuildInfo(d, use_legacy_id=True)
|
||||
# Set up the salt for partitions without build.prop
|
||||
if build_info.fingerprint:
|
||||
if "fingerprint" not in d:
|
||||
d["fingerprint"] = build_info.fingerprint
|
||||
if "avb_salt" not in d:
|
||||
d["avb_salt"] = sha256(build_info.fingerprint.encode()).hexdigest()
|
||||
# Set the vbmeta digest if exists
|
||||
try:
|
||||
d["vbmeta_digest"] = read_helper("META/vbmeta_digest.txt").rstrip()
|
||||
|
|
Loading…
Reference in a new issue