• Home
  • Raw
  • Download

Lines Matching refs:OPTIONS

134 OPTIONS = common.OPTIONS  variable
135 OPTIONS.package_key = None
136 OPTIONS.incremental_source = None
137 OPTIONS.verify = False
138 OPTIONS.require_verbatim = set()
139 OPTIONS.prohibit_verbatim = set(("system/build.prop",))
140 OPTIONS.patch_threshold = 0.95
141 OPTIONS.wipe_user_data = False
142 OPTIONS.omit_prereq = False
143 OPTIONS.downgrade = False
144 OPTIONS.extra_script = None
145 OPTIONS.aslr_mode = True
146 OPTIONS.worker_threads = multiprocessing.cpu_count() // 2
147 if OPTIONS.worker_threads == 0:
148 OPTIONS.worker_threads = 1
149 OPTIONS.two_step = False
150 OPTIONS.no_signing = False
151 OPTIONS.block_based = False
152 OPTIONS.updater_binary = None
153 OPTIONS.oem_source = None
154 OPTIONS.oem_no_mount = False
155 OPTIONS.fallback_to_full = True
156 OPTIONS.full_radio = False
157 OPTIONS.full_bootloader = False
159 OPTIONS.cache_size = None
160 OPTIONS.stash_threshold = 0.8
161 OPTIONS.gen_verify = False
162 OPTIONS.log_diff = None
195 if not OPTIONS.target_info_dict.get("update_rename_support", False):
433 key_passwords = common.GetKeyPasswords([OPTIONS.package_key])
434 pw = key_passwords[OPTIONS.package_key]
436 common.SignFile(temp_zip_name, output_zip_name, OPTIONS.package_key, pw,
505 OPTIONS.tempfiles.append(mappath)
529 script = edify_generator.EdifyGenerator(3, OPTIONS.info_dict)
531 oem_props = OPTIONS.info_dict.get("oem_fingerprint_properties")
532 recovery_mount_options = OPTIONS.info_dict.get("recovery_mount_options")
535 if OPTIONS.oem_source is None:
537 if not OPTIONS.oem_no_mount:
540 open(OPTIONS.oem_source).readlines())
544 OPTIONS.info_dict),
546 OPTIONS.info_dict),
547 "post-timestamp": GetBuildProp("ro.build.date.utc", OPTIONS.info_dict),
552 input_version=OPTIONS.info_dict["recovery_api_version"],
555 input_tmp=OPTIONS.input_tmp,
557 info_dict=OPTIONS.info_dict)
560 block_based = OPTIONS.block_based and has_recovery_patch
564 if not OPTIONS.omit_prereq:
565 ts = GetBuildProp("ro.build.date.utc", OPTIONS.info_dict)
566 ts_text = GetBuildProp("ro.build.date", OPTIONS.info_dict)
569 AppendAssertions(script, OPTIONS.info_dict, oem_dict)
593 OPTIONS.input_tmp, "RECOVERY")
594 if OPTIONS.two_step:
595 if not OPTIONS.info_dict.get("multistage_support", None):
597 fs = OPTIONS.info_dict["fstab"]["/misc"]
614 oem_props, oem_dict, OPTIONS.info_dict))
620 if OPTIONS.wipe_user_data:
627 if "selinux_fc" in OPTIONS.info_dict:
628 WritePolicyConfig(OPTIONS.info_dict["selinux_fc"], output_zip)
630 recovery_mount_options = OPTIONS.info_dict.get("recovery_mount_options")
640 system_tgt = GetImage("system", OPTIONS.input_tmp, OPTIONS.info_dict)
655 "boot.img", "boot.img", OPTIONS.input_tmp, "BOOT")
662 common.MakeRecoveryPatch(OPTIONS.input_tmp, output_sink,
673 vendor_tgt = GetImage("vendor", OPTIONS.input_tmp, OPTIONS.info_dict)
688 common.CheckSize(boot_img.data, "boot.img", OPTIONS.info_dict)
697 if OPTIONS.extra_script is not None:
698 script.AppendExtra(OPTIONS.extra_script)
702 if OPTIONS.wipe_user_data:
706 if OPTIONS.two_step:
720 script.AddToZip(input_zip, output_zip, input_path=OPTIONS.updater_binary)
772 source_version = OPTIONS.source_info_dict["recovery_api_version"]
773 target_version = OPTIONS.target_info_dict["recovery_api_version"]
779 source_version, OPTIONS.target_info_dict,
780 fstab=OPTIONS.source_info_dict["fstab"])
782 oem_props = OPTIONS.info_dict.get("oem_fingerprint_properties")
783 recovery_mount_options = OPTIONS.source_info_dict.get(
787 if OPTIONS.oem_source is None:
789 if not OPTIONS.oem_no_mount:
792 open(OPTIONS.oem_source).readlines())
796 OPTIONS.source_info_dict),
800 post_timestamp = GetBuildProp("ro.build.date.utc", OPTIONS.target_info_dict)
801 pre_timestamp = GetBuildProp("ro.build.date.utc", OPTIONS.source_info_dict)
804 if OPTIONS.downgrade:
829 info_dict=OPTIONS.source_info_dict)
832 OPTIONS.source_info_dict)
834 OPTIONS.target_info_dict)
838 "ro.build.version.incremental", OPTIONS.source_info_dict)
840 "ro.build.version.incremental", OPTIONS.target_info_dict)
843 "/tmp/boot.img", "boot.img", OPTIONS.source_tmp, "BOOT",
844 OPTIONS.source_info_dict)
846 "/tmp/boot.img", "boot.img", OPTIONS.target_tmp, "BOOT")
847 updating_boot = (not OPTIONS.two_step and
851 "/tmp/recovery.img", "recovery.img", OPTIONS.target_tmp, "RECOVERY")
853 system_src = GetImage("system", OPTIONS.source_tmp, OPTIONS.source_info_dict)
854 system_tgt = GetImage("system", OPTIONS.target_tmp, OPTIONS.target_info_dict)
857 if OPTIONS.info_dict:
860 OPTIONS.info_dict.get("blockimgdiff_versions", "1").split(","))
864 system_partition = OPTIONS.source_info_dict["fstab"]["/system"]
879 vendor_src = GetImage("vendor", OPTIONS.source_tmp,
880 OPTIONS.source_info_dict)
881 vendor_tgt = GetImage("vendor", OPTIONS.target_tmp,
882 OPTIONS.target_info_dict)
886 vendor_partition = OPTIONS.source_info_dict["fstab"]["/vendor"]
896 AppendAssertions(script, OPTIONS.target_info_dict, oem_dict)
921 if OPTIONS.two_step:
922 if not OPTIONS.source_info_dict.get("multistage_support", None):
924 fs = OPTIONS.source_info_dict["fstab"]["/misc"]
942 oem_props, oem_dict, OPTIONS.source_info_dict))
944 oem_props, oem_dict, OPTIONS.target_info_dict))
962 GetBuildProp("ro.build.thumbprint", OPTIONS.source_info_dict))
965 GetBuildProp("ro.build.thumbprint", OPTIONS.target_info_dict),
966 GetBuildProp("ro.build.thumbprint", OPTIONS.source_info_dict))
977 "/boot", OPTIONS.source_info_dict)
1002 if OPTIONS.two_step:
1025 if OPTIONS.two_step:
1030 if not OPTIONS.two_step:
1056 if OPTIONS.extra_script is not None:
1057 script.AppendExtra(OPTIONS.extra_script)
1059 if OPTIONS.wipe_user_data:
1064 if OPTIONS.two_step:
1074 if OPTIONS.downgrade:
1075 script.AddToZip(source_zip, output_zip, input_path=OPTIONS.updater_binary)
1077 script.AddToZip(target_zip, output_zip, input_path=OPTIONS.updater_binary)
1083 script = edify_generator.EdifyGenerator(3, OPTIONS.info_dict)
1085 oem_props = OPTIONS.info_dict.get("oem_fingerprint_properties")
1086 recovery_mount_options = OPTIONS.info_dict.get(
1090 if OPTIONS.oem_source is None:
1094 open(OPTIONS.oem_source).readlines())
1096 target_fp = CalculateFingerprint(oem_props, oem_dict, OPTIONS.info_dict)
1100 OPTIONS.info_dict),
1101 "post-timestamp": GetBuildProp("ro.build.date.utc", OPTIONS.info_dict),
1106 input_version=OPTIONS.info_dict["recovery_api_version"],
1109 input_tmp=OPTIONS.input_tmp,
1111 info_dict=OPTIONS.info_dict)
1113 AppendAssertions(script, OPTIONS.info_dict, oem_dict)
1120 "boot.img", "boot.img", OPTIONS.input_tmp, "BOOT")
1122 "/boot", OPTIONS.info_dict)
1129 "recovery.img", "recovery.img", OPTIONS.input_tmp, "RECOVERY")
1131 "/recovery", OPTIONS.info_dict)
1136 system_tgt = GetImage("system", OPTIONS.input_tmp, OPTIONS.info_dict)
1142 vendor_tgt = GetImage("vendor", OPTIONS.input_tmp, OPTIONS.info_dict)
1151 script.AddToZip(input_zip, output_zip, input_path=OPTIONS.updater_binary)
1161 if OPTIONS.package_key is None:
1162 OPTIONS.package_key = OPTIONS.info_dict.get(
1168 "-in", OPTIONS.package_key + OPTIONS.private_key_suffix,
1182 oem_props = OPTIONS.info_dict.get("oem_fingerprint_properties", None)
1185 if OPTIONS.oem_source is None:
1188 open(OPTIONS.oem_source).readlines())
1192 OPTIONS.info_dict),
1194 OPTIONS.info_dict),
1196 OPTIONS.info_dict),
1197 "post-timestamp": GetBuildProp("ro.build.date.utc", OPTIONS.info_dict),
1204 OPTIONS.source_info_dict)
1206 "ro.build.version.incremental", OPTIONS.source_info_dict)
1326 if sf is None or fn in OPTIONS.require_verbatim:
1328 if fn in OPTIONS.prohibit_verbatim:
1347 if d is None or len(d) > tf.size * OPTIONS.patch_threshold or \
1426 if (OPTIONS.block_based and
1431 source_version = OPTIONS.source_info_dict["recovery_api_version"]
1432 target_version = OPTIONS.target_info_dict["recovery_api_version"]
1438 source_version, OPTIONS.target_info_dict,
1439 fstab=OPTIONS.source_info_dict["fstab"])
1441 oem_props = OPTIONS.info_dict.get("oem_fingerprint_properties")
1442 recovery_mount_options = OPTIONS.source_info_dict.get(
1446 if OPTIONS.oem_source is None:
1448 if not OPTIONS.oem_no_mount:
1451 open(OPTIONS.oem_source).readlines())
1455 OPTIONS.source_info_dict),
1459 post_timestamp = GetBuildProp("ro.build.date.utc", OPTIONS.target_info_dict)
1460 pre_timestamp = GetBuildProp("ro.build.date.utc", OPTIONS.source_info_dict)
1463 if OPTIONS.downgrade:
1488 info_dict=OPTIONS.source_info_dict)
1499 OPTIONS.target_info_dict)
1501 OPTIONS.source_info_dict)
1507 GetBuildProp("ro.build.thumbprint", OPTIONS.target_info_dict),
1508 GetBuildProp("ro.build.thumbprint", OPTIONS.source_info_dict))
1513 "ro.build.version.incremental", OPTIONS.source_info_dict)
1515 "ro.build.version.incremental", OPTIONS.target_info_dict)
1518 "/tmp/boot.img", "boot.img", OPTIONS.source_tmp, "BOOT",
1519 OPTIONS.source_info_dict)
1521 "/tmp/boot.img", "boot.img", OPTIONS.target_tmp, "BOOT")
1522 updating_boot = (not OPTIONS.two_step and
1526 "/tmp/recovery.img", "recovery.img", OPTIONS.source_tmp, "RECOVERY",
1527 OPTIONS.source_info_dict)
1529 "/tmp/recovery.img", "recovery.img", OPTIONS.target_tmp, "RECOVERY")
1538 AppendAssertions(script, OPTIONS.target_info_dict, oem_dict)
1563 if OPTIONS.two_step:
1564 if not OPTIONS.source_info_dict.get("multistage_support", None):
1566 fs = OPTIONS.source_info_dict["fstab"]["/misc"]
1611 "/boot", OPTIONS.source_info_dict)
1625 if OPTIONS.two_step:
1637 if OPTIONS.two_step:
1660 if not OPTIONS.two_step:
1698 common.MakeRecoveryPatch(OPTIONS.target_tmp, output_sink,
1800 if OPTIONS.extra_script is not None:
1801 script.AppendExtra(OPTIONS.extra_script)
1809 if OPTIONS.wipe_user_data:
1814 if OPTIONS.two_step:
1821 if OPTIONS.verify and system_diff:
1827 if OPTIONS.verify and vendor_diff:
1835 if OPTIONS.downgrade:
1836 script.AddToZip(source_zip, output_zip, input_path=OPTIONS.updater_binary)
1838 script.AddToZip(target_zip, output_zip, input_path=OPTIONS.updater_binary)
1850 OPTIONS.package_key = a
1852 OPTIONS.incremental_source = a
1854 OPTIONS.full_radio = True
1856 OPTIONS.full_bootloader = True
1858 OPTIONS.wipe_user_data = True
1860 OPTIONS.omit_prereq = True
1862 OPTIONS.downgrade = True
1863 OPTIONS.wipe_user_data = True
1865 OPTIONS.oem_source = a
1867 OPTIONS.oem_no_mount = True
1869 OPTIONS.extra_script = a
1872 OPTIONS.aslr_mode = True
1874 OPTIONS.aslr_mode = False
1877 OPTIONS.worker_threads = int(a)
1882 OPTIONS.two_step = True
1884 OPTIONS.no_signing = True
1886 OPTIONS.verify = True
1888 OPTIONS.block_based = True
1890 OPTIONS.updater_binary = a
1892 OPTIONS.fallback_to_full = False
1895 OPTIONS.stash_threshold = float(a)
1900 OPTIONS.gen_verify = True
1902 OPTIONS.log_diff = a
1938 if OPTIONS.downgrade:
1940 if not OPTIONS.wipe_user_data:
1946 if OPTIONS.incremental_source is None:
1953 OPTIONS.info_dict = common.LoadInfoDict(input_zip)
1956 ab_update = OPTIONS.info_dict.get("ab_update") == "true"
1959 if OPTIONS.incremental_source is not None:
1960 OPTIONS.target_info_dict = OPTIONS.info_dict
1961 source_zip = zipfile.ZipFile(OPTIONS.incremental_source, "r")
1962 OPTIONS.source_info_dict = common.LoadInfoDict(source_zip)
1965 if OPTIONS.verbose:
1967 common.DumpInfoDict(OPTIONS.info_dict)
1969 if OPTIONS.incremental_source is not None:
1971 common.DumpInfoDict(OPTIONS.source_info_dict)
1976 source_file=OPTIONS.incremental_source)
1981 if OPTIONS.extra_script is not None:
1982 OPTIONS.extra_script = open(OPTIONS.extra_script).read()
1985 OPTIONS.input_tmp, input_zip = common.UnzipTemp(args[0])
1987 OPTIONS.target_tmp = OPTIONS.input_tmp
1988 OPTIONS.info_dict = common.LoadInfoDict(input_zip, OPTIONS.target_tmp)
1990 if OPTIONS.verbose:
1992 common.DumpInfoDict(OPTIONS.info_dict)
2001 if OPTIONS.device_specific is None:
2002 from_input = os.path.join(OPTIONS.input_tmp, "META", "releasetools.py")
2005 OPTIONS.device_specific = from_input
2007 OPTIONS.device_specific = OPTIONS.info_dict.get("tool_extensions", None)
2009 if OPTIONS.device_specific is not None:
2010 OPTIONS.device_specific = os.path.abspath(OPTIONS.device_specific)
2012 if OPTIONS.info_dict.get("no_recovery") == "true":
2017 if not OPTIONS.no_signing:
2018 if OPTIONS.package_key is None:
2019 OPTIONS.package_key = OPTIONS.info_dict.get(
2024 if OPTIONS.no_signing:
2035 cache_size = OPTIONS.info_dict.get("cache_size", None)
2038 OPTIONS.cache_size = cache_size
2041 if OPTIONS.gen_verify:
2045 elif OPTIONS.incremental_source is None:
2052 OPTIONS.source_tmp, source_zip = common.UnzipTemp(
2053 OPTIONS.incremental_source)
2054 OPTIONS.target_info_dict = OPTIONS.info_dict
2055 OPTIONS.source_info_dict = common.LoadInfoDict(source_zip,
2056 OPTIONS.source_tmp)
2057 if OPTIONS.verbose:
2059 common.DumpInfoDict(OPTIONS.source_info_dict)
2062 if OPTIONS.log_diff:
2063 out_file = open(OPTIONS.log_diff, 'w')
2066 OPTIONS.source_tmp,
2067 OPTIONS.input_tmp,
2071 if not OPTIONS.fallback_to_full:
2074 OPTIONS.incremental_source = None
2080 if not OPTIONS.no_signing: