From 49fa20ecc3deb80489303b55d9b7dd6d4366d493 Mon Sep 17 00:00:00 2001 From: Mykola Grymalyuk <48863253+khronokernel@users.noreply.github.com> Date: Thu, 23 Sep 2021 11:48:10 -0600 Subject: [PATCH] Disable SIP on legacy Wifi Macs --- OCLP-CLI.command | 6 ++++++ OpenCore-Patcher.command | 6 ++++++ Resources/SysPatch.py | 4 ++-- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/OCLP-CLI.command b/OCLP-CLI.command index 93fcba546..a2065a08b 100755 --- a/OCLP-CLI.command +++ b/OCLP-CLI.command @@ -204,6 +204,12 @@ If you plan to create the USB for another machine, please select the "Change Mod self.constants.sip_status = False self.constants.amfi_status = True self.constants.allow_fv_root = True # Allow FileVault on broken seal + if ( + isinstance(self.computer.wifi, device_probe.Broadcom) + and self.computer.wifi.chipset in [device_probe.Broadcom.Chipsets.AirPortBrcm4331, device_probe.Broadcom.Chipsets.AirPortBrcm43224] + ) or (isinstance(self.computer.wifi, device_probe.Atheros) and self.computer.wifi.chipset == device_probe.Atheros.Chipsets.AirPortAtheros40): + self.constants.sip_status = False + self.constants.allow_fv_root = True # Allow FileVault on broken seal elif model in ModelArray.LegacyGPU: self.constants.disable_cs_lv = True if model in ModelArray.LegacyGPU: diff --git a/OpenCore-Patcher.command b/OpenCore-Patcher.command index f16877c59..666a45304 100755 --- a/OpenCore-Patcher.command +++ b/OpenCore-Patcher.command @@ -35,6 +35,12 @@ class OpenCoreLegacyPatcher: self.constants.sip_status = False self.constants.amfi_status = True self.constants.allow_fv_root = True # Allow FileVault on broken seal + if ( + isinstance(self.computer.wifi, device_probe.Broadcom) + and self.computer.wifi.chipset in [device_probe.Broadcom.Chipsets.AirPortBrcm4331, device_probe.Broadcom.Chipsets.AirPortBrcm43224] + ) or (isinstance(self.computer.wifi, device_probe.Atheros) and self.computer.wifi.chipset == device_probe.Atheros.Chipsets.AirPortAtheros40): + self.constants.sip_status = False + self.constants.allow_fv_root = True # Allow FileVault on broken seal elif model in ModelArray.LegacyGPU: self.constants.disable_cs_lv = True diff --git a/Resources/SysPatch.py b/Resources/SysPatch.py index 57d6af849..f7993703e 100644 --- a/Resources/SysPatch.py +++ b/Resources/SysPatch.py @@ -660,8 +660,8 @@ set million colour before rebooting""" if ( isinstance(self.constants.computer.wifi, device_probe.Broadcom) - and self.computer.wifi.chipset in [device_probe.Broadcom.Chipsets.AirPortBrcm4331, device_probe.Broadcom.Chipsets.AirPortBrcm43224] - ) or (isinstance(self.computer.wifi, device_probe.Atheros) and self.computer.wifi.chipset == device_probe.Atheros.Chipsets.AirPortAtheros40): + and self.constants.computer.wifi.chipset in [device_probe.Broadcom.Chipsets.AirPortBrcm4331, device_probe.Broadcom.Chipsets.AirPortBrcm43224] + ) or (isinstance(self.constants.computer.wifi, device_probe.Atheros) and self.constants.computer.wifi.chipset == device_probe.Atheros.Chipsets.AirPortAtheros40): if self.constants.detected_os > self.constants.big_sur: self.legacy_wifi = True