build: Add basic T1 patches

Restore basic communication from stripped KernelRelayHost logic
This commit is contained in:
Mykola Grymalyuk
2023-07-31 18:31:30 -06:00
parent 84a3341788
commit 1038be303b
6 changed files with 137 additions and 1 deletions

View File

@@ -1707,6 +1707,60 @@
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
<key>Comment</key>
<string>AppleSSE - T1</string>
<key>Enabled</key>
<false/>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string>23.0.0</string>
<key>BundlePath</key>
<string>AppleSSE.kext</string>
<key>ExecutablePath</key>
<string>Contents/MacOS/AppleSSE</string>
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
<key>Comment</key>
<string>AppleCredentialManager - T1</string>
<key>Enabled</key>
<false/>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string>23.0.0</string>
<key>BundlePath</key>
<string>AppleCredentialManager.kext</string>
<key>ExecutablePath</key>
<string>Contents/MacOS/AppleCredentialManager</string>
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
<key>Comment</key>
<string>AppleKeyStore - T1</string>
<key>Enabled</key>
<false/>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string>23.0.0</string>
<key>BundlePath</key>
<string>AppleKeyStore.kext</string>
<key>ExecutablePath</key>
<string>Contents/MacOS/AppleKeyStore</string>
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
</array>
<key>Block</key>
<array>
@@ -1726,6 +1780,54 @@
<key>Strategy</key>
<string>Exclude</string>
</dict>
<dict>
<key>Arch</key>
<string>Any</string>
<key>Comment</key>
<string>Allow AppleSSE Downgrade</string>
<key>Enabled</key>
<false/>
<key>Identifier</key>
<string>com.apple.driver.AppleSSE</string>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string>23.0.0</string>
<key>Strategy</key>
<string>Exclude</string>
</dict>
<dict>
<key>Arch</key>
<string>Any</string>
<key>Comment</key>
<string>Allow AppleCredentialManager Downgrade</string>
<key>Enabled</key>
<false/>
<key>Identifier</key>
<string>com.apple.driver.AppleCredentialManager</string>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string>23.0.0</string>
<key>Strategy</key>
<string>Exclude</string>
</dict>
<dict>
<key>Arch</key>
<string>Any</string>
<key>Comment</key>
<string>Allow AppleCredentialManager Downgrade</string>
<key>Enabled</key>
<false/>
<key>Identifier</key>
<string>com.apple.driver.AppleKeyStore</string>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string>23.0.0</string>
<key>Strategy</key>
<string>Exclude</string>
</dict>
</array>
<key>Emulate</key>
<dict>

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -43,6 +43,7 @@ class BuildMiscellaneous:
self._debug_handling()
self._cpu_friend_handling()
self._general_oc_handling()
self._t1_handling()
def _feature_unlock_handling(self) -> None:
@@ -338,4 +339,22 @@ class BuildMiscellaneous:
if self.constants.vault is True and utilities.check_command_line_tools() is True:
logging.info("- Setting Vault configuration")
self.config["Misc"]["Security"]["Vault"] = "Secure"
support.BuildSupport(self.model, self.constants, self.config).get_efi_binary_by_path("OpenShell.efi", "Misc", "Tools")["Enabled"] = False
support.BuildSupport(self.model, self.constants, self.config).get_efi_binary_by_path("OpenShell.efi", "Misc", "Tools")["Enabled"] = False
def _t1_handling(self) -> None:
"""
T1 Security Chip Handler
"""
if self.model not in ["MacBookPro13,2", "MacBookPro13,3", "MacBookPro14,2", "MacBookPro14,3"]:
return
logging.info("- Enabling T1 Security Chip support")
support.BuildSupport(self.model, self.constants, self.config).get_item_by_kv(self.config["Kernel"]["Block"], "Identifier", "com.apple.driver.AppleSSE")["Enabled"] = True
support.BuildSupport(self.model, self.constants, self.config).get_item_by_kv(self.config["Kernel"]["Block"], "Identifier", "com.apple.driver.AppleCredentialManager")["Enabled"] = True
support.BuildSupport(self.model, self.constants, self.config).get_item_by_kv(self.config["Kernel"]["Block"], "Identifier", "com.apple.driver.AppleKeyStore")["Enabled"] = True
support.BuildSupport(self.model, self.constants, self.config).enable_kext("AppleSSE.kext", self.constants.t1_sse_version, self.constants.t1_sse_path)
support.BuildSupport(self.model, self.constants, self.config).enable_kext("AppleCredentialManager.kext", self.constants.t1_credential_version, self.constants.t1_credential_path)
support.BuildSupport(self.model, self.constants, self.config).enable_kext("AppleKeyStore.kext", self.constants.t1_key_store_version, self.constants.t1_key_store_path)

View File

@@ -67,6 +67,9 @@ class Constants:
self.aicpupm_version: str = "1.0.0" # AppleIntelCPUPowerManagement/Client
self.s3x_nvme_version: str = "1.0.0" # IONVMeFamily (14.0 Beta 1, S1X and S3X classes)
self.apple_camera_version: str = "1.0.0" # AppleCameraInterface (14.0 Beta 1)
self.t1_credential_version: str = "1.0.0" # AppleCredentialManager (13.5 - T1 support)
self.t1_sse_version: str = "1.0.0" # AppleSSE (13.5 - T1 support)
self.t1_key_store_version: str = "1.0.0" # AppleKeyStore (13.5 - T1 support)
## Apple - Dortania Modified
self.bcm570_version: str = "1.0.2" # CatalinaBCM5701Ethernet
@@ -430,6 +433,18 @@ class Constants:
def top_case_path(self):
return self.payload_kexts_path / Path(f"Misc/AppleUSBTopCase-v{self.topcase_version}.zip")
@property
def t1_key_store_path(self):
return self.payload_kexts_path / Path(f"Misc/AppleKeyStore-v{self.t1_key_store_version}.zip")
@property
def t1_credential_path(self):
return self.payload_kexts_path / Path(f"Misc/AppleCredentialManager-v{self.t1_credential_version}.zip")
@property
def t1_sse_path(self):
return self.payload_kexts_path / Path(f"Misc/AppleSSE-v{self.t1_sse_version}.zip")
@property
def mousse_path(self):
return self.payload_kexts_path / Path(f"SSE/AAAMouSSE-v{self.mousse_version}.zip")