Loading core/Makefile +1 −0 Original line number Diff line number Diff line Loading @@ -2200,6 +2200,7 @@ $(INTERNAL_OTA_PACKAGE_TARGET): $(BUILT_TARGET_FILES_PACKAGE) \ $(hide) PATH=$(foreach p,$(INTERNAL_USERIMAGES_BINARY_PATHS),$(p):)$$PATH MKBOOTIMG=$(MKBOOTIMG) \ ./build/tools/releasetools/ota_from_target_files -v \ --block \ --extracted_input_target_files $(patsubst %.zip,%,$(BUILT_TARGET_FILES_PACKAGE)) \ -p $(HOST_OUT) \ -k $(KEY_CERT_PAIR) \ $(if $(OEM_OTA_CONFIG), -o $(OEM_OTA_CONFIG)) \ Loading tools/releasetools/ota_from_target_files.py +20 −8 Original line number Diff line number Diff line Loading @@ -1235,6 +1235,8 @@ def main(argv): OPTIONS.payload_signer = a elif o == "--payload_signer_args": OPTIONS.payload_signer_args = shlex.split(a) elif o == "--extracted_input_target_files": OPTIONS.extracted_input = a else: return False return True Loading Loading @@ -1265,6 +1267,7 @@ def main(argv): "log_diff=", "payload_signer=", "payload_signer_args=", "extracted_input_target_files=", ], extra_option_handler=option_handler) if len(args) != 2: Loading @@ -1287,6 +1290,9 @@ def main(argv): # Load the dict file from the zip directly to have a peek at the OTA type. # For packages using A/B update, unzipping is not needed. if OPTIONS.extracted_input is not None: OPTIONS.info_dict = common.LoadInfoDict(OPTIONS.extracted_input, OPTIONS.extracted_input) else: input_zip = zipfile.ZipFile(args[0], "r") OPTIONS.info_dict = common.LoadInfoDict(input_zip) common.ZipClose(input_zip) Loading Loading @@ -1319,6 +1325,12 @@ def main(argv): if OPTIONS.extra_script is not None: OPTIONS.extra_script = open(OPTIONS.extra_script).read() if OPTIONS.extracted_input is not None: OPTIONS.input_tmp = OPTIONS.extracted_input OPTIONS.target_tmp = OPTIONS.input_tmp OPTIONS.info_dict = common.LoadInfoDict(OPTIONS.input_tmp, OPTIONS.input_tmp) input_zip = zipfile.ZipFile(args[0], "r") else: print("unzipping target target-files...") OPTIONS.input_tmp, input_zip = common.UnzipTemp( args[0], UNZIP_PATTERN) Loading Loading
core/Makefile +1 −0 Original line number Diff line number Diff line Loading @@ -2200,6 +2200,7 @@ $(INTERNAL_OTA_PACKAGE_TARGET): $(BUILT_TARGET_FILES_PACKAGE) \ $(hide) PATH=$(foreach p,$(INTERNAL_USERIMAGES_BINARY_PATHS),$(p):)$$PATH MKBOOTIMG=$(MKBOOTIMG) \ ./build/tools/releasetools/ota_from_target_files -v \ --block \ --extracted_input_target_files $(patsubst %.zip,%,$(BUILT_TARGET_FILES_PACKAGE)) \ -p $(HOST_OUT) \ -k $(KEY_CERT_PAIR) \ $(if $(OEM_OTA_CONFIG), -o $(OEM_OTA_CONFIG)) \ Loading
tools/releasetools/ota_from_target_files.py +20 −8 Original line number Diff line number Diff line Loading @@ -1235,6 +1235,8 @@ def main(argv): OPTIONS.payload_signer = a elif o == "--payload_signer_args": OPTIONS.payload_signer_args = shlex.split(a) elif o == "--extracted_input_target_files": OPTIONS.extracted_input = a else: return False return True Loading Loading @@ -1265,6 +1267,7 @@ def main(argv): "log_diff=", "payload_signer=", "payload_signer_args=", "extracted_input_target_files=", ], extra_option_handler=option_handler) if len(args) != 2: Loading @@ -1287,6 +1290,9 @@ def main(argv): # Load the dict file from the zip directly to have a peek at the OTA type. # For packages using A/B update, unzipping is not needed. if OPTIONS.extracted_input is not None: OPTIONS.info_dict = common.LoadInfoDict(OPTIONS.extracted_input, OPTIONS.extracted_input) else: input_zip = zipfile.ZipFile(args[0], "r") OPTIONS.info_dict = common.LoadInfoDict(input_zip) common.ZipClose(input_zip) Loading Loading @@ -1319,6 +1325,12 @@ def main(argv): if OPTIONS.extra_script is not None: OPTIONS.extra_script = open(OPTIONS.extra_script).read() if OPTIONS.extracted_input is not None: OPTIONS.input_tmp = OPTIONS.extracted_input OPTIONS.target_tmp = OPTIONS.input_tmp OPTIONS.info_dict = common.LoadInfoDict(OPTIONS.input_tmp, OPTIONS.input_tmp) input_zip = zipfile.ZipFile(args[0], "r") else: print("unzipping target target-files...") OPTIONS.input_tmp, input_zip = common.UnzipTemp( args[0], UNZIP_PATTERN) Loading