mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-15 21:28:55 +10:00
Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b9df76ebdf | ||
|
|
703acc9c19 | ||
|
|
46404c07ef | ||
|
|
aec949a17c | ||
|
|
6d97152078 | ||
|
|
b372a3f73e | ||
|
|
896c0fef58 | ||
|
|
7c626eb185 | ||
|
|
a9795b7b5f | ||
|
|
7b371e07f1 | ||
|
|
e60a53052e | ||
|
|
f71c8ddeaa | ||
|
|
806d47f413 | ||
|
|
b5da41c030 |
13
CHANGELOG.md
13
CHANGELOG.md
@@ -1,5 +1,18 @@
|
||||
# OpenCore Legacy Patcher changelog
|
||||
|
||||
## 2.5.0
|
||||
- Disable repatching a dirty root volume
|
||||
- Prevents issues if existing patches are partially overwritten
|
||||
- Thanks @crystall1nedev!
|
||||
- Add slimmed down patchset for Modern Wireless for macOS Sequoia
|
||||
- Move JavaScriptCore patch for pre-AVX Macs to RestrictEvents
|
||||
- Additionally fixes machines without WiFi cards on Sonoma+ as the patch was not applied before
|
||||
- Increment binaries:
|
||||
- OpenCorePkg 1.0.4 - release
|
||||
- Lilu 1.7.1 - release
|
||||
- RestrictEvents 1.1.7 - (rolling - b70aaa4)
|
||||
- PatcherSupportPkg 1.9.6 - release
|
||||
|
||||
## 2.4.1
|
||||
- Switch installer source to AppleDB
|
||||
- Resolves missing or incorrect installers showing up when downloading an installer
|
||||
|
||||
10
docs/ACCEL.md
Normal file
10
docs/ACCEL.md
Normal file
@@ -0,0 +1,10 @@
|
||||
This page has moved.
|
||||
|
||||
|
||||
|
||||
* [Application troubleshooting](./TROUBLESHOOT-APP.md)
|
||||
* [Booting, installer and other troubleshooting](./TROUBLESHOOT-MISC.md)
|
||||
* [Non-Metal troubleshooting](./TROUBLESHOOT-NONMETAL.md)
|
||||
* [Hardware troubleshooting](./TROUBLESHOOT-HARDWARE.md)
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@ When installing macOS Sonoma or newer on a T1 system (2016-2017), full disk wipe
|
||||
<img src="./images/wipe-volume.png" alt="WipeVolume" width="800" />
|
||||
</div>
|
||||
|
||||
[More info here](https://dortania.github.io/OpenCore-Legacy-Patcher/TROUBLESHOOTING.html#no-t1-functionality-after-installing-sonoma-or-newer)
|
||||
[More info here](https://dortania.github.io/OpenCore-Legacy-Patcher/TROUBLESHOOT-HARDWARE.html#no-t1-functionality-after-installing-sonoma-or-newer)
|
||||
|
||||
:::
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ The below page is for users experiencing issues with their overall usage of macO
|
||||
|
||||
## Broken Firefox and Thunderbird (HD 3000)
|
||||
|
||||
[Due to removal of HD 3000 support workarounds](https://hg-edge.mozilla.org/releases/mozilla-release/rev/32d4368e5a2a869bdc1f4556f020c1a6bea2a9c0) in Firefox/Thunderbird v145, Firefox and Thunderbird on HD 3000 are now broken. This may lead to system freezes and other erratic behavior on systems with this GPU, which is found in Mac models from 2011. As a workaround, hardware acceleration has to be disabled. If your system is locking up in normal mode, boot into Safe Mode by holding `Shift` on boot and disable hardware acceleration for Firefox and Thunderbird wherever applicable.
|
||||
Firefox and Thunderbird are now broken on HD 3000 [due to removal of HD 3000 support by Mozilla in v145.](https://hg-edge.mozilla.org/releases/mozilla-release/rev/32d4368e5a2a869bdc1f4556f020c1a6bea2a9c0) This may lead to system freezes and other erratic behavior on systems with this GPU, which is found in Mac models from 2011. As a workaround, hardware acceleration has to be disabled. If your system is locking up in normal mode, boot into Safe Mode by holding `Shift` on boot and disable hardware acceleration for Firefox and Thunderbird wherever applicable.
|
||||
|
||||
::: details Affected Mac models (click to expand)
|
||||
|
||||
|
||||
6
docs/TROUBLESHOOTING.md
Normal file
6
docs/TROUBLESHOOTING.md
Normal file
@@ -0,0 +1,6 @@
|
||||
This page has moved.
|
||||
|
||||
- [Application troubleshooting](./TROUBLESHOOT-APP.md)
|
||||
- [Booting, installer and other troubleshooting](./TROUBLESHOOT-MISC.md)
|
||||
- [Non-Metal troubleshooting](./TROUBLESHOOT-NONMETAL.md)
|
||||
- [Hardware troubleshooting](./TROUBLESHOOT-HARDWARE.md)
|
||||
@@ -4,12 +4,16 @@ This guide tells you different ways to uninstall OCLP and/or patches.
|
||||
|
||||
## Delete everything and revert back to native macOS
|
||||
|
||||
1. Create a USB drive with the latest officially supported macOS installer.
|
||||
2. Restart the computer and [Reset NVRAM.](https://support.apple.com/HT204063)
|
||||
3. Boot the computer using the installer USB drive.
|
||||
1. Create a USB drive with the latest officially supported macOS installer or alternatively [on most Macs](https://apple.stackexchange.com/questions/383985/which-macs-support-macos-internet-recovery) use Internet Recovery.
|
||||
* Hold `cmd` + `Option (Alt)` + `R` for Internet Recovery.
|
||||
* If doing Internet Recovery, skip step 2.
|
||||
* Caution: Internet Recovery may not always install the latest officially supported OS version.
|
||||
3. Restart and boot the computer using the installer USB drive by holding `Option (Alt)`.
|
||||
4. Go to Disk Utility and choose View -> Show All Devices.
|
||||
5. Wipe the full disk by choosing the top disk option on the left sidebar and selecting "Erase".
|
||||
6. Start macOS installation.
|
||||
7. Once finished, restart once more and [Reset NVRAM](https://support.apple.com/HT204063) to ensure a fully clean and stock system.
|
||||
|
||||
|
||||
## Manual methods
|
||||
|
||||
|
||||
@@ -13,8 +13,8 @@ from .detections import device_probe
|
||||
class Constants:
|
||||
def __init__(self) -> None:
|
||||
# Patcher Versioning
|
||||
self.patcher_version: str = "2.4.1" # OpenCore-Legacy-Patcher
|
||||
self.patcher_support_pkg_version: str = "1.9.5" # PatcherSupportPkg
|
||||
self.patcher_version: str = "2.5.0" # OpenCore-Legacy-Patcher
|
||||
self.patcher_support_pkg_version: str = "1.9.6" # PatcherSupportPkg
|
||||
self.copyright_date: str = "Copyright © 2020-2025 Dortania"
|
||||
self.patcher_name: str = "OpenCore Legacy Patcher"
|
||||
|
||||
@@ -33,13 +33,13 @@ class Constants:
|
||||
# Kext Versioning
|
||||
## Acidanthera
|
||||
## https://github.com/acidanthera
|
||||
self.lilu_version: str = "1.7.0" # Lilu
|
||||
self.lilu_version: str = "1.7.1" # Lilu
|
||||
self.whatevergreen_version: str = "1.6.9" # WhateverGreen
|
||||
self.whatevergreen_navi_version: str = "1.6.9-Navi" # WhateverGreen (Navi Patch)
|
||||
self.airportbcrmfixup_version: str = "2.1.9" # AirPortBrcmFixup
|
||||
self.nvmefix_version: str = "1.1.2" # NVMeFix
|
||||
self.applealc_version: str = "1.6.3" # AppleALC
|
||||
self.restrictevents_version: str = "1.1.5" # RestrictEvents
|
||||
self.restrictevents_version: str = "1.1.7" # RestrictEvents
|
||||
self.featureunlock_version: str = "1.1.7" # FeatureUnlock
|
||||
self.debugenhancer_version: str = "1.1.0" # DebugEnhancer
|
||||
self.cpufriend_version: str = "1.2.9" # CPUFriend
|
||||
|
||||
@@ -155,6 +155,11 @@ xw
|
||||
logging.info("- Fixing CoreGraphics support on Ivy Bridge")
|
||||
re_patch_args.append("f16c")
|
||||
|
||||
# Patch AVX hardcoding in JavaScriptCore
|
||||
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] < cpu_data.CPUGen.sandy_bridge.value:
|
||||
logging.info("- Fixing AVX hardcoding in JavaScriptCore")
|
||||
re_patch_args.append("jsc")
|
||||
|
||||
return re_patch_args
|
||||
|
||||
|
||||
|
||||
@@ -44,7 +44,6 @@ from .hardware.misc import (
|
||||
pcie_webcam,
|
||||
t1_security,
|
||||
usb11,
|
||||
cpu_missing_avx,
|
||||
)
|
||||
|
||||
from ... import constants
|
||||
@@ -89,6 +88,7 @@ class HardwarePatchsetValidation(StrEnum):
|
||||
NVDA_DRV_MISSING = "Validation: nvda_drv(_vrl) variable missing"
|
||||
PATCHING_NOT_POSSIBLE = "Validation: Patching not possible"
|
||||
UNPATCHING_NOT_POSSIBLE = "Validation: Unpatching not possible"
|
||||
REPATCHING_NOT_SUPPORTED = "Validation: Root volume dirty, unpatch to continue"
|
||||
|
||||
|
||||
class HardwarePatchsetDetection:
|
||||
@@ -134,7 +134,6 @@ class HardwarePatchsetDetection:
|
||||
pcie_webcam.PCIeFaceTimeCamera,
|
||||
t1_security.T1SecurityChip,
|
||||
usb11.USB11Controller,
|
||||
cpu_missing_avx.CPUMissingAVX,
|
||||
]
|
||||
|
||||
self.device_properties = None
|
||||
@@ -184,6 +183,42 @@ class HardwarePatchsetDetection:
|
||||
|
||||
return "FileVault is Off" not in subprocess.run(["/usr/bin/fdesetup", "status"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.decode()
|
||||
|
||||
|
||||
def _validation_check_repatching_is_possible(self) -> bool:
|
||||
"""
|
||||
Determine if repatching is not allowed
|
||||
"""
|
||||
oclp_patch_path = "/System/Library/CoreServices/OpenCore-Legacy-Patcher.plist"
|
||||
if not Path(oclp_patch_path).exists():
|
||||
return self._is_root_volume_dirty()
|
||||
|
||||
oclp_plist = plistlib.load(open(oclp_patch_path, "rb"))
|
||||
|
||||
if self._constants.computer.oclp_sys_url != self._constants.commit_info[2]:
|
||||
logging.error("Installed patches are from different commit, unpatching is required")
|
||||
return True
|
||||
|
||||
wireless_keys = {"Legacy Wireless", "Modern Wireless Common"}
|
||||
|
||||
# Keep in sync with generate_patchset_plist
|
||||
metadata_keys = {
|
||||
"OpenCore Legacy Patcher",
|
||||
"PatcherSupportPkg",
|
||||
"Time Patched",
|
||||
"Commit URL",
|
||||
"Kernel Debug Kit Used",
|
||||
"Metal Library Used",
|
||||
"OS Version",
|
||||
"Custom Signature",
|
||||
}
|
||||
|
||||
existing_patches = set(oclp_plist) - wireless_keys - metadata_keys
|
||||
if existing_patches:
|
||||
logging.error(f"Patch(es) already installed: {', '.join(existing_patches)}, unpatching is required")
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
|
||||
def _validation_check_system_integrity_protection_enabled(self, configs: list[str]) -> bool:
|
||||
"""
|
||||
@@ -307,6 +342,28 @@ class HardwarePatchsetDetection:
|
||||
"""
|
||||
return metallib_handler.MetalLibraryObject(self._constants, self._os_build, self._os_version).metallib_already_installed
|
||||
|
||||
|
||||
def _is_root_volume_dirty(self) -> bool:
|
||||
"""
|
||||
Determine if system volume is not sealed
|
||||
"""
|
||||
# macOS 11.0 introduced sealed system volumes
|
||||
if self._xnu_major < os_data.big_sur.value:
|
||||
return False
|
||||
|
||||
try:
|
||||
content = plistlib.loads(subprocess.run(["/usr/sbin/diskutil", "info", "-plist", "/"], capture_output=True).stdout)
|
||||
except plistlib.InvalidFileException:
|
||||
raise RuntimeError("Failed to parse diskutil output.")
|
||||
|
||||
seal = content["Sealed"]
|
||||
|
||||
if "Broken" in seal:
|
||||
logging.error(f"System volume is tainted, unpatching is required")
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
|
||||
def _can_patch(self, requirements: dict, ignore_keys: list[str] = []) -> bool:
|
||||
"""
|
||||
@@ -500,6 +557,7 @@ class HardwarePatchsetDetection:
|
||||
HardwarePatchsetValidation.SIP_ENABLED: self._validation_check_system_integrity_protection_enabled(required_sip_configs),
|
||||
HardwarePatchsetValidation.SECURE_BOOT_MODEL_ENABLED: self._validation_check_secure_boot_model_enabled(),
|
||||
HardwarePatchsetValidation.AMFI_ENABLED: self._validation_check_amfi_enabled(highest_amfi_level),
|
||||
HardwarePatchsetValidation.REPATCHING_NOT_SUPPORTED: self._validation_check_repatching_is_possible(),
|
||||
HardwarePatchsetValidation.WHATEVERGREEN_MISSING: self._validation_check_whatevergreen_missing() if has_nvidia_web_drivers is True else False,
|
||||
HardwarePatchsetValidation.FORCE_OPENGL_MISSING: self._validation_check_force_opengl_missing() if has_nvidia_web_drivers is True else False,
|
||||
HardwarePatchsetValidation.FORCE_COMPAT_MISSING: self._validation_check_force_compat_missing() if has_nvidia_web_drivers is True else False,
|
||||
|
||||
@@ -1,86 +0,0 @@
|
||||
"""
|
||||
cpu_missing_avx.py: Legacy CPUs (Lacking AVX) Detection
|
||||
|
||||
Note that this system is implemented only for macOS Ventura and
|
||||
machines not using the legacy/modern wireless patches (AVX patch integrated into WiFi patches).
|
||||
|
||||
This commit implemented unconditional AVX usage, thus Safari 18.2 and later will crash:
|
||||
https://github.com/WebKit/WebKit/commit/c15e741266db8ff9df309ce9971eda1cfd9021cc
|
||||
"""
|
||||
|
||||
from ..base import BaseHardware, HardwareVariant
|
||||
|
||||
from ..networking.legacy_wireless import LegacyWireless
|
||||
from ..networking.modern_wireless import ModernWireless
|
||||
|
||||
from ...base import PatchType
|
||||
|
||||
from .....constants import Constants
|
||||
|
||||
from .....datasets.os_data import os_data
|
||||
|
||||
|
||||
class CPUMissingAVX(BaseHardware):
|
||||
|
||||
def __init__(self, xnu_major, xnu_minor, os_build, global_constants: Constants) -> None:
|
||||
super().__init__(xnu_major, xnu_minor, os_build, global_constants)
|
||||
|
||||
|
||||
def name(self) -> str:
|
||||
"""
|
||||
Display name for end users
|
||||
"""
|
||||
return f"{self.hardware_variant()}: Legacy CPUs (Lacking AVX)"
|
||||
|
||||
|
||||
def present(self) -> bool:
|
||||
"""
|
||||
Targeting CPUs without AVX support
|
||||
"""
|
||||
if self._constants.computer.rosetta_active is True:
|
||||
return False
|
||||
if "AVX1.0" in self._constants.computer.cpu.flags:
|
||||
return False
|
||||
|
||||
return True
|
||||
|
||||
|
||||
def native_os(self) -> bool:
|
||||
"""
|
||||
Only install this patch on macOS Ventura.
|
||||
This is because we integrated the patch into the WiFi patches which all Macs use in Sonoma+.
|
||||
"""
|
||||
if self._xnu_major != os_data.ventura.value:
|
||||
return True
|
||||
|
||||
if LegacyWireless(self._xnu_major, self._xnu_minor, self._os_build, self._constants).present() is True:
|
||||
return True
|
||||
if ModernWireless(self._xnu_major, self._xnu_minor, self._os_build, self._constants).present() is True:
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
|
||||
def hardware_variant(self) -> HardwareVariant:
|
||||
"""
|
||||
Type of hardware variant
|
||||
"""
|
||||
return HardwareVariant.MISCELLANEOUS
|
||||
|
||||
|
||||
def patches(self) -> dict:
|
||||
"""
|
||||
Patches for Legacy CPUs (Lacking AVX)
|
||||
"""
|
||||
if self.native_os() is True:
|
||||
return {}
|
||||
|
||||
return {
|
||||
"CPU Missing AVX": {
|
||||
PatchType.MERGE_SYSTEM_VOLUME: {
|
||||
"/System/Library/PrivateFrameworks": {
|
||||
"IO80211.framework": "13.7.2-22",
|
||||
},
|
||||
}
|
||||
},
|
||||
}
|
||||
@@ -52,23 +52,18 @@ class ModernWireless(BaseHardware):
|
||||
"""
|
||||
return HardwareVariant.NETWORKING
|
||||
|
||||
|
||||
def patches(self) -> dict:
|
||||
def _patches_modern_wireless_common_extended(self) -> dict:
|
||||
"""
|
||||
Patches for Modern Wireless
|
||||
Extended modern wireless patches
|
||||
"""
|
||||
if self.native_os() is True:
|
||||
if self._xnu_major > os_data.sonoma:
|
||||
return {}
|
||||
|
||||
return {
|
||||
"Modern Wireless": {
|
||||
"Modern Wireless Extended": {
|
||||
PatchType.OVERWRITE_SYSTEM_VOLUME: {
|
||||
"/usr/libexec": {
|
||||
"airportd": f"13.7.2-{self._xnu_major}",
|
||||
"wifip2pd": f"13.7.2-{self._xnu_major}",
|
||||
},
|
||||
"/System/Library/CoreServices": {
|
||||
**({ "WiFiAgent.app": "14.7.2" } if self._xnu_major >= os_data.sequoia else {}),
|
||||
},
|
||||
},
|
||||
PatchType.MERGE_SYSTEM_VOLUME: {
|
||||
@@ -76,10 +71,43 @@ class ModernWireless(BaseHardware):
|
||||
"CoreWLAN.framework": f"13.7.2-{self._xnu_major}",
|
||||
},
|
||||
"/System/Library/PrivateFrameworks": {
|
||||
"CoreWiFi.framework": f"13.7.2-{self._xnu_major}",
|
||||
"CoreWiFi.framework": f"13.7.2-{self._xnu_major}",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
def _patches_modern_wireless_common(self) -> dict:
|
||||
"""
|
||||
Common modern wireless patches
|
||||
"""
|
||||
return {
|
||||
"Modern Wireless Common": {
|
||||
PatchType.OVERWRITE_SYSTEM_VOLUME: {
|
||||
"/usr/libexec": {
|
||||
"wifip2pd": f"13.7.2-{self._xnu_major}",
|
||||
},
|
||||
},
|
||||
PatchType.MERGE_SYSTEM_VOLUME: {
|
||||
"/System/Library/PrivateFrameworks": {
|
||||
"IO80211.framework": f"13.7.2-{self._xnu_major}",
|
||||
"WiFiPeerToPeer.framework": f"13.7.2-{self._xnu_major}",
|
||||
},
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
def patches(self) -> dict:
|
||||
"""
|
||||
Dictionary of patches
|
||||
"""
|
||||
if self.native_os() is True:
|
||||
return {}
|
||||
|
||||
return {
|
||||
**self._patches_modern_wireless_common(),
|
||||
**self._patches_modern_wireless_common_extended(),
|
||||
}
|
||||
|
||||
return _base
|
||||
@@ -229,7 +229,7 @@ class SysPatchDisplayFrame(wx.Frame):
|
||||
start_button.Disable()
|
||||
else:
|
||||
self.available_patches = True
|
||||
if patches[HardwarePatchsetValidation.PATCHING_NOT_POSSIBLE] is True:
|
||||
if patches[HardwarePatchsetValidation.PATCHING_NOT_POSSIBLE] is True or no_new_patches is True:
|
||||
start_button.Disable()
|
||||
elif no_new_patches is False:
|
||||
start_button.SetDefault()
|
||||
|
||||
Binary file not shown.
Binary file not shown.
BIN
payloads/Kexts/Acidanthera/Lilu-v1.7.1-DEBUG.zip
Normal file
BIN
payloads/Kexts/Acidanthera/Lilu-v1.7.1-DEBUG.zip
Normal file
Binary file not shown.
BIN
payloads/Kexts/Acidanthera/Lilu-v1.7.1-RELEASE.zip
Normal file
BIN
payloads/Kexts/Acidanthera/Lilu-v1.7.1-RELEASE.zip
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
payloads/Kexts/Acidanthera/RestrictEvents-v1.1.7-DEBUG.zip
Normal file
BIN
payloads/Kexts/Acidanthera/RestrictEvents-v1.1.7-DEBUG.zip
Normal file
Binary file not shown.
BIN
payloads/Kexts/Acidanthera/RestrictEvents-v1.1.7-RELEASE.zip
Normal file
BIN
payloads/Kexts/Acidanthera/RestrictEvents-v1.1.7-RELEASE.zip
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -60,6 +60,13 @@ UNUSED_DRIVERS = [
|
||||
"RamDiskDxe.efi",
|
||||
"Mtftp6Dxe.efi",
|
||||
"OpenNetworkBoot.efi",
|
||||
"VirtioSerialDxe.efi",
|
||||
"VirtioBlkDxe.efi",
|
||||
"VirtioPciDeviceDxe.efi",
|
||||
"VirtioNetDxe.efi",
|
||||
"VirtioGpuDxe.efi",
|
||||
"VirtioScsiDxe.efi",
|
||||
"Virtio10.efi",
|
||||
]
|
||||
|
||||
UNUSED_TOOLS = [
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user