Home | History | Annotate | Download | only in releasetools

Lines Matching refs:OPTIONS

108 OPTIONS = common.OPTIONS
109 OPTIONS.package_key = None
110 OPTIONS.incremental_source = None
111 OPTIONS.verify = False
112 OPTIONS.require_verbatim = set()
113 OPTIONS.prohibit_verbatim = set(("system/build.prop",))
114 OPTIONS.patch_threshold = 0.95
115 OPTIONS.wipe_user_data = False
116 OPTIONS.omit_prereq = False
117 OPTIONS.extra_script = None
118 OPTIONS.aslr_mode = True
119 OPTIONS.worker_threads = multiprocessing.cpu_count() // 2
120 if OPTIONS.worker_threads == 0:
121 OPTIONS.worker_threads = 1
122 OPTIONS.two_step = False
123 OPTIONS.no_signing = False
124 OPTIONS.block_based = False
125 OPTIONS.updater_binary = None
126 OPTIONS.oem_source = None
127 OPTIONS.fallback_to_full = True
159 if not OPTIONS.target_info_dict.get("update_rename_support", False):
378 key_passwords = common.GetKeyPasswords([OPTIONS.package_key])
379 pw = key_passwords[OPTIONS.package_key]
381 common.SignFile(temp_zip_name, output_zip_name, OPTIONS.package_key, pw,
450 OPTIONS.tempfiles.append(mappath)
467 script = edify_generator.EdifyGenerator(3, OPTIONS.info_dict)
469 oem_props = OPTIONS.info_dict.get("oem_fingerprint_properties")
470 recovery_mount_options = OPTIONS.info_dict.get("recovery_mount_options")
473 if OPTIONS.oem_source is None:
476 oem_dict = common.LoadDictionaryFromLines(open(OPTIONS.oem_source).readlines())
479 oem_props, oem_dict, OPTIONS.info_dict),
481 OPTIONS.info_dict),
483 OPTIONS.info_dict),
488 input_version=OPTIONS.info_dict["recovery_api_version"],
491 input_tmp=OPTIONS.input_tmp,
493 info_dict=OPTIONS.info_dict)
496 block_based = OPTIONS.block_based and has_recovery_patch
498 if not OPTIONS.omit_prereq:
499 ts = GetBuildProp("ro.build.date.utc", OPTIONS.info_dict)
500 ts_text = GetBuildProp("ro.build.date", OPTIONS.info_dict)
503 AppendAssertions(script, OPTIONS.info_dict, oem_dict)
526 OPTIONS.input_tmp, "RECOVERY")
527 if OPTIONS.two_step:
528 if not OPTIONS.info_dict.get("multistage_support", None):
530 fs = OPTIONS.info_dict["fstab"]["/misc"]
549 if OPTIONS.wipe_user_data:
554 if "selinux_fc" in OPTIONS.info_dict:
555 WritePolicyConfig(OPTIONS.info_dict["selinux_fc"], output_zip)
557 recovery_mount_options = OPTIONS.info_dict.get("recovery_mount_options")
566 system_tgt = GetImage("system", OPTIONS.input_tmp, OPTIONS.info_dict)
581 OPTIONS.input_tmp, "BOOT")
588 common.MakeRecoveryPatch(OPTIONS.input_tmp, output_sink,
599 vendor_tgt = GetImage("vendor", OPTIONS.input_tmp, OPTIONS.info_dict)
614 common.CheckSize(boot_img.data, "boot.img", OPTIONS.info_dict)
623 if OPTIONS.extra_script is not None:
624 script.AppendExtra(OPTIONS.extra_script)
628 if OPTIONS.wipe_user_data:
632 if OPTIONS.two_step:
644 script.AddToZip(input_zip, output_zip, input_path=OPTIONS.updater_binary)
695 source_version = OPTIONS.source_info_dict["recovery_api_version"]
696 target_version = OPTIONS.target_info_dict["recovery_api_version"]
702 OPTIONS.target_info_dict)
705 OPTIONS.source_info_dict),
707 OPTIONS.target_info_dict),
718 info_dict=OPTIONS.info_dict)
720 source_fp = GetBuildProp("ro.build.fingerprint", OPTIONS.source_info_dict)
721 target_fp = GetBuildProp("ro.build.fingerprint", OPTIONS.target_info_dict)
726 "/tmp/boot.img", "boot.img", OPTIONS.source_tmp, "BOOT",
727 OPTIONS.source_info_dict)
729 "/tmp/boot.img", "boot.img", OPTIONS.target_tmp, "BOOT")
730 updating_boot = (not OPTIONS.two_step and
734 "/tmp/recovery.img", "recovery.img", OPTIONS.source_tmp, "RECOVERY",
735 OPTIONS.source_info_dict)
737 "/tmp/recovery.img", "recovery.img", OPTIONS.target_tmp, "RECOVERY")
740 system_src = GetImage("system", OPTIONS.source_tmp, OPTIONS.source_info_dict)
741 system_tgt = GetImage("system", OPTIONS.target_tmp, OPTIONS.target_info_dict)
748 vendor_src = GetImage("vendor", OPTIONS.source_tmp, OPTIONS.source_info_dict)
749 vendor_tgt = GetImage("vendor", OPTIONS.target_tmp, OPTIONS.target_info_dict)
755 oem_props = OPTIONS.target_info_dict.get("oem_fingerprint_properties")
756 recovery_mount_options = OPTIONS.target_info_dict.get("recovery_mount_options")
759 if OPTIONS.oem_source is None:
762 oem_dict = common.LoadDictionaryFromLines(open(OPTIONS.oem_source).readlines())
764 AppendAssertions(script, OPTIONS.target_info_dict, oem_dict)
788 if OPTIONS.two_step:
789 if not OPTIONS.info_dict.get("multistage_support", None):
791 fs = OPTIONS.info_dict["fstab"]["/misc"]
815 GetBuildProp("ro.build.thumbprint", OPTIONS.target_info_dict),
816 GetBuildProp("ro.build.thumbprint", OPTIONS.source_info_dict))
819 boot_type, boot_device = common.GetTypeAndDevice("/boot", OPTIONS.info_dict)
840 if OPTIONS.two_step:
857 if OPTIONS.two_step:
862 if not OPTIONS.two_step:
888 if OPTIONS.extra_script is not None:
889 script.AppendExtra(OPTIONS.extra_script)
891 if OPTIONS.wipe_user_data:
895 if OPTIONS.two_step:
903 script.AddToZip(target_zip, output_zip, input_path=OPTIONS.updater_binary)
941 if sf is None or fn in OPTIONS.require_verbatim:
943 if fn in OPTIONS.prohibit_verbatim:
962 if d is None or len(d) > tf.size * OPTIONS.patch_threshold or \
1039 if (OPTIONS.block_based and
1044 source_version = OPTIONS.source_info_dict["recovery_api_version"]
1045 target_version = OPTIONS.target_info_dict["recovery_api_version"]
1051 OPTIONS.target_info_dict)
1053 oem_props = OPTIONS.info_dict.get("oem_fingerprint_properties")
1054 recovery_mount_options = OPTIONS.info_dict.get("recovery_mount_options")
1057 if OPTIONS.oem_source is None:
1060 oem_dict = common.LoadDictionaryFromLines(open(OPTIONS.oem_source).readlines())
1063 OPTIONS.source_info_dict),
1065 OPTIONS.target_info_dict),
1076 info_dict=OPTIONS.info_dict)
1086 target_fp = CalculateFingerprint(oem_props, oem_dict, OPTIONS.target_info_dict)
1087 source_fp = CalculateFingerprint(oem_props, oem_dict, OPTIONS.source_info_dict)
1093 GetBuildProp("ro.build.thumbprint", OPTIONS.target_info_dict),
1094 GetBuildProp("ro.build.thumbprint", OPTIONS.source_info_dict))
1100 "/tmp/boot.img", "boot.img", OPTIONS.source_tmp, "BOOT",
1101 OPTIONS.source_info_dict)
1103 "/tmp/boot.img", "boot.img", OPTIONS.target_tmp, "BOOT")
1104 updating_boot = (not OPTIONS.two_step and
1108 "/tmp/recovery.img", "recovery.img", OPTIONS.source_tmp, "RECOVERY",
1109 OPTIONS.source_info_dict)
1111 "/tmp/recovery.img", "recovery.img", OPTIONS.target_tmp, "RECOVERY")
1120 AppendAssertions(script, OPTIONS.target_info_dict, oem_dict)
1144 if OPTIONS.two_step:
1145 if not OPTIONS.info_dict.get("multistage_support", None):
1147 fs = OPTIONS.info_dict["fstab"]["/misc"]
1180 boot_type, boot_device = common.GetTypeAndDevice("/boot", OPTIONS.info_dict)
1197 if OPTIONS.two_step:
1209 if OPTIONS.two_step:
1232 if not OPTIONS.two_step:
1270 common.MakeRecoveryPatch(OPTIONS.target_tmp, output_sink,
1346 if OPTIONS.extra_script is not None:
1347 script.AppendExtra(OPTIONS.extra_script)
1355 if OPTIONS.wipe_user_data:
1359 if OPTIONS.two_step:
1366 if OPTIONS.verify and system_diff:
1372 if OPTIONS.verify and vendor_diff:
1377 script.AddToZip(target_zip, output_zip, input_path=OPTIONS.updater_binary)
1388 OPTIONS.package_key = a
1390 OPTIONS.incremental_source = a
1392 OPTIONS.wipe_user_data = True
1394 OPTIONS.omit_prereq = True
1396 OPTIONS.oem_source = a
1398 OPTIONS.extra_script = a
1401 OPTIONS.aslr_mode = True
1403 OPTIONS.aslr_mode = False
1406 OPTIONS.worker_threads = int(a)
1411 OPTIONS.two_step = True
1413 OPTIONS.no_signing = True
1415 OPTIONS.verify = True
1417 OPTIONS.block_based = True
1419 OPTIONS.updater_binary = a
1421 OPTIONS.fallback_to_full = False
1450 if OPTIONS.extra_script is not None:
1451 OPTIONS.extra_script = open(OPTIONS.extra_script).read()
1454 OPTIONS.input_tmp, input_zip = common.UnzipTemp(args[0])
1456 OPTIONS.target_tmp = OPTIONS.input_tmp
1457 OPTIONS.info_dict = common.LoadInfoDict(input_zip)
1463 if "selinux_fc" in OPTIONS.info_dict:
1464 OPTIONS.info_dict["selinux_fc"] = os.path.join(OPTIONS.input_tmp, "BOOT", "RAMDISK",
1467 if OPTIONS.verbose:
1469 common.DumpInfoDict(OPTIONS.info_dict)
1478 if OPTIONS.device_specific is None:
1479 from_input = os.path.join(OPTIONS.input_tmp, "META", "releasetools.py")
1482 OPTIONS.device_specific = from_input
1484 OPTIONS.device_specific = OPTIONS.info_dict.get("tool_extensions", None)
1486 if OPTIONS.device_specific is not None:
1487 OPTIONS.device_specific = os.path.abspath(OPTIONS.device_specific)
1491 if OPTIONS.no_signing:
1499 if OPTIONS.incremental_source is None:
1501 if OPTIONS.package_key is None:
1502 OPTIONS.package_key = OPTIONS.info_dict.get(
1509 OPTIONS.source_tmp, source_zip = common.UnzipTemp(OPTIONS.incremental_source)
1510 OPTIONS.target_info_dict = OPTIONS.info_dict
1511 OPTIONS.source_info_dict = common.LoadInfoDict(source_zip)
1512 if "selinux_fc" in OPTIONS.source_info_dict:
1513 OPTIONS.source_info_dict["selinux_fc"] = os.path.join(OPTIONS.source_tmp, "BOOT", "RAMDISK",
1515 if OPTIONS.package_key is None:
1516 OPTIONS.package_key = OPTIONS.source_info_dict.get(
1519 if OPTIONS.verbose:
1521 common.DumpInfoDict(OPTIONS.source_info_dict)
1526 if not OPTIONS.fallback_to_full: raise
1528 OPTIONS.incremental_source = None
1533 if not OPTIONS.no_signing: