mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-06-19 22:00:00 +10:00
Add ApECID backend
This commit is contained in:
@@ -9,6 +9,7 @@ import subprocess
|
|||||||
import uuid
|
import uuid
|
||||||
import zipfile
|
import zipfile
|
||||||
import ast
|
import ast
|
||||||
|
import secrets
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from datetime import date
|
from datetime import date
|
||||||
|
|
||||||
@@ -587,6 +588,11 @@ class BuildOpenCore:
|
|||||||
print("- Adding CPU Name Patch")
|
print("- Adding CPU Name Patch")
|
||||||
if self.get_kext_by_bundle_path("RestrictEvents.kext")["Enabled"] is False:
|
if self.get_kext_by_bundle_path("RestrictEvents.kext")["Enabled"] is False:
|
||||||
self.enable_kext("RestrictEvents.kext", self.constants.restrictevents_version, self.constants.restrictevents_path)
|
self.enable_kext("RestrictEvents.kext", self.constants.restrictevents_version, self.constants.restrictevents_path)
|
||||||
|
if self.constants.apecid_support is True:
|
||||||
|
print("- Generating ApECID value")
|
||||||
|
apecid = secrets.randbits(64)
|
||||||
|
print(f"- Setting ApECID: {apecid}")
|
||||||
|
self.config["Misc"]["Security"]["ApECID"] = int(apecid)
|
||||||
|
|
||||||
def set_smbios(self):
|
def set_smbios(self):
|
||||||
spoofed_model = self.model
|
spoofed_model = self.model
|
||||||
|
|||||||
@@ -80,6 +80,7 @@ class Constants:
|
|||||||
self.disallow_cpufriend = False
|
self.disallow_cpufriend = False
|
||||||
self.recovery_status = False
|
self.recovery_status = False
|
||||||
self.override_smbios = "Default"
|
self.override_smbios = "Default"
|
||||||
|
self.apecid_support = False
|
||||||
|
|
||||||
# OS Versions
|
# OS Versions
|
||||||
self.tiger = 8
|
self.tiger = 8
|
||||||
|
|||||||
Reference in New Issue
Block a user