aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2017-10-03 14:17:57 -0700
committerRyan Longair <rlongair@google.com>2018-01-17 16:52:02 -0800
commit4e0cccc882170810a55b2d34c3e9a59b1a11c9d4 (patch)
treeec5249cb6e340e42905090895d678a3ba650331c
parentfe609f03f515590ba5e28dd861acc7cf52b02ccc (diff)
downloadbuild-nougat-mr2-security-release.tar.gz
Specify --max_timestamp when calling brillo_update_payload.android-7.1.2_r39android-7.1.2_r38android-7.1.2_r37nougat-mr2-security-release
Bug: 36232423 Test: Create OTA packages (full, incremental and downgrade) with ota_from_target_files.py; check the parameters passed down to brillo_update_payload. Change-Id: I3af397f05fe16f4a9f0eb73e8272bac6afdc002a Merged-In: I3af397f05fe16f4a9f0eb73e8272bac6afdc002a (cherry picked from commit ed08bc4a2267c038ce4834fc65a6693a7e0223af) (cherry picked from commit d21de1b1c3494e121149be0d1e155d0ef4bc08a5)
-rwxr-xr-xtools/releasetools/ota_from_target_files.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/releasetools/ota_from_target_files.py b/tools/releasetools/ota_from_target_files.py
index d409d94f99..6aa14d2849 100755
--- a/tools/releasetools/ota_from_target_files.py
+++ b/tools/releasetools/ota_from_target_files.py
@@ -1284,6 +1284,11 @@ def WriteABOTAPackageWithBrilloScript(target_file, output_file,
"--target_image", target_file]
if source_file is not None:
cmd.extend(["--source_image", source_file])
+ if OPTIONS.downgrade:
+ max_timestamp = GetBuildProp("ro.build.date.utc", OPTIONS.source_info_dict)
+ else:
+ max_timestamp = metadata["post-timestamp"]
+ cmd.extend(["--max_timestamp", max_timestamp])
p1 = common.Run(cmd, stdout=subprocess.PIPE)
p1.wait()
assert p1.returncode == 0, "brillo_update_payload generate failed"