From 90a9ff8bb2ec7768ebf426f8827e5be898385de4 Mon Sep 17 00:00:00 2001 From: Mykola Grymalyuk Date: Sat, 28 Aug 2021 11:37:16 -0600 Subject: [PATCH] Allow FileVault on Catalina and older --- Resources/SysPatch.py | 2 +- Resources/Utilities.py | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Resources/SysPatch.py b/Resources/SysPatch.py index b6a34063b..18cd996d2 100644 --- a/Resources/SysPatch.py +++ b/Resources/SysPatch.py @@ -630,7 +630,7 @@ set million colour before rebooting""" sip_value = ( "For Hackintoshes, please set csr-active-config to '030A0000' (0xA03)\nFor non-OpenCore Macs, please run 'csrutil disable' and \n'csrutil authenticated-root disable' in RecoveryOS" ) - self.sip_enabled, self.sbm_enabled, self.amfi_enabled, self.fv_enabled, self.dosdude_patched = Utilities.patching_status(sip) + self.sip_enabled, self.sbm_enabled, self.amfi_enabled, self.fv_enabled, self.dosdude_patched = Utilities.patching_status(sip, self.constants.detected_os) if self.sip_enabled is True: print("\nCannot patch! Please disable System Integrity Protection (SIP).") print("Disable SIP in Patcher Settings and Rebuild OpenCore\n") diff --git a/Resources/Utilities.py b/Resources/Utilities.py index 543a91b0d..ad540562a 100644 --- a/Resources/Utilities.py +++ b/Resources/Utilities.py @@ -128,7 +128,7 @@ def amfi_status(): return True -def patching_status(os_sip): +def patching_status(os_sip, os): # Detection for Root Patching sip_enabled = True # System Integrity Protection sbm_enabled = True # Secure Boot Status (SecureBootModel) @@ -147,8 +147,11 @@ def patching_status(os_sip): if get_nvram("csr-active-config", decode=False) and csr_decode(get_nvram("csr-active-config", decode=False), os_sip) is False: sip_enabled = False - fv_status: str = subprocess.run("fdesetup status".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.decode() - if fv_status.startswith("FileVault is Off"): + if os > Constants.Constants.catalina: + fv_status: str = subprocess.run("fdesetup status".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.decode() + if fv_status.startswith("FileVault is Off"): + fv_enabled = False + else: fv_enabled = False if not (Path(gen6_kext).exists() and Path(gen7_kext).exists()):