diff --git a/data/smbios_data.py b/data/smbios_data.py index ec1cd696e..38dd337ea 100644 --- a/data/smbios_data.py +++ b/data/smbios_data.py @@ -1585,4 +1585,15 @@ smbios_dictionary = { "Ethernet Chipset": "Broadcom", }, + "AAPLJ53,1": { + # AppleInternal MacBookPro11,4 + "Board ID": "Mac-C08A65A66A9A3BA2", + "FirmwareFeatures": None, + "SecureBootModel": None, + "CPU Generation": cpu_data.cpu_data.haswell.value, + "Max OS Supported": os_data.os_data.mavericks, + "Wireless Model": device_probe.Broadcom.Chipsets.AirportBrcmNIC, + "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM20702_v2, + }, + } \ No newline at end of file diff --git a/resources/generate_smbios.py b/resources/generate_smbios.py index 89a38b41a..1b1caf44d 100644 --- a/resources/generate_smbios.py +++ b/resources/generate_smbios.py @@ -12,7 +12,7 @@ def set_smbios_model_spoof(model): return "MacBookAir7,1" else: # Unknown Model - raise Exception + raise Exception(f"Unknown SMBIOS for spoofing: {model}") elif model.startswith("MacBookPro"): if smbios_data.smbios_dictionary[model]["Screen Size"] == 13: return "MacBookPro12,1" @@ -25,7 +25,7 @@ def set_smbios_model_spoof(model): return "MacBookPro11,4" else: # Unknown Model - raise Exception + raise Exception(f"Unknown SMBIOS for spoofing: {model}") elif model.startswith("MacBook"): if smbios_data.smbios_dictionary[model]["Screen Size"] == 13: return "MacBookAir7,2" @@ -33,10 +33,10 @@ def set_smbios_model_spoof(model): return "MacBook9,1" else: # Unknown Model - raise Exception + raise Exception(f"Unknown SMBIOS for spoofing: {model}") else: # Unknown Model - raise Exception + raise Exception(f"Unknown SMBIOS for spoofing: {model}") except KeyError: # Found desktop model if model.startswith("MacPro") or model.startswith("Xserve"): @@ -51,7 +51,7 @@ def set_smbios_model_spoof(model): return "iMac17,1" else: # Unknown Model - raise Exception + raise Exception(f"Unknown SMBIOS for spoofing: {model}") def update_firmware_features(firmwarefeature): # Adjust FirmwareFeature to support everything macOS requires diff --git a/resources/sys_patch.py b/resources/sys_patch.py index c4eda4163..e6ba4c595 100644 --- a/resources/sys_patch.py +++ b/resources/sys_patch.py @@ -10,6 +10,7 @@ import shutil import subprocess import zipfile from pathlib import Path +import sys from resources import constants, device_probe, utilities from data import sip_data, sys_patch_data, model_array @@ -236,8 +237,16 @@ class PatchSysVolume: input("Press [ENTER] to continue with kernel and dyld cache merging") if self.constants.detected_os > self.constants.catalina: print("- Creating new APFS snapshot") - utilities.elevated(["bless", "--folder", f"{self.mount_location}/System/Library/CoreServices", "--bootefi", "--create-snapshot"], stdout=subprocess.PIPE).stdout.decode().strip().encode() - self.unmount_drive() + bless = utilities.elevated(["bless", "--folder", f"{self.mount_location}/System/Library/CoreServices", "--bootefi", "--create-snapshot"], stdout=subprocess.PIPE).stdout.decode().strip().encode() + if bless.returncode != 0: + print("- Unable to create new snapshot") + print("Reason for snapshot failure:") + print(bless.stdout.decode()) + if "Can't use last-sealed-snapshot or create-snapshot on non system volume" in bless.stdout.decode(): + print("- This is an APFS bug with Monterey! Perform a clean installation to ensure your APFS volume is built correctly") + sys.exit(1) + else: + self.unmount_drive() else: if self.constants.detected_os == self.constants.catalina: print("- Merging kernel cache")