summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorSteve Kondik <steve@cyngn.com>2015-12-07 16:28:39 -0800
committerSteve Kondik <steve@cyngn.com>2015-12-07 16:28:39 -0800
commitf24fab8e2916f68416d4775422f8d082129cb823 (patch)
tree0357f6e2f82d507961b7652735b44890bdafda4d /tools
parent059dafe9677726add62cf3d4f998246558b84e10 (diff)
parent610455ddd4d110f7c5be75beb24bc7a0809028a6 (diff)
downloadbuild-f24fab8e2916f68416d4775422f8d082129cb823.zip
build-f24fab8e2916f68416d4775422f8d082129cb823.tar.gz
build-f24fab8e2916f68416d4775422f8d082129cb823.tar.bz2
Merge tag 'android-6.0.1_r3' of https://android.googlesource.com/platform/build into cm-13.0
Android 6.0.1 release 3 Change-Id: Ifd951be596daad53785b191ddce316a6a4a96e03
Diffstat (limited to 'tools')
-rw-r--r--tools/droiddoc/templates-sdk/sdkpage.cs4
-rwxr-xr-xtools/releasetools/add_img_to_target_files.py19
-rwxr-xr-xtools/releasetools/build_image.py1
-rw-r--r--tools/releasetools/common.py10
-rwxr-xr-xtools/releasetools/ota_from_target_files.py4
5 files changed, 33 insertions, 5 deletions
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
<tr>
<!-- blank TD from Windows rowspan -->
<td>
- <a onclick="return onDownload(this,false,true)"
+ <a onclick="return onDownload(this,false,true)" id="win-bundle-notools"
href="https://dl.google.com/dl/android/studio/install/<?cs var:studio.version ?>/<?cs var:studio.win_notools_exe_download ?>"
><?cs var:studio.win_notools_exe_download ?></a><br>(No SDK tools included)
</td>
@@ -364,7 +364,7 @@ var:sdk.linux_download
<tr>
<!-- blank TD from Windows rowspan -->
<td>
- <a onclick="return onDownload(this,false,true)"
+ <a onclick="return onDownload(this,false,true)" id="win-bundle-zip"
href="https://dl.google.com/dl/android/studio/ide-zips/<?cs var:studio.version ?>/<?cs var:studio.win_bundle_download ?>"
><?cs var:studio.win_bundle_download ?></a>
</td>
diff --git a/tools/releasetools/add_img_to_target_files.py b/tools/releasetools/add_img_to_target_files.py
index dc8307c..b7ec726 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.
@@ -257,6 +270,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 91fe54b..b83379c 100755
--- a/tools/releasetools/build_image.py
+++ b/tools/releasetools/build_image.py
@@ -403,6 +403,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:
diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py
index 3ea0acb..47cf759 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
@@ -1237,7 +1239,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:
@@ -1438,6 +1444,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 40c6846..3e72ede 100755
--- a/tools/releasetools/ota_from_target_files.py
+++ b/tools/releasetools/ota_from_target_files.py
@@ -826,7 +826,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
@@ -1231,7 +1231,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)