Home | History | Annotate | Download | only in releasetools

Lines Matching refs:OPTIONS

21 Usage:  ota_from_target_files [options] input_target_files output_ota_package
23 Common options that apply to both of non-A/B and A/B OTAs
81 Non-A/B OTA specific options
140 A/B OTA specific options
204 OPTIONS = common.OPTIONS
205 OPTIONS.package_key = None
206 OPTIONS.incremental_source = None
207 OPTIONS.verify = False
208 OPTIONS.patch_threshold = 0.95
209 OPTIONS.wipe_user_data = False
210 OPTIONS.downgrade = False
211 OPTIONS.extra_script = None
212 OPTIONS.worker_threads = multiprocessing.cpu_count() // 2
213 if OPTIONS.worker_threads == 0:
214 OPTIONS.worker_threads = 1
215 OPTIONS.two_step = False
216 OPTIONS.include_secondary = False
217 OPTIONS.no_signing = False
218 OPTIONS.block_based = True
219 OPTIONS.updater_binary = None
220 OPTIONS.oem_source = None
221 OPTIONS.oem_no_mount = False
222 OPTIONS.full_radio = False
223 OPTIONS.full_bootloader = False
225 OPTIONS.cache_size = None
226 OPTIONS.stash_threshold = 0.8
227 OPTIONS.log_diff = None
228 OPTIONS.payload_signer = None
229 OPTIONS.payload_signer_args = []
230 OPTIONS.payload_signer_key_size = None
231 OPTIONS.extracted_input = None
232 OPTIONS.key_passwords = []
233 OPTIONS.skip_postinstall = False
234 OPTIONS.retrofit_dynamic_partitions = False
235 OPTIONS.skip_compatibility_check = False
236 OPTIONS.output_metadata_path = None
464 If an external payload signer has been specified (OPTIONS.payload_signer), it
465 calls the signer with the provided args (OPTIONS.payload_signer_args). Note
468 (OPTIONS.package_key) and calls openssl for the signing works.
472 if OPTIONS.payload_signer is None:
474 private_key = OPTIONS.package_key + OPTIONS.private_key_suffix
475 pw = OPTIONS.key_passwords[OPTIONS.package_key]
488 self.signer = OPTIONS.payload_signer
489 self.signer_args = OPTIONS.payload_signer_args
490 if OPTIONS.payload_signer_key_size:
491 self.key_size = int(OPTIONS.payload_signer_key_size)
493 "Unsupported key size {}".format(OPTIONS.payload_signer_key_size)
615 if OPTIONS.wipe_user_data:
649 pw = OPTIONS.key_passwords[OPTIONS.package_key]
651 common.SignFile(temp_zip_name, output_zip_name, OPTIONS.package_key, pw,
684 OPTIONS.input_tmp, "IMAGES", recovery_two_step_img_name)
688 OPTIONS.input_tmp, "RECOVERY")
824 if OPTIONS.skip_compatibility_check:
852 target_info = BuildInfo(OPTIONS.info_dict, OPTIONS.oem_dicts)
860 if target_info.oem_props and not OPTIONS.oem_no_mount:
865 if not OPTIONS.no_signing:
878 input_tmp=OPTIONS.input_tmp,
880 info_dict=OPTIONS.info_dict)
889 target_info.WriteDeviceAssertions(script, OPTIONS.oem_no_mount)
913 OPTIONS.input_tmp, "RECOVERY")
914 if OPTIONS.two_step:
945 if OPTIONS.wipe_user_data:
957 tgt = common.GetUserImage(partition, OPTIONS.input_tmp, input_zip,
982 info_dict=OPTIONS.info_dict,
986 write_verify_script=OPTIONS.verify)
991 write_verify_script=OPTIONS.verify)
996 "boot.img", "boot.img", OPTIONS.input_tmp, "BOOT")
1006 if OPTIONS.extra_script is not None:
1007 script.AppendExtra(OPTIONS.extra_script)
1011 if OPTIONS.wipe_user_data:
1015 if OPTIONS.two_step:
1033 script.AddToZip(input_zip, output_zip, input_path=OPTIONS.updater_binary)
1066 assert OPTIONS.incremental_source is not None
1072 if OPTIONS.downgrade:
1091 downgrade / data wipe based on the global options.
1120 if OPTIONS.wipe_user_data:
1123 if OPTIONS.retrofit_dynamic_partitions:
1460 if OPTIONS.no_signing:
1498 if OPTIONS.no_signing:
1509 output_metadata_path = OPTIONS.output_metadata_path
1515 target_info = BuildInfo(OPTIONS.target_info_dict, OPTIONS.oem_dicts)
1516 source_info = BuildInfo(OPTIONS.source_info_dict, OPTIONS.oem_dicts)
1528 if not OPTIONS.oem_no_mount:
1533 if not OPTIONS.no_signing:
1544 source_tmp=OPTIONS.source_tmp,
1547 target_tmp=OPTIONS.target_tmp,
1554 "/tmp/boot.img", "boot.img", OPTIONS.source_tmp, "BOOT", source_info)
1556 "/tmp/boot.img", "boot.img", OPTIONS.target_tmp, "BOOT", target_info)
1557 updating_boot = (not OPTIONS.two_step and
1561 "/tmp/recovery.img", "recovery.img", OPTIONS.target_tmp, "RECOVERY")
1566 system_src = common.GetUserImage("system", OPTIONS.source_tmp, source_zip,
1572 system_tgt = common.GetUserImage("system", OPTIONS.target_tmp, target_zip,
1601 vendor_src = common.GetUserImage("vendor", OPTIONS.source_tmp, source_zip,
1607 "vendor", OPTIONS.target_tmp, target_zip,
1628 target_info.WriteDeviceAssertions(script, OPTIONS.oem_no_mount)
1653 if OPTIONS.two_step:
1724 if OPTIONS.two_step:
1762 if OPTIONS.source_info_dict.get("use_dynamic_partitions") == "true":
1763 if OPTIONS.target_info_dict.get("use_dynamic_partitions") != "true":
1767 info_dict=OPTIONS.target_info_dict,
1768 source_info_dict=OPTIONS.source_info_dict,
1772 script, output_zip, write_verify_script=OPTIONS.verify)
1777 write_verify_script=OPTIONS.verify)
1779 if OPTIONS.two_step:
1784 if not OPTIONS.two_step:
1809 if OPTIONS.extra_script is not None:
1810 script.AppendExtra(OPTIONS.extra_script)
1812 if OPTIONS.wipe_user_data:
1816 if OPTIONS.two_step:
1826 if OPTIONS.downgrade:
1827 script.AddToZip(source_zip, output_zip, input_path=OPTIONS.updater_binary)
1829 script.AddToZip(target_zip, output_zip, input_path=OPTIONS.updater_binary)
2005 if not OPTIONS.no_signing:
2013 target_info = BuildInfo(OPTIONS.target_info_dict, OPTIONS.oem_dicts)
2014 source_info = BuildInfo(OPTIONS.source_info_dict, OPTIONS.oem_dicts)
2016 target_info = BuildInfo(OPTIONS.info_dict, OPTIONS.oem_dicts)
2022 if OPTIONS.retrofit_dynamic_partitions:
2026 elif OPTIONS.skip_postinstall:
2033 if OPTIONS.downgrade:
2050 if OPTIONS.include_secondary:
2054 target_file, OPTIONS.skip_postinstall)
2104 OPTIONS.package_key = a
2106 OPTIONS.incremental_source = a
2108 OPTIONS.full_radio = True
2110 OPTIONS.full_bootloader = True
2112 OPTIONS.wipe_user_data = True
2114 OPTIONS.downgrade = True
2115 OPTIONS.wipe_user_data = True
2117 OPTIONS.downgrade = True
2119 OPTIONS.oem_source = a.split(',')
2121 OPTIONS.oem_no_mount = True
2123 OPTIONS.extra_script = a
2126 OPTIONS.worker_threads = int(a)
2131 OPTIONS.two_step = True
2133 OPTIONS.include_secondary = True
2135 OPTIONS.no_signing = True
2137 OPTIONS.verify = True
2139 OPTIONS.block_based = True
2141 OPTIONS.updater_binary = a
2144 OPTIONS.stash_threshold = float(a)
2149 OPTIONS.log_diff = a
2151 OPTIONS.payload_signer = a
2153 OPTIONS.payload_signer_args = shlex.split(a)
2155 OPTIONS.payload_signer_key_size = a
2157 OPTIONS.extracted_input = a
2159 OPTIONS.skip_postinstall = True
2161 OPTIONS.retrofit_dynamic_partitions = True
2163 OPTIONS.skip_compatibility_check = True
2165 OPTIONS.output_metadata_path = a
2208 if OPTIONS.downgrade:
2212 if OPTIONS.incremental_source is None:
2222 if OPTIONS.extracted_input is not None:
2223 OPTIONS.info_dict = common.LoadInfoDict(OPTIONS.extracted_input)
2226 OPTIONS.info_dict = common.LoadInfoDict(input_zip)
2229 common.DumpInfoDict(OPTIONS.info_dict)
2232 if OPTIONS.incremental_source is not None:
2233 OPTIONS.target_info_dict = OPTIONS.info_dict
2234 with zipfile.ZipFile(OPTIONS.incremental_source, 'r') as source_zip:
2235 OPTIONS.source_info_dict = common.LoadInfoDict(source_zip)
2238 common.DumpInfoDict(OPTIONS.source_info_dict)
2241 OPTIONS.oem_dicts = _LoadOemDicts(OPTIONS.oem_source)
2245 if (OPTIONS.source_info_dict and
2246 OPTIONS.source_info_dict.get("use_dynamic_partitions") != "true" and
2247 OPTIONS.target_info_dict.get("use_dynamic_partitions") == "true"):
2248 if OPTIONS.target_info_dict.get("dynamic_partition_retrofit") != "true":
2254 OPTIONS.retrofit_dynamic_partitions = True
2257 if OPTIONS.retrofit_dynamic_partitions:
2258 OPTIONS.skip_postinstall = True
2260 ab_update = OPTIONS.info_dict.get("ab_update") == "true"
2265 if not OPTIONS.no_signing or ab_update:
2266 if OPTIONS.package_key is None:
2267 OPTIONS.package_key = OPTIONS.info_dict.get(
2271 OPTIONS.key_passwords = common.GetKeyPasswords([OPTIONS.package_key])
2277 source_file=OPTIONS.incremental_source)
2283 if OPTIONS.info_dict.get("no_recovery") == "true":
2288 cache_size = OPTIONS.info_dict.get("cache_size")
2291 OPTIONS.cache_size = cache_size
2293 if OPTIONS.extra_script is not None:
2294 OPTIONS.extra_script = open(OPTIONS.extra_script).read()
2296 if OPTIONS.extracted_input is not None:
2297 OPTIONS.input_tmp = OPTIONS.extracted_input
2300 OPTIONS.input_tmp = common.UnzipTemp(args[0], UNZIP_PATTERN)
2301 OPTIONS.target_tmp = OPTIONS.input_tmp
2308 if OPTIONS.device_specific is None:
2309 from_input = os.path.join(OPTIONS.input_tmp, "META", "releasetools.py")
2312 OPTIONS.device_specific = from_input
2314 OPTIONS.device_specific = OPTIONS.info_dict.get("tool_extensions")
2316 if OPTIONS.device_specific is not None:
2317 OPTIONS.device_specific = os.path.abspath(OPTIONS.device_specific)
2320 if OPTIONS.incremental_source is None:
2329 OPTIONS.source_tmp = common.UnzipTemp(
2330 OPTIONS.incremental_source, UNZIP_PATTERN)
2332 zipfile.ZipFile(OPTIONS.incremental_source, 'r') as source_zip:
2338 if OPTIONS.log_diff:
2339 with open(OPTIONS.log_diff, 'w') as out_file:
2342 '', OPTIONS.source_tmp, OPTIONS.input_tmp, out_file)