Allow FileVault on Catalina and older

This commit is contained in:
Mykola Grymalyuk
2021-08-28 11:37:16 -06:00
parent 1198a37969
commit 90a9ff8bb2
2 changed files with 7 additions and 4 deletions

View File

@@ -630,7 +630,7 @@ set million colour before rebooting"""
sip_value = ( 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" "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: if self.sip_enabled is True:
print("\nCannot patch! Please disable System Integrity Protection (SIP).") print("\nCannot patch! Please disable System Integrity Protection (SIP).")
print("Disable SIP in Patcher Settings and Rebuild OpenCore\n") print("Disable SIP in Patcher Settings and Rebuild OpenCore\n")

View File

@@ -128,7 +128,7 @@ def amfi_status():
return True return True
def patching_status(os_sip): def patching_status(os_sip, os):
# Detection for Root Patching # Detection for Root Patching
sip_enabled = True # System Integrity Protection sip_enabled = True # System Integrity Protection
sbm_enabled = True # Secure Boot Status (SecureBootModel) 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: 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 sip_enabled = False
fv_status: str = subprocess.run("fdesetup status".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.decode() if os > Constants.Constants.catalina:
if fv_status.startswith("FileVault is Off"): 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 fv_enabled = False
if not (Path(gen6_kext).exists() and Path(gen7_kext).exists()): if not (Path(gen6_kext).exists() and Path(gen7_kext).exists()):