aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2017-10-03 14:17:57 -0700
committerandroid-build-team Robot <android-build-team-robot@google.com>2018-01-18 19:07:10 +0000
commit9de91d94e8224314f856d0d3c884142ef5d71f44 (patch)
treec2e9ab367feffef18cc4b6de037c9c5c52857f84
parent9b092aac73121c329f7a9b4d6364ecaae4f73e6a (diff)
downloadbuild-9de91d94e8224314f856d0d3c884142ef5d71f44.tar.gz
Specify --max_timestamp when calling brillo_update_payload.
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 a660c8c47889a0ed58fc0a9122c42707c6e4d6e8)
-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 1b0f68b73b..3baacdc9d5 100755
--- a/tools/releasetools/ota_from_target_files.py
+++ b/tools/releasetools/ota_from_target_files.py
@@ -1077,6 +1077,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=log_file, stderr=subprocess.STDOUT)
p1.communicate()
assert p1.returncode == 0, "brillo_update_payload generate failed"