mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-06-20 22:20:53 +10:00
Add dosdude patch detection
This commit is contained in:
+1
-1
@@ -197,7 +197,7 @@ class BuildOpenCore:
|
|||||||
self.get_item_by_kv(self.config["Kernel"]["Patch"], "Identifier", "com.apple.driver.AppleSMC")["Enabled"] = True
|
self.get_item_by_kv(self.config["Kernel"]["Patch"], "Identifier", "com.apple.driver.AppleSMC")["Enabled"] = True
|
||||||
|
|
||||||
if self.get_kext_by_bundle_path("latebloom.kext")["Enabled"] is True:
|
if self.get_kext_by_bundle_path("latebloom.kext")["Enabled"] is True:
|
||||||
print(f"Setting latebloom delay of {self.constants.latebloom_delay}, range {self.constants.latebloom_range}, debug {self.constants.latebloom_debug}")
|
print(f"- Setting latebloom delay of {self.constants.latebloom_delay}, range {self.constants.latebloom_range}, debug {self.constants.latebloom_debug}")
|
||||||
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += f" latebloom={self.constants.latebloom_delay}, lb_range={self.constants.latebloom_range}, lb_debug={self.constants.latebloom_debug}"
|
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += f" latebloom={self.constants.latebloom_delay}, lb_range={self.constants.latebloom_range}, lb_debug={self.constants.latebloom_debug}"
|
||||||
|
|
||||||
if not self.constants.custom_model and (self.constants.allow_oc_everywhere is True or self.model in ModelArray.MacPro71):
|
if not self.constants.custom_model and (self.constants.allow_oc_everywhere is True or self.model in ModelArray.MacPro71):
|
||||||
|
|||||||
@@ -1024,5 +1024,8 @@ PCIRaceCondition = [
|
|||||||
"iMac11,1",
|
"iMac11,1",
|
||||||
"iMac11,2",
|
"iMac11,2",
|
||||||
"iMac11,3",
|
"iMac11,3",
|
||||||
|
"MacPro3,1",
|
||||||
|
"MacPro4,1",
|
||||||
|
"MacPro5,1",
|
||||||
"Dortania1,1",
|
"Dortania1,1",
|
||||||
]
|
]
|
||||||
@@ -538,7 +538,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 = Utilities.patching_status(sip)
|
self.sip_enabled, self.sbm_enabled, self.amfi_enabled, self.fv_enabled, self.dosdude_patched = Utilities.patching_status(sip)
|
||||||
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")
|
||||||
@@ -566,7 +566,11 @@ set million colour before rebooting"""
|
|||||||
print("\n".join(self.constants.sandy_board_id))
|
print("\n".join(self.constants.sandy_board_id))
|
||||||
self.bad_board_id = True
|
self.bad_board_id = True
|
||||||
|
|
||||||
if any([self.sip_enabled, self.sbm_enabled, self.fv_enabled, self.amfi_enabled if self.amfi_must_disable else False, self.bad_board_id if self.check_board_id else False]):
|
if self.dosdude_patched is True:
|
||||||
|
print("\nCannot patch! Detected machine has already been patched by another patcher")
|
||||||
|
print("Please ensure your install is either clean or patched with OpenCore Legacy Patcher")
|
||||||
|
|
||||||
|
if any([self.sip_enabled, self.sbm_enabled, self.fv_enabled, self.dosdude_patched, self.amfi_enabled if self.amfi_must_disable else False, self.bad_board_id if self.check_board_id else False]):
|
||||||
return False
|
return False
|
||||||
else:
|
else:
|
||||||
return True
|
return True
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import plistlib
|
|||||||
import subprocess
|
import subprocess
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
import re
|
import re
|
||||||
|
import os
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
from Resources import Constants, ioreg
|
from Resources import Constants, ioreg
|
||||||
@@ -99,9 +99,12 @@ def patching_status(os_sip):
|
|||||||
sbm_enabled = True # Secure Boot Status (SecureBootModel)
|
sbm_enabled = True # Secure Boot Status (SecureBootModel)
|
||||||
amfi_enabled = True # Apple Mobile File Integrity
|
amfi_enabled = True # Apple Mobile File Integrity
|
||||||
fv_enabled = True # FileVault
|
fv_enabled = True # FileVault
|
||||||
|
dosdude_patched = True
|
||||||
|
|
||||||
amfi_1 = "amfi_get_out_of_my_way=0x1"
|
amfi_1 = "amfi_get_out_of_my_way=0x1"
|
||||||
amfi_2 = "amfi_get_out_of_my_way=1"
|
amfi_2 = "amfi_get_out_of_my_way=1"
|
||||||
|
gen6_kext = "/System/Library/Extension/AppleIntelHDGraphics.kext"
|
||||||
|
gen7_kext = "/System/Library/Extension/AppleIntelHD3000Graphics.kext"
|
||||||
|
|
||||||
if get_nvram("boot-args", decode=False) and (amfi_1 in get_nvram("boot-args", decode=False) or amfi_2 in get_nvram("boot-args", decode=False)):
|
if get_nvram("boot-args", decode=False) and (amfi_1 in get_nvram("boot-args", decode=False) or amfi_2 in get_nvram("boot-args", decode=False)):
|
||||||
amfi_enabled = False
|
amfi_enabled = False
|
||||||
@@ -115,7 +118,10 @@ def patching_status(os_sip):
|
|||||||
if fv_status.startswith("FileVault is Off"):
|
if fv_status.startswith("FileVault is Off"):
|
||||||
fv_enabled = False
|
fv_enabled = False
|
||||||
|
|
||||||
return sip_enabled, sbm_enabled, amfi_enabled, fv_enabled
|
if not (Path(gen6_kext).exists() and Path(gen7_kext).exists()):
|
||||||
|
dosdude_patched = False
|
||||||
|
|
||||||
|
return sip_enabled, sbm_enabled, amfi_enabled, fv_enabled, dosdude_patched
|
||||||
|
|
||||||
|
|
||||||
clear = True
|
clear = True
|
||||||
|
|||||||
Reference in New Issue
Block a user