Merge "Copy dexpreopt.config only if it exists"
diff --git a/tools/releasetools/build_super_image.py b/tools/releasetools/build_super_image.py
index fb31415..ac61e60 100755
--- a/tools/releasetools/build_super_image.py
+++ b/tools/releasetools/build_super_image.py
@@ -194,10 +194,8 @@
return BuildSuperImageFromTargetFiles(inp, out)
if os.path.isfile(inp):
- with open(inp) as f:
- lines = f.read()
logger.info("Building super image from info dict...")
- return BuildSuperImageFromDict(common.LoadDictionaryFromLines(lines.split("\n")), out)
+ return BuildSuperImageFromDict(common.LoadDictionaryFromFile(inp), out)
raise ValueError("{} is not a dictionary or a valid path".format(inp))
diff --git a/tools/releasetools/ota_from_target_files.py b/tools/releasetools/ota_from_target_files.py
index 94dbd4e..02b2b4d 100755
--- a/tools/releasetools/ota_from_target_files.py
+++ b/tools/releasetools/ota_from_target_files.py
@@ -1051,6 +1051,15 @@
"META/ab_partitions.txt is required for ab_update."
target_info = common.BuildInfo(OPTIONS.target_info_dict, OPTIONS.oem_dicts)
source_info = common.BuildInfo(OPTIONS.source_info_dict, OPTIONS.oem_dicts)
+ vendor_prop = source_info.info_dict.get("vendor.build.prop")
+ vabc_used = vendor_prop and \
+ vendor_prop.GetProp("ro.virtual_ab.compression.enabled") == "true" and \
+ not OPTIONS.disable_vabc
+ if vabc_used:
+ # TODO(zhangkelvin) Remove this once FEC on VABC is supported
+ logger.info("Virtual AB Compression enabled, disabling FEC")
+ OPTIONS.disable_fec_computation = True
+ OPTIONS.disable_verity_computation = True
else:
assert "ab_partitions" in OPTIONS.info_dict, \
"META/ab_partitions.txt is required for ab_update."
diff --git a/tools/releasetools/sign_target_files_apks.py b/tools/releasetools/sign_target_files_apks.py
index 22c6ac4..313d1e6 100755
--- a/tools/releasetools/sign_target_files_apks.py
+++ b/tools/releasetools/sign_target_files_apks.py
@@ -799,7 +799,7 @@
value = "/".join(pieces)
elif key == "ro.build.description":
pieces = value.split(" ")
- assert len(pieces) == 5
+ assert pieces[-1].endswith("-keys")
pieces[-1] = EditTags(pieces[-1])
value = " ".join(pieces)
elif key.startswith("ro.") and key.endswith(".build.tags"):