diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b885695e..e67466f95 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ - Resolve unused KDKs not being properly cleaned up - Implement MXM graphics handling for iMac9,1 - Credit to [Ausdauersportler](https://github.com/Ausdauersportler) for implementation +- Resolve accidental CPU renaming with RestrictEvents - Backend changes: - Use `.AppleSystemUIFont` for wxPython text rendering (thanks [jazzzny](https://github.com/Jazzzny)) - Add extra error handling for network errors: diff --git a/resources/build/misc.py b/resources/build/misc.py index 37191649e..0efc0f778 100644 --- a/resources/build/misc.py +++ b/resources/build/misc.py @@ -112,15 +112,6 @@ class BuildMiscellaneous: support.BuildSupport(self.model, self.constants, self.config).enable_kext("RestrictEvents.kext", self.constants.restrictevents_version, self.constants.restrictevents_path) self.config["NVRAM"]["Add"]["4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102"]["revpatch"] = patch_args - if self.constants.custom_cpu_model == 0 or self.constants.custom_cpu_model == 1: - self.config["NVRAM"]["Add"]["4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102"]["revcpu"] = self.constants.custom_cpu_model - if self.constants.custom_cpu_model_value != "": - logging.info(f"- Adding custom CPU Name: {self.constants.custom_cpu_model_value}") - self.config["NVRAM"]["Add"]["4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102"]["revcpuname"] = self.constants.custom_cpu_model_value - else: - logging.info("- Adding CPU Name Patch") - support.BuildSupport(self.model, self.constants, self.config).enable_kext("RestrictEvents.kext", self.constants.restrictevents_version, self.constants.restrictevents_path) - if support.BuildSupport(self.model, self.constants, self.config).get_kext_by_bundle_path("RestrictEvents.kext")["Enabled"] is False: # Ensure this is done at the end so all previous RestrictEvents patches are applied # RestrictEvents and EFICheckDisabler will conflict if both are injected diff --git a/resources/build/smbios.py b/resources/build/smbios.py index 6e0568680..ad8357e8a 100644 --- a/resources/build/smbios.py +++ b/resources/build/smbios.py @@ -235,10 +235,6 @@ class BuildSMBIOS: self.config["PlatformInfo"]["SMBIOS"]["SystemProductName"] = self.model self.config["PlatformInfo"]["SMBIOS"]["BoardVersion"] = self.model - # ProcessorType (when RestrictEvent's CPU naming is used) - if self.constants.custom_cpu_model == 0 or self.constants.custom_cpu_model == 1: - self.config["PlatformInfo"]["SMBIOS"]["ProcessorType"] = 1537 - # Avoid incorrect Firmware Updates self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["run-efi-updater"] = "No" self.config["PlatformInfo"]["SMBIOS"]["BIOSVersion"] = "9999.999.999.999.999" @@ -273,8 +269,6 @@ class BuildSMBIOS: Implements a full SMBIOS replacement, however retains original serial numbers (unless override requested) """ - if self.constants.custom_cpu_model == 0 or self.constants.custom_cpu_model == 1: - self.config["PlatformInfo"]["Generic"]["ProcessorType"] = 1537 if self.constants.custom_serial_number != "" and self.constants.custom_board_serial_number != "": logging.info("- Adding custom serial numbers") self.config["PlatformInfo"]["Generic"]["SystemSerialNumber"] = self.constants.custom_serial_number @@ -297,8 +291,6 @@ class BuildSMBIOS: Implements a full SMBIOS replacement, including serial numbers """ - if self.constants.custom_cpu_model == 0 or self.constants.custom_cpu_model == 1: - self.config["PlatformInfo"]["Generic"]["ProcessorType"] = 1537 if self.constants.custom_serial_number == "" or self.constants.custom_board_serial_number == "": macserial_output = subprocess.run([self.constants.macserial_path] + f"-g -m {self.spoofed_model} -n 1".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT) macserial_output = macserial_output.stdout.decode().strip().split(" | ") diff --git a/resources/constants.py b/resources/constants.py index 2322e1ef9..67d2b42e7 100644 --- a/resources/constants.py +++ b/resources/constants.py @@ -156,10 +156,6 @@ class Constants: self.override_smbios: str = "Default" # Set SMBIOS model used self.allow_native_spoofs: bool = False # Allow native models to recieve spoofs - ### RestrictEvents CPU renaming - self.custom_cpu_model: int = 2 # Patch type value - self.custom_cpu_model_value: str = "" # New CPU name within About This Mac - ### Serial Number Overrides self.custom_serial_number: str = "" # Set SMBIOS serial number self.custom_board_serial_number: str = "" # Set SMBIOS board serial number diff --git a/resources/defaults.py b/resources/defaults.py index d001e8e01..5c568c7b1 100644 --- a/resources/defaults.py +++ b/resources/defaults.py @@ -146,12 +146,6 @@ class GenerateDefaults: self.constants.custom_serial_number = "" self.constants.custom_board_serial_number = "" - custom_cpu_model_value = utilities.get_nvram("revcpuname", "4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102", decode=True) - if custom_cpu_model_value is not None: - # TODO: Fix to not use two separate variables - self.constants.custom_cpu_model = 1 - self.constants.custom_cpu_model_value = custom_cpu_model_value.split("%00")[0] - def _networking_probe(self) -> None: """