sys_patch: Avoid listing Modern Wifi patch

Binaries are currently not public, however patcher may confuse some users that it added support
This commit is contained in:
Mykola Grymalyuk
2023-06-08 09:27:14 -06:00
parent 9a483181a1
commit 985e053e90
8 changed files with 104 additions and 26 deletions
+9
View File
@@ -45,6 +45,11 @@ class BuildWirelessNetworking:
self.config["#Revision"]["Hardware-Wifi"] = f"{utilities.friendly_hex(self.computer.wifi.vendor_id)}:{utilities.friendly_hex(self.computer.wifi.device_id)}"
if isinstance(self.computer.wifi, device_probe.Broadcom):
if self.computer.wifi.chipset == device_probe.Broadcom.Chipsets.AirportBrcmNIC:
support.BuildSupport(self.model, self.constants, self.config).enable_kext("IOSkywalkFamily.kext", self.constants.ioskywalk_version, self.constants.ioskywalk_path)
support.BuildSupport(self.model, self.constants, self.config).enable_kext("IO80211FamilyLegacy.kext", self.constants.io80211legacy_version, self.constants.io80211legacy_path)
support.BuildSupport(self.model, self.constants, self.config).get_kext_by_bundle_path("IO80211FamilyLegacy.kext/Contents/PlugIns/AirPortBrcmNIC.kext")["Enabled"] = True
support.BuildSupport(self.model, self.constants, self.config).get_item_by_kv(self.config["Kernel"]["Block"], "Identifier", "com.apple.iokit.IOSkywalkFamily")["Enabled"] = True
# This works around OCLP spoofing the Wifi card and therefore unable to actually detect the correct device
if self.computer.wifi.chipset == device_probe.Broadcom.Chipsets.AirportBrcmNIC and self.constants.validate is False and self.computer.wifi.country_code:
support.BuildSupport(self.model, self.constants, self.config).enable_kext("AirportBrcmFixup.kext", self.constants.airportbcrmfixup_version, self.constants.airportbcrmfixup_path)
@@ -102,6 +107,10 @@ class BuildWirelessNetworking:
support.BuildSupport(self.model, self.constants, self.config).enable_kext("IO80211ElCap.kext", self.constants.io80211elcap_version, self.constants.io80211elcap_path)
support.BuildSupport(self.model, self.constants, self.config).get_kext_by_bundle_path("IO80211ElCap.kext/Contents/PlugIns/AirPortAtheros40.kext")["Enabled"] = True
elif smbios_data.smbios_dictionary[self.model]["Wireless Model"] == device_probe.Broadcom.Chipsets.AirportBrcmNIC:
support.BuildSupport(self.model, self.constants, self.config).enable_kext("IOSkywalkFamily.kext", self.constants.ioskywalk_version, self.constants.ioskywalk_path)
support.BuildSupport(self.model, self.constants, self.config).enable_kext("IO80211FamilyLegacy.kext", self.constants.io80211legacy_version, self.constants.io80211legacy_path)
support.BuildSupport(self.model, self.constants, self.config).get_kext_by_bundle_path("IO80211FamilyLegacy.kext/Contents/PlugIns/AirPortBrcmNIC.kext")["Enabled"] = True
support.BuildSupport(self.model, self.constants, self.config).get_item_by_kv(self.config["Kernel"]["Block"], "Identifier", "com.apple.iokit.IOSkywalkFamily")["Enabled"] = True
support.BuildSupport(self.model, self.constants, self.config).enable_kext("AirportBrcmFixup.kext", self.constants.airportbcrmfixup_version, self.constants.airportbcrmfixup_path)
+10
View File
@@ -70,6 +70,8 @@ class Constants:
self.i210_version: str = "1.0.0" # CatalinaIntelI210Ethernet
self.corecaptureelcap_version: str = "1.0.1" # corecaptureElCap
self.io80211elcap_version: str = "2.0.0" # IO80211ElCap
self.io80211legacy_version: str = "1.0.0" # IO80211FamilyLegacy (Ventura)
self.ioskywalk_version: str = "1.0.0" # IOSkywalkFamily (Ventura)
self.bigsursdxc_version: str = "1.0.0" # BigSurSDXC
self.monterey_ahci_version: str = "1.0.0" # CatalinaAHCI
@@ -418,6 +420,14 @@ class Constants:
def io80211elcap_path(self):
return self.payload_kexts_path / Path(f"Wifi/IO80211ElCap-v{self.io80211elcap_version}.zip")
@property
def io80211legacy_path(self):
return self.payload_kexts_path / Path(f"Wifi/IO80211FamilyLegacy-v{self.io80211legacy_version}.zip")
@property
def ioskywalk_path(self):
return self.payload_kexts_path / Path(f"Wifi/IOSkywalkFamily-v{self.ioskywalk_version}.zip")
@property
def applealc_path(self):
return self.payload_kexts_path / Path(f"Acidanthera/AppleALC-v{self.applealc_version}-{self.kext_variant}.zip")
-1
View File
@@ -33,7 +33,6 @@
# 'sudo ditto /Library/Developer/KDKs/<KDK Version>/System /System/Volumes/Update/mnt1/System'
import plistlib
import shutil
import subprocess
from pathlib import Path
from datetime import datetime
+13 -10
View File
@@ -258,7 +258,6 @@ class DetectRootPatch:
if self.requires_root_kc is True:
self.missing_kdk = not self._check_kdk()
self._check_networking_support()
def _check_networking_support(self):
@@ -272,9 +271,10 @@ class DetectRootPatch:
On subsequent runs, we'll require networking to be enabled.
"""
if self.constants.detected_os < os_data.os_data.ventura:
# Increase OS check if modern wifi is detected
if self.constants.detected_os < os_data.os_data.ventura if self.legacy_wifi is True else os_data.os_data.sonoma:
return
if self.legacy_wifi is False:
if self.legacy_wifi is False and self.modern_wifi is False:
return
if self.requires_root_kc is False:
return
@@ -543,13 +543,13 @@ class DetectRootPatch:
# Due to extracted frameworks for IO80211.framework and co, check library validation
self.amfi_must_disable = True
if (
isinstance(self.constants.computer.wifi, device_probe.Broadcom)
and self.constants.computer.wifi.chipset in [device_probe.Broadcom.Chipsets.AirPortBrcm4360, device_probe.Broadcom.Chipsets.AirportBrcmNIC]):
if self.constants.detected_os > os_data.os_data.ventura:
self.modern_wifi = True
self.amfi_must_disable = True
self.requires_root_kc = True
# if (
# isinstance(self.constants.computer.wifi, device_probe.Broadcom)
# and self.constants.computer.wifi.chipset in [device_probe.Broadcom.Chipsets.AirPortBrcm4360, device_probe.Broadcom.Chipsets.AirportBrcmNIC]):
# if self.constants.detected_os > os_data.os_data.ventura:
# self.modern_wifi = True
# self.amfi_must_disable = True
# self.requires_root_kc = True
# if self.model in ["MacBookPro5,1", "MacBookPro5,2", "MacBookPro5,3", "MacBookPro8,2", "MacBookPro8,3"]:
if self.model in ["MacBookPro8,2", "MacBookPro8,3"]:
@@ -566,6 +566,9 @@ class DetectRootPatch:
self.legacy_gmux = True
self._detect_gpus()
# This must be performed last, as it may override previous decisions
# Namely, whether we allow patches requiring KDKs
self._check_networking_support()
self.root_patch_dict = {
"Graphics: Nvidia Tesla": self.nvidia_tesla,