Skip to content

Commit 997c0b3

Browse files
committed
ADD APFS-Patch
1 parent 8cb39c5 commit 997c0b3

File tree

6 files changed

+96
-14
lines changed

6 files changed

+96
-14
lines changed

.github/workflows/build-app-wxpython.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
rm -rf *pay*.dmg
3030
/Library/Frameworks/Python.framework/Versions/3.11/bin/python3 -m pip install -r requirements.txt
3131
32-
aria2c -x 16 "https://github.com/hackdoc/PatcherSupportPkg/releases/download/1.10.0/Universal-Binaries.dmg"
32+
aria2c -x 16 "https://github.com/hackdoc/PatcherSupportPkg/releases/download/1.10.1-pre/Universal-Binaries.dmg"
3333
3434
- name: Force Universal2 charset for Python
3535
run: |

.github/workflows/validate.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@ jobs:
2525
/Library/Frameworks/Python.framework/Versions/3.11/bin/python3 -m pip install -r requirements.txt
2626
/Library/Frameworks/Python.framework/Versions/3.11/bin/python3 -m pip install packaging
2727
rm -rf Univ*
28-
aria2c -x 16 "https://github.com/hackdoc/PatcherSupportPkg/releases/download/1.10.0/Universal-Binaries.dmg"
28+
aria2c -x 16 "https://github.com/hackdoc/PatcherSupportPkg/releases/download/1.10.1-pre/Universal-Binaries.dmg"
2929
/Library/Frameworks/Python.framework/Versions/3.11/bin/python3 OCLP-R-GUI.command --validate

oclp_r/constants.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,7 @@ def __init__(self) -> None:
247247
self.allow_nvme_fixing: bool = True # Allow NVMe Kernel Space Patches
248248
self.apfs_trim_timeout: bool = True # Set APFS Trim timeout
249249
self.custom_sip_value: int = None # Set custom SIP value
250+
self.allow_apfs_aligned_patch: bool = True
250251

251252
## Non-Metal OS support
252253
self.legacy_accel_support = [

oclp_r/sys_patch/patchsets/detect.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
intel_haswell,
2222
intel_broadwell,
2323
intel_skylake,
24-
24+
2525
nvidia_tesla,
2626
nvidia_kepler,
2727
nvidia_webdriver,
@@ -43,7 +43,7 @@
4343
legacy_audio,
4444
legacy_usb11,
4545
modern_audio,
46-
46+
apfs_aligned,
4747
Launch,
4848
modern_usb,
4949
pcie_webcam,
@@ -134,7 +134,7 @@ def __init__(self, constants: constants.Constants,
134134
modern_wireless.ModernWireless,
135135
legacy_audio.LegacyAudio,
136136
modern_audio.ModernAudio,
137-
137+
apfs_aligned.APFSP,
138138
Launch.LaunchPad,
139139
voodoo_audio.VoodooAudio,
140140
modern_usb.LegacyUSBHost,
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
"""
2+
modern_audio.py: Modern Audio patch set for macOS 26
3+
"""
4+
5+
from ..base import BaseHardware, HardwareVariant
6+
7+
from ...base import PatchType
8+
9+
from .....constants import Constants
10+
11+
from .....datasets.os_data import os_data
12+
13+
from .....support import utilities
14+
15+
16+
class APFSP(BaseHardware):
17+
18+
def __init__(self, xnu_major, xnu_minor, os_build, global_constants: Constants) -> None:
19+
super().__init__(xnu_major, xnu_minor, os_build, global_constants)
20+
21+
22+
def name(self) -> str:
23+
"""
24+
Display name for end users
25+
"""
26+
return f"{self.hardware_variant()}: FileVault Patch for Non-T2"
27+
28+
29+
def present(self) -> bool:
30+
"""
31+
AppleHDA was outright removed in macOS 26, so this patch set is always present if OS requires it
32+
"""
33+
return True
34+
35+
def requires_kernel_debug_kit(self) -> bool:
36+
"""
37+
Apple no longer provides standalone kexts in the base OS
38+
"""
39+
return self._constants.allow_apfs_aligned_patch
40+
def native_os(self) -> bool:
41+
"""
42+
- Everything before macOS Tahoe 26 is considered native
43+
"""
44+
if self._xnu_major < os_data.tahoe.value:
45+
return True
46+
47+
48+
49+
return False
50+
51+
52+
def hardware_variant(self) -> HardwareVariant:
53+
"""
54+
Type of hardware variant
55+
"""
56+
return HardwareVariant.MISCELLANEOUS
57+
58+
59+
def _apfs_patches(self) -> dict:
60+
"""
61+
Patches for Modern Audio
62+
"""
63+
return {
64+
"Modern Audio": {
65+
PatchType.OVERWRITE_SYSTEM_VOLUME: {
66+
"/usr/standalone/i386": {
67+
"apfs.efi": "15.6",
68+
"apfs_aligned.efi": "15.6",
69+
},
70+
},
71+
},
72+
}
73+
74+
75+
def patches(self) -> dict:
76+
"""
77+
Patches for modern audio
78+
"""
79+
if self.native_os() is True:
80+
return {}
81+
82+
return self._apfs_patches()

oclp_r/wx_gui/gui_settings.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -799,19 +799,18 @@ def _settings(self) -> dict:
799799
"When enabled, this will patch the LaunchPad",
800800
"on Tahoe.",
801801
],
802-
"condition":self.condition_exp("LP")
802+
#"condition":self.condition_exp("LP")
803803
},
804-
"Allow Control Center Patch (Exp.)": {
804+
"Allow APFS Patch For Non-T2": {
805805
"type": "checkbox",
806-
"value": self.constants.change_control_center,
807-
"variable": "change_control_center",
808-
"constants_variable": "change_control_center",
806+
"value": self.constants.allow_apfs_aligned_patch,
807+
"variable": "allow_apfs_aligned_patch",
808+
"constants_variable": "allow_apfs_aligned_patch",
809809
"description": [
810-
"When enabled, this will patch the Control",
811-
"Center on Tahoe.",
810+
"When enabled, this will patch the apfs.efi",
811+
"on Tahoe.",
812812
],
813-
"condition":self.condition_exp("CC")
814-
},
813+
},
815814
"AppleHDA.kext Version": {
816815
"type": "choice",
817816
"choices": [

0 commit comments

Comments
 (0)