summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYing Wang <wangying@google.com>2014-01-28 00:00:50 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-01-28 00:00:50 +0000
commita8d15474ebb7b595f842ffb23a36cce9bc382f10 (patch)
tree98b0f513ed9e558467b9aae0551f5bb9fcc1244b
parent4695598df1fa11064a54421f60fee66032c673ee (diff)
parent04cff70804810d27e1fcbef556ebfdc39278d746 (diff)
downloadbuild-a8d15474ebb7b595f842ffb23a36cce9bc382f10.zip
build-a8d15474ebb7b595f842ffb23a36cce9bc382f10.tar.gz
build-a8d15474ebb7b595f842ffb23a36cce9bc382f10.tar.bz2
am 04cff708: resolved conflicts for merge of 7382ec7d to klp-dev-plus-aosp
* commit '04cff70804810d27e1fcbef556ebfdc39278d746': ota_from_target_files: Add an option to not sign OTA packages
-rwxr-xr-xtools/releasetools/ota_from_target_files18
1 files changed, 13 insertions, 5 deletions
diff --git a/tools/releasetools/ota_from_target_files b/tools/releasetools/ota_from_target_files
index a31d70a..8d3f6ce 100755
--- a/tools/releasetools/ota_from_target_files
+++ b/tools/releasetools/ota_from_target_files
@@ -94,6 +94,7 @@ OPTIONS.extra_script = None
OPTIONS.aslr_mode = True
OPTIONS.worker_threads = 3
OPTIONS.two_step = False
+OPTIONS.no_signing = False
def MostPopularKey(d, default):
"""Given a dict, return the key corresponding to the largest
@@ -968,6 +969,8 @@ def main(argv):
OPTIONS.worker_threads = int(a)
elif o in ("-2", "--two_step"):
OPTIONS.two_step = True
+ elif o in ("--no_signing"):
+ OPTIONS.no_signing = True
else:
return False
return True
@@ -983,6 +986,7 @@ def main(argv):
"worker_threads=",
"aslr_mode=",
"two_step",
+ "no_signing",
],
extra_option_handler=option_handler)
@@ -1017,9 +1021,12 @@ def main(argv):
OPTIONS.device_specific = os.path.normpath(OPTIONS.device_specific)
print "using device-specific extensions in", OPTIONS.device_specific
- temp_zip_file = tempfile.NamedTemporaryFile()
- output_zip = zipfile.ZipFile(temp_zip_file, "w",
- compression=zipfile.ZIP_DEFLATED)
+ if OPTIONS.no_signing:
+ output_zip = zipfile.ZipFile(args[1], "w", compression=zipfile.ZIP_DEFLATED)
+ else:
+ temp_zip_file = tempfile.NamedTemporaryFile()
+ output_zip = zipfile.ZipFile(temp_zip_file, "w",
+ compression=zipfile.ZIP_DEFLATED)
if OPTIONS.incremental_source is None:
WriteFullOTAPackage(input_zip, output_zip)
@@ -1043,8 +1050,9 @@ def main(argv):
output_zip.close()
- SignOutput(temp_zip_file.name, args[1])
- temp_zip_file.close()
+ if not OPTIONS.no_signing:
+ SignOutput(temp_zip_file.name, args[1])
+ temp_zip_file.close()
common.Cleanup()