Mykola Grymalyuk
2021-03-13 08:52:53 -07:00
parent fa5266b069
commit 6f5d5922dc
10 changed files with 45 additions and 8 deletions
+4
View File
@@ -3,6 +3,10 @@
## 0.0.18 ## 0.0.18
- Disable Vault by default due to breaking installations - Disable Vault by default due to breaking installations
- Move BOOTx64.efi to System/Library/CoreServices/ to support GPT BootCamp installs - 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 ## 0.0.17
- Fix build detection breaking on older OS - Fix build detection breaking on older OS
+6 -2
View File
@@ -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.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, _, _ = platform.mac_ver()
self.constants.detected_os = float('.'.join(self.constants.detected_os.split('.')[:2])) 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): def build_opencore(self):
build.BuildOpenCore(self.constants.custom_model or self.current_model, self.constants).build_opencore() 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"}: if print_models in {"y", "Y", "yes", "Yes"}:
print("\n".join(ModelArray.SupportedSMBIOS)) print("\n".join(ModelArray.SupportedSMBIOS))
input("Press any key to continue...") input("Press any key to continue...")
if self.constants.custom_model in ModelArray.NoAPFSsupport:
self.constants.serial_settings = "Moderate"
def change_os(self): def change_os(self):
utilities.cls() utilities.cls()
@@ -150,7 +154,7 @@ Recommended for adanced users who want control how serials are handled
Valid options: Valid options:
1. Minimal:\tUse original serials and minimally update SMBIOS 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 3. Advanced:\tReplace entire SMBIOS and generate new serials
Note: For new users we recommend leaving as default(1. Minimal) 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"]) utilities.header(["Set SIP and SecureBootModel"])
print("""SIP and SecureBootModel are used to ensure proper OTA functionality, print("""SIP and SecureBootModel are used to ensure proper OTA functionality,
however to patch the root volume both of these must be disabled. 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. 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 Additionally, when disabling SIP via the patcher amfi_get_out_of_my_way=1
+4 -2
View File
@@ -42,7 +42,7 @@ class Constants:
self.opencore_debug = False self.opencore_debug = False
self.opencore_build = "RELEASE" self.opencore_build = "RELEASE"
self.kext_debug = False self.kext_debug = False
self.verbose_debug = True self.verbose_debug = False
self.os_support = 11.0 self.os_support = 11.0
self.min_os_support = 11.0 self.min_os_support = 11.0
self.max_os_support = 11.0 self.max_os_support = 11.0
@@ -149,6 +149,8 @@ class Constants:
@property @property
def app_icon_path(self): return self.current_path / Path("OC-Patcher.icns") def app_icon_path(self): return self.current_path / Path("OC-Patcher.icns")
@property @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 @property
def gui_path(self): return self.payload_path / Path("Icon/Resources.zip") def gui_path(self): return self.payload_path / Path("Icon/Resources.zip")
+20
View File
@@ -817,3 +817,23 @@ NoSATAPatch = [
"iMac14,2", "iMac14,2",
"iMac14,3", "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"
]
+10 -3
View File
@@ -208,6 +208,10 @@ class BuildOpenCore:
amd_patch(self) amd_patch(self)
elif (self.constants.current_gpuv == "NVIDIA (0x10de)") & (self.constants.current_gpud in ModelArray.NVIDIAMXMGPUs): elif (self.constants.current_gpuv == "NVIDIA (0x10de)") & (self.constants.current_gpud in ModelArray.NVIDIAMXMGPUs):
nvidia_patch(self) 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 # Add OpenCanopy
print("- Adding OpenCanopy GUI") print("- Adding OpenCanopy GUI")
@@ -250,7 +254,7 @@ class BuildOpenCore:
self.get_tool_by__path("OpenShell.efi")["Enabled"] = False self.get_tool_by__path("OpenShell.efi")["Enabled"] = False
if self.constants.sip_status is False: if self.constants.sip_status is False:
print("- Disabling SIP") 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"]["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" 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: if self.constants.secure_status is False:
@@ -335,10 +339,13 @@ class BuildOpenCore:
self.config["PlatformInfo"]["Generic"]["SystemUUID"] = str(uuid.uuid4()).upper() self.config["PlatformInfo"]["Generic"]["SystemUUID"] = str(uuid.uuid4()).upper()
if self.constants.serial_settings == "Moderate": if self.constants.serial_settings == "Moderate":
print("- Using Moderate SMBIOS patching")
moderate_serial_patch(self) moderate_serial_patch(self)
elif self.constants.serial_settings == "Advanced": elif self.constants.serial_settings == "Advanced":
print("- Using Advanced SMBIOS patching")
adanced_serial_patch(self) adanced_serial_patch(self)
else: else:
print("- Using Minimal SMBIOS patching")
self.spoofed_model = self.model self.spoofed_model = self.model
minimal_serial_patch(self) minimal_serial_patch(self)
@@ -544,7 +551,6 @@ Please build OpenCore first!"""
# TODO: Remount if readonly # 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()) 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"]) mount_path = Path(partition_info["MountPoint"])
utilities.cls() utilities.cls()
utilities.header(["Copying OpenCore"]) utilities.header(["Copying OpenCore"])
@@ -558,7 +564,8 @@ Please build OpenCore first!"""
print("- Coping OpenCore onto EFI partition") 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("EFI/OC"), mount_path / Path("EFI/OC"))
shutil.copytree(self.constants.opencore_release_folder / Path("System"), mount_path / Path("System")) 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("- OpenCore transfer complete")
print("\nPress [Enter] to continue.\n") print("\nPress [Enter] to continue.\n")
input() input()
+1 -1
View File
@@ -13,7 +13,7 @@ features:
- title: Built with security in mind - 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 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 - 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 - title: Zero firmware patching
details: No need to patch APFS ROM support, all protocol upgrades are done in memory and never permanent. details: No need to patch APFS ROM support, all protocol upgrades are done in memory and never permanent.
footer: Copyright © Dortania 2020-2021 footer: Copyright © Dortania 2020-2021
Binary file not shown.

After

Width:  |  Height:  |  Size: 129 KiB

Before

Width:  |  Height:  |  Size: 141 KiB

After

Width:  |  Height:  |  Size: 141 KiB

BIN
View File
Binary file not shown.