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 ()
0 commit comments