Loading tools/releasetools/ota_from_target_files +45 −29 Original line number Diff line number Diff line Loading @@ -117,6 +117,7 @@ OPTIONS.no_signing = False OPTIONS.block_based = False OPTIONS.updater_binary = None OPTIONS.oem_source = None OPTIONS.fallback_to_full = True def MostPopularKey(d, default): """Given a dict, return the key corresponding to the largest Loading Loading @@ -1489,6 +1490,8 @@ def main(argv): OPTIONS.block_based = True elif o in ("-b", "--binary"): OPTIONS.updater_binary = a elif o in ("--no_fallback_to_full",): OPTIONS.fallback_to_full = False else: return False return True Loading @@ -1508,6 +1511,7 @@ def main(argv): "block", "binary=", "oem_settings=", "no_fallback_to_full", ], extra_option_handler=option_handler) Loading Loading @@ -1554,7 +1558,10 @@ def main(argv): if OPTIONS.device_specific is not None: OPTIONS.device_specific = os.path.abspath(OPTIONS.device_specific) while True: if OPTIONS.no_signing: if os.path.exists(args[1]): os.unlink(args[1]) output_zip = zipfile.ZipFile(args[1], "w", compression=zipfile.ZIP_DEFLATED) else: temp_zip_file = tempfile.NamedTemporaryFile() Loading @@ -1567,6 +1574,8 @@ def main(argv): OPTIONS.package_key = OPTIONS.info_dict.get( "default_system_dev_certificate", "build/target/product/security/testkey") break else: print "unzipping source target-files..." OPTIONS.source_tmp, source_zip = common.UnzipTemp(OPTIONS.incremental_source) Loading @@ -1582,7 +1591,14 @@ def main(argv): if OPTIONS.verbose: print "--- source info ---" common.DumpInfoDict(OPTIONS.source_info_dict) try: WriteIncrementalOTAPackage(input_zip, source_zip, output_zip) break except ValueError: if not OPTIONS.fallback_to_full: raise print "--- failed to build incremental; falling back to full ---" OPTIONS.incremental_source = None output_zip.close() output_zip.close() Loading Loading
tools/releasetools/ota_from_target_files +45 −29 Original line number Diff line number Diff line Loading @@ -117,6 +117,7 @@ OPTIONS.no_signing = False OPTIONS.block_based = False OPTIONS.updater_binary = None OPTIONS.oem_source = None OPTIONS.fallback_to_full = True def MostPopularKey(d, default): """Given a dict, return the key corresponding to the largest Loading Loading @@ -1489,6 +1490,8 @@ def main(argv): OPTIONS.block_based = True elif o in ("-b", "--binary"): OPTIONS.updater_binary = a elif o in ("--no_fallback_to_full",): OPTIONS.fallback_to_full = False else: return False return True Loading @@ -1508,6 +1511,7 @@ def main(argv): "block", "binary=", "oem_settings=", "no_fallback_to_full", ], extra_option_handler=option_handler) Loading Loading @@ -1554,7 +1558,10 @@ def main(argv): if OPTIONS.device_specific is not None: OPTIONS.device_specific = os.path.abspath(OPTIONS.device_specific) while True: if OPTIONS.no_signing: if os.path.exists(args[1]): os.unlink(args[1]) output_zip = zipfile.ZipFile(args[1], "w", compression=zipfile.ZIP_DEFLATED) else: temp_zip_file = tempfile.NamedTemporaryFile() Loading @@ -1567,6 +1574,8 @@ def main(argv): OPTIONS.package_key = OPTIONS.info_dict.get( "default_system_dev_certificate", "build/target/product/security/testkey") break else: print "unzipping source target-files..." OPTIONS.source_tmp, source_zip = common.UnzipTemp(OPTIONS.incremental_source) Loading @@ -1582,7 +1591,14 @@ def main(argv): if OPTIONS.verbose: print "--- source info ---" common.DumpInfoDict(OPTIONS.source_info_dict) try: WriteIncrementalOTAPackage(input_zip, source_zip, output_zip) break except ValueError: if not OPTIONS.fallback_to_full: raise print "--- failed to build incremental; falling back to full ---" OPTIONS.incremental_source = None output_zip.close() output_zip.close() Loading