mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-14 04:38:20 +10:00
Misc Ventura fixes
This commit is contained in:
@@ -42,7 +42,8 @@ def SystemPatchDictionary(os_major, os_minor, non_metal_os_support):
|
||||
"CoreDisplay.framework": f"10.14.4-{os_major}",
|
||||
"IOSurface.framework": f"10.15.7-{os_major}",
|
||||
"QuartzCore.framework": f"10.15.7-{os_major}",
|
||||
**({ "WebKit.framework": "11.6" } if os_major >= os_data.os_data.monterey else {}),
|
||||
# Ventura breaks with this patch
|
||||
**({ "WebKit.framework": "11.6" } if os_major == os_data.os_data.monterey else {}),
|
||||
},
|
||||
"/System/Library/PrivateFrameworks": {
|
||||
"GPUSupport.framework": "10.14.3",
|
||||
|
||||
@@ -960,7 +960,10 @@ class BuildOpenCore:
|
||||
# self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " amfi_get_out_of_my_way=1"
|
||||
if self.constants.disable_cs_lv is True:
|
||||
print("- Disabling Library Validation")
|
||||
self.get_item_by_kv(self.config["Kernel"]["Patch"], "Comment", "Disable Library Validation Enforcement")["Enabled"] = True
|
||||
# In Ventura, LV patch broke. For now, add AMFI arg
|
||||
# Before merging into mainline, this needs to be resolved
|
||||
# self.get_item_by_kv(self.config["Kernel"]["Patch"], "Comment", "Disable Library Validation Enforcement")["Enabled"] = True
|
||||
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " amfi_get_out_of_my_way=0x1"
|
||||
self.config["NVRAM"]["Add"]["4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102"]["OCLP-Settings"] += " -allow_amfi"
|
||||
# CSLVFixup simply patches out __RESTRICT and __restrict out of the Music.app Binary
|
||||
# Ref: https://pewpewthespells.com/blog/blocking_code_injection_on_ios_and_os_x.html
|
||||
|
||||
@@ -184,4 +184,9 @@ class generate_defaults:
|
||||
|
||||
nv_web_status = global_settings.global_settings().read_property("Force_Web_Drivers")
|
||||
if nv_web_status is True:
|
||||
settings.force_nv_web = True
|
||||
settings.force_nv_web = True
|
||||
|
||||
|
||||
if settings.disable_cs_lv is True:
|
||||
# With Ventura, SIP needs to be lowered for AMFI to work
|
||||
settings.custom_sip_value = "0xA03"
|
||||
@@ -51,6 +51,7 @@ class PatchSysVolume:
|
||||
self.constants.needs_to_open_preferences = False
|
||||
self.patch_set_dictionary = {}
|
||||
self.needs_kmutil_exemptions = False # For '/Library/Extensions' rebuilds
|
||||
self.kdk_path = None
|
||||
|
||||
# GUI will detect hardware patches before starting PatchSysVolume()
|
||||
# However the TUI will not, so allow for data to be passed in manually avoiding multiple calls
|
||||
@@ -111,15 +112,16 @@ class PatchSysVolume:
|
||||
if kdk_path is None:
|
||||
print("- Unable to find Kernel Debug Kit")
|
||||
raise Exception("Unable to find Kernel Debug Kit")
|
||||
self.kdk_path = kdk_path
|
||||
print(f"- Found KDK at: {kdk_path}")
|
||||
print("- Merging KDK with Root Volume")
|
||||
utilities.elevated(
|
||||
["ditto", f"{kdk_path}/System", f"{self.mount_location}/System"],
|
||||
["ditto", f"{kdk_path}/System/Library/Library/Extensions", f"{self.mount_location}/System/Library/Library/Extensions"],
|
||||
stdout=subprocess.PIPE, stderr=subprocess.STDOUT
|
||||
)
|
||||
# During reversing, we found that kmutil uses this path to determine whether the KDK was successfully merged
|
||||
# Best to verify now before we cause any damage
|
||||
if not (Path(self.mount_location) / Path("/System/Library/Extensions/System.kext/PlugIns/Libkern.kext/Libkern")).exists():
|
||||
if not (Path(self.mount_location) / Path("System/Library/Extensions/System.kext/PlugIns/Libkern.kext/Libkern")).exists():
|
||||
print("- Unable to merge KDK with Root Volume")
|
||||
raise Exception("Unable to merge KDK with Root Volume")
|
||||
print("- Successfully merged KDK with Root Volume")
|
||||
|
||||
@@ -190,7 +190,7 @@ class AutomaticSysPatch:
|
||||
# Strip everything after OpenCore-Patcher.app
|
||||
path = str(settings.launcher_binary).split("/Contents/MacOS/OpenCore-Patcher")[0]
|
||||
print(f"- Copying {path} to /Library/Application Support/Dortania/")
|
||||
utilities.process_status(utilities.elevated(["cp", "-R", path, "/Library/Application Support/Dortania/"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||
utilities.process_status(utilities.elevated(["ditto", path, "/Library/Application Support/Dortania/OpenCore-Patcher.app"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||
|
||||
if not Path("/Library/Application Support/Dortania/OpenCore-Patcher.app").exists():
|
||||
# Sometimes the binary the user launches maye have a suffix (ie. OpenCore-Patcher 3.app)
|
||||
|
||||
Reference in New Issue
Block a user