Lines Matching refs:OPTIONS
80 OPTIONS = common.OPTIONS
81 OPTIONS.package_key = None
82 OPTIONS.incremental_source = None
83 OPTIONS.require_verbatim = set()
84 OPTIONS.prohibit_verbatim = set(("system/build.prop",))
85 OPTIONS.patch_threshold = 0.95
86 OPTIONS.wipe_user_data = False
87 OPTIONS.omit_prereq = False
88 OPTIONS.extra_script = None
89 OPTIONS.aslr_mode = True
90 OPTIONS.worker_threads = 3
299 key_passwords = common.GetKeyPasswords([OPTIONS.package_key])
300 pw = key_passwords[OPTIONS.package_key]
302 common.SignFile(temp_zip_name, output_zip_name, OPTIONS.package_key, pw,
341 boot_type, boot_device = common.GetTypeAndDevice("/boot", OPTIONS.info_dict)
342 recovery_type, recovery_device = common.GetTypeAndDevice("/recovery", OPTIONS.info_dict)
369 script = edify_generator.EdifyGenerator(3, OPTIONS.info_dict)
372 OPTIONS.info_dict),
374 OPTIONS.info_dict),
376 OPTIONS.info_dict),
381 input_version=OPTIONS.info_dict["recovery_api_version"],
384 input_tmp=OPTIONS.input_tmp,
386 info_dict=OPTIONS.info_dict)
388 if not OPTIONS.omit_prereq:
389 ts = GetBuildProp("ro.build.date.utc", OPTIONS.info_dict)
392 AppendAssertions(script, OPTIONS.info_dict)
398 if OPTIONS.wipe_user_data:
401 if "selinux_fc" in OPTIONS.info_dict:
402 WritePolicyConfig(OPTIONS.info_dict["selinux_fc"], output_zip)
413 OPTIONS.input_tmp, "BOOT")
415 OPTIONS.input_tmp, "RECOVERY")
416 MakeRecoveryPatch(OPTIONS.input_tmp, output_zip, recovery_img, boot_img)
421 common.CheckSize(boot_img.data, "boot.img", OPTIONS.info_dict)
431 if OPTIONS.extra_script is not None:
432 script.AppendExtra(OPTIONS.extra_script)
471 source_version = OPTIONS.source_info_dict["recovery_api_version"]
472 target_version = OPTIONS
478 OPTIONS.target_info_dict)
481 OPTIONS.source_info_dict),
483 OPTIONS.target_info_dict),
494 info_dict=OPTIONS.info_dict)
510 if sf is None or fn in OPTIONS.require_verbatim:
512 if fn in OPTIONS.prohibit_verbatim:
528 if d is None or len(d) > tf.size * OPTIONS.patch_threshold:
537 source_fp = GetBuildProp("ro.build.fingerprint", OPTIONS.source_info_dict)
538 target_fp = GetBuildProp("ro.build.fingerprint", OPTIONS.target_info_dict)
546 "/tmp/boot.img", "boot.img", OPTIONS.source_tmp, "BOOT",
547 OPTIONS.source_info_dict)
549 "/tmp/boot.img", "boot.img", OPTIONS.target_tmp, "BOOT")
553 "/tmp/recovery.img", "recovery.img", OPTIONS.source_tmp, "RECOVERY",
554 OPTIONS.source_info_dict)
556 "/tmp/recovery.img", "recovery.img", OPTIONS.target_tmp, "RECOVERY")
565 AppendAssertions(script, OPTIONS.target_info_dict)
591 boot_type, boot_device = common.GetTypeAndDevice("/boot", OPTIONS.info_dict)
609 if OPTIONS.wipe_user_data:
664 MakeRecoveryPatch(OPTIONS.target_tmp, output_zip,
725 if OPTIONS.extra_script is not None:
726 script.AppendExtra(OPTIONS.extra_script)
747 OPTIONS.package_key = a
749 OPTIONS.incremental_source = a
751 OPTIONS.wipe_user_data = True
753 OPTIONS.omit_prereq = True
755 OPTIONS.extra_script = a
758 OPTIONS.aslr_mode = True
760 OPTIONS.aslr_mode = False
762 OPTIONS.worker_threads = int(a)
784 if OPTIONS.extra_script is not None:
785 OPTIONS.extra_script = open(OPTIONS.extra_script).read()
788 OPTIONS.input_tmp, input_zip = common.UnzipTemp(args[0])
790 OPTIONS.target_tmp = OPTIONS.input_tmp
791 OPTIONS.info_dict = common.LoadInfoDict(input_zip)
797 if "selinux_fc" in OPTIONS.info_dict:
798 OPTIONS.info_dict["selinux_fc"] = os.path.join(OPTIONS.input_tmp, "BOOT", "RAMDISK",
801 if OPTIONS.verbose:
803 common.DumpInfoDict(OPTIONS.info_dict)
805 if OPTIONS.device_specific is None:
806 OPTIONS.device_specific = OPTIONS.info_dict.get("tool_extensions", None)
807 if OPTIONS.device_specific is not None:
808 OPTIONS.device_specific = os.path.normpath(OPTIONS.device_specific)
809 print "using device-specific extensions in", OPTIONS.device_specific
815 if OPTIONS.incremental_source is None:
817 if OPTIONS.package_key is None:
818 OPTIONS.package_key = OPTIONS.info_dict.get(
823 OPTIONS.source_tmp, source_zip = common.UnzipTemp(OPTIONS.incremental_source)
824 OPTIONS.target_info_dict = OPTIONS.info_dict
825 OPTIONS.source_info_dict = common.LoadInfoDict(source_zip)
826 if OPTIONS.package_key is None:
827 OPTIONS.package_key = OPTIONS.source_info_dict.get(
830 if OPTIONS.verbose:
832 common.DumpInfoDict(OPTIONS.source_info_dict)