Skip to content

Commit 0f8021a

Browse files
committed
update HDAUniversal Patch
1 parent 50e8dd3 commit 0f8021a

7 files changed

Lines changed: 90 additions & 3 deletions

File tree

oclp_r/application_entry.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ def _fix_cwd(self) -> None:
7777

7878
def check_voodoo_patch(self) -> None:
7979
self.constants.voodoo_patch_already=os.path.exists(self.constants.voodoo_kext_path)
80+
self.constants.hdau_patch_already = os.path.exists(self.constants.hdau_kext_path)
81+
8082
def _generate_base_data(self) -> None:
8183
"""
8284
Generate base data required for the patcher to run

oclp_r/constants.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,11 @@ def __init__(self) -> None:
1919
self.kdk_api_link: str = ""
2020
self.metallib_api_link: str = ""
2121
self.voodoo_patch_already: bool = False
22+
self.hdau_patch_already: bool = False
2223

2324
# Patcher Versioning
2425
self.patcher_version: str = "3.1.8" # OCLP-R
25-
self.patcher_support_pkg_version: str = "1.11.3" # PatcherSupportPkg
26+
self.patcher_support_pkg_version: str = "1.11.4" # PatcherSupportPkg
2627
self.copyright_date: str = "Copyright © 2020-2026 Dortania and Hackdoc"
2728
self.patcher_name: str = "OCLP-R"
2829

@@ -142,6 +143,7 @@ def __init__(self) -> None:
142143
self.original_path: Path = Path(__file__).parent.parent.resolve()
143144
self.payload_path: Path = self.current_path / Path("payloads")
144145
self.voodoo_kext_path = Path('/Library/Extensions/VoodooHDA.kext')
146+
self.hdau_kext_path = Path('/Library/Extensions/HDAUniversal.kext')
145147

146148

147149
# Patcher Settings

oclp_r/sys_patch/patchsets/detect.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
from .hardware.audio import(
5252
legacy_audio,
5353
modern_audio,
54+
hda_universal_audio,
5455
voodoo_audio,
5556
)
5657
from ... import constants
@@ -136,6 +137,7 @@ def __init__(self, constants: constants.Constants,
136137
legacy_audio.LegacyAudio,
137138
modern_audio.ModernAudio,
138139
voodoo_audio.VoodooAudio,
140+
hda_universal_audio.HDAU,
139141
modern_usb.LegacyUSBHost,
140142
display_backlight.DisplayBacklight,
141143
gmux.GraphicsMultiplexer,
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
"""
2+
hda_universal_audio.py: Audio patch set for macOS 26
3+
"""
4+
from .....detections.amfi_detect import AmfiConfigDetectLevel
5+
from ..base import BaseHardware, HardwareVariant
6+
from ...base import PatchType
7+
from .....constants import Constants
8+
from .....datasets.os_data import os_data
9+
from .....support import utilities
10+
class HDAU(BaseHardware):
11+
12+
def __init__(self, xnu_major, xnu_minor, os_build, global_constants: Constants) -> None:
13+
super().__init__(xnu_major, xnu_minor, os_build, global_constants)
14+
15+
16+
def name(self) -> str:
17+
"""
18+
Display name for end users
19+
"""
20+
return f"{self._trans.get(self.hardware_variant(), self.hardware_variant())}: HDAUniversal"
21+
22+
def required_amfi_level(self) -> AmfiConfigDetectLevel:
23+
"""
24+
What level of AMFI configuration is required for this patch set
25+
Currently defaulted to AMFI needing to be disabled
26+
"""
27+
return AmfiConfigDetectLevel.NO_CHECK
28+
29+
def present(self) -> bool:
30+
return self._constants.audio_type=="HDAUniversal" and not self._constants.hdau_patch_already and not self._computer.t2_chip
31+
32+
33+
def native_os(self) -> bool:
34+
if self._xnu_major < os_data.tahoe.value:
35+
return True
36+
return False
37+
38+
39+
def hardware_variant(self) -> HardwareVariant:
40+
"""
41+
Type of hardware variant
42+
"""
43+
return HardwareVariant.AUDIO
44+
45+
46+
def _hdau_audio_patches(self) -> dict:
47+
"""
48+
Patches for Modern Audio
49+
"""
50+
51+
return {
52+
"HDAUniversal": {
53+
# On macOS 26+ /Library is a firmlink to the Data volume, so
54+
# /Library/Extensions and /Library/PreferencePanes no longer exist
55+
# on the System volume. Install to the Data volume instead.
56+
PatchType.OVERWRITE_DATA_VOLUME: {
57+
"/Library/Extensions": {
58+
"HDAUniversal.kext":"HDAUniversal",
59+
},
60+
},
61+
PatchType.REMOVE_SYSTEM_VOLUME:{
62+
"/Library/Extensions":[
63+
"VoodooHDA.kext",
64+
"AppleHDADisabler.kext",
65+
],
66+
"/Library/PreferencePanes":[
67+
'VoodooHDA.prefPane',
68+
]
69+
},
70+
},
71+
}
72+
def patches(self) -> dict:
73+
"""
74+
Patches for HDAUniversal
75+
"""
76+
if self.native_os() is True:
77+
return {}
78+
79+
return self._hdau_audio_patches()

oclp_r/sys_patch/patchsets/hardware/audio/modern_audio.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ def _modern_audio_patches(self) -> dict:
7777
"/Library/Extensions":[
7878
"VoodooHDA.kext",
7979
"AppleHDADisabler.kext",
80+
"HDAUniversal.kext",
8081
],
8182
"/Library/PreferencePanes":[
8283
'VoodooHDA.prefPane',

oclp_r/sys_patch/patchsets/hardware/audio/voodoo_audio.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def required_amfi_level(self) -> AmfiConfigDetectLevel:
2727
return AmfiConfigDetectLevel.NO_CHECK
2828

2929
def present(self) -> bool:
30-
return self._constants.audio_type=="VoodooHDA" and not self._constants.voodoo_patch_already
30+
return self._constants.audio_type=="VoodooHDA" and not self._constants.voodoo_patch_already and not self._computer.t2_chip
3131

3232

3333
def native_os(self) -> bool:

oclp_r/wx_gui/gui_settings.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,8 @@ def _settings(self) -> dict:
735735
"type": "choice",
736736
"choices": [
737737
"AppleHDA",
738-
"VoodooHDA"
738+
"VoodooHDA",
739+
"HDAUniversal"
739740
],
740741
"value": self.constants.audio_type,
741742
"variable": "audio_type",

0 commit comments

Comments
 (0)