Lines Matching refs:OPTIONS
104 OPTIONS = common.OPTIONS
105 OPTIONS.package_key = None
106 OPTIONS.incremental_source = None
107 OPTIONS.verify = False
108 OPTIONS.require_verbatim = set()
109 OPTIONS.prohibit_verbatim = set(("system/build.prop",))
110 OPTIONS.patch_threshold = 0.95
111 OPTIONS.wipe_user_data = False
112 OPTIONS.omit_prereq = False
113 OPTIONS.extra_script = None
114 OPTIONS.aslr_mode = True
115 OPTIONS.worker_threads = multiprocessing.cpu_count() // 2
116 if OPTIONS.worker_threads == 0:
117 OPTIONS.worker_threads = 1
118 OPTIONS.two_step = False
119 OPTIONS.no_signing = False
120 OPTIONS.block_based = False
121 OPTIONS.updater_binary = None
122 OPTIONS.oem_source = None
123 OPTIONS.fallback_to_full = True
124 OPTIONS.full_radio = False
157 if not OPTIONS.target_info_dict.get("update_rename_support", False):
394 key_passwords = common.GetKeyPasswords([OPTIONS.package_key])
395 pw = key_passwords[OPTIONS.package_key]
397 common.SignFile(temp_zip_name, output_zip_name, OPTIONS.package_key, pw,
468 OPTIONS.tempfiles.append(mappath)
492 script = edify_generator.EdifyGenerator(3, OPTIONS.info_dict)
494 oem_props = OPTIONS.info_dict.get("oem_fingerprint_properties")
495 recovery_mount_options = OPTIONS.info_dict.get("recovery_mount_options")
498 if OPTIONS.oem_source is None:
502 open(OPTIONS.oem_source).readlines())
506 OPTIONS.info_dict),
508 OPTIONS.info_dict),
509 "post-timestamp": GetBuildProp("ro.build.date.utc", OPTIONS.info_dict),
514 input_version=OPTIONS.info_dict["recovery_api_version"],
517 input_tmp=OPTIONS.input_tmp,
519 info_dict=OPTIONS.info_dict)
522 block_based = OPTIONS.block_based and has_recovery_patch
524 if not OPTIONS.omit_prereq:
525 ts = GetBuildProp("ro.build.date.utc", OPTIONS.info_dict)
526 ts_text = GetBuildProp("ro.build.date", OPTIONS.info_dict)
529 AppendAssertions(script, OPTIONS.info_dict, oem_dict)
553 OPTIONS.input_tmp, "RECOVERY")
554 if OPTIONS.two_step:
555 if not OPTIONS.info_dict.get("multistage_support", None):
557 fs = OPTIONS.info_dict["fstab"]["/misc"]
574 oem_props, oem_dict, OPTIONS.info_dict))
580 if OPTIONS.wipe_user_data:
585 if "selinux_fc" in OPTIONS.info_dict:
586 WritePolicyConfig(OPTIONS.info_dict["selinux_fc"], output_zip)
588 recovery_mount_options = OPTIONS.info_dict.get("recovery_mount_options")
598 system_tgt = GetImage("system", OPTIONS.input_tmp, OPTIONS.info_dict)
613 OPTIONS.input_tmp, "BOOT")
620 common.MakeRecoveryPatch(OPTIONS.input_tmp, output_sink,
631 vendor_tgt = GetImage("vendor", OPTIONS.input_tmp, OPTIONS.info_dict)
646 common.CheckSize(boot_img.data, "boot.img", OPTIONS.info_dict)
655 if OPTIONS.extra_script is not None:
656 script.AppendExtra(OPTIONS.extra_script)
660 if OPTIONS.wipe_user_data:
664 if OPTIONS.two_step:
676 script.AddToZip(input_zip, output_zip, input_path=OPTIONS.updater_binary)
725 source_version = OPTIONS.source_info_dict["recovery_api_version"]
726 target_version = OPTIONS.target_info_dict["recovery_api_version"]
732 source_version, OPTIONS.target_info_dict,
733 fstab=OPTIONS.source_info_dict["fstab"])
737 OPTIONS.source_info_dict),
739 OPTIONS.target_info_dict),
750 info_dict=OPTIONS.info_dict)
758 source_fp = GetBuildProp("ro.build.fingerprint", OPTIONS.source_info_dict)
759 target_fp = GetBuildProp("ro.build.fingerprint", OPTIONS.target_info_dict)
764 "/tmp/boot.img", "boot.img", OPTIONS.source_tmp, "BOOT",
765 OPTIONS.source_info_dict)
767 "/tmp/boot.img", "boot.img", OPTIONS.target_tmp, "BOOT")
768 updating_boot = (not OPTIONS.two_step and
772 "/tmp/recovery.img", "recovery.img", OPTIONS.target_tmp, "RECOVERY")
774 system_src = GetImage("system", OPTIONS.source_tmp, OPTIONS.source_info_dict)
775 system_tgt = GetImage("system", OPTIONS.target_tmp, OPTIONS.target_info_dict)
778 if OPTIONS.info_dict:
781 OPTIONS.info_dict.get("blockimgdiff_versions", "1").split(","))
789 vendor_src = GetImage("vendor", OPTIONS.source_tmp,
790 OPTIONS.source_info_dict)
791 vendor_tgt = GetImage("vendor", OPTIONS.target_tmp,
792 OPTIONS.target_info_dict)
798 oem_props = OPTIONS.target_info_dict.get("oem_fingerprint_properties")
799 recovery_mount_options = OPTIONS.source_info_dict.get(
803 if OPTIONS.oem_source is None:
807 open(OPTIONS.oem_source).readlines())
809 AppendAssertions(script, OPTIONS.target_info_dict, oem_dict)
834 if OPTIONS.two_step:
835 if not OPTIONS.source_info_dict.get("multistage_support", None):
837 fs = OPTIONS.source_info_dict["fstab"]["/misc"]
855 oem_props, oem_dict, OPTIONS.source_info_dict))
857 oem_props, oem_dict, OPTIONS.target_info_dict))
875 GetBuildProp("ro.build.thumbprint", OPTIONS.source_info_dict))
878 GetBuildProp("ro.build.thumbprint", OPTIONS.target_info_dict),
879 GetBuildProp("ro.build.thumbprint", OPTIONS.source_info_dict))
883 "/boot", OPTIONS.source_info_dict)
904 if OPTIONS.two_step:
926 if OPTIONS.two_step:
931 if not OPTIONS.two_step:
957 if OPTIONS.extra_script is not None:
958 script.AppendExtra(OPTIONS.extra_script)
960 if OPTIONS.wipe_user_data:
964 if OPTIONS.two_step:
972 script.AddToZip(target_zip, output_zip, input_path=OPTIONS.updater_binary)
1011 if sf is None or fn in OPTIONS.require_verbatim:
1013 if fn in OPTIONS.prohibit_verbatim:
1032 if d is None or len(d) > tf.size * OPTIONS.patch_threshold or \
1109 if (OPTIONS.block_based and
1114 source_version = OPTIONS.source_info_dict["recovery_api_version"]
1115 target_version = OPTIONS.target_info_dict["recovery_api_version"]
1121 source_version, OPTIONS.target_info_dict,
1122 fstab=OPTIONS.source_info_dict["fstab"])
1124 oem_props = OPTIONS.info_dict.get("oem_fingerprint_properties")
1125 recovery_mount_options = OPTIONS.source_info_dict.get(
1129 if OPTIONS.oem_source is None:
1133 open(OPTIONS.oem_source).readlines())
1137 OPTIONS.source_info_dict),
1139 OPTIONS.target_info_dict),
1150 info_dict=OPTIONS.info_dict)
1161 OPTIONS.target_info_dict)
1163 OPTIONS.source_info_dict)
1169 GetBuildProp("ro.build.thumbprint", OPTIONS.target_info_dict),
1170 GetBuildProp("ro.build.thumbprint", OPTIONS.source_info_dict))
1176 "/tmp/boot.img", "boot.img", OPTIONS.source_tmp, "BOOT",
1177 OPTIONS.source_info_dict)
1179 "/tmp/boot.img", "boot.img", OPTIONS.target_tmp, "BOOT")
1180 updating_boot = (not OPTIONS.two_step and
1184 "/tmp/recovery.img", "recovery.img", OPTIONS.source_tmp, "RECOVERY",
1185 OPTIONS.source_info_dict)
1187 "/tmp/recovery.img", "recovery.img", OPTIONS.target_tmp, "RECOVERY")
1196 AppendAssertions(script, OPTIONS.target_info_dict, oem_dict)
1221 if OPTIONS.two_step:
1222 if not OPTIONS.source_info_dict.get("multistage_support", None):
1224 fs = OPTIONS.source_info_dict["fstab"]["/misc"]
1262 "/boot", OPTIONS.source_info_dict)
1281 if OPTIONS.two_step:
1293 if OPTIONS.two_step:
1316 if not OPTIONS.two_step:
1354 common.MakeRecoveryPatch(OPTIONS.target_tmp, output_sink,
1455 if OPTIONS.extra_script is not None:
1456 script.AppendExtra(OPTIONS.extra_script)
1464 if OPTIONS.wipe_user_data:
1468 if OPTIONS.two_step:
1475 if OPTIONS.verify and system_diff:
1481 if OPTIONS.verify and vendor_diff:
1486 script.AddToZip(target_zip, output_zip, input_path=OPTIONS.updater_binary)
1497 OPTIONS.package_key = a
1499 OPTIONS.incremental_source = a
1501 OPTIONS.full_radio = True
1503 OPTIONS.wipe_user_data = True
1505 OPTIONS.omit_prereq = True
1507 OPTIONS.oem_source = a
1509 OPTIONS.extra_script = a
1512 OPTIONS.aslr_mode = True
1514 OPTIONS.aslr_mode = False
1517 OPTIONS.worker_threads = int(a)
1522 OPTIONS.two_step = True
1524 OPTIONS.no_signing = True
1526 OPTIONS.verify = True
1528 OPTIONS.block_based = True
1530 OPTIONS.updater_binary = a
1532 OPTIONS.fallback_to_full = False
1562 if OPTIONS.extra_script is not None:
1563 OPTIONS.extra_script = open(OPTIONS.extra_script).read()
1566 OPTIONS.input_tmp, input_zip = common.UnzipTemp(args[0])
1568 OPTIONS.target_tmp = OPTIONS.input_tmp
1569 OPTIONS.info_dict = common.LoadInfoDict(input_zip)
1575 if "selinux_fc" in OPTIONS.info_dict:
1576 OPTIONS.info_dict["selinux_fc"] = os.path.join(
1577 OPTIONS.input_tmp, "BOOT", "RAMDISK", "file_contexts")
1579 if OPTIONS.verbose:
1581 common.DumpInfoDict(OPTIONS.info_dict)
1590 if OPTIONS.device_specific is None:
1591 from_input = os.path.join(OPTIONS.input_tmp, "META", "releasetools.py")
1594 OPTIONS.device_specific = from_input
1596 OPTIONS.device_specific = OPTIONS.info_dict.get("tool_extensions", None)
1598 if OPTIONS.device_specific is not None:
1599 OPTIONS.device_specific = os.path.abspath(OPTIONS.device_specific)
1603 if OPTIONS.no_signing:
1613 if OPTIONS.incremental_source is None:
1615 if OPTIONS.package_key is None:
1616 OPTIONS.package_key = OPTIONS.info_dict.get(
1624 OPTIONS.source_tmp, source_zip = common.UnzipTemp(
1625 OPTIONS.incremental_source)
1626 OPTIONS.target_info_dict = OPTIONS.info_dict
1627 OPTIONS.source_info_dict = common.LoadInfoDict(source_zip)
1628 if "selinux_fc" in OPTIONS.source_info_dict:
1629 OPTIONS.source_info_dict["selinux_fc"] = os.path.join(
1630 OPTIONS.source_tmp, "BOOT", "RAMDISK", "file_contexts")
1631 if OPTIONS.package_key is None:
1632 OPTIONS.package_key = OPTIONS.source_info_dict.get(
1635 if OPTIONS.verbose:
1637 common.DumpInfoDict(OPTIONS.source_info_dict)
1643 if not OPTIONS.fallback_to_full:
1646 OPTIONS.incremental_source = None
1649 if not OPTIONS.no_signing: