diff --git a/opencore_legacy_patcher/support/macos_installer_handler.py b/opencore_legacy_patcher/support/macos_installer_handler.py index 2475493d1..b8800ce7c 100644 --- a/opencore_legacy_patcher/support/macos_installer_handler.py +++ b/opencore_legacy_patcher/support/macos_installer_handler.py @@ -24,7 +24,6 @@ from ..volume import ( APPLICATION_SEARCH_PATH: str = "/Applications" -SFR_SOFTWARE_UPDATE_PATH: str = "SFR/com_apple_MobileAsset_SFRSoftwareUpdate/com_apple_MobileAsset_SFRSoftwareUpdate.xml" tmp_dir = tempfile.TemporaryDirectory() @@ -344,9 +343,15 @@ class LocalInstallerCatalog: if output.returncode != 0: return (detected_build, detected_os) - ss_info = Path(SFR_SOFTWARE_UPDATE_PATH) - if Path(tmpdir / ss_info).exists(): + ss_info_files = [ + Path("SFR/com_apple_MobileAsset_SFRSoftwareUpdate/com_apple_MobileAsset_SFRSoftwareUpdate.xml"), + Path("com_apple_MobileAsset_MacSoftwareUpdate/com_apple_MobileAsset_MacSoftwareUpdate.xml") + ] + + for ss_info in ss_info_files: + if not Path(tmpdir / ss_info).exists(): + continue plist = plistlib.load((tmpdir / ss_info).open("rb")) if "Assets" in plist: if "Build" in plist["Assets"][0]: diff --git a/opencore_legacy_patcher/sys_patch/kernelcache/kernel_collection/support.py b/opencore_legacy_patcher/sys_patch/kernelcache/kernel_collection/support.py index 06a34f5cb..0600e15b9 100644 --- a/opencore_legacy_patcher/sys_patch/kernelcache/kernel_collection/support.py +++ b/opencore_legacy_patcher/sys_patch/kernelcache/kernel_collection/support.py @@ -33,6 +33,8 @@ class KernelCacheSupport: ["teamID"] = Team ID (blank on ad-hoc signed) To grab the CDHash of a kext, run 'codesign -dvvv ' """ + if not kext_name.endswith(".kext"): + return False try: aux_cache_path = Path(self.mount_location_data) / Path("/private/var/db/KernelExtensionManagement/AuxKC/CurrentAuxKC/com.apple.kcgen.instructions.plist")