mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-14 04:38:20 +10:00
Disable verbose and misc fixes
Closes https://github.com/dortania/OpenCore-Legacy-Patcher/issues/97 Closes https://github.com/dortania/OpenCore-Legacy-Patcher/issues/96
This commit is contained in:
@@ -3,6 +3,10 @@
|
||||
## 0.0.18
|
||||
- Disable Vault by default due to breaking installations
|
||||
- Move BOOTx64.efi to System/Library/CoreServices/ to support GPT BootCamp installs
|
||||
- Disable verbose by default, still configurable by end-user
|
||||
- Remove `AppleInternal`(0x10) from SIP value
|
||||
- Add Mac Pro DRM patches for Metal GPUs
|
||||
- Force `Moderate` SMBIOS replacement for models without native APFS support
|
||||
|
||||
## 0.0.17
|
||||
- Fix build detection breaking on older OS
|
||||
|
||||
@@ -20,6 +20,8 @@ class OpenCoreLegacyPatcher():
|
||||
self.current_model = [line.strip().split(": ", 1)[1] for line in self.current_model.stdout.decode().split("\n") if line.strip().startswith("Model Identifier")][0]
|
||||
self.constants.detected_os, _, _ = platform.mac_ver()
|
||||
self.constants.detected_os = float('.'.join(self.constants.detected_os.split('.')[:2]))
|
||||
if self.current_model in ModelArray.NoAPFSsupport:
|
||||
self.constants.serial_settings = "Moderate"
|
||||
|
||||
def build_opencore(self):
|
||||
build.BuildOpenCore(self.constants.custom_model or self.current_model, self.constants).build_opencore()
|
||||
@@ -44,6 +46,8 @@ system_profiler SPHardwareDataType | grep 'Model Identifier'
|
||||
if print_models in {"y", "Y", "yes", "Yes"}:
|
||||
print("\n".join(ModelArray.SupportedSMBIOS))
|
||||
input("Press any key to continue...")
|
||||
if self.constants.custom_model in ModelArray.NoAPFSsupport:
|
||||
self.constants.serial_settings = "Moderate"
|
||||
|
||||
def change_os(self):
|
||||
utilities.cls()
|
||||
@@ -150,7 +154,7 @@ Recommended for adanced users who want control how serials are handled
|
||||
Valid options:
|
||||
|
||||
1. Minimal:\tUse original serials and minimally update SMBIOS
|
||||
2. Moderate:\tReplave entire SMBIOS but keep original serials
|
||||
2. Moderate:\tReplace entire SMBIOS but keep original serials
|
||||
3. Advanced:\tReplace entire SMBIOS and generate new serials
|
||||
|
||||
Note: For new users we recommend leaving as default(1. Minimal)
|
||||
@@ -202,7 +206,7 @@ Note: For secuirty reasons, OpenShell will be disabled when Vault is set.
|
||||
utilities.header(["Set SIP and SecureBootModel"])
|
||||
print("""SIP and SecureBootModel are used to ensure proper OTA functionality,
|
||||
however to patch the root volume both of these must be disabled.
|
||||
Only disable is absolutely necessary.
|
||||
Only disable is absolutely necessary. SIP value = 0xFEF
|
||||
|
||||
Note: for minor changes, SIP can be adjusted in recovery like normal.
|
||||
Additionally, when disabling SIP via the patcher amfi_get_out_of_my_way=1
|
||||
|
||||
@@ -42,7 +42,7 @@ class Constants:
|
||||
self.opencore_debug = False
|
||||
self.opencore_build = "RELEASE"
|
||||
self.kext_debug = False
|
||||
self.verbose_debug = True
|
||||
self.verbose_debug = False
|
||||
self.os_support = 11.0
|
||||
self.min_os_support = 11.0
|
||||
self.max_os_support = 11.0
|
||||
@@ -149,6 +149,8 @@ class Constants:
|
||||
@property
|
||||
def app_icon_path(self): return self.current_path / Path("OC-Patcher.icns")
|
||||
@property
|
||||
def icon_path(self): return self.payload_path / Path("Icon/.VolumeIcon.icns")
|
||||
def icon_path_external(self): return self.payload_path / Path("Icon/External/.VolumeIcon.icns")
|
||||
@property
|
||||
def icon_path_internal(self): return self.payload_path / Path("Icon/Internal/.VolumeIcon.icns")
|
||||
@property
|
||||
def gui_path(self): return self.payload_path / Path("Icon/Resources.zip")
|
||||
|
||||
@@ -816,4 +816,24 @@ NoSATAPatch = [
|
||||
"iMac14,1",
|
||||
"iMac14,2",
|
||||
"iMac14,3",
|
||||
]
|
||||
|
||||
NoAPFSsupport = [
|
||||
"MacBook5,1",
|
||||
"MacBook5,2",
|
||||
"MacBookAir2,1",
|
||||
"MacBookPro4,1",
|
||||
"MacBookPro5,1",
|
||||
"MacBookPro5,2",
|
||||
"MacBookPro5,3",
|
||||
"MacBookPro5,4",
|
||||
"MacBookPro5,5",
|
||||
"Macmini3,1",
|
||||
"iMac7,1",
|
||||
"iMac8,1",
|
||||
"iMac9,1",
|
||||
"MacPro3,1",
|
||||
"MacPro4,1",
|
||||
"Xserve3,1",
|
||||
"Dortania1,1"
|
||||
]
|
||||
@@ -208,6 +208,10 @@ class BuildOpenCore:
|
||||
amd_patch(self)
|
||||
elif (self.constants.current_gpuv == "NVIDIA (0x10de)") & (self.constants.current_gpud in ModelArray.NVIDIAMXMGPUs):
|
||||
nvidia_patch(self)
|
||||
elif self.model in ModelArray.MacPro71:
|
||||
print("- Adding Mac Pro, Xserve DRM patches")
|
||||
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " shikigva=128 unfairgva=1 -wegtree"
|
||||
|
||||
|
||||
# Add OpenCanopy
|
||||
print("- Adding OpenCanopy GUI")
|
||||
@@ -250,7 +254,7 @@ class BuildOpenCore:
|
||||
self.get_tool_by__path("OpenShell.efi")["Enabled"] = False
|
||||
if self.constants.sip_status is False:
|
||||
print("- Disabling SIP")
|
||||
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["csr-active-config"] = binascii.unhexlify("FF0F0000")
|
||||
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["csr-active-config"] = binascii.unhexlify("EF0F0000")
|
||||
self.config["NVRAM"]["Delete"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"] += ["csr-active-config"]
|
||||
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " amfi_get_out_of_my_way=1"
|
||||
if self.constants.secure_status is False:
|
||||
@@ -335,10 +339,13 @@ class BuildOpenCore:
|
||||
self.config["PlatformInfo"]["Generic"]["SystemUUID"] = str(uuid.uuid4()).upper()
|
||||
|
||||
if self.constants.serial_settings == "Moderate":
|
||||
print("- Using Moderate SMBIOS patching")
|
||||
moderate_serial_patch(self)
|
||||
elif self.constants.serial_settings == "Advanced":
|
||||
print("- Using Advanced SMBIOS patching")
|
||||
adanced_serial_patch(self)
|
||||
else:
|
||||
print("- Using Minimal SMBIOS patching")
|
||||
self.spoofed_model = self.model
|
||||
minimal_serial_patch(self)
|
||||
|
||||
@@ -544,7 +551,6 @@ Please build OpenCore first!"""
|
||||
# TODO: Remount if readonly
|
||||
partition_info = plistlib.loads(subprocess.run(f"diskutil info -plist {disk_identifier}s{response}".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode())
|
||||
mount_path = Path(partition_info["MountPoint"])
|
||||
|
||||
utilities.cls()
|
||||
utilities.header(["Copying OpenCore"])
|
||||
|
||||
@@ -558,7 +564,8 @@ Please build OpenCore first!"""
|
||||
print("- Coping OpenCore onto EFI partition")
|
||||
shutil.copytree(self.constants.opencore_release_folder / Path("EFI/OC"), mount_path / Path("EFI/OC"))
|
||||
shutil.copytree(self.constants.opencore_release_folder / Path("System"), mount_path / Path("System"))
|
||||
shutil.copy(self.constants.icon_path, mount_path)
|
||||
# TODO: Add drive detection for custom icons (ie. USB, etc)
|
||||
shutil.copy(self.constants.icon_path_internal, mount_path)
|
||||
print("- OpenCore transfer complete")
|
||||
print("\nPress [Enter] to continue.\n")
|
||||
input()
|
||||
|
||||
@@ -13,7 +13,7 @@ features:
|
||||
- title: Built with security in mind
|
||||
details: Supporting System Integrity Protection(SIP), FileVault 2, .im4m Secure Boot and Vaulting. You're just as secure as a supported Mac
|
||||
- title: Native OTA updates
|
||||
details: Install updates the moment the come out just like on a supported Mac, and no more 12GB+ updates.
|
||||
details: Install updates the moment they come out just like on a supported Mac, and no more 12GB+ updates.
|
||||
- title: Zero firmware patching
|
||||
details: No need to patch APFS ROM support, all protocol upgrades are done in memory and never permanent.
|
||||
footer: Copyright © Dortania 2020-2021
|
||||
|
||||
BIN
images/OC-Picker-External.png
Normal file
BIN
images/OC-Picker-External.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 129 KiB |
|
Before Width: | Height: | Size: 141 KiB After Width: | Height: | Size: 141 KiB |
BIN
payloads/Icon/External/.VolumeIcon.icns
vendored
Executable file
BIN
payloads/Icon/External/.VolumeIcon.icns
vendored
Executable file
Binary file not shown.
Reference in New Issue
Block a user