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