mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-13 20:28:21 +10:00
Add IO80211ElCap verification
This commit is contained in:
@@ -294,13 +294,12 @@ set million colour before rebooting"""
|
||||
def add_audio_patch(self):
|
||||
self.delete_old_binaries(SysPatchArray.DeleteVolumeControl)
|
||||
self.add_new_binaries(SysPatchArray.AddVolumeControl, self.constants.audio_path)
|
||||
|
||||
|
||||
def add_wifi_patch(self):
|
||||
print("- Merging Wireless CoreSerices patches")
|
||||
self.elevated(["rsync", "-r", "-i", "-a", f"{self.constants.legacy_wifi_coreservices}/", self.mount_coreservices], stdout=subprocess.PIPE)
|
||||
print("- Merging Wireless usr/libexec patches")
|
||||
self.elevated(["rsync", "-r", "-i", "-a", f"{self.constants.legacy_wifi_libexec}/", self.mount_libexec], stdout=subprocess.PIPE)
|
||||
|
||||
|
||||
def gpu_accel_legacy(self):
|
||||
if self.constants.detected_os == self.constants.mojave:
|
||||
@@ -513,7 +512,7 @@ set million colour before rebooting"""
|
||||
if self.legacy_audio is True:
|
||||
print("- Fixing Volume Control Support")
|
||||
self.add_audio_patch()
|
||||
|
||||
|
||||
if self.legacy_wifi is True:
|
||||
print("- Installing legacy Wireless support")
|
||||
self.add_wifi_patch()
|
||||
@@ -637,7 +636,7 @@ set million colour before rebooting"""
|
||||
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):
|
||||
if self.constants.detected_os > self.constants.big_sur:
|
||||
if self.constants.detected_os > self.constants.big_sur and Utilities.check_monterey_wifi is True:
|
||||
self.legacy_wifi = True
|
||||
|
||||
Utilities.cls()
|
||||
|
||||
@@ -135,6 +135,7 @@ def amfi_status():
|
||||
return False
|
||||
return True
|
||||
|
||||
|
||||
def check_oclp_boot():
|
||||
if get_nvram("OCLP-Version", "4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102", decode=False):
|
||||
return True
|
||||
@@ -142,6 +143,16 @@ def check_oclp_boot():
|
||||
return False
|
||||
|
||||
|
||||
def check_monterey_wifi():
|
||||
IO80211ElCap = "com.apple.iokit.IO80211ElCap (1110.26)"
|
||||
CoreCaptureElCap = "com.apple.driver.corecaptureElCap (1.0.4)"
|
||||
loaded_kexts: str = subprocess.run("kextcache".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.decode()
|
||||
if IO80211ElCap in loaded_kexts and CoreCaptureElCap in loaded_kexts:
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
||||
|
||||
def patching_status(os_sip, os):
|
||||
# Detection for Root Patching
|
||||
sip_enabled = True # System Integrity Protection
|
||||
@@ -244,10 +255,10 @@ def download_file(link, location):
|
||||
chunk = file.read(1024 * 1024 * 16)
|
||||
return checksum
|
||||
|
||||
def enable_apfs(fw_feature, fw_mask):
|
||||
fw_feature |= 2**19
|
||||
fw_mask |= 2**19
|
||||
|
||||
def enable_apfs(fw_feature, fw_mask):
|
||||
fw_feature |= 2 ** 19
|
||||
fw_mask |= 2 ** 19
|
||||
|
||||
|
||||
# def menu(title, prompt, menu_options, add_quit=True, auto_number=False, in_between=[], top_level=False):
|
||||
|
||||
Reference in New Issue
Block a user