Fix MacBookPro8,2/3 Hibernation wake

This commit is contained in:
Mykola Grymalyuk
2021-05-15 17:42:09 -06:00
parent f3734f9daa
commit abe865f999
5 changed files with 32 additions and 3 deletions
+9
View File
@@ -56,6 +56,15 @@ class OpenCoreLegacyPatcher():
self.constants.custom_cpu_model = 1
self.constants.custom_cpu_model_value = custom_cpu_model_value.split("%00")[0]
# Check if running in RecoveryOS
root_partition_info = plistlib.loads(subprocess.run("diskutil info -plist /".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode())
if root_partition_info["VolumeName"] == "macOS Base System" and \
root_partition_info["FilesystemType"] == "apfs" and \
root_partition_info["BusProtocol"] == "Disk Image":
self.constants.recovery_status = True
else:
self.constants.recovery_status = False
def hexswap(self, input_hex: str):
hex_pairs = [input_hex[i:i + 2] for i in range(0, len(input_hex), 2)]
hex_rev = hex_pairs[::-1]