mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-24 03:50:14 +10:00
utilities.py: Fix amfi check
This commit is contained in:
@@ -150,15 +150,14 @@ def amfi_status():
|
|||||||
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"
|
||||||
|
|
||||||
if get_nvram("OCLP-Settings", "4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102", decode=False):
|
oclp_guid = get_nvram("OCLP-Settings", "4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102", decode=False)
|
||||||
if "-allow_amfi" in get_nvram("OCLP-Settings", "4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102", decode=True):
|
if oclp_guid:
|
||||||
|
if "-allow_amfi" in oclp_guid:
|
||||||
return False
|
return False
|
||||||
else:
|
boot_args = get_nvram("boot-args", decode=False)
|
||||||
return True
|
if boot_args:
|
||||||
elif get_nvram("boot-args", decode=False):
|
if amfi_1 in boot_args or amfi_2 in boot_args:
|
||||||
if amfi_1 in get_nvram("boot-args", decode=False) or amfi_2 in get_nvram("boot-args", decode=False):
|
|
||||||
return False
|
return False
|
||||||
else:
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user