mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-14 12:48:18 +10:00
Add AMFIPass (#1051)
This commit is contained in:
@@ -3,26 +3,16 @@
|
||||
# Used when supplying data to sys_patch.py
|
||||
# Copyright (C) 2020-2022, Dhinak G, Mykola Grymalyuk
|
||||
|
||||
import plistlib
|
||||
import logging
|
||||
import py_sip_xnu
|
||||
import plistlib
|
||||
from pathlib import Path
|
||||
|
||||
from resources import (
|
||||
constants,
|
||||
device_probe,
|
||||
utilities,
|
||||
amfi_detect,
|
||||
network_handler,
|
||||
kdk_handler
|
||||
)
|
||||
from data import (
|
||||
model_array,
|
||||
os_data,
|
||||
sip_data,
|
||||
smbios_data,
|
||||
cpu_data
|
||||
)
|
||||
import packaging.version
|
||||
import py_sip_xnu
|
||||
|
||||
from data import cpu_data, model_array, os_data, sip_data, smbios_data
|
||||
from resources import (amfi_detect, constants, device_probe, kdk_handler,
|
||||
network_handler, utilities)
|
||||
|
||||
|
||||
class DetectRootPatch:
|
||||
@@ -418,7 +408,7 @@ class DetectRootPatch:
|
||||
bool: True if loaded, False otherwise
|
||||
"""
|
||||
|
||||
return utilities.check_kext_loaded("WhateverGreen", self.constants.detected_os)
|
||||
return utilities.check_kext_loaded("as.vit9696.WhateverGreen")
|
||||
|
||||
|
||||
def _check_kdk(self):
|
||||
@@ -521,7 +511,7 @@ class DetectRootPatch:
|
||||
if self.constants.detected_os > os_data.os_data.catalina:
|
||||
self.brightness_legacy = True
|
||||
|
||||
if self.model in ["iMac7,1", "iMac8,1"] or (self.model in model_array.LegacyAudio and utilities.check_kext_loaded("AppleALC", self.constants.detected_os) is False):
|
||||
if self.model in ["iMac7,1", "iMac8,1"] or (self.model in model_array.LegacyAudio and utilities.check_kext_loaded("as.vit9696.AppleALC") is False):
|
||||
# Special hack for systems with botched GOPs
|
||||
# TL;DR: No Boot Screen breaks Lilu, therefore breaking audio
|
||||
if self.constants.detected_os > os_data.os_data.catalina:
|
||||
@@ -610,6 +600,12 @@ class DetectRootPatch:
|
||||
if self.constants.detected_os < os_data.os_data.big_sur:
|
||||
return amfi_detect.AmfiConfigDetectLevel.NO_CHECK
|
||||
|
||||
amfipass_version = utilities.check_kext_loaded("com.dhinakg.AMFIPass")
|
||||
if amfipass_version:
|
||||
if packaging.version.parse(amfipass_version) >= packaging.version.parse(self.constants.amfipass_compatibility_version):
|
||||
# If AMFIPass is loaded, our binaries will work
|
||||
return amfi_detect.AmfiConfigDetectLevel.NO_CHECK
|
||||
|
||||
if self.constants.detected_os >= os_data.os_data.ventura:
|
||||
if self.amfi_shim_bins is True:
|
||||
# Currently we require AMFI outright disabled
|
||||
|
||||
Reference in New Issue
Block a user