From 23d7f9f07c058e11f11cbfbef893a527ad34cd32 Mon Sep 17 00:00:00 2001 From: neon ball <35791009+ParaDoX1994@users.noreply.github.com> Date: Wed, 7 Aug 2024 21:00:35 +0300 Subject: [PATCH 1/4] Fix some links --- docs/TROUBLESHOOTING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/TROUBLESHOOTING.md b/docs/TROUBLESHOOTING.md index 39d990e6e..3e670555e 100644 --- a/docs/TROUBLESHOOTING.md +++ b/docs/TROUBLESHOOTING.md @@ -3,8 +3,8 @@ Here are some common errors that users may experience while using this patcher: * [OpenCore Legacy Patcher not launching](#opencore-legacy-patcher-not-launching) -* ["You don't have permission to save..." error when creating USB installer](#you-dont-have-permission-to-save-error-when-creating-usb-installer) -* [Stuck on `This version of Mac OS X is not supported on this platform` or (🚫) Prohibited Symbol](#stuck-on-this-version-of-mac-os-x-is-not-supported-on-this-platform-or-(🚫)-prohibited-symbol) +* ["You don't have permission to save..." error when creating USB installer](#you-don-t-have-permission-to-save-error-when-creating-usb-installer) +* [Stuck on `This version of Mac OS X is not supported on this platform` or (🚫) Prohibited Symbol](##stuck-on-this-version-of-mac-os-x-is-not-supported-on-this-platform-or-🚫-prohibited-symbol) * [Cannot boot macOS without the USB](#cannot-boot-macos-without-the-usb) * [Infinite Recovery OS Booting](#infinite-recovery-os-reboot) * [Stuck on boot after root patching](#stuck-on-boot-after-root-patching) From 9a55317f86537c59f5af1132282ef0f0bb9f420c Mon Sep 17 00:00:00 2001 From: neon ball <35791009+ParaDoX1994@users.noreply.github.com> Date: Wed, 7 Aug 2024 21:01:14 +0300 Subject: [PATCH 2/4] Fix typo --- docs/TROUBLESHOOTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/TROUBLESHOOTING.md b/docs/TROUBLESHOOTING.md index 3e670555e..6c2e93a0d 100644 --- a/docs/TROUBLESHOOTING.md +++ b/docs/TROUBLESHOOTING.md @@ -4,7 +4,7 @@ Here are some common errors that users may experience while using this patcher: * [OpenCore Legacy Patcher not launching](#opencore-legacy-patcher-not-launching) * ["You don't have permission to save..." error when creating USB installer](#you-don-t-have-permission-to-save-error-when-creating-usb-installer) -* [Stuck on `This version of Mac OS X is not supported on this platform` or (🚫) Prohibited Symbol](##stuck-on-this-version-of-mac-os-x-is-not-supported-on-this-platform-or-🚫-prohibited-symbol) +* [Stuck on `This version of Mac OS X is not supported on this platform` or (🚫) Prohibited Symbol](#stuck-on-this-version-of-mac-os-x-is-not-supported-on-this-platform-or-🚫-prohibited-symbol) * [Cannot boot macOS without the USB](#cannot-boot-macos-without-the-usb) * [Infinite Recovery OS Booting](#infinite-recovery-os-reboot) * [Stuck on boot after root patching](#stuck-on-boot-after-root-patching) From 1a576c72a2080eeb0139cb3e6dbc0140ff371778 Mon Sep 17 00:00:00 2001 From: Jazzzny <75343012+Jazzzny@users.noreply.github.com> Date: Fri, 9 Aug 2024 18:13:53 -0400 Subject: [PATCH 3/4] Provide additional resilience in USB detection code (#1144) * Add fallback, don't bail out * Part 2 * Part 3 * Fix import * Move encoding --- opencore_legacy_patcher/support/install.py | 13 ++++++++++--- .../support/macos_installer_handler.py | 11 +++++++++-- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/opencore_legacy_patcher/support/install.py b/opencore_legacy_patcher/support/install.py index e9bbf1cb7..f1a6aebf1 100644 --- a/opencore_legacy_patcher/support/install.py +++ b/opencore_legacy_patcher/support/install.py @@ -5,6 +5,7 @@ install.py: Installation of OpenCore files to ESP import logging import plistlib import subprocess +import re from pathlib import Path @@ -27,9 +28,15 @@ class tui_disk_installation: # Sierra and older disks = plistlib.loads(subprocess.run(["/usr/sbin/diskutil", "list", "-plist"], stdout=subprocess.PIPE).stdout.decode().strip().encode()) for disk in disks["AllDisksAndPartitions"]: - disk_info = plistlib.loads(subprocess.run(["/usr/sbin/diskutil", "info", "-plist", disk["DeviceIdentifier"]], stdout=subprocess.PIPE).stdout.decode().strip().encode()) try: - all_disks[disk["DeviceIdentifier"]] = {"identifier": disk_info["DeviceNode"], "name": disk_info["MediaName"], "size": disk_info["TotalSize"], "partitions": {}} + disk_info = plistlib.loads(subprocess.run(["/usr/sbin/diskutil", "info", "-plist", disk["DeviceIdentifier"]], stdout=subprocess.PIPE).stdout.decode().strip().encode()) + except: + # Chinesium USB can have garbage data in MediaName + diskutil_output = subprocess.run(["/usr/sbin/diskutil", "info", "-plist", disk["DeviceIdentifier"]], stdout=subprocess.PIPE).stdout.decode().strip() + ungarbafied_output = re.sub(r'(MediaName\s*).*?()', r'\1\2', diskutil_output).encode() + disk_info = plistlib.loads(ungarbafied_output) + try: + all_disks[disk["DeviceIdentifier"]] = {"identifier": disk_info["DeviceNode"], "name": disk_info.get("MediaName", "Disk"), "size": disk_info["TotalSize"], "partitions": {}} for partition in disk["Partitions"]: partition_info = plistlib.loads(subprocess.run(["/usr/sbin/diskutil", "info", "-plist", partition["DeviceIdentifier"]], stdout=subprocess.PIPE).stdout.decode().strip().encode()) all_disks[disk["DeviceIdentifier"]]["partitions"][partition["DeviceIdentifier"]] = { @@ -98,7 +105,7 @@ class tui_disk_installation: partition_info = plistlib.loads(subprocess.run(["/usr/sbin/diskutil", "info", "-plist", full_disk_identifier], stdout=subprocess.PIPE).stdout.decode().strip().encode()) parent_disk = partition_info["ParentWholeDisk"] drive_host_info = plistlib.loads(subprocess.run(["/usr/sbin/diskutil", "info", "-plist", parent_disk], stdout=subprocess.PIPE).stdout.decode().strip().encode()) - sd_type = drive_host_info["MediaName"] + sd_type = drive_host_info.get("MediaName", "Disk") try: ssd_type = drive_host_info["SolidState"] except KeyError: diff --git a/opencore_legacy_patcher/support/macos_installer_handler.py b/opencore_legacy_patcher/support/macos_installer_handler.py index fc764c2d3..2475493d1 100644 --- a/opencore_legacy_patcher/support/macos_installer_handler.py +++ b/opencore_legacy_patcher/support/macos_installer_handler.py @@ -6,6 +6,7 @@ import logging import plistlib import tempfile import subprocess +import re from pathlib import Path @@ -171,9 +172,15 @@ fi disks = plistlib.loads(subprocess.run(["/usr/sbin/diskutil", "list", "-plist"], stdout=subprocess.PIPE).stdout.decode().strip().encode()) for disk in disks["AllDisksAndPartitions"]: - disk_info = plistlib.loads(subprocess.run(["/usr/sbin/diskutil", "info", "-plist", disk["DeviceIdentifier"]], stdout=subprocess.PIPE).stdout.decode().strip().encode()) try: - all_disks[disk["DeviceIdentifier"]] = {"identifier": disk_info["DeviceNode"], "name": disk_info["MediaName"], "size": disk_info["TotalSize"], "removable": disk_info["Internal"], "partitions": {}} + disk_info = plistlib.loads(subprocess.run(["/usr/sbin/diskutil", "info", "-plist", disk["DeviceIdentifier"]], stdout=subprocess.PIPE).stdout.decode().strip().encode()) + except: + # Chinesium USB can have garbage data in MediaName + diskutil_output = subprocess.run(["/usr/sbin/diskutil", "info", "-plist", disk["DeviceIdentifier"]], stdout=subprocess.PIPE).stdout.decode().strip() + ungarbafied_output = re.sub(r'(MediaName\s*).*?()', r'\1\2', diskutil_output).encode() + disk_info = plistlib.loads(ungarbafied_output) + try: + all_disks[disk["DeviceIdentifier"]] = {"identifier": disk_info["DeviceNode"], "name": disk_info.get("MediaName", "Disk"), "size": disk_info["TotalSize"], "removable": disk_info["Internal"], "partitions": {}} except KeyError: # Avoid crashing with CDs installed continue From e453bd1b51d16f0217d11a76b89c8daeeccd520d Mon Sep 17 00:00:00 2001 From: Mykola Grymalyuk Date: Sun, 11 Aug 2024 19:57:39 -0600 Subject: [PATCH 4/4] Sync PatcherSupportPkg --- CHANGELOG.md | 2 ++ opencore_legacy_patcher/constants.py | 2 +- .../datasets/sys_patch_dict.py | 30 +++++++++---------- 3 files changed, 18 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fa3c5f6b6..5b1664789 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,8 @@ - Implement new Copy on Write detection mechanism for all file copying operations - Implemented using `getattrlist` and `VOL_CAP_INT_CLONE` flag - Helps improve performance on APFS volumes +- Increment Binaries: + - PatcherSupportPkg 1.6.3 - release ## 1.5.0 - Restructure project directories diff --git a/opencore_legacy_patcher/constants.py b/opencore_legacy_patcher/constants.py index c4a499a43..62f3a3dfa 100644 --- a/opencore_legacy_patcher/constants.py +++ b/opencore_legacy_patcher/constants.py @@ -14,7 +14,7 @@ class Constants: def __init__(self) -> None: # Patcher Versioning self.patcher_version: str = "1.6.0" # OpenCore-Legacy-Patcher - self.patcher_support_pkg_version: str = "1.4.9" # PatcherSupportPkg + self.patcher_support_pkg_version: str = "1.6.3" # PatcherSupportPkg self.copyright_date: str = "Copyright © 2020-2024 Dortania" self.patcher_name: str = "OpenCore Legacy Patcher" diff --git a/opencore_legacy_patcher/datasets/sys_patch_dict.py b/opencore_legacy_patcher/datasets/sys_patch_dict.py index 25bad6182..6ff22ea5b 100644 --- a/opencore_legacy_patcher/datasets/sys_patch_dict.py +++ b/opencore_legacy_patcher/datasets/sys_patch_dict.py @@ -91,10 +91,10 @@ class SystemPatchDictionary(): - AppleIntelHD4000Graphics.kext """ if self.os_major < os_data.os_data.sonoma: - return "11.4" + return "11.7.10" if self.os_float < self.macOS_14_4: - return "11.4-23" - return "11.4-23.4" + return "11.7.10-23" + return "11.7.10-23.4" def __resolve_kepler_geforce_framebuffers(self) -> str: @@ -509,8 +509,8 @@ class SystemPatchDictionary(): }, "Install": { "/System/Library/PrivateFrameworks": { - "AppleGVA.framework": "10.15.7", - "AppleGVACore.framework": "10.15.7", + "AppleGVA.framework": "11.7.10", + "AppleGVACore.framework": "11.7.10", }, }, }, @@ -1031,13 +1031,13 @@ class SystemPatchDictionary(): }, "Install": { "/System/Library/Extensions": { - "AppleIntelHD4000GraphicsGLDriver.bundle": "11.0 Beta 6", - "AppleIntelHD4000GraphicsMTLDriver.bundle": "11.0 Beta 6" if self.os_major < os_data.os_data.ventura else "11.0-beta 6-22", - "AppleIntelHD4000GraphicsVADriver.bundle": "11.3 Beta 1", + "AppleIntelHD4000GraphicsGLDriver.bundle": "11.7.10", + "AppleIntelHD4000GraphicsMTLDriver.bundle": "11.7.10" if self.os_major < os_data.os_data.ventura else "11.7.10-22", + "AppleIntelHD4000GraphicsVADriver.bundle": "11.7.10", "AppleIntelFramebufferCapri.kext": self.__resolve_ivy_bridge_framebuffers(), "AppleIntelHD4000Graphics.kext": self.__resolve_ivy_bridge_framebuffers(), - "AppleIntelIVBVA.bundle": "11.4", - "AppleIntelGraphicsShared.bundle": "11.4", # libIGIL-Metal.dylib pulled from 11.0 Beta 6 + "AppleIntelIVBVA.bundle": "11.7.10", + "AppleIntelGraphicsShared.bundle": "11.7.10", # libIGIL-Metal.dylib pulled from 11.0 Beta 6 }, }, }, @@ -1239,12 +1239,12 @@ class SystemPatchDictionary(): "wifip2pd": "13.6.5", }, "/System/Library/Frameworks": { - "CoreWLAN.framework": "13.6.5", + "CoreWLAN.framework": f"13.6.5-{self.os_major}", }, "/System/Library/PrivateFrameworks": { - "CoreWiFi.framework": "13.6.5", - "IO80211.framework": "13.6.5", - "WiFiPeerToPeer.framework": "13.6.5", + "CoreWiFi.framework": f"13.6.5-{self.os_major}", + "IO80211.framework": f"13.6.5-{self.os_major}", + "WiFiPeerToPeer.framework": f"13.6.5-{self.os_major}", }, }, }, @@ -1406,7 +1406,7 @@ class SystemPatchDictionary(): }, "Install": { "/System/Library/Frameworks": { - "LocalAuthentication.framework": "13.6" # Required for Password Authentication (SharedUtils.framework) + "LocalAuthentication.framework": f"13.6-{self.os_major}" # Required for Password Authentication (SharedUtils.framework) }, "/System/Library/PrivateFrameworks": { "EmbeddedOSInstall.framework": "13.6" # Required for biometrickitd