diff --git a/resources/arguments.py b/resources/arguments.py index fe571d163..19db0350a 100644 --- a/resources/arguments.py +++ b/resources/arguments.py @@ -66,9 +66,6 @@ class arguments: if self.args.nvme: print("- Set NVMe Boot configuration") settings.nvme_boot = True - # if self.args.disable_amfi: - # print("- Set Disable AMFI configuration") - # settings.amfi_status = False if self.args.wlan: print("- Set Wake on WLAN configuration") settings.enable_wake_on_wlan = True diff --git a/resources/cli_menu.py b/resources/cli_menu.py index 342befda6..ff91cc916 100644 --- a/resources/cli_menu.py +++ b/resources/cli_menu.py @@ -222,24 +222,6 @@ Q. Return to previous menu else: self.change_sbm() - def set_amfi(self): - utilities.cls() - utilities.header(["Set AMFI"]) - print( - """Required for Root Patching non-Metal GPUs -in macOS Big Sur. Without this, will receive kernel panic once -Patcher finishes installing legacy acceleration patches. - """ - ) - change_menu = input("Disable AMFI(y/n/q): ") - if change_menu in {"y", "Y", "yes", "Yes"}: - self.constants.amfi_status = False - elif change_menu in {"n", "N", "no", "No"}: - self.constants.amfi_status = True - elif change_menu in {"q", "Q", "Quit", "quit"}: - print("Returning to previous menu") - else: - self.set_amfi() def bootstrap_setting(self): utilities.cls() @@ -1077,10 +1059,6 @@ system_profiler SPHardwareDataType | grep 'Model Identifier' title = ["Adjust Security Settings"] menu = tui_helpers.TUIMenu(title, "Please select an option: ", auto_number=True, top_level=True) options = [ - # [ - # f"Set Apple Mobile File Integrity (AMFI):\tCurrently {self.constants.amfi_status}", - # MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).set_amfi, - # ], [ f"Set System Integrity Protection (SIP):\tCurrently {self.constants.custom_sip_value or self.constants.sip_status}", MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).change_sip, diff --git a/resources/constants.py b/resources/constants.py index f1968554a..d2ca2b881 100644 --- a/resources/constants.py +++ b/resources/constants.py @@ -148,7 +148,6 @@ class Constants: ## Security Settings self.apecid_support = False # ApECID - self.amfi_status = True # Apple Mobile File Integrity self.sip_status = True # System Integrity Protection self.secure_status = False # Secure Boot Model self.vault = False # EFI Vault diff --git a/resources/defaults.py b/resources/defaults.py index 6f72b271d..b2222c238 100644 --- a/resources/defaults.py +++ b/resources/defaults.py @@ -14,7 +14,6 @@ class generate_defaults: # Reset Variables self.constants.sip_status = True self.constants.secure_status = False - self.constants.amfi_status = True self.constants.disable_cs_lv = False self.constants.disable_amfi = False @@ -180,6 +179,12 @@ class generate_defaults: device_probe.AMD.Archs.Vega, device_probe.AMD.Archs.Navi, ]: + if gpu == device_probe.AMD.Archs.Legacy_GCN_7000: + # Check if we're running in Rosetta + if self.host_is_target: + if self.constants.computer.rosetta_active is True: + continue + # Allow H.265 on AMD if self.model in smbios_data.smbios_dictionary: if "Socketed GPUs" in smbios_data.smbios_dictionary[self.model]: diff --git a/resources/device_probe.py b/resources/device_probe.py index f426dcaa6..8ef27e9b9 100644 --- a/resources/device_probe.py +++ b/resources/device_probe.py @@ -485,6 +485,7 @@ class Computer: oclp_sys_date: Optional[str] = None oclp_sys_url: Optional[str] = None firmware_vendor: Optional[str] = None + rosetta_active: Optional[bool] = False @staticmethod def probe(): @@ -503,6 +504,7 @@ class Computer: computer.ambient_light_sensor_probe() computer.sata_disk_probe() computer.oclp_sys_patch_probe() + computer.check_rosetta() return computer def gpu_probe(self): @@ -771,4 +773,11 @@ class Computer: if "Time Patched" in sys_plist: self.oclp_sys_date = sys_plist["Time Patched"] if "Commit URL" in sys_plist: - self.oclp_sys_url = sys_plist["Commit URL"] \ No newline at end of file + self.oclp_sys_url = sys_plist["Commit URL"] + + def check_rosetta(self): + result = subprocess.run("sysctl -in sysctl.proc_translated".split(), stdout=subprocess.PIPE).stdout.decode() + if result: + self.rosetta_active = True + else: + self.rosetta_active = False \ No newline at end of file