Compare commits

..

7 Commits
0.1.8 ... 0.1.9

Author SHA1 Message Date
Mykola Grymalyuk
b3d2ac190c Add better error messaging 2021-06-15 18:49:53 -06:00
Mykola Grymalyuk
ce6805507d Fix crash on El Capitan and older 2021-06-15 18:08:22 -06:00
Mykola Grymalyuk
ad7d06d4b2 Sync changelog 2021-06-15 17:45:21 -06:00
Mykola Grymalyuk
04dee1fcff Fix incorrect AMFI and SIP detection 2021-06-15 17:44:04 -06:00
Mykola Grymalyuk
3af65423c6 Merge branch 'main' of https://github.com/dortania/Opencore-Legacy-Patcher 2021-06-15 17:43:12 -06:00
Dhinak G
af6c98b54d Fix crash with no boot args
Fixes #304
2021-06-15 14:36:54 -04:00
Mykola Grymalyuk
eb9b137323 Increment Build 2021-06-15 09:55:10 -06:00
5 changed files with 17 additions and 7 deletions

View File

@@ -1,5 +1,8 @@
# OpenCore Legacy Patcher changelog
## 0.1.9
- Fix incorrect AMFI and SIP detection
## 0.1.8
- Fix Kernel Panic in Big Sur and Monterey
- Increment binaries:

View File

@@ -26,7 +26,7 @@ class OpenCoreLegacyPatcher():
self.constants.custom_cpu_model = 1
self.constants.custom_cpu_model_value = custom_cpu_model_value.split("%00")[0]
if "-v" in Utilities.get_nvram("boot-args", decode=False):
if "-v" in (Utilities.get_nvram("boot-args", decode=False) or ""):
self.constants.verbose_debug = True
# Check if running in RecoveryOS
@@ -42,6 +42,10 @@ class OpenCoreLegacyPatcher():
self.constants.sip_status = True
self.constants.secure_status = False
self.constants.disable_amfi = False
else:
self.constants.sip_status = False
self.constants.secure_status = False
self.constants.disable_amfi = True
else:
self.constants.sip_status = False
self.constants.secure_status = False

View File

@@ -9,7 +9,7 @@ from pathlib import Path
class Constants:
def __init__(self):
self.patcher_version = "0.1.8"
self.patcher_version = "0.1.9"
self.opencore_commit = "4e0ff2d - 05-23-2021"
self.opencore_version = "0.7.0"
self.lilu_version = "1.5.4"

View File

@@ -435,6 +435,8 @@ class PatchSysVolume:
else:
sip = self.constants.root_patch_sip_mojave
print("\n".join(sip))
print("For Hackintoshes, please set csr-active-config to 030A0000 (0xA03)")
print("For non-OpenCore Macs, please run 'csrutil disable' and \n'csrutil authenticated-root disable' in RecoveryOS")
if self.sbm_enabled is True:
print("\nCannot patch!!! Please disable SecureBootModel!!!")
print("Disable SecureBootModel in Patcher Settings and Rebuild OpenCore")

View File

@@ -94,12 +94,13 @@ def get_nvram(variable: str, uuid: str = None, *, decode: bool = False):
else:
uuid = ""
result = subprocess.run(f"nvram -x {uuid}{variable}".split(), stdout=subprocess.PIPE, stderr=subprocess.PIPE).stdout.strip()
if result:
try:
value = plistlib.loads(result)[f"{uuid}{variable}"]
if decode:
value = value.strip(b"\0").decode()
return value
return None
except plistlib.InvalidFileException:
return None
if decode:
value = value.strip(b"\0").decode()
return value
# def menu(title, prompt, menu_options, add_quit=True, auto_number=False, in_between=[], top_level=False):
# return_option = ["Q", "Quit", None] if top_level else ["B", "Back", None]