forked from dortania/OpenCore-Legacy-Patcher
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d02d89b
commit 463bed4
Showing
81 changed files
with
881 additions
and
464 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
#!/usr/bin/env python3 | ||
# Copyright (C) 2020-2022, Dhinak G, Mykola Grymalyuk | ||
from resources import main | ||
""" | ||
PyInstaller Entry Point | ||
""" | ||
|
||
from opencore_legacy_patcher import main | ||
|
||
if __name__ == '__main__': | ||
main.OpenCoreLegacyPatcher() | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from .application_entry import main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
""" | ||
amfi_data.py: AppleMobileFileIntegrity Bitmask Data | ||
""" | ||
|
||
""" | ||
Within AppleMobileFileIntegrity.kext, Apple has a bitmask-based boot-arg (ex. amfi=128) | ||
Below information is from reversed values in 13.0 Beta 6's AppleMobileFileIntegrity.kext | ||
Currently only 'amfi=3' has been used by Apple publicly | ||
- 0x3 used in 11.0.1 dyld source: | ||
- https://github.com/apple-oss-distributions/dyld/blob/5c9192436bb195e7a8fe61f22a229ee3d30d8222/testing/test-cases/kernel-hello-world.dtest/main.c#L2 | ||
""" | ||
|
||
import enum | ||
|
||
|
||
class AppleMobileFileIntegrity(enum.IntEnum): | ||
# Names set are solely for readability | ||
# Internal names are unknown | ||
AMFI_ALLOW_TASK_FOR_PID: int = 0x1 # Allow Task for PID (alt. amfi_unrestrict_task_for_pid=0x1) | ||
AMFI_ALLOW_INVALID_SIGNATURE: int = 0x2 # Reduce sig enforcement (alt. amfi_allow_any_signature=0x1) | ||
AMFI_LV_ENFORCE_THIRD_PARTY: int = 0x4 # Don't mark external binaries as platform binaries | ||
AMFI_UNKNOWN_1: int = 0x8 | ||
AMFI_UNKNOWN_2: int = 0x10 | ||
AMFI_UNKNOWN_3: int = 0x20 | ||
AMFI_UNKNOWN_4: int = 0x40 | ||
AMFI_ALLOW_EVERYTHING: int = 0x80 # Disable sig enforcement and Library Validation (alt. amfi_get_out_of_my_way=0x1) | ||
|
||
""" | ||
Internally within AMFI.kext, Apple references 0x2 and 0x80 as both 'Disable signature enforcement' | ||
However 0x80 is a higher privilege than 0x2, and breaks TCC support in OS (ex. Camera, Microphone, etc prompts) | ||
Supported boot-args within AMFI.kext, last compared against 13.0 Beta 6 | ||
Within _initializeAppleMobileFileIntegrity(): | ||
- amfi_unrestrict_task_for_pid=0x1 | ||
- amfi_dev_mode_policy=0x1 | ||
- amfi_allow_any_signature=0x1 | ||
- amfi_get_out_of_my_way=0x1 | ||
- amfi_unrestricted_local_signing=0x1 | ||
- pmap_cs_unrestricted_local_signing=0x1 | ||
- amfi_ready_to_roll=0x1 | ||
- cs_enforcement_disable=0x1 | ||
Within AMFIInitializeLocalSigningPublicKey(): | ||
- -restore | ||
Within macOSPolicyConfigurationInit(): | ||
- amfi_force_policy=0x1 | ||
- amfi_block_unsigned_code=0x1 | ||
- amfi_force_cs_kill=0x1 | ||
- amfi_hsp_disable=0x1 | ||
- amfi_hsp_logging=0x1 | ||
- amfi_allow_bni_as_platform=0x1 | ||
- amfi_allow_non_platform=0x1 | ||
- amfi_prevent_old_entitled_platform_binaries=0x1 | ||
- amfi_allow_only_tc=0x1 | ||
- amfi_allow_only_tc_override=0x1 | ||
Within configurationSettingsInit() | ||
- amfi_enforce_launch_constraints=0x1 | ||
- amfi_allow_3p_launch_constraints=0x1 | ||
- BATS_TESTPLAN_ID="Custom Team ID" | ||
""" |
4 changes: 4 additions & 0 deletions
4
data/bluetooth_data.py → ...legacy_patcher/datasets/bluetooth_data.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
""" | ||
bluetooth_data.py: Enum for Bluetooth Chipsets | ||
""" | ||
|
||
import enum | ||
|
||
|
||
|
4 changes: 4 additions & 0 deletions
4
data/cpu_data.py → opencore_legacy_patcher/datasets/cpu_data.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
""" | ||
cpu_data.py: CPU Generation Data | ||
""" | ||
|
||
import enum | ||
|
||
|
||
|
7 changes: 6 additions & 1 deletion
7
data/css_data.py → opencore_legacy_patcher/datasets/css_data.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 6 additions & 3 deletions
9
data/example_data.py → ...e_legacy_patcher/datasets/example_data.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 5 additions & 2 deletions
7
data/model_array.py → ...re_legacy_patcher/datasets/model_array.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 5 additions & 1 deletion
6
data/pci_data.py → opencore_legacy_patcher/datasets/pci_data.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 7 additions & 1 deletion
8
data/sip_data.py → opencore_legacy_patcher/datasets/sip_data.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.