From 3d593455272b2be8c3e7d62c40fd003a015cbad3 Mon Sep 17 00:00:00 2001 From: "smain@google.com" Date: Fri, 9 Oct 2015 16:30:05 -0700 Subject: add unique ID to each windows download link. These IDs are necessary for the TOS wall to identify which link should be applied to the download button. Change-Id: I1b5b8b516a5b8d7fd8433c02011cb4fb2044b71f --- tools/droiddoc/templates-sdk/sdkpage.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools') diff --git a/tools/droiddoc/templates-sdk/sdkpage.cs b/tools/droiddoc/templates-sdk/sdkpage.cs index 3a3a9a3..47c2992 100644 --- a/tools/droiddoc/templates-sdk/sdkpage.cs +++ b/tools/droiddoc/templates-sdk/sdkpage.cs @@ -353,7 +353,7 @@ var:sdk.linux_download -
(No SDK tools included) @@ -364,7 +364,7 @@ var:sdk.linux_download - -- cgit v1.1 From 338da607e89bcb67394e0580fe02bb1ae0c69b8b Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Wed, 30 Sep 2015 16:01:14 -0700 Subject: DO NOT MERGE: Only use a fixed timestamp when packaging. This CL changes to use a fixed timestamp only when packaging into the target_files zip. Bug: 24377993 Change-Id: I01d136f4b99e1eff80c559192d93db83a3c5c0a4 (cherry picked from commit 822f5840c0f498e33829a0a00f383d9be3a7e913) --- tools/releasetools/add_img_to_target_files.py | 19 +++++++++++++++++++ tools/releasetools/build_image.py | 1 + 2 files changed, 20 insertions(+) (limited to 'tools') diff --git a/tools/releasetools/add_img_to_target_files.py b/tools/releasetools/add_img_to_target_files.py index f7332b2..f2bf1e1 100755 --- a/tools/releasetools/add_img_to_target_files.py +++ b/tools/releasetools/add_img_to_target_files.py @@ -28,6 +28,7 @@ if sys.hexversion < 0x02070000: print >> sys.stderr, "Python 2.7 or newer is required." sys.exit(1) +import datetime import errno import os import tempfile @@ -122,6 +123,12 @@ def CreateImage(input_dir, info_dict, what, block_list=None): if fstab: image_props["fs_type"] = fstab["/" + what].fs_type + # Use a fixed timestamp (01/01/2009) when packaging the image. + # Bug: 24377993 + epoch = datetime.datetime.fromtimestamp(0) + timestamp = (datetime.datetime(2009, 1, 1) - epoch).total_seconds() + image_props["timestamp"] = int(timestamp) + if what == "system": fs_config_prefix = "" else: @@ -173,6 +180,12 @@ def AddUserdata(output_zip, prefix="IMAGES/"): print "creating userdata.img..." + # Use a fixed timestamp (01/01/2009) when packaging the image. + # Bug: 24377993 + epoch = datetime.datetime.fromtimestamp(0) + timestamp = (datetime.datetime(2009, 1, 1) - epoch).total_seconds() + image_props["timestamp"] = int(timestamp) + # The name of the directory it is making an image out of matters to # mkyaffs2image. So we create a temp dir, and within it we create an # empty dir named "data", and build the image from that. @@ -210,6 +223,12 @@ def AddCache(output_zip, prefix="IMAGES/"): print "creating cache.img..." + # Use a fixed timestamp (01/01/2009) when packaging the image. + # Bug: 24377993 + epoch = datetime.datetime.fromtimestamp(0) + timestamp = (datetime.datetime(2009, 1, 1) - epoch).total_seconds() + image_props["timestamp"] = int(timestamp) + # The name of the directory it is making an image out of matters to # mkyaffs2image. So we create a temp dir, and within it we create an # empty dir named "cache", and build the image from that. diff --git a/tools/releasetools/build_image.py b/tools/releasetools/build_image.py index 4b43c0c..357a666 100755 --- a/tools/releasetools/build_image.py +++ b/tools/releasetools/build_image.py @@ -399,6 +399,7 @@ def ImagePropFromGlobalDict(glob_dict, mount_point): mount_point: such as "system", "data" etc. """ d = {} + if "build.prop" in glob_dict: bp = glob_dict["build.prop"] if "ro.build.date.utc" in bp: -- cgit v1.1 From e09359abc0f8c29fbb16d35ab7375d80fde6f931 Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Tue, 13 Oct 2015 16:37:12 -0700 Subject: DO NOT MERGE Pass source's info_dict to vendor's releasetools.py. When building incremental packages, the info_dict from the source build should be the one in use. We have done that for most of the partitions (system and etc.), and should pass that to vendor's script as well. Also includes the CL in commit aac4ad56b6c60e271d807604b20f72084c58b426 that fixes a bug in commit 6f0b219ac551710c724e3f344023943178cdc217. Bug: 24898607 Change-Id: I4ea6037dad7061e1683661fc4c394fa3a7a7c5cd (cherry picked from commit 6f0b219ac551710c724e3f344023943178cdc217) --- tools/releasetools/common.py | 10 +++++++++- tools/releasetools/ota_from_target_files.py | 4 ++-- 2 files changed, 11 insertions(+), 3 deletions(-) (limited to 'tools') diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py index 99b319d..27b8f27 100644 --- a/tools/releasetools/common.py +++ b/tools/releasetools/common.py @@ -59,6 +59,8 @@ class Options(object): self.device_specific = None self.extras = {} self.info_dict = None + self.source_info_dict = None + self.target_info_dict = None self.worker_threads = None @@ -1193,7 +1195,11 @@ class BlockDifference(object): self.path = os.path.join(tmpdir, partition) b.Compute(self.path) - _, self.device = GetTypeAndDevice("/" + partition, OPTIONS.info_dict) + if src is None: + _, self.device = GetTypeAndDevice("/" + partition, OPTIONS.info_dict) + else: + _, self.device = GetTypeAndDevice("/" + partition, + OPTIONS.source_info_dict) def WriteScript(self, script, output_zip, progress=None): if not self.src: @@ -1391,6 +1397,8 @@ def MakeRecoveryPatch(input_dir, output_sink, recovery_img, boot_img, output_sink("recovery-from-boot.p", patch) try: + # The following GetTypeAndDevice()s need to use the path in the target + # info_dict instead of source_info_dict. boot_type, boot_device = GetTypeAndDevice("/boot", info_dict) recovery_type, recovery_device = GetTypeAndDevice("/recovery", info_dict) except KeyError: diff --git a/tools/releasetools/ota_from_target_files.py b/tools/releasetools/ota_from_target_files.py index b148fc1..c6fd47e 100755 --- a/tools/releasetools/ota_from_target_files.py +++ b/tools/releasetools/ota_from_target_files.py @@ -753,7 +753,7 @@ def WriteBlockIncrementalOTAPackage(target_zip, source_zip, output_zip): output_zip=output_zip, script=script, metadata=metadata, - info_dict=OPTIONS.info_dict) + info_dict=OPTIONS.source_info_dict) # TODO: Currently this works differently from WriteIncrementalOTAPackage(). # This function doesn't consider thumbprints when writing @@ -1153,7 +1153,7 @@ def WriteIncrementalOTAPackage(target_zip, source_zip, output_zip): output_zip=output_zip, script=script, metadata=metadata, - info_dict=OPTIONS.info_dict) + info_dict=OPTIONS.source_info_dict) system_diff = FileDifference("system", source_zip, target_zip, output_zip) script.Mount("/system", recovery_mount_options) -- cgit v1.1