Sync Changelog

This commit is contained in:
Mykola Grymalyuk
2022-07-03 11:59:35 -06:00
parent ba0fae0fe7
commit 7c8ea41c37
2 changed files with 18 additions and 13 deletions
+2
View File
@@ -7,6 +7,8 @@
- Add error-handling to corrupt/non-standard NVRAM variables - Add error-handling to corrupt/non-standard NVRAM variables
- Add warning prompt when using 'Allow native models' - Add warning prompt when using 'Allow native models'
- Attempt to avoid misuse of option - Attempt to avoid misuse of option
- Work-around `Failed to extract AssetData` during installer creation
- Apple bug, resolved by using CoW into a different directory than `/Applications`
## 0.4.7 ## 0.4.7
- Fix crashing on defaults parsing - Fix crashing on defaults parsing
+16 -13
View File
@@ -28,20 +28,23 @@ class sys_patch_helpers:
board_to_patch_hex = bytes.fromhex(board_to_patch.encode('utf-8').hex()) board_to_patch_hex = bytes.fromhex(board_to_patch.encode('utf-8').hex())
reported_board_hex = bytes.fromhex(self.constants.computer.reported_board_id.encode('utf-8').hex()) reported_board_hex = bytes.fromhex(self.constants.computer.reported_board_id.encode('utf-8').hex())
if len(board_to_patch_hex) != len(reported_board_hex): if len(board_to_patch_hex) > len(reported_board_hex):
print(f"- Error: Board ID {self.constants.computer.reported_board_id} is not the same length as {board_to_patch}") # Pad the reported Board ID with zeros to match the length of the board to patch
raise Exception("Host's Board ID is not the same length as the kext's Board ID, cannot patch!!!") reported_board_hex = reported_board_hex + bytes(len(board_to_patch_hex) - len(reported_board_hex))
elif len(board_to_patch_hex) < len(reported_board_hex):
print(f"- Error: Board ID {self.constants.computer.reported_board_id} is longer than {board_to_patch}")
raise Exception("Host's Board ID is longer than the kext's Board ID, cannot patch!!!")
path = source_files_path + "/10.13.6/System/Library/Extensions/AppleIntelSNBGraphicsFB.kext/Contents/MacOS/AppleIntelSNBGraphicsFB"
if Path(path).exists():
with open(path, 'rb') as f:
data = f.read()
data = data.replace(board_to_patch_hex, reported_board_hex)
with open(path, 'wb') as f:
f.write(data)
else: else:
path = source_files_path + "/10.13.6/System/Library/Extensions/AppleIntelSNBGraphicsFB.kext/Contents/MacOS/AppleIntelSNBGraphicsFB" print(f"- Error: Could not find {path}")
if Path(path).exists(): raise Exception("Failed to find AppleIntelSNBGraphicsFB.kext, cannot patch!!!")
with open(path, 'rb') as f:
data = f.read()
data = data.replace(board_to_patch_hex, reported_board_hex)
with open(path, 'wb') as f:
f.write(data)
else:
print(f"- Error: Could not find {path}")
raise Exception("Failed to find AppleIntelSNBGraphicsFB.kext, cannot patch!!!")
def generate_patchset_plist(self, patchset, file_name): def generate_patchset_plist(self, patchset, file_name):