From 76aa3bb80f41c5cf5e7474f3b6c34c391ee76883 Mon Sep 17 00:00:00 2001 From: Mykola Grymalyuk <48863253+khronokernel@users.noreply.github.com> Date: Sun, 12 Sep 2021 11:31:31 -0600 Subject: [PATCH] Clean up code --- CHANGELOG.md | 2 ++ OCLP-CLI.command | 9 +++++---- OpenCore-Patcher.command | 7 ++++--- Resources/Build.py | 6 +++--- 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index af3ffd112..7ed8f8b98 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,6 +33,8 @@ - TeraScale 2 acceleration to be added in the future - Allow Trackpad gestures on MacBook4,1 and MacBook5,2 - System Preferences will not report settings however +- Allow Root Volume Patched Systems to use FileVault 2 + - Requires macOS 11.3 (20E232) or newer ## 0.2.4 diff --git a/OCLP-CLI.command b/OCLP-CLI.command index 99a072a19..a19f2933e 100755 --- a/OCLP-CLI.command +++ b/OCLP-CLI.command @@ -213,18 +213,19 @@ If you plan to create the USB for another machine, please select the "Change Mod # self.constants.secure_status = True # Monterey self.constants.amfi_status = True elif host_is_target: - self.constants.sip_status = False # Unsigned kexts + self.constants.sip_status = False # Unsigned kexts self.constants.secure_status = False # Root volume modified - self.constants.amfi_status = False # Unsigned binaries + self.constants.amfi_status = False # Unsigned binaries if model in ModelArray.ModernGPU: if host_is_target and model in ["iMac13,1", "iMac13,3"] and self.computer.dgpu: # Some models have a supported dGPU, others don't print("- Detected Metal dGPU, overriding default configuration") self.constants.sip_status = True elif host_is_target: - self.constants.sip_status = False # Unsigned kexts + self.constants.sip_status = False # Unsigned kexts self.constants.secure_status = False # Modified root volume - # self.constants.amfi_status = True # Signed bundles, Don't need to explicitly set currently + self.constants.allow_fv_root = True # Allow FileVault on broken seal + # self.constants.amfi_status = True # Signed bundles, Don't need to explicitly set currently if model == "MacBook8,1" and host_is_target: # MacBook8,1 has an odd bug where it cannot install Monterey with Minimal spoofing self.constants.serial_settings == "Moderate" diff --git a/OpenCore-Patcher.command b/OpenCore-Patcher.command index 1a75a1d1e..d760c961a 100755 --- a/OpenCore-Patcher.command +++ b/OpenCore-Patcher.command @@ -53,11 +53,12 @@ class OpenCoreLegacyPatcher: # Some models have a supported dGPU, others don't self.constants.sip_status = True # self.constants.secure_status = True # Monterey - # self.constants.amfi_status = True # Signed bundles, Don't need to explicitly set currently + # self.constants.amfi_status = True # Signed bundles, Don't need to explicitly set currently else: - self.constants.sip_status = False # Unsigned kexts + self.constants.sip_status = False # Unsigned kexts self.constants.secure_status = False # Modified root volume - # self.constants.amfi_status = True # Signed bundles, Don't need to explicitly set currently + self.constants.allow_fv_root = True # Allow FileVault on broken seal + # self.constants.amfi_status = True # Signed bundles, Don't need to explicitly set currently if model == "MacBook8,1": # MacBook8,1 has an odd bug where it cannot install Monterey with Minimal spoofing self.constants.serial_settings = "Moderate" diff --git a/Resources/Build.py b/Resources/Build.py index 6b11d9a69..f61a45564 100644 --- a/Resources/Build.py +++ b/Resources/Build.py @@ -686,12 +686,12 @@ class BuildOpenCore: if self.model in ModelArray.dGPU_switch: print("- Allowing GMUX switching in Windows") self.config["Booter"]["Quirks"]["SignalAppleOS"] = True - # if self.constants.allow_fv_root is True: + if self.constants.allow_fv_root is True: # apfs.kext has an undocumented boot-arg that allows FileVault usage on broken APFS seals (-arv_allow_fv) # This is however hidden behind kern.development, thus we patch _apfs_filevault_allowed to always return true # Note this function was added in 11.3 (20E232, 20.4), older builds do not support this (ie. 11.2.3) - print("- Allowing FileVault on Root Patched systems") - self.get_item_by_kv(self.config["Kernel"]["Patch"], "Identifier", "com.apple.filesystems.apfs")["Enabled"] = True + print("- Allowing FileVault on Root Patched systems") + self.get_item_by_kv(self.config["Kernel"]["Patch"], "Identifier", "com.apple.filesystems.apfs")["Enabled"] = True def set_smbios(self):