Lines Matching refs:OPTIONS
155 OPTIONS = common.OPTIONS
156 OPTIONS.package_key = None
157 OPTIONS.incremental_source = None
158 OPTIONS.verify = False
159 OPTIONS.patch_threshold = 0.95
160 OPTIONS.wipe_user_data = False
161 OPTIONS.downgrade = False
162 OPTIONS.timestamp = False
163 OPTIONS.extra_script = None
164 OPTIONS.worker_threads = multiprocessing.cpu_count() // 2
165 if OPTIONS.worker_threads == 0:
166 OPTIONS.worker_threads = 1
167 OPTIONS.two_step = False
168 OPTIONS.no_signing = False
169 OPTIONS.block_based = True
170 OPTIONS.updater_binary = None
171 OPTIONS.oem_source = None
172 OPTIONS.oem_no_mount = False
173 OPTIONS.fallback_to_full = True
174 OPTIONS.full_radio = False
175 OPTIONS.full_bootloader = False
177 OPTIONS.cache_size = None
178 OPTIONS.stash_threshold = 0.8
179 OPTIONS.gen_verify = False
180 OPTIONS.log_diff = None
181 OPTIONS.payload_signer = None
182 OPTIONS.payload_signer_args = []
183 OPTIONS.extracted_input = None
190 key_passwords = common.GetKeyPasswords([OPTIONS.package_key])
191 pw = key_passwords[OPTIONS.package_key]
193 common.SignFile(temp_zip_name, output_zip_name, OPTIONS.package_key, pw,
220 if OPTIONS.oem_source is None:
222 if not OPTIONS.oem_no_mount and script:
225 for oem_file in OPTIONS.oem_source:
248 OPTIONS.input_tmp, "IMAGES", recovery_two_step_img_name)
252 OPTIONS.input_tmp, "RECOVERY")
377 script = edify_generator.EdifyGenerator(3, OPTIONS.info_dict)
379 recovery_mount_options = OPTIONS.info_dict.get("recovery_mount_options")
380 oem_props = OPTIONS.info_dict.get("oem_fingerprint_properties")
386 OPTIONS.info_dict)
391 OPTIONS.info_dict),
392 "post-timestamp": GetBuildProp("ro.build.date.utc", OPTIONS.info_dict),
397 input_version=OPTIONS.info_dict["recovery_api_version"],
400 input_tmp=OPTIONS.input_tmp,
402 info_dict=OPTIONS.info_dict)
408 ts = GetBuildProp("ro.build.date.utc", OPTIONS.info_dict)
409 ts_text = GetBuildProp("ro.build.date", OPTIONS.info_dict)
412 AppendAssertions(script, OPTIONS.info_dict, oem_dicts)
436 OPTIONS.input_tmp, "RECOVERY")
437 if OPTIONS.two_step:
438 if not OPTIONS.info_dict.get("multistage_support", None):
440 fs = OPTIONS.info_dict["fstab"]["/misc"]
468 if OPTIONS.wipe_user_data:
475 if "selinux_fc" in OPTIONS.info_dict:
476 WritePolicyConfig(OPTIONS.info_dict["selinux_fc"], output_zip)
478 recovery_mount_options = OPTIONS.info_dict.get("recovery_mount_options")
486 system_tgt = GetImage("system", OPTIONS.input_tmp)
492 "boot.img", "boot.img", OPTIONS.input_tmp, "BOOT")
497 vendor_tgt = GetImage("vendor", OPTIONS.input_tmp)
502 common.CheckSize(boot_img.data, "boot.img", OPTIONS.info_dict)
511 if OPTIONS.extra_script is not None:
512 script.AppendExtra(OPTIONS.extra_script)
516 if OPTIONS.wipe_user_data:
520 if OPTIONS.two_step:
538 script.AddToZip(input_zip, output_zip, input_path=OPTIONS.updater_binary)
563 assert OPTIONS.incremental_source is not None
565 post_timestamp = GetBuildProp("ro.build.date.utc", OPTIONS.target_info_dict)
566 pre_timestamp = GetBuildProp("ro.build.date.utc", OPTIONS.source_info_dict)
569 if OPTIONS.downgrade:
574 elif OPTIONS.timestamp:
589 source_version = OPTIONS.source_info_dict["recovery_api_version"]
590 target_version = OPTIONS.target_info_dict["recovery_api_version"]
596 source_version, OPTIONS.target_info_dict,
597 fstab=OPTIONS.source_info_dict["fstab"])
599 recovery_mount_options = OPTIONS.source_info_dict.get(
601 source_oem_props = OPTIONS.source_info_dict.get("oem_fingerprint_properties")
602 target_oem_props = OPTIONS.target_info_dict.get("oem_fingerprint_properties")
610 OPTIONS.source_info_dict),
624 info_dict=OPTIONS.source_info_dict)
627 OPTIONS.source_info_dict)
629 OPTIONS.target_info_dict)
633 "ro.build.version.incremental", OPTIONS.source_info_dict)
635 "ro.build.version.incremental", OPTIONS.target_info_dict)
638 "/tmp/boot.img", "boot.img", OPTIONS.source_tmp, "BOOT",
639 OPTIONS.source_info_dict)
641 "/tmp/boot.img", "boot.img", OPTIONS.target_tmp, "BOOT")
642 updating_boot = (not OPTIONS.two_step and
646 "/tmp/recovery.img", "recovery.img", OPTIONS.target_tmp, "RECOVERY")
648 system_src = GetImage("system", OPTIONS.source_tmp)
649 system_tgt = GetImage("system", OPTIONS.target_tmp)
652 if OPTIONS.info_dict:
655 OPTIONS.info_dict.get("blockimgdiff_versions", "1").split(","))
659 system_src_partition = OPTIONS.source_info_dict["fstab"]["/system"]
665 system_tgt_partition = OPTIONS.target_info_dict["fstab"]["/system"]
676 vendor_src = GetImage("vendor", OPTIONS.source_tmp)
677 vendor_tgt = GetImage("vendor", OPTIONS.target_tmp)
681 vendor_partition = OPTIONS.source_info_dict["fstab"]["/vendor"]
691 AppendAssertions(script, OPTIONS.target_info_dict, oem_dicts)
716 if OPTIONS.two_step:
717 if not OPTIONS.source_info_dict.get("multistage_support", None):
719 fs = OPTIONS.source_info_dict["fstab"]["/misc"]
758 GetBuildProp("ro.build.thumbprint", OPTIONS.source_info_dict))
765 GetBuildProp("ro.build.thumbprint", OPTIONS.target_info_dict),
766 GetBuildProp("ro.build.thumbprint", OPTIONS.source_info_dict))
770 GetBuildProp("ro.build.thumbprint", OPTIONS.target_info_dict))
774 GetBuildProp("ro.build.thumbprint", OPTIONS.source_info_dict))
785 "/boot", OPTIONS.source_info_dict)
810 if OPTIONS.two_step:
838 if OPTIONS.two_step:
843 if not OPTIONS.two_step:
869 if OPTIONS.extra_script is not None:
870 script.AppendExtra(OPTIONS.extra_script)
872 if OPTIONS.wipe_user_data:
877 if OPTIONS.two_step:
887 if OPTIONS.downgrade:
888 script.AddToZip(source_zip, output_zip, input_path=OPTIONS.updater_binary)
890 script.AddToZip(target_zip, output_zip, input_path=OPTIONS.updater_binary)
896 script = edify_generator.EdifyGenerator(3, OPTIONS.info_dict)
898 oem_props = OPTIONS.info_dict.get("oem_fingerprint_properties")
899 recovery_mount_options = OPTIONS.info_dict.get(
906 OPTIONS.info_dict)
911 OPTIONS.info_dict),
912 "post-timestamp": GetBuildProp("ro.build.date.utc", OPTIONS.info_dict),
917 input_version=OPTIONS.info_dict["recovery_api_version"],
920 input_tmp=OPTIONS.input_tmp,
922 info_dict=OPTIONS.info_dict)
924 AppendAssertions(script, OPTIONS.info_dict, oem_dicts)
931 "boot.img", "boot.img", OPTIONS.input_tmp, "BOOT")
933 "/boot", OPTIONS.info_dict)
940 "recovery.img", "recovery.img", OPTIONS.input_tmp, "RECOVERY")
942 "/recovery", OPTIONS.info_dict)
947 system_tgt = GetImage("system", OPTIONS.input_tmp)
953 vendor_tgt = GetImage("vendor", OPTIONS.input_tmp)
962 script.AddToZip(input_zip, output_zip, input_path=OPTIONS.updater_binary)
1022 log_file = sys.stdout if OPTIONS.verbose else subprocess.PIPE
1025 if OPTIONS.package_key is None:
1026 OPTIONS.package_key = OPTIONS.info_dict.get(
1032 if OPTIONS.payload_signer is None:
1034 "-in", OPTIONS.package_key + OPTIONS.private_key_suffix,
1048 oem_props = OPTIONS.info_dict.get("oem_fingerprint_properties", None)
1055 OPTIONS.info_dict),
1057 OPTIONS.info_dict),
1060 OPTIONS.info_dict),
1068 OPTIONS.source_info_dict)
1070 "ro.build.version.incremental", OPTIONS.source_info_dict)
1075 "ro.build.date.utc", OPTIONS.info_dict)
1106 if OPTIONS.payload_signer is not None:
1107 cmd = [OPTIONS.payload_signer]
1108 cmd.extend(OPTIONS.payload_signer_args)
1120 if OPTIONS.payload_signer is not None:
1121 cmd = [OPTIONS.payload_signer]
1122 cmd.extend(OPTIONS.payload_signer_args)
1156 if OPTIONS.wipe_user_data:
1174 if OPTIONS.info_dict.get("verity") == "true":
1270 OPTIONS.package_key = a
1272 OPTIONS.incremental_source = a
1274 OPTIONS.full_radio = True
1276 OPTIONS.full_bootloader = True
1278 OPTIONS.wipe_user_data = True
1280 OPTIONS.downgrade = True
1281 OPTIONS.wipe_user_data = True
1283 OPTIONS.timestamp = True
1285 OPTIONS.oem_source = a.split(',')
1287 OPTIONS.oem_no_mount = True
1289 OPTIONS.extra_script = a
1292 OPTIONS.worker_threads = int(a)
1297 OPTIONS.two_step = True
1299 OPTIONS.no_signing = True
1301 OPTIONS.verify = True
1303 OPTIONS.block_based = True
1305 OPTIONS.updater_binary = a
1307 OPTIONS.fallback_to_full = False
1310 OPTIONS.stash_threshold = float(a)
1315 OPTIONS.gen_verify = True
1317 OPTIONS.log_diff = a
1319 OPTIONS.payload_signer = a
1321 OPTIONS.payload_signer_args = shlex.split(a)
1323 OPTIONS.extracted_input = a
1361 if OPTIONS.downgrade:
1363 if not OPTIONS.wipe_user_data:
1369 if OPTIONS.incremental_source is None:
1372 assert not (OPTIONS.downgrade and OPTIONS.timestamp), \
1377 if OPTIONS.extracted_input is not None:
1378 OPTIONS.info_dict = common.LoadInfoDict(OPTIONS.extracted_input, OPTIONS.extracted_input)
1381 OPTIONS.info_dict = common.LoadInfoDict(input_zip)
1384 ab_update = OPTIONS.info_dict.get("ab_update") == "true"
1387 if OPTIONS.incremental_source is not None:
1388 OPTIONS.target_info_dict = OPTIONS.info_dict
1389 source_zip = zipfile.ZipFile(OPTIONS.incremental_source, "r")
1390 OPTIONS.source_info_dict = common.LoadInfoDict(source_zip)
1393 if OPTIONS.verbose:
1395 common.DumpInfoDict(OPTIONS.info_dict)
1397 if OPTIONS.incremental_source is not None:
1399 common.DumpInfoDict(OPTIONS.source_info_dict)
1404 source_file=OPTIONS.incremental_source)
1409 if OPTIONS.extra_script is not None:
1410 OPTIONS.extra_script = open(OPTIONS.extra_script).read()
1412 if OPTIONS.extracted_input is not None:
1413 OPTIONS.input_tmp = OPTIONS.extracted_input
1414 OPTIONS.target_tmp = OPTIONS.input_tmp
1415 OPTIONS.info_dict = common.LoadInfoDict(OPTIONS.input_tmp, OPTIONS.input_tmp)
1419 OPTIONS.input_tmp, input_zip = common.UnzipTemp(
1422 OPTIONS.target_tmp = OPTIONS.input_tmp
1423 OPTIONS.info_dict = common.LoadInfoDict(input_zip, OPTIONS.target_tmp)
1425 if OPTIONS.verbose:
1427 common.DumpInfoDict(OPTIONS.info_dict)
1436 if OPTIONS.device_specific is None:
1437 from_input = os.path.join(OPTIONS.input_tmp, "META", "releasetools.py")
1440 OPTIONS.device_specific = from_input
1442 OPTIONS.device_specific = OPTIONS.info_dict.get("tool_extensions", None)
1444 if OPTIONS.device_specific is not None:
1445 OPTIONS.device_specific = os.path.abspath(OPTIONS.device_specific)
1447 if OPTIONS.info_dict.get("no_recovery") == "true":
1452 if not OPTIONS.no_signing:
1453 if OPTIONS.package_key is None:
1454 OPTIONS.package_key = OPTIONS.info_dict.get(
1459 if OPTIONS.no_signing:
1470 cache_size = OPTIONS.info_dict.get("cache_size", None)
1473 OPTIONS.cache_size = cache_size
1476 if OPTIONS.gen_verify:
1480 elif OPTIONS.incremental_source is None:
1487 OPTIONS.source_tmp, source_zip = common.UnzipTemp(
1488 OPTIONS.incremental_source,
1490 OPTIONS.target_info_dict = OPTIONS.info_dict
1491 OPTIONS.source_info_dict = common.LoadInfoDict(source_zip,
1492 OPTIONS.source_tmp)
1493 if OPTIONS.verbose:
1495 common.DumpInfoDict(OPTIONS.source_info_dict)
1498 if OPTIONS.log_diff:
1499 out_file = open(OPTIONS.log_diff, 'w')
1502 OPTIONS.source_tmp,
1503 OPTIONS.input_tmp,
1507 if not OPTIONS.fallback_to_full:
1510 OPTIONS.incremental_source = None
1516 if not OPTIONS.no_signing: