Add build.version.incremental to metadata
Add the build property "build.version.incremental" of the source (if present) and target files to the metadata of the ota update package. Example of metadata: .... post-build-incremental=2951741 post-timestamp=1465345123 pre-build-incremental=2943039 pre-device=bullhead ... Bug: 28658632 Change-Id: I889e8ccf39633b1b35590751001a42d1b05d5514
This commit is contained in:
parent
ddc0c5e0a0
commit
d06f07eef4
|
@ -834,6 +834,10 @@ def WriteBlockIncrementalOTAPackage(target_zip, source_zip, output_zip):
|
|||
OPTIONS.target_info_dict)
|
||||
metadata["pre-build"] = source_fp
|
||||
metadata["post-build"] = target_fp
|
||||
metadata["pre-build-incremental"] = GetBuildProp(
|
||||
"ro.build.version.incremental", OPTIONS.source_info_dict)
|
||||
metadata["post-build-incremental"] = GetBuildProp(
|
||||
"ro.build.version.incremental", OPTIONS.target_info_dict)
|
||||
|
||||
source_boot = common.GetBootableImage(
|
||||
"/tmp/boot.img", "boot.img", OPTIONS.source_tmp, "BOOT",
|
||||
|
@ -1178,6 +1182,8 @@ def WriteABOTAPackageWithBrilloScript(target_file, output_file,
|
|||
metadata = {
|
||||
"post-build": CalculateFingerprint(oem_props, oem_dict,
|
||||
OPTIONS.info_dict),
|
||||
"post-build-incremental" : GetBuildProp("ro.build.version.incremental",
|
||||
OPTIONS.info_dict),
|
||||
"pre-device": GetOemProperty("ro.product.device", oem_props, oem_dict,
|
||||
OPTIONS.info_dict),
|
||||
"post-timestamp": GetBuildProp("ro.build.date.utc", OPTIONS.info_dict),
|
||||
|
@ -1188,6 +1194,8 @@ def WriteABOTAPackageWithBrilloScript(target_file, output_file,
|
|||
if source_file is not None:
|
||||
metadata["pre-build"] = CalculateFingerprint(oem_props, oem_dict,
|
||||
OPTIONS.source_info_dict)
|
||||
metadata["pre-build-incremental"] = GetBuildProp(
|
||||
"ro.build.version.incremental", OPTIONS.source_info_dict)
|
||||
|
||||
# 1. Generate payload.
|
||||
payload_file = common.MakeTempFile(prefix="payload-", suffix=".bin")
|
||||
|
@ -1493,6 +1501,10 @@ def WriteIncrementalOTAPackage(target_zip, source_zip, output_zip):
|
|||
|
||||
metadata["pre-build"] = source_fp
|
||||
metadata["post-build"] = target_fp
|
||||
metadata["pre-build-incremental"] = GetBuildProp(
|
||||
"ro.build.version.incremental", OPTIONS.source_info_dict)
|
||||
metadata["post-build-incremental"] = GetBuildProp(
|
||||
"ro.build.version.incremental", OPTIONS.target_info_dict)
|
||||
|
||||
source_boot = common.GetBootableImage(
|
||||
"/tmp/boot.img", "boot.img", OPTIONS.source_tmp, "BOOT",
|
||||
|
|
Loading…
Reference in New Issue