Compare commits

...

235 Commits
0.2.5 ... 0.3.2

Author SHA1 Message Date
Mykola Grymalyuk
37769e052a Increment Binaries 2021-12-13 11:58:55 -07:00
Mykola Grymalyuk
d94ffc1472 Limit AppleIntelPIIXATA to Big Sur 2021-12-13 11:28:41 -07:00
Mykola Grymalyuk
5c9a0c74d4 Resolve NVMe Patching on 2016-2017 MacBook Pros
Closes https://github.com/dortania/OpenCore-Legacy-Patcher/issues/794
2021-12-13 10:51:10 -07:00
Mykola Grymalyuk
6e20a51d8f utilities.py: Clean up downloader logic 2021-12-12 22:05:00 -07:00
Mykola Grymalyuk
e0284bffe6 Implement SkyLightShims List.txt generation 2021-12-12 20:50:07 -07:00
Mykola Grymalyuk
2b6d318cfd Ensure ACPI path is correctly parsed 2021-12-08 18:04:48 -07:00
Mykola Grymalyuk
faadb3f740 Fix FU versioning 2021-12-08 15:21:26 -07:00
Mykola Grymalyuk
d6a82f08a0 Increment FeatureUnlock 2021-12-08 11:30:20 -07:00
Mykola Grymalyuk
3b22a593dd Sync changelog 2021-12-08 11:18:02 -07:00
Mykola Grymalyuk
56501818a9 Merge pull request #777 from dortania/5k-patch
Add 5k Display Output Support
2021-12-08 11:14:02 -07:00
Mykola Grymalyuk
52225e15b2 Only copy boot.efi if present 2021-12-08 11:12:19 -07:00
Mykola Grymalyuk
f75f1aa87a Ensure boot.efi is copied to root in TUI 2021-12-08 09:16:28 -07:00
Mykola Grymalyuk
e30f8be03d Streamline diags.efi injection, add GUI support 2021-12-08 09:05:13 -07:00
Mykola Grymalyuk
fd2662717c Avoid incorrectly setting Minimal spoof on GCN Macs 2021-12-07 20:35:46 -07:00
Mykola Grymalyuk
83cffeb1e5 Adjust comment 2021-12-07 20:19:14 -07:00
Mykola Grymalyuk
ca734ff055 Add inital 5k Patchset 2021-12-07 20:14:01 -07:00
Mykola Grymalyuk
67ddb619c7 Add 5k Display Data set 2021-12-07 19:14:56 -07:00
Mykola Grymalyuk
36b584dc41 Add Pikera Patch to Legacy GCN 2021-12-07 09:01:37 -07:00
Mykola Grymalyuk
bf86619e82 Add Legacy GCN build support off model 2021-12-05 11:29:16 -07:00
Mykola Grymalyuk
4acf8b1a67 Add Network failure handling 2021-11-28 11:00:32 -07:00
Mykola Grymalyuk
5298c4ecb8 Sync PatcherSupportPkg 2021-11-27 11:31:13 -07:00
Mykola Grymalyuk
be5f9114af Sync PatcherSupportPkg 2021-11-27 10:10:15 -07:00
Mykola Grymalyuk
b1df91cac3 Add Apple RAID Card support 2021-11-25 17:57:31 -07:00
Mykola Grymalyuk
60221edb07 Sync PatcherSupportPkg 2021-11-22 14:04:45 -07:00
Mykola Grymalyuk
779d348853 defaults.py: add break to loops 2021-11-22 13:56:02 -07:00
Mykola Grymalyuk
fcc0516b6a defaults.py: Iterate over computer.gpus
Closes https://github.com/dortania/OpenCore-Legacy-Patcher/issues/753
2021-11-22 13:53:39 -07:00
Mykola Grymalyuk
f840e30f36 Sync PatcherSupportPkg 2021-11-19 20:16:44 -07:00
Mykola Grymalyuk
24e645fb07 Fix typo 2021-11-19 19:59:58 -07:00
Mykola Grymalyuk
a519d66e90 Sync build 2021-11-19 19:41:35 -07:00
Mykola Grymalyuk
5af6c4ac54 Fix Wifi Password prompt in Monterey on legacy wifi 2021-11-19 19:37:17 -07:00
Mykola Grymalyuk
57eb61cb9a Fix USBVideo kext 2021-11-19 19:31:22 -07:00
Mykola Grymalyuk
b2b9cc7686 Fix displaypolicyd blocking 2021-11-19 14:52:36 -07:00
Mykola Grymalyuk
5d07311892 Add return menu to macOS downloader 2021-11-18 17:43:13 -07:00
Mykola Grymalyuk
889b5f3c71 Add legacy iSight patch
Thanks Jazzny for notifying!
2021-11-18 16:46:46 -07:00
Mykola Grymalyuk
eef336ab62 Adjust KeyError level
Closes https://github.com/dortania/OpenCore-Legacy-Patcher/issues/745
2021-11-18 11:33:12 -07:00
Mykola Grymalyuk
c37aa306fd Add 3rd Party SATA SSD detection
Closes https://github.com/dortania/OpenCore-Legacy-Patcher/issues/741
2021-11-17 22:01:26 -07:00
Mykola Grymalyuk
48380afdd5 Avoid enabling AirportBrcmFixup without wifi 2021-11-17 21:41:27 -07:00
Mykola Grymalyuk
1486859d79 Allow disabling of ConnectDrivers
Closes https://github.com/dortania/OpenCore-Legacy-Patcher/issues/742
2021-11-17 12:22:57 -07:00
Mykola Grymalyuk
9a4085ca50 Fix typo 2021-11-15 19:25:18 -07:00
Mykola Grymalyuk
936febe2e4 Move from i++ to enumerate() 2021-11-15 12:30:28 -07:00
Mykola Grymalyuk
3ad2c538be Fix Content Caching with spoofless usage 2021-11-14 21:18:06 -07:00
Mykola Grymalyuk
f705affcae Fix comment 2021-11-14 20:48:00 -07:00
Mykola Grymalyuk
2546e9167f Fix ordering 2021-11-14 20:44:40 -07:00
Mykola Grymalyuk
f84828483b Fix command 2021-11-14 20:43:49 -07:00
Mykola Grymalyuk
4bfe8b1038 Merge pull request #731 from dortania/limit-signing
Limit GUI Signing to Releases
2021-11-14 20:32:01 -07:00
Mykola Grymalyuk
89765a6c5f Fix GUI upload 2021-11-14 20:25:49 -07:00
Mykola Grymalyuk
4c043ab6dc Update build-gui.yml 2021-11-14 20:21:58 -07:00
Mykola Grymalyuk
8efc702077 Limit GUI signing to releases 2021-11-14 20:14:25 -07:00
Mykola Grymalyuk
90cc87702d Add Building from Source documentation 2021-11-14 19:50:45 -07:00
Mykola Grymalyuk
b27007d55c Fix SurPlus entry 2021-11-14 13:27:23 -07:00
Mykola Grymalyuk
0368ab00b7 Remove extra user input prompts during patching 2021-11-14 13:22:26 -07:00
Mykola Grymalyuk
606dc03b2b Remove backups on pre-snapshot based OSes 2021-11-14 12:29:31 -07:00
Mykola Grymalyuk
1799691348 Implement libSystem.dylib based SIP parsing 2021-11-14 12:24:35 -07:00
Mykola Grymalyuk
fda3a1724d Raise SurPlus MaxKernel to 21.99.99 2021-11-14 11:44:12 -07:00
Dhinak G
b320980aef Update issue template 2021-11-13 20:53:32 -05:00
Mykola Grymalyuk
874a0557e3 Increment FeatureUnlock
Closes https://github.com/dortania/OpenCore-Legacy-Patcher/issues/564
2021-11-12 19:07:17 -07:00
Mykola Grymalyuk
8db9cab06c Resolve iMac MXM Nvidia display output 2021-11-12 13:19:52 -07:00
Mykola Grymalyuk
d73f8979eb Increment PatcherSupportPkg 2021-11-11 22:24:01 -07:00
Mykola Grymalyuk
87bdc65e6c Merge pull request #697 from RedBearAK/patch-1
Fix for info about unable to click "Done" button
2021-11-08 16:23:14 -07:00
Mykola Grymalyuk
e325f6a25b Merge pull request #629 from ghost/patch-3
Update TESTED.md
2021-11-08 16:22:38 -07:00
Mykola Grymalyuk
21b2f86654 Clarify FileVault support 2021-11-08 09:06:50 -07:00
Mykola Grymalyuk
afb91b8b4f Add stock drive data set 2021-11-07 12:37:08 -07:00
Mykola Grymalyuk
2ace124880 Sync changelog 2021-11-05 23:30:15 -06:00
Mykola Grymalyuk
6b92640b64 Merge pull request #696 from dortania/walkthrough
Implement macOS InstallAssistant downloader
2021-11-05 23:29:08 -06:00
Mykola Grymalyuk
6689817872 Fix Integrity typo
Thanks to @J-Human
2021-11-05 23:24:13 -06:00
Mykola Grymalyuk
15bcfa7b79 Merge pull request #702 from dortania/airplay-12.1
Fix AirPlay to Mac support for 12.1 Beta 1
2021-11-05 23:19:15 -06:00
Mykola Grymalyuk
a5afbc6420 Fix 12.1 AirPlay to Mac 2021-11-05 23:18:16 -06:00
Mykola Grymalyuk
da32e3bfcf Test AirPlay to Mac fix 2021-11-04 23:40:00 -06:00
RedBearAK
822464a0bf Fix for info about unable to click "Done" button
Found solution for being unable to click the "Done" button when editing Sidebar Widget settings: Shift-Tab instead of Tab.
2021-11-03 18:09:50 -08:00
Mykola Grymalyuk
b42169f980 Strip unused functions 2021-11-03 19:29:24 -06:00
Mykola Grymalyuk
dd17f5da29 Update form 2021-11-03 14:10:38 -06:00
Mykola Grymalyuk
9f3d3453df Avoid Installing OC to ESP if not requested 2021-11-03 11:44:29 -06:00
Mykola Grymalyuk
95521e2225 Update 11.2.3 size 2021-11-03 11:37:05 -06:00
Mykola Grymalyuk
924cac7577 Add 11.2.3 mirror 2021-11-03 11:20:30 -06:00
Mykola Grymalyuk
c83e926e7d Fix exit 2021-11-02 19:18:45 -06:00
Mykola Grymalyuk
4929715830 macOS Installer Creation: initial commit 2021-11-02 18:32:10 -06:00
Mykola Grymalyuk
8fc1bf9572 Clean downloader_file funtion 2021-11-02 15:30:13 -06:00
Mykola Grymalyuk
875e77b0d1 Clean up download_file function 2021-11-02 09:58:09 -06:00
Mykola Grymalyuk
31bfdc755c Fix typo 2021-11-01 10:24:44 -06:00
Mykola Grymalyuk
4424209d3e Increment Binaries 2021-11-01 10:20:12 -06:00
Mykola Grymalyuk
75ca458747 Add Navi 23 IDs 2021-11-01 10:19:54 -06:00
Mykola Grymalyuk
7e08d3afc1 Update Post Install docs 2021-10-31 13:57:00 -06:00
Mykola Grymalyuk
24a0817890 Fix typo 2021-10-31 11:59:48 -06:00
Mykola Grymalyuk
0072cd2988 Update docs 2021-10-31 11:32:24 -06:00
Mykola Grymalyuk
5696dcd934 Fix tabbing 2021-10-31 09:48:06 -06:00
Mykola Grymalyuk
3ac7964fb0 Fix iGPU-only iMac14,x display output
Closes https://github.com/dortania/OpenCore-Legacy-Patcher/issues/661
2021-10-30 10:41:00 -06:00
Mykola Grymalyuk
dc4238fb09 Resolve BCM94331 BT4.0 issue
Closes https://github.com/dortania/OpenCore-Legacy-Patcher/issues/654
2021-10-30 10:36:40 -06:00
Mykola Grymalyuk
d68d04fd8c Update bug_report.yml 2021-10-30 10:21:33 -06:00
Mykola Grymalyuk
08852b8f4c Update issues template 2021-10-30 10:20:17 -06:00
Mykola Grymalyuk
7463d56ffc Adjust SIP naming 2021-10-30 07:51:26 -06:00
Mykola Grymalyuk
377b0dd797 Fix remaining check 2021-10-28 09:25:13 -06:00
Mykola Grymalyuk
ec683f21a4 Fix os_data call
Closes https://github.com/dortania/OpenCore-Legacy-Patcher/issues/647
2021-10-28 09:10:59 -06:00
Mykola Grymalyuk
dabe66e052 Refactor: move to os_data.py usage 2021-10-27 21:16:09 -06:00
Mykola Grymalyuk
91f3b94992 Move ESP disk installation to dedicated file 2021-10-27 20:56:51 -06:00
Mykola Grymalyuk
699ccd50c5 Merge pull request #548 from dortania/vmm
Support Spoofless Approach via VMM
2021-10-27 20:07:58 -06:00
Mykola Grymalyuk
491b5fe078 Sync changelog 2021-10-27 20:07:41 -06:00
Mykola Grymalyuk
5db6be9828 Merge branch 'main' into vmm 2021-10-26 20:01:15 -06:00
lulu-gh
e3871d5c35 Update TESTED.md 2021-10-26 15:58:25 -07:00
Mykola Grymalyuk
11a427ef01 Merge pull request #624 from Ausdauersportler/patch-7
Update MONTEREY-DROP.md
2021-10-26 16:14:14 -06:00
Ausdauersportler
5c54276a85 Update MONTEREY-DROP.md
Added short section about NVIDIA Kepler based systems.
2021-10-26 17:31:32 +02:00
Mykola Grymalyuk
7f9311c175 Merge pull request #619 from educovas/main
Update brightness control models
2021-10-26 08:09:06 -06:00
educovas
e4682f6307 Update brightness control models 2021-10-25 18:37:39 -03:00
Mykola Grymalyuk
bc88ed27d1 Increment version 2021-10-25 15:20:26 -06:00
Mykola Grymalyuk
113156c94c Sync changelog 2021-10-25 15:13:38 -06:00
Mykola Grymalyuk
99879bdcfc Resolve CPUFriend injection 2021-10-24 09:36:03 -06:00
Mykola Grymalyuk
e1cb78fa0b Merge pull request #614 from akidone/patch-1
TESTED.md
2021-10-24 09:23:41 -06:00
akidone
6109d8c92f TESTED.md
Added my good old MacBookPro10,2 to the list, as it works perfectly with patcher 0.3.0.
2021-10-24 11:20:27 +02:00
Mykola Grymalyuk
b473d189dd Sync PatcherSupportPkg 2021-10-23 22:05:31 -06:00
Mykola Grymalyuk
3b89fc2950 Sync PatcherSupportPkg 2021-10-22 16:12:59 -06:00
Mykola Grymalyuk
707cc5c45f Clarify VMM comment 2021-10-21 16:44:15 -06:00
Mykola Grymalyuk
80e5c38ee7 Merge branch 'main' into vmm 2021-10-21 16:42:37 -06:00
Mykola Grymalyuk
1b4fd73673 Add TS2 MacBook Pro troubleshooting 2021-10-21 15:50:16 -06:00
Mykola Grymalyuk
aec3bf4d08 Git's drunk 2021-10-21 12:53:26 -06:00
Mykola Grymalyuk
1b76b68a1b Fix cslv
Weird git bug, for some reason didn't update this correctly
2021-10-21 12:49:40 -06:00
Mykola Grymalyuk
1190e169cb Merge branch 'main' into vmm 2021-10-21 12:42:54 -06:00
Mykola Grymalyuk
ca2fd695b3 Fix crashing on dict append
Closes https://github.com/dortania/OpenCore-Legacy-Patcher/issues/597
2021-10-21 11:34:46 -06:00
Mykola Grymalyuk
9669196a07 Add ADP2,1 data set 2021-10-20 20:44:40 -06:00
Mykola Grymalyuk
88696c7047 Add MacBookPro18,x data set 2021-10-20 14:27:21 -06:00
Mykola Grymalyuk
8706959f65 Sync PatchSupportPkg 2021-10-20 14:25:40 -06:00
Mykola Grymalyuk
a63d1953b4 Fix non-Metal Control Center 2021-10-19 13:18:11 -06:00
Mykola Grymalyuk
6d129505ea Fix non-Metal acceleration crashing on 12.0.1 2021-10-18 21:53:31 -06:00
Mykola Grymalyuk
f12028aa84 Add support for RELEASE kexts 2021-10-18 20:17:45 -06:00
Mykola Grymalyuk
cf2a58e6bf Merge branch 'main' into vmm 2021-10-18 19:41:47 -06:00
Mykola Grymalyuk
6bc36c737c Remove legacy GMUX patch set for MacBookPro5,x
Closes https://github.com/dortania/OpenCore-Legacy-Patcher/issues/584
Closes https://github.com/dortania/OpenCore-Legacy-Patcher/issues/580
2021-10-17 15:53:38 -06:00
Mykola Grymalyuk
5f07e9ffd9 Drop CSR_ALLOW_EXECUTABLE_POLICY_OVERRIDE usage 2021-10-17 15:48:08 -06:00
Mykola Grymalyuk
9f4d96d446 Merge branch 'main' into vmm 2021-10-17 11:25:40 -06:00
Mykola Grymalyuk
0ff6a18e83 Avoid erroring on odd length values 2021-10-17 10:10:40 -06:00
Mykola Grymalyuk
a153b500b9 Remove garbage 2021-10-17 00:14:32 -06:00
Mykola Grymalyuk
db617db1fd Allow for setting custom SIP values via TUI
Closes https://github.com/dortania/OpenCore-Legacy-Patcher/issues/516
2021-10-17 00:13:49 -06:00
Mykola Grymalyuk
69e50aeb6d Fix incorrectly parsing SecureBootModel status
Closes https://github.com/dortania/OpenCore-Legacy-Patcher/issues/581
2021-10-16 23:21:29 -06:00
Mykola Grymalyuk
eaa686e045 Add saftey check for Vault configurations 2021-10-16 21:51:55 -06:00
Mykola Grymalyuk
6381910639 Update binaries to release build 2021-10-16 13:57:40 -06:00
Mykola Grymalyuk
68d25d30b4 Merge pull request #579 from educovas/main
Update documentation
2021-10-16 13:55:22 -06:00
educovas
16a666e836 2 2021-10-16 16:48:04 -03:00
educovas
5e91ea181b typo 2021-10-16 16:47:39 -03:00
educovas
f4e487c648 More changes 2021-10-16 16:24:59 -03:00
educovas
d1fbeba50f Add Safari extensions workaround / + 2021-10-16 16:20:32 -03:00
educovas
8c138658e2 Update supported Ones 2021-10-16 16:06:32 -03:00
educovas
729feba2ba Update host and target OS 2021-10-16 16:04:12 -03:00
educovas
978d2fda26 Fix typo 2021-10-16 15:58:51 -03:00
educovas
5e0354531a Monterey legacy WiFi workaround 2021-10-16 15:53:02 -03:00
educovas
19ed65968d Merge pull request #1 from dortania/main
Update
2021-10-16 15:39:55 -03:00
Mykola Grymalyuk
b3ad321922 Merge branch 'main' into vmm 2021-10-16 09:15:54 -06:00
Mykola Grymalyuk
5aee1aa60f Fix GMUX switching
Closes https://github.com/dortania/OpenCore-Legacy-Patcher/issues/574
2021-10-16 08:59:33 -06:00
Mykola Grymalyuk
ab22a225c4 Increment build 2021-10-15 19:54:38 -06:00
Mykola Grymalyuk
a97a32730a Fix function cast 2021-10-15 16:09:47 -06:00
Mykola Grymalyuk
ecde9ce077 Fix Nvdiai MXM patch set 2021-10-15 16:08:45 -06:00
Mykola Grymalyuk
c3dfc35692 Adjust defaults for VMM usage 2021-10-15 11:29:56 -06:00
Mykola Grymalyuk
cfa5175c72 Ensure WEG is enabled for iMac MXM patch set 2021-10-15 10:27:07 -06:00
Mykola Grymalyuk
e591f912b9 Strip unneeded agdpmod patches 2021-10-15 10:13:11 -06:00
Mykola Grymalyuk
17c130112e Merge remote-tracking branch 'origin/main' into vmm 2021-10-15 09:40:48 -06:00
Mykola Grymalyuk
0b3e45f7ba Fix board ID call
Closes https://github.com/dortania/OpenCore-Legacy-Patcher/issues/571
2021-10-15 09:33:34 -06:00
Mykola Grymalyuk
fa89865552 Fix Beta 10 Bluetooth 2021-10-15 09:23:05 -06:00
Mykola Grymalyuk
f58de2e000 Sync PatcherSupportPkg
Closes https://github.com/dortania/OpenCore-Legacy-Patcher/issues/569
2021-10-14 19:05:34 -06:00
Mykola Grymalyuk
f9c1d96aea Fix ADP3,2 ID 2021-10-13 15:06:43 -06:00
Mykola Grymalyuk
30121d869f Add basic GPU data sets 2021-10-12 21:44:32 -06:00
Mykola Grymalyuk
bb62eded77 Add Curie and Comet Lake IDs 2021-10-12 21:42:33 -06:00
Mykola Grymalyuk
dd43a0f243 Add ATI R500 IDs 2021-10-12 21:03:23 -06:00
Mykola Grymalyuk
ce6195529b Add GMA data set 2021-10-12 20:48:52 -06:00
Mykola Grymalyuk
f26e494450 Add Legacy GCN iMac patches
Co-authored-by @Ausdauersportler
2021-10-12 13:20:02 -06:00
Mykola Grymalyuk
1d336f9dcf Merge branch 'main' into vmm 2021-10-11 16:50:35 -06:00
Mykola Grymalyuk
82fe98a93c Add Software Based deMUX
Closes https://github.com/dortania/OpenCore-Legacy-Patcher/issues/559
2021-10-11 15:50:07 -06:00
Mykola Grymalyuk
ee15a55876 Merge branch 'main' into vmm 2021-10-10 20:50:25 -06:00
Mykola Grymalyuk
47a2f71612 Add firmware throttle patch
Closes https://github.com/dortania/OpenCore-Legacy-Patcher/issues/555
2021-10-10 20:42:05 -06:00
Mykola Grymalyuk
12e0ffff71 Fix offline releases 2021-10-10 16:46:30 -06:00
Mykola Grymalyuk
d7f3bb7d53 Add missing Macmini5,2 patch 2021-10-09 11:38:53 -06:00
Mykola Grymalyuk
06e0e9a2c0 Fix formatting 2021-10-09 11:19:39 -06:00
Mykola Grymalyuk
12998bc7e1 Fix return code error 2021-10-08 15:02:25 -06:00
Mykola Grymalyuk
68d13775d9 Work around erroring when single element in array 2021-10-08 15:00:58 -06:00
Mykola Grymalyuk
86694de7df Add error handling for bless failure 2021-10-08 12:53:06 -06:00
Mykola Grymalyuk
2d9403c524 Fix logic 2021-10-08 08:53:15 -06:00
Mykola Grymalyuk
664b7ddcd4 Merge branch 'main' into vmm 2021-10-08 08:46:31 -06:00
Mykola Grymalyuk
96fd706ead Implement EFICheckDisabler
Closes https://github.com/dortania/OpenCore-Legacy-Patcher/issues/552
Closes https://github.com/dortania/OpenCore-Legacy-Patcher/issues/551
2021-10-08 08:42:29 -06:00
Mykola Grymalyuk
a0fa3a8808 Fix desync off vmm branch
Closes https://github.com/dortania/OpenCore-Legacy-Patcher/issues/549
2021-10-06 19:23:52 -06:00
Mykola Grymalyuk
27383b5bc7 Update docs 2021-10-06 18:08:11 -06:00
Mykola Grymalyuk
4a8f61a01d Merge branch 'main' into vmm 2021-10-06 10:39:25 -06:00
Mykola Grymalyuk
75c6d10089 Fix accidental deletion 2021-10-06 10:37:11 -06:00
Mykola Grymalyuk
d62e6fda43 Merge branch 'main' into vmm 2021-10-06 10:29:24 -06:00
Mykola Grymalyuk
ee77f76c3a Add AppleGVA patch set 2021-10-06 09:44:00 -06:00
Mykola Grymalyuk
ae2a015c67 Fix references
Closes https://github.com/dortania/OpenCore-Legacy-Patcher/issues/545
2021-10-05 22:16:50 -06:00
Mykola Grymalyuk
9cbfe5be6a Add TS2 comments 2021-10-05 21:19:13 -06:00
Mykola Grymalyuk
3aa6e76c15 Add HW_BID patch 2021-10-05 20:44:29 -06:00
Mykola Grymalyuk
0484e8e18c Fix typo 2021-10-05 17:03:40 -06:00
Mykola Grymalyuk
5a4ee57034 Allow stock Board ID for spoofs 2021-10-05 16:30:02 -06:00
Mykola Grymalyuk
e20bc2aca5 Fix USB map 2021-10-05 15:58:48 -06:00
Mykola Grymalyuk
4d9325b238 Fix typo 2021-10-05 12:07:24 -06:00
Mykola Grymalyuk
84bd66fd92 Implement VMM Patching 2021-10-05 11:51:32 -06:00
Mykola Grymalyuk
b6297d6b63 Add Panel ID 9cd6 for iMac11,3
Co-authored-by @Ausdauersportler

Closes https://github.com/dortania/OpenCore-Legacy-Patcher/issues/538
2021-10-05 11:49:02 -06:00
Mykola Grymalyuk
f6ef7583ee Merge pull request #528 from dortania/refactor
Refactor Constants
2021-10-04 13:02:24 -06:00
Mykola Grymalyuk
e8d2b4f63e Fix on-model building with CLI 2021-10-04 12:47:27 -06:00
Mykola Grymalyuk
e210c0cbe6 I need sleep 2021-10-04 12:21:32 -06:00
Mykola Grymalyuk
9184302c18 Fix logic 2021-10-04 12:11:54 -06:00
Mykola Grymalyuk
fdfbbf6ae1 Fix clear screen usage in GUI 2021-10-04 11:52:42 -06:00
Mykola Grymalyuk
4f9abbaa49 Fix root patching from CLI 2021-10-04 11:21:59 -06:00
Mykola Grymalyuk
f524c4441b Update pci comment 2021-10-04 11:18:01 -06:00
Mykola Grymalyuk
5ca30e8ffe Fix spec 2021-10-04 11:13:24 -06:00
Mykola Grymalyuk
5742f745b1 Merge branch 'refactor' of https://github.com/dortania/OpenCore-Legacy-Patcher into refactor 2021-10-04 10:52:33 -06:00
Mykola Grymalyuk
91d20b2ad0 Rework args check 2021-10-04 10:52:11 -06:00
Mykola Grymalyuk
8272c092ad Fix init 2021-10-03 18:15:14 -06:00
Mykola Grymalyuk
3790555dec Fix init 2021-10-03 18:01:34 -06:00
Mykola Grymalyuk
3537725a13 Adjust build to py scheme 2021-10-03 14:14:55 -06:00
Mykola Grymalyuk
991a089c45 Tmp 2021-10-03 14:14:39 -06:00
Mykola Grymalyuk
8a6faa0836 Adjust utilities to py scheme 2021-10-03 14:12:11 -06:00
Mykola Grymalyuk
8e1923ee21 Tmp 2021-10-03 14:11:20 -06:00
Mykola Grymalyuk
a2f73a7bdc Adjust Constants to python scheme 2021-10-03 14:10:56 -06:00
Mykola Grymalyuk
2164463e3b Tmp 2021-10-03 14:09:40 -06:00
Mykola Grymalyuk
a980ba95f9 Fix typo 2021-10-03 13:57:17 -06:00
Mykola Grymalyuk
a70b18dd50 Convert additional files to snake naming scheme 2021-10-03 13:54:12 -06:00
Mykola Grymalyuk
e33997320b Use snake nameing scheme 2021-10-03 13:35:01 -06:00
Mykola Grymalyuk
b9a5ba7897 Rename to tmp folders
Work around git not checking case
2021-10-03 13:31:19 -06:00
Mykola Grymalyuk
c0350e036e Enforce Snake Style naming scheme for files 2021-10-03 13:24:51 -06:00
Mykola Grymalyuk
a5f489d48b Depreciate dedicated OCLP-CLI binary
OpenCore-Patcher now supports both CLI and TUI mode
2021-10-03 10:44:13 -06:00
Mykola Grymalyuk
426c572ce2 Fix AppleALC building 2021-10-01 18:00:53 -06:00
Mykola Grymalyuk
9f4ac80083 Update SMBIOS data
Include Ethernet and Chipset information
2021-10-01 12:28:28 -06:00
Mykola Grymalyuk
2e613600de Sync changelog 2021-10-01 10:22:12 -06:00
Mykola Grymalyuk
3a28ba699f Allow iGPU always on iMac13,x 2021-10-01 10:16:30 -06:00
Mykola Grymalyuk
fe359f7ea6 Move FirmwareFeature generation 2021-10-01 09:58:31 -06:00
Mykola Grymalyuk
0e07273c8e Move SMBIOS generation to dedicated file 2021-10-01 09:45:34 -06:00
Mykola Grymalyuk
8b41cc6ff5 Update .spec to include Data folder 2021-10-01 00:17:47 -06:00
Mykola Grymalyuk
d563011c72 Refactor SMBIOS table 2021-10-01 00:04:55 -06:00
Mykola Grymalyuk
06824e6757 Update MONTEREY-DROP.md 2021-09-30 12:09:15 -06:00
Mykola Grymalyuk
cc8bff1e1f Avoid Updating DataHub
Works around hibernation issue
2021-09-29 13:11:06 -06:00
Mykola Grymalyuk
6102bba478 Ensure overrides get RestrictEvents 2021-09-29 12:39:24 -06:00
Mykola Grymalyuk
dd40ddc452 Fix OTA updates on T2 SMBIOS
Closes https://github.com/dortania/OpenCore-Legacy-Patcher/issues/471
2021-09-29 11:49:30 -06:00
Mykola Grymalyuk
8d02a7984d Limit MacBookPro6,2 G State
Closes https://github.com/dortania/OpenCore-Legacy-Patcher/issues/520
2021-09-29 11:31:41 -06:00
Mykola Grymalyuk
61281f597a Add Legacy GMUX patch sets 2021-09-29 11:29:05 -06:00
Mykola Grymalyuk
11e795026b Ensure SMBIOS data is correctly updated 2021-09-27 12:34:58 -06:00
Mykola Grymalyuk
d58e0e3972 Avoid erroring 2021-09-27 09:25:21 -06:00
Mykola Grymalyuk
453703d402 Add SurPlus patch 2021-09-27 09:22:55 -06:00
Mykola Grymalyuk
dfb84ec72b Fix Kepler DisplayPort output 2021-09-27 08:35:30 -06:00
Mykola Grymalyuk
8f98cac918 Misc fixes
- Adjust MacPro/Xserve SMBIOS spoof
- Lower SIP bits flipped
- Force delete SIP on each boot (avoids user error)

Closes https://github.com/dortania/OpenCore-Legacy-Patcher/issues/510
2021-09-25 11:49:05 -06:00
Mykola Grymalyuk
c053fb7244 Fix formatting 2021-09-24 10:31:14 -06:00
Mykola Grymalyuk
0ccb2c74d2 Allow configuring GMUX usage for Windows
Closes https://github.com/dortania/OpenCore-Legacy-Patcher/issues/502
2021-09-24 10:29:43 -06:00
Mykola Grymalyuk
2683b7a7f0 Add forgotten commit 2021-09-24 09:16:04 -06:00
Mykola Grymalyuk
86dcf9fb5b Fix Beta 7 Acceleration on Nvidia Tesla 2021-09-24 07:47:31 -06:00
109 changed files with 7868 additions and 3868 deletions

View File

@@ -1,4 +1,4 @@
[flake8] [flake8]
extend-ignore = E501, E203 extend-ignore = E501, E203
per-file-ignores = per-file-ignores =
Resources/Constants.py:E704 Resources/constants.py:E704

View File

@@ -1,6 +1,5 @@
name: Bug Report name: Bug Report
description: File a bug report description: File a bug report
title: "[Bug]: "
labels: [bug] labels: [bug]
body: body:
- type: markdown - type: markdown
@@ -101,6 +100,39 @@ body:
- Other/Non-Applicable - Other/Non-Applicable
validations: validations:
required: true required: true
- type: dropdown
id: verify-previously-reported
attributes:
label: Have you verified whether this issue has been opened before? If no, your issue will be closed
description: If no, your issue will be closed. We'd appreciate it if users check with Github Issue's search before filing (https://github.com/dortania/OpenCore-Legacy-Patcher/issues?q=is%3Aissue)
multiple: true
options:
- 'true'
- 'false'
validations:
required: true
- type: dropdown
id: verify-guide
attributes:
label: Have you verified whether this issue is covered in our guide? ie. Troubleshooting and Legacy Acceleration pages
description: If no, your issue will be closed. We'd appreciate it if users check with Guide before filing (https://dortania.github.io/OpenCore-Legacy-Patcher/)
multiple: true
options:
- 'true'
- 'false'
validations:
required: true
- type: dropdown
id: 3rd-party-application
attributes:
label: Is this issue with a 3rd party application?
description: If yes, please move discussions onto forums. We're unable to dedicate time to working on every single application that may be broken in macOS. Only file issues if you have a fix you'd like to add to our project
multiple: true
options:
- 'true'
- 'false'
validations:
required: true
- type: dropdown - type: dropdown
id: os-version id: os-version
attributes: attributes:
@@ -132,7 +164,7 @@ body:
- type: textarea - type: textarea
id: what-happened id: what-happened
attributes: attributes:
label: What is the Isssue? label: What is the Issue?
description: Additionally, explain what you expected to happen? description: Additionally, explain what you expected to happen?
value: "Please clearly explain the issue" value: "Please clearly explain the issue"
validations: validations:

View File

@@ -12,10 +12,10 @@ jobs:
runs-on: x86_64_mojave runs-on: x86_64_mojave
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- run: python3 create-offline-build.py - run: python3 create_offline_build.py
- run: /Library/Frameworks/Python.framework/Versions/3.9/bin/pyinstaller OpenCore-Patcher.spec - run: /Library/Frameworks/Python.framework/Versions/3.9/bin/pyinstaller OpenCore-Patcher.spec
- run: ./after_pyinstaller.sh - run: ./after_pyinstaller.sh
- run: 'codesign -s "Developer ID Application: Mykola Grymalyuk (S74BDJXQMD)" -v --force --deep --timestamp --entitlements entitlements.plist -o runtime "dist/OpenCore-Patcher.app"' - run: 'codesign -s "Developer ID Application: Mykola Grymalyuk (S74BDJXQMD)" -v --force --deep --timestamp --entitlements ./payloads/entitlements.plist -o runtime "dist/OpenCore-Patcher.app"'
- run: cd dist; zip -r ../OpenCore-Patcher-TUI-Offline.app.zip OpenCore-Patcher.app - run: cd dist; zip -r ../OpenCore-Patcher-TUI-Offline.app.zip OpenCore-Patcher.app
- name: Upload App to Artifacts - name: Upload App to Artifacts
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
@@ -28,6 +28,6 @@ jobs:
uses: svenstaro/upload-release-action@e74ff71f7d8a4c4745b560a485cc5fdb9b5b999d uses: svenstaro/upload-release-action@e74ff71f7d8a4c4745b560a485cc5fdb9b5b999d
with: with:
repo_token: ${{ secrets.GITHUB_TOKEN }} repo_token: ${{ secrets.GITHUB_TOKEN }}
file: OpenCore-Patcher-TUI.app.zip file: OpenCore-Patcher-TUI-Offline.app.zip
tag: ${{ github.ref }} tag: ${{ github.ref }}
file_glob: true file_glob: true

View File

@@ -12,10 +12,9 @@ jobs:
runs-on: x86_64_mojave runs-on: x86_64_mojave
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- run: /Library/Frameworks/Python.framework/Versions/3.9/bin/pyinstaller OpenCore-Patcher.spec - run: /Library/Frameworks/Python.framework/Versions/3.9/bin/pyinstaller OpenCore-Patcher.spec
- run: ./after_pyinstaller.sh - run: ./after_pyinstaller.sh
- run: 'codesign -s "Developer ID Application: Mykola Grymalyuk (S74BDJXQMD)" -v --force --deep --timestamp --entitlements entitlements.plist -o runtime "dist/OpenCore-Patcher.app"' - run: 'codesign -s "Developer ID Application: Mykola Grymalyuk (S74BDJXQMD)" -v --force --deep --timestamp --entitlements ./payloads/entitlements.plist -o runtime "dist/OpenCore-Patcher.app"'
- run: cd dist; zip -r ../OpenCore-Patcher-TUI.app.zip OpenCore-Patcher.app - run: cd dist; zip -r ../OpenCore-Patcher-TUI.app.zip OpenCore-Patcher.app
- run: ./../sign-tui.sh - run: ./../sign-tui.sh
- name: Upload App to Artifacts - name: Upload App to Artifacts

View File

@@ -13,21 +13,25 @@ jobs:
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- run: /Library/Frameworks/Python.framework/Versions/3.9/bin/pyinstaller OCLP-CLI.spec - run: /Library/Frameworks/Python.framework/Versions/3.9/bin/pyinstaller OpenCore-Patcher.spec
- run: cd dist; cp OCLP-CLI ../; cd .. - run: cd dist; cp OpenCore-Patcher ../; cd ..; mv OpenCore-Patcher OCLP-CLI
- run: zip OCLP-CLI.zip OCLP-CLI
- name: Download latest nightly OCLP-GUI - name: Download latest nightly OCLP-GUI
run: curl -S -L https://nightly.link/dortania/OCLP-GUI/workflows/build-app/master/OpenCore-Patcher-GUI.app.zip --output ./OpenCore-Patcher-GUI.app.zip run: curl -S -L https://nightly.link/dortania/OCLP-GUI/workflows/build-app/master/OpenCore-Patcher-GUI.app.zip --output ./OpenCore-Patcher-GUI.app.zip --insecure
- run: unzip -o OpenCore-Patcher-GUI.app.zip - run: unzip -o OpenCore-Patcher-GUI.app.zip
- run: unzip OpenCore-Patcher-GUI.app.zip; rm OpenCore-Patcher-GUI.app.zip - run: unzip OpenCore-Patcher-GUI.app.zip; rm OpenCore-Patcher-GUI.app.zip
- name: Merge new GUI - name: Merge new GUI
run: cp OCLP-CLI OpenCore\ Patcher.app/Contents/Resources/ run: cp OCLP-CLI OpenCore\ Patcher.app/Contents/Resources/
- run: python3 merge_gui.py - run: python3 merge_gui.py
- run: 'codesign -s "Developer ID Application: Mykola Grymalyuk (S74BDJXQMD)" -v --force --deep --timestamp --entitlements entitlements.plist -o runtime "OpenCore Patcher.app/Contents/Resources/OCLP-CLI"' - name: Code Sign Binaries for release
- run: 'codesign -s "Developer ID Application: Mykola Grymalyuk (S74BDJXQMD)" -v --force --deep --timestamp --entitlements entitlements.plist -o runtime "OpenCore Patcher.app/Contents/Resources/oclpd"' if: github.event_name == 'release'
- run: 'codesign -s "Developer ID Application: Mykola Grymalyuk (S74BDJXQMD)" -v --force --deep --timestamp --entitlements entitlements.plist -o runtime "OpenCore Patcher.app"' run: |
'codesign -s "Developer ID Application: Mykola Grymalyuk (S74BDJXQMD)" -v --force --deep --timestamp --entitlements ./payloads/entitlements.plist -o runtime "OpenCore Patcher.app/Contents/Resources/OCLP-CLI"'
'codesign -s "Developer ID Application: Mykola Grymalyuk (S74BDJXQMD)" -v --force --deep --timestamp --entitlements ./payloads/entitlements.plist -o runtime "OpenCore Patcher.app/Contents/Resources/oclpd"'
'codesign -s "Developer ID Application: Mykola Grymalyuk (S74BDJXQMD)" -v --force --deep --timestamp --entitlements ./payloads/entitlements.plist -o runtime "OpenCore Patcher.app"'
- run: ditto -c -k --sequesterRsrc --keepParent OpenCore\ Patcher.app OpenCore-Patcher-GUI.app.zip - run: ditto -c -k --sequesterRsrc --keepParent OpenCore\ Patcher.app OpenCore-Patcher-GUI.app.zip
- run: ./../sign-gui.sh - name: Notarize Binaries for release
if: github.event_name == 'release'
run: ./../sign-gui.sh
- name: Upload GUI to Artifacts - name: Upload GUI to Artifacts
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
with: with:
@@ -37,7 +41,7 @@ jobs:
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
with: with:
name: OCLP-CLI name: OCLP-CLI
path: OCLP-CLI.zip path: OCLP-CLI
- name: Upload to Release - name: Upload to Release
if: github.event_name == 'release' if: github.event_name == 'release'
uses: svenstaro/upload-release-action@e74ff71f7d8a4c4745b560a485cc5fdb9b5b999d uses: svenstaro/upload-release-action@e74ff71f7d8a4c4745b560a485cc5fdb9b5b999d

4
.gitignore vendored
View File

@@ -2,6 +2,9 @@
OCLP-GUI.command OCLP-GUI.command
/payloads/Apple /payloads/Apple
/payloads/*.zip /payloads/*.zip
/payloads/BuildManifest.plist
/payloads/*.sucatalog
/payloads/*.pkg
/payloads/__MACOSX /payloads/__MACOSX
/App /App
/Build-Folder /Build-Folder
@@ -17,3 +20,4 @@ __pycache__/
/docs/yarn.lock /docs/yarn.lock
/docs/yarn-error.log /docs/yarn-error.log
/docs/node_modules/ /docs/node_modules/
/payloads/List.txt

View File

@@ -1,5 +1,105 @@
# OpenCore Legacy Patcher changelog # OpenCore Legacy Patcher changelog
## 0.3.2
- Implement spoofless support (ie. no SMBIOS patching)
- Requires macOS 11.3 or newer, for 11.2.3 and older use Minimal or higher spoofing
- See additional notes before updating: [VMM usage notes](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/543#issuecomment-953441283)
- Adjust SIP setting to better reflect current SIP usage
- Resolve Monterey Bluetooth issues on user-upgraded BCM94331 BT4.0 modules
- Fix iGPU-only iMac14,x display output when using Minimal/Moderate spoof
- Increment Binaries:
- OpenCore 0.7.6 - release
- Lilu 1.5.8 - release
- BrcmPatchRAM 2.6.1 - release
- WhateverGreen 1.5.5 - release
- PatcherSupportPkg 0.2.8 - release
- FeatureUnlock 1.0.5 - rolling (9cf1e81)
- Fix AirPlay to Mac on macOS 12.1
- Add macOS InstallAssistant downloader to TUI
- Resolve rare memory corruption due to FeatureUnlock
- Raise SurPlus MaxKernel to 21.99.99
- Fix Content Caching with spoofless usage
- Allow disabling of ConnectDrivers
- Aid with Hibernation on MacBookPro9,1/MacBookPro10,1
- Add legacy iSight patch
- Applicable for MacBook4,1/5,2
- Affected Device IDs: 0x8300, 0x8501, 0x8503
- Credit to parrotgeek1 for LegacyUSBVideoSupport
- Fix Wifi Password prompt in Monterey on legacy wifi
- Applicable for Atheros, BCM94328, BCM94322
- Fix OpenCL Acceleration on Ivy Bridge and Kepler
- Add Apple RAID Card support
- Add Legacy GCN build support off model for MXM iMacs
- Resolve 5k Display Output support on 5k iMacs and iMac Pro
- Resolve NVMe Patching on 2016-2017 MacBook Pros
- Enable Windows VMX support for Haswell and Broadwell MacBooks
## 0.3.1
- Increment Binaries:
- OpenCorePkg 0.7.4 release
- RestrictEvents 1.0.5 release
- WhateverGreen 1.5.4 release
- Allow for setting custom SIP values via TUI
- Drop `CSR_ALLOW_EXECUTABLE_POLICY_OVERRIDE` requirement for root patching
- Lowers default SIP Disabled value to 0xA03
- Update Legacy GMUX patchset to latest Sierra Secuirty Update
- [Source](https://github.com/HackintoshHD/mbp5x-instant-gpu-switching)
- Fix non-Metal acceleration crashing on 12.0.1
- Yes Apple adding a notch broke our accel patches
- Fix non-Metal Control Center crashing on 12.0 Beta 10+
- Increment Binaries:
- PatcherSupportPkg 0.1.12
## 0.3.0
- Fix Nvidia Tesla Acceleration in Monterey Beta 7+
- Add missing NVDAStartup
- Allow configuring GMUX usage for Windows
- Applicable for iGPU+dGPU MacBook Pros
- Allow usage of legacy AppleHDA
- Only use for machines that cannot achieve audio support normally
- Main usage for Macs without boot screen output
- Revert iMacPro1,1 SMBIOS usage on Mac Pros and Xserves
- Resolves display output issues on Legacy GCN
- Limit SIP bits flipped when disabled
- 0xFEF -> 0xE03
- `CSR_ALLOW_UNTRUSTED_KEXTS`
- `CSR_ALLOW_UNRESTRICTED_FS`
- `CSR_ALLOW_UNAPPROVED_KEXTS`
- `CSR_ALLOW_EXECUTABLE_POLICY_OVERRIDE`
- `CSR_ALLOW_UNAUTHENTICATED_ROOT`
- Fix Kepler DisplayPort output
- Apply `agdpmod=vit9696` patch
- Add Syncretic's SurPlus 11.3+ Race Condition Patch
- [Source](https://github.com/reenigneorcim/SurPlus)
- Downgrade Nvidia Kepler Bundles to 11.0 Beta 3
- Resolves crashing at high loads, credit to [Jackluke](https://github.com/jacklukem) for discovery
- Add Legacy GMUX patchsets
- Applicable for dual GPU MacBookPro5,x and demuxed MacBookPro8,x
- Increment Binaries:
- PatcherSupportPkg 0.1.7 release
- RestrictEvents 1.0.5 rolling (2430ed0)
- Limit MacBookPro6,2 G State
- Works around crashing when switching GPUs
- Fix OTA updates on T2 SMBIOS
- Allow iMac13,x iGPU usage always
- Due to both Kepler and Ivy needing root patching, no benefit to disable the iGPU
- Refactor Hardware Model building
- Resolve dGPU output on MacBookPro10,1
- Add Panel ID `9cd6` for iMac11,3
- Resolves Brightness control
- Add AppleGVA patch set for HD3000 machines
- Mainly applicable for iMac12,x and iGPU-only MacBooks
- Add EFICheckDisabler
- Based off stripped RestrictEvents.kext
- Add SimpleMSR to disable missing battery throttling on Nehalem+ MacBooks
- Implement software demux patch set for 2011 15/17" MacBook Pros
- Alternative to hardware demux
- Adds [AMDGPUWakeHandler](https://github.com/blackgate/AMDGPUWakeHandler)
- Add Legacy GCN support for iMac11,x and iMac12,x with upgraded GPUs
- Note: iMac12,x with legacy GCN will fail to wake
- Fix Beta 10 Bluetooth
- Works around new Broadcom/CSR vendor checks in `bluetoothd`
## 0.2.5 ## 0.2.5
- Implement Latebloom configuration via command line tool - Implement Latebloom configuration via command line tool
@@ -34,6 +134,7 @@
- System Preferences will not report settings however - System Preferences will not report settings however
- Allow Root Volume Patched Systems to use FileVault 2 - Allow Root Volume Patched Systems to use FileVault 2
- Requires macOS 11.3 (20E232) or newer - Requires macOS 11.3 (20E232) or newer
- Unsupported on APFS ROM Patched Macs, revert to stock firmware to resolve
- Add offline TUI build - Add offline TUI build
- Allows for root patching without network connection - Allows for root patching without network connection
- Add Legacy Wireless support for Monterey - Add Legacy Wireless support for Monterey

View File

@@ -1,309 +0,0 @@
#!/usr/bin/env python3
# Copyright (C) 2020-2021 Mykola Grymalyuk
from __future__ import print_function
import subprocess
import sys
import platform
import argparse
from pathlib import Path
from Resources import Build, ModelArray, Constants, SysPatch, device_probe, Utilities, ModelExample
class OpenCoreLegacyPatcher:
def __init__(self):
print("Loading...")
Utilities.disable_cls()
self.constants = Constants.Constants()
self.constants.computer = device_probe.Computer.probe()
self.computer = self.constants.computer
self.constants.detected_os = int(platform.uname().release.partition(".")[0])
self.constants.detected_os_minor = int(platform.uname().release.partition(".")[2].partition(".")[0])
detected_os_build: str = subprocess.run("sw_vers -buildVersion".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.decode()
self.constants.detected_os_build = detected_os_build
custom_cpu_model_value = Utilities.get_nvram("revcpuname", "4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102", decode=True)
if custom_cpu_model_value is not None:
# TODO: Fix to not use two separate variables
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") or ""):
self.constants.verbose_debug = True
# Check if running in RecoveryOS
self.constants.recovery_status = Utilities.check_recovery()
parser = argparse.ArgumentParser()
# Generic building args
parser.add_argument("--build", help="Build OpenCore", action="store_true", required=False)
parser.add_argument("--verbose", help="Enable verbose boot", action="store_true", required=False)
parser.add_argument("--debug_oc", help="Enable OpenCore DEBUG", action="store_true", required=False)
parser.add_argument("--debug_kext", help="Enable kext DEBUG", action="store_true", required=False)
parser.add_argument("--hide_picker", help="Hide OpenCore picker", action="store_true", required=False)
parser.add_argument("--disable_sip", help="Disable SIP", action="store_true", required=False)
parser.add_argument("--disable_smb", help="Disable SecureBootModel", action="store_true", required=False)
parser.add_argument("--vault", help="Enable OpenCore Vaulting", action="store_true", required=False)
parser.add_argument("--support_all", help="Allow OpenCore on natively supported Models", action="store_true", required=False)
parser.add_argument("--firewire", help="Enable FireWire Booting", action="store_true", required=False)
parser.add_argument("--nvme", help="Enable NVMe Booting", action="store_true", required=False)
parser.add_argument("--wlan", help="Enable Wake on WLAN support", action="store_true", required=False)
# parser.add_argument("--disable_amfi", help="Disable AMFI", action="store_true", required=False)
parser.add_argument("--moderate_smbios", help="Moderate SMBIOS Patching", action="store_true", required=False)
parser.add_argument("--moj_cat_accel", help="Allow Root Patching on Mojave and Catalina", action="store_true", required=False)
parser.add_argument("--disable_thunderbolt", help="Disable Thunderbolt on 2013-2014 MacBook Pros", action="store_true", required=False)
# Building args requiring value values (ie. --model iMac12,2)
parser.add_argument("--model", action="store", help="Set custom model", required=False)
parser.add_argument("--disk", action="store", help="Specifies disk to install to", required=False)
parser.add_argument("--smbios_spoof", action="store", help="Set SMBIOS patching mode", required=False)
parser.add_argument("--lb_delay", action="store", help="Set Latebloom delay in ms", required=False)
parser.add_argument("--lb_range", action="store", help="Set Latebloom range in ms", required=False)
parser.add_argument("--lb_debug", action="store", help="Set Latebloom debug", required=False)
# SysPatch args
parser.add_argument("--patch_sys_vol", help="Patches root volume", action="store_true", required=False)
parser.add_argument("--unpatch_sys_vol", help="Unpatches root volume, EXPERIMENTAL", action="store_true", required=False)
# parser.add_argument("--patch_disk", action="store", help="Specifies disk to root patch", required=False)
parser.add_argument("--validate", help="Validate", action="store_true", required=False)
args = parser.parse_args()
self.constants.gui_mode = True
self.constants.current_path = Path.cwd()
if getattr(sys, "frozen", False) and hasattr(sys, "_MEIPASS"):
print("- Rerouting payloads location")
self.constants.payload_path = sys._MEIPASS / Path("payloads")
else:
print("- Using default payloads location")
if args.disk:
print(f"- Install Disk set: {args.disk}")
self.constants.disk = args.disk
if args.validate:
self.validate()
# if args.patch_disk:
# print(f"- Patch Disk set: {args.patch_disk}")
# self.constants.patch_disk = args.patch_disk
if args.verbose:
print("- Set verbose configuration")
self.constants.verbose_debug = True
if args.debug_oc:
print("- Set OpenCore DEBUG configuration")
self.constants.opencore_debug = True
self.constants.opencore_build = "DEBUG"
if args.debug_kext:
print("- Set kext DEBUG configuration")
self.constants.kext_debug = True
if args.hide_picker:
print("- Set HidePicker configuration")
self.constants.showpicker = False
if args.disable_sip:
print("- Set Disable SIP configuration")
self.constants.sip_status = False
if args.disable_smb:
print("- Set Disable SecureBootModel configuration")
self.constants.secure_status = False
if args.vault:
print("- Set Vault configuration")
self.constants.vault = True
if args.firewire:
print("- Set FireWire Boot configuration")
self.constants.firewire_boot = True
if args.nvme:
print("- Set NVMe Boot configuration")
self.constants.nvme_boot = True
# if args.disable_amfi:
# print("- Set Disable AMFI configuration")
# self.constants.amfi_status = False
if args.wlan:
print("- Set Wake on WLAN configuration")
self.constants.enable_wake_on_wlan = True
if args.disable_thunderbolt:
print("- Set Disable Thunderbolt configuration")
self.constants.disable_thunderbolt = True
if args.moderate_smbios:
print("- Set Moderate SMBIOS Patching configuration")
self.constants.serial_settings = "Moderate"
if args.smbios_spoof:
if args.smbios_spoof == "Minimal":
self.constants.serial_settings = "Minimal"
elif args.smbios_spoof == "Moderate":
self.constants.serial_settings = "Moderate"
elif args.smbios_spoof == "Advanced":
self.constants.serial_settings = "Advanced"
else:
print(f"- Unknown SMBIOS arg passed: {args.smbios_spoof}")
if args.lb_delay:
try:
self.constants.latebloom_delay = int(args.lb_delay)
print(f"- Set LateBloom delay: {args.lb_delay}")
except ValueError:
print(f"- Invalid LateBloom delay: {args.lb_delay}")
if args.lb_range:
try:
self.constants.latebloom_range = int(args.lb_range)
print(f"- Set LateBloom range: {args.lb_range}")
except ValueError:
print(f"- Invalid LateBloom range: {args.lb_range}")
if args.lb_debug:
try:
self.constants.latebloom_debug = int(args.lb_debug)
if self.constants.latebloom_debug in [0, 1]:
print(f"- Set LateBloom debug: {args.lb_debug}")
else:
print(f"- Invalid LateBloom debug: {args.lb_debug}")
except ValueError:
print(f"- Invalid LateBloom range: {args.lb_debug}")
if args.support_all:
print("- Building for natively supported model")
self.constants.allow_oc_everywhere = True
self.constants.serial_settings = "None"
if args.build:
if args.model:
print(f"- Using custom model: {args.model}")
self.constants.custom_model = args.model
self.set_defaults(self.constants.custom_model, False)
self.build_opencore()
elif self.computer.real_model not in ModelArray.SupportedSMBIOS and self.constants.allow_oc_everywhere is False:
print(
"""Your model is not supported by this patcher for running unsupported OSes!"
If you plan to create the USB for another machine, please select the "Change Model" option in the menu."""
)
sys.exit(1)
else:
print(f"- Using detected model: {self.constants.computer.real_model}")
self.set_defaults(self.constants.custom_model, True)
self.build_opencore()
if args.patch_sys_vol:
if args.moj_cat_accel:
print("- Set Mojave/Catalina root patch configuration")
self.constants.moj_cat_accel = True
print("- Set System Volume patching")
self.patch_vol()
elif args.unpatch_sys_vol:
print("- Set System Volume unpatching")
self.unpatch_vol()
def set_defaults(self, model, host_is_target):
if host_is_target:
if Utilities.check_metal_support(device_probe, self.computer) is False:
self.constants.disable_cs_lv = True
if self.computer.dgpu and self.computer.dgpu.arch == device_probe.NVIDIA.Archs.Kepler:
self.constants.sip_status = False
self.constants.amfi_status = True
self.constants.allow_fv_root = True # Allow FileVault on broken seal
if (
isinstance(self.computer.wifi, device_probe.Broadcom)
and self.computer.wifi.chipset in [device_probe.Broadcom.Chipsets.AirPortBrcm4331, device_probe.Broadcom.Chipsets.AirPortBrcm43224]
) or (isinstance(self.computer.wifi, device_probe.Atheros) and self.computer.wifi.chipset == device_probe.Atheros.Chipsets.AirPortAtheros40):
self.constants.sip_status = False
self.constants.allow_fv_root = True # Allow FileVault on broken seal
elif model in ModelArray.LegacyGPU:
self.constants.disable_cs_lv = True
if model in ModelArray.LegacyGPU:
if host_is_target and Utilities.check_metal_support(device_probe, self.computer) is True:
# Building on device and we have a native, supported GPU
if self.computer.dgpu and self.computer.dgpu.arch == device_probe.NVIDIA.Archs.Kepler:
self.constants.sip_status = False
# self.constants.secure_status = True # Monterey
self.constants.amfi_status = True
self.constants.allow_fv_root = True # Allow FileVault on broken seal
else:
self.constants.sip_status = True
# self.constants.secure_status = True # Monterey
self.constants.amfi_status = True
else:
self.constants.sip_status = False # Unsigned kexts
self.constants.secure_status = False # Root volume modified
self.constants.amfi_status = False # Unsigned binaries
self.constants.allow_fv_root = True # Allow FileVault on broken seal
if model in ModelArray.ModernGPU:
self.constants.sip_status = False # Unsigned kexts
self.constants.secure_status = False # Modified root volume
self.constants.allow_fv_root = True # Allow FileVault on broken seal
# self.constants.amfi_status = True # Signed bundles, Don't need to explicitly set currently
if model == "MacBook8,1":
# MacBook8,1 has an odd bug where it cannot install Monterey with Minimal spoofing
self.constants.serial_settings == "Moderate"
if self.constants.latebloom_delay == 0:
self.constants.latebloom_delay, self.constants.latebloom_range, self.constants.latebloom_debug = Utilities.latebloom_detection(model)
if Utilities.get_nvram("gpu-power-prefs", "FA4CE28D-B62F-4C99-9CC3-6815686E30F9", decode=True):
self.constants.allow_ts2_accel = False
def patch_vol(self):
SysPatch.PatchSysVolume(self.constants.custom_model or self.constants.computer.real_model, self.constants).start_patch()
def unpatch_vol(self):
SysPatch.PatchSysVolume(self.constants.custom_model or self.constants.computer.real_model, self.constants).start_unpatch()
def build_opencore(self):
Build.BuildOpenCore(self.constants.custom_model or self.constants.computer.real_model, self.constants).build_opencore()
def install_opencore(self):
Build.BuildOpenCore(self.constants.custom_model or self.constants.computer.real_model, self.constants).copy_efi()
def validate(self):
# Runs through ocvalidate to check for errors
valid_dumps = [
ModelExample.MacBookPro.MacBookPro92_Stock,
# ModelExample.MacBookPro.MacBookPro171_Stock,
# ModelExample.Macmini.Macmini91_Stock,
ModelExample.iMac.iMac81_Stock,
ModelExample.iMac.iMac112_Stock,
ModelExample.iMac.iMac122_Upgraded,
ModelExample.MacPro.MacPro31_Stock,
ModelExample.MacPro.MacPro31_Upgrade,
ModelExample.MacPro.MacPro31_Modern_AMD,
ModelExample.MacPro.MacPro31_Modern_Kepler,
ModelExample.MacPro.MacPro41_Upgrade,
ModelExample.MacPro.MacPro41_Modern_AMD,
ModelExample.MacPro.MacPro41_51__Flashed_Modern_AMD,
]
self.constants.validate = True
for model in ModelArray.SupportedSMBIOS:
print(f"Validating predefined model: {model}")
self.constants.custom_model = model
self.build_opencore()
result = subprocess.run([self.constants.ocvalidate_path, f"{self.constants.opencore_release_folder}/EFI/OC/config.plist"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
if result.returncode != 0:
print("Error on build!")
print(result.stdout.decode())
raise Exception(f"Validation failed for predefined model: {model}")
else:
print(f"Validation succeeded for predefined model: {model}")
for model in valid_dumps:
self.constants.computer = model
self.computer = self.constants.computer
self.constants.custom_model = ""
print(f"Validating dumped model: {self.computer.real_model}")
self.build_opencore()
result = subprocess.run([self.constants.ocvalidate_path, f"{self.constants.opencore_release_folder}/EFI/OC/config.plist"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
if result.returncode != 0:
print("Error on build!")
print(result.stdout.decode())
raise Exception(f"Validation failed for predefined model: {self.computer.real_model}")
else:
print(f"Validation succeeded for predefined model: {self.computer.real_model}")
OpenCoreLegacyPatcher()
# Example arg for OCLP command line
# ./OCLP-CLI --build --verbose --debug_oc --debug_kext --model iMac11,2

View File

@@ -1,35 +0,0 @@
# -*- mode: python ; coding: utf-8 -*-
import sys, os
sys.path.append(os.path.abspath(os.getcwd()))
from Resources import Constants
block_cipher = None
a = Analysis(['OCLP-CLI.command'],
pathex=['Resources'],
binaries=[],
datas=[('payloads', 'payloads')],
hiddenimports=[],
hookspath=[],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
[('u', None, 'OPTION')],
name='OCLP-CLI',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=True )

View File

@@ -3,383 +3,40 @@
from __future__ import print_function from __future__ import print_function
import platform
import subprocess import subprocess
import sys import sys
from pathlib import Path
from Resources import Build, CliMenu, Constants, ModelArray, SysPatch, Utilities, device_probe from resources import build, cli_menu, constants, utilities, device_probe, os_probe, defaults, arguments, install
from data import model_array
class OpenCoreLegacyPatcher: class OpenCoreLegacyPatcher:
def __init__(self): def __init__(self):
print("Loading...") print("- Loading...")
self.constants = Constants.Constants() self.constants = constants.Constants()
self.generate_base_data()
if utilities.check_cli_args() is None:
self.main_menu()
def generate_base_data(self):
self.constants.detected_os = os_probe.detect_kernel_major()
self.constants.detected_os_minor = os_probe.detect_kernel_minor()
self.constants.detected_os_build = os_probe.detect_kernel_build()
self.constants.computer = device_probe.Computer.probe() self.constants.computer = device_probe.Computer.probe()
self.constants.recovery_status = utilities.check_recovery()
self.computer = self.constants.computer self.computer = self.constants.computer
self.constants.detected_os = int(platform.uname().release.partition(".")[0]) defaults.generate_defaults.probe(self.computer.real_model, True, self.constants)
self.constants.detected_os_minor = int(platform.uname().release.partition(".")[2].partition(".")[0]) if utilities.check_cli_args() is not None:
detected_os_build: str = subprocess.run("sw_vers -buildVersion".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.decode() print("- Detected arguments, switching to CLI mode")
self.constants.detected_os_build = detected_os_build self.constants.gui_mode = True # Assumes no user interaction is required
self.set_defaults(self.computer.real_model, True) self.constants.current_path = Path.cwd()
if getattr(sys, "frozen", False) and hasattr(sys, "_MEIPASS"):
def set_defaults(self, model, host_is_target): print("- Rerouting payloads location")
# Defaults self.constants.payload_path = sys._MEIPASS / Path("payloads")
self.constants.sip_status = True arguments.arguments().parse_arguments(self.constants)
self.constants.secure_status = False # Default false for Monterey
self.constants.amfi_status = True
if host_is_target:
if Utilities.check_metal_support(device_probe, self.computer) is False:
self.constants.disable_cs_lv = True
if self.computer.dgpu and self.computer.dgpu.arch == device_probe.NVIDIA.Archs.Kepler:
self.constants.sip_status = False
self.constants.amfi_status = True
self.constants.allow_fv_root = True # Allow FileVault on broken seal
if (
isinstance(self.computer.wifi, device_probe.Broadcom)
and self.computer.wifi.chipset in [device_probe.Broadcom.Chipsets.AirPortBrcm4331, device_probe.Broadcom.Chipsets.AirPortBrcm43224]
) or (isinstance(self.computer.wifi, device_probe.Atheros) and self.computer.wifi.chipset == device_probe.Atheros.Chipsets.AirPortAtheros40):
self.constants.sip_status = False
self.constants.allow_fv_root = True # Allow FileVault on broken seal
elif model in ModelArray.LegacyGPU:
self.constants.disable_cs_lv = True
if model in ModelArray.LegacyGPU:
if host_is_target and Utilities.check_metal_support(device_probe, self.computer) is True:
# Building on device and we have a native, supported GPU
if self.computer.dgpu and self.computer.dgpu.arch == device_probe.NVIDIA.Archs.Kepler:
self.constants.sip_status = False
# self.constants.secure_status = True # Monterey
self.constants.allow_fv_root = True # Allow FileVault on broken seal
else: else:
self.constants.sip_status = True print("- No arguments present, loading TUI")
# self.constants.secure_status = True # Monterey
self.constants.amfi_status = True
else:
self.constants.sip_status = False # Unsigned kexts
self.constants.secure_status = False # Root volume modified
self.constants.amfi_status = False # Unsigned binaries
self.constants.allow_fv_root = True # Allow FileVault on broken seal
if model in ModelArray.ModernGPU:
self.constants.sip_status = False # Unsigned kexts
self.constants.secure_status = False # Modified root volume
self.constants.allow_fv_root = True # Allow FileVault on broken seal
# self.constants.amfi_status = True # Signed bundles, Don't need to explicitly set currently
if model == "MacBook8,1":
# MacBook8,1 has an odd bug where it cannot install Monterey with Minimal spoofing
self.constants.serial_settings = "Moderate"
custom_cpu_model_value = Utilities.get_nvram("revcpuname", "4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102", decode=True)
if custom_cpu_model_value is not None:
# TODO: Fix to not use two separate variables
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") or ""):
self.constants.verbose_debug = True
if Utilities.amfi_status() is False:
self.constants.amfi_status = False
if Utilities.get_nvram("gpu-power-prefs", "FA4CE28D-B62F-4C99-9CC3-6815686E30F9", decode=True):
self.constants.allow_ts2_accel = False
if self.constants.latebloom_delay == 0:
self.constants.latebloom_delay, self.constants.latebloom_range, self.constants.latebloom_debug = Utilities.latebloom_detection(model)
if Utilities.get_nvram("gpu-power-prefs", "FA4CE28D-B62F-4C99-9CC3-6815686E30F9", decode=True):
self.constants.allow_ts2_accel = False
# Check if running in RecoveryOS
self.constants.recovery_status = Utilities.check_recovery()
def build_opencore(self):
Build.BuildOpenCore(self.constants.custom_model or self.constants.computer.real_model, self.constants).build_opencore()
def install_opencore(self):
Build.BuildOpenCore(self.constants.custom_model or self.constants.computer.real_model, self.constants).copy_efi()
def change_model(self):
Utilities.cls()
Utilities.header(["Select Different Model"])
print(
"""
Tip: Run the following command on the target machine to find the model identifier:
system_profiler SPHardwareDataType | grep 'Model Identifier'
"""
)
self.constants.custom_model = input("Please enter the model identifier of the target machine: ").strip()
if self.constants.custom_model not in ModelArray.SupportedSMBIOS:
print(
f"""
{self.constants.custom_model} is not a valid SMBIOS Identifier for macOS {self.constants.os_support}!
"""
)
print_models = input(f"Print list of valid options for macOS {self.constants.os_support}? (y/n)")
if print_models.lower() in {"y", "yes"}:
print("\n".join(ModelArray.SupportedSMBIOS))
input("\nPress [ENTER] to continue")
else:
self.set_defaults(self.constants.custom_model, False)
def patcher_settings(self):
response = None
while not (response and response == -1):
title = ["Adjust Patcher Settings"]
menu = Utilities.TUIMenu(title, "Please select an option: ", auto_number=True, top_level=True)
options = [
["Debug Settings", self.patcher_setting_debug],
["Security Settings", self.patcher_settings_security],
["SMBIOS Settings", self.patcher_settings_smbios],
["Boot Volume Settings", self.patcher_settings_boot],
["Miscellaneous Settings", self.patcher_settings_misc],
["Dump detected hardware", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).dump_hardware],
[
f"Allow Accel on Mojave/Catalina:\tCurrently {self.constants.moj_cat_accel}",
CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).allow_moj_cat_patch,
],
[
f"Allow OpenCore on native Models:\tCurrently {self.constants.allow_oc_everywhere}",
CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).allow_native_models,
],
["Advanced Settings, for developers only", self.advanced_patcher_settings],
]
for option in options:
menu.add_menu_option(option[0], function=option[1])
response = menu.start()
def patcher_setting_debug(self):
response = None
while not (response and response == -1):
title = ["Adjust Debug Settings"]
menu = Utilities.TUIMenu(title, "Please select an option: ", auto_number=True, top_level=True)
options = [
[f"Enable Verbose Mode:\tCurrently {self.constants.verbose_debug}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).change_verbose],
[f"Enable OpenCore DEBUG:\tCurrently {self.constants.opencore_debug}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).change_oc],
[f"Enable Kext DEBUG:\t\tCurrently {self.constants.kext_debug}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).change_kext],
] + (
[
[
f"Set Latebloom args:\t\tDelay {self.constants.latebloom_delay}, Range {self.constants.latebloom_range}, Debug {self.constants.latebloom_debug}",
CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).latebloom_settings,
]
]
if ((self.constants.custom_model or self.computer.real_model) in ModelArray.PCIRaceCondition)
else []
)
for option in options:
menu.add_menu_option(option[0], function=option[1])
response = menu.start()
def patcher_settings_security(self):
response = None
while not (response and response == -1):
title = ["Adjust Security Settings"]
menu = Utilities.TUIMenu(title, "Please select an option: ", auto_number=True, top_level=True)
options = [
# [
# f"Set Apple Mobile File Integrity (AMFI):\tCurrently {self.constants.amfi_status}",
# CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).set_amfi,
# ],
[
f"Set System Intrgity Protection (SIP):\tCurrently {self.constants.sip_status}",
CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).change_sip,
],
[
f"Set Secure Boot Model (SBM):\t\tCurrently {self.constants.secure_status}",
CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).change_sbm,
],
[f"Set Vault Mode:\t\t\t\tCurrently {self.constants.vault}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).change_vault],
]
for option in options:
menu.add_menu_option(option[0], function=option[1])
response = menu.start()
def patcher_settings_smbios(self):
response = None
while not (response and response == -1):
title = ["Adjust SMBIOS Settings"]
menu = Utilities.TUIMenu(title, "Please select an option: ", auto_number=True, top_level=True)
options = [
[f"Set SMBIOS Spoof Level:\tCurrently {self.constants.serial_settings}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).change_serial],
[f"Set SMBIOS Spoof Model:\tCurrently {self.constants.override_smbios}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).set_smbios],
[f"Set Custom name {self.constants.custom_cpu_model_value}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).custom_cpu],
]
for option in options:
menu.add_menu_option(option[0], function=option[1])
response = menu.start()
def patcher_settings_boot(self):
response = None
while not (response and response == -1):
title = ["Adjust Bootable Volume Settings"]
menu = Utilities.TUIMenu(title, "Please select an option: ", auto_number=True, top_level=True)
options = [
[f"Set FireWire Boot:\tCurrently {self.constants.firewire_boot}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).allow_firewire],
[f"Set NVMe Boot:\tCurrently {self.constants.nvme_boot}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).allow_nvme],
]
for option in options:
menu.add_menu_option(option[0], function=option[1])
response = menu.start()
def patcher_settings_misc(self):
response = None
while not (response and response == -1):
title = ["Adjust Miscellaneous Settings"]
menu = Utilities.TUIMenu(title, "Please select an option: ", auto_number=True, top_level=True)
options = [
[f"Set ShowPicker Mode:\tCurrently {self.constants.showpicker}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).change_showpicker],
[f"Set Wake on WLAN:\t\tCurrently {self.constants.enable_wake_on_wlan}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).allow_wowl],
[f"Set Ivy iMac iGPU:\t\tCurrently {self.constants.allow_ivy_igpu}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).allow_ivy],
[f"Set TeraScale 2 Accel:\tCurrently {self.constants.allow_ts2_accel}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).terascale_2_accel],
[
f"Disable Thunderbolt:\tCurrently {self.constants.disable_thunderbolt}",
CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).disable_thunderbolt,
],
]
for option in options:
menu.add_menu_option(option[0], function=option[1])
response = menu.start()
def advanced_patcher_settings(self):
response = None
while not (response and response == -1):
title = ["Adjust Advanced Patcher Settings, for developers ONLY"]
menu = Utilities.TUIMenu(title, "Please select an option: ", auto_number=True, top_level=True)
options = [
[f"Set Metal GPU Status:\t\tCurrently {self.constants.imac_vendor}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).change_metal],
[f"Set DRM Preferences:\t\tCurrently {self.constants.drm_support}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).drm_setting],
[f"Set Generic Bootstrap:\t\tCurrently {self.constants.boot_efi}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).bootstrap_setting],
[
f"Disable CPU Friend:\t\t\tCurrently {self.constants.disallow_cpufriend}",
CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).disable_cpufriend,
],
]
for option in options:
menu.add_menu_option(option[0], function=option[1])
response = menu.start()
def credits(self):
Utilities.TUIOnlyPrint(
["Credits"],
"Press [Enter] to go back.\n",
[
"""Many thanks to the following:
- Acidanthera:\tOpenCore, kexts and other tools
- Khronokernel:\tWriting and maintaining this patcher
- DhinakG:\t\tWriting and maintaining this patcher
- ASentientBot:\tLegacy Acceleration Patches
- Ausdauersportler:\tLinking fixes for SNBGraphicsFB and AMDX3000
- Syncretic:\t\tAAAMouSSE and telemetrap
- cdf:\t\tNightShiftEnabler and Innie"""
],
).start()
def PatchVolume(self):
Utilities.cls()
Utilities.header(["Patching System Volume"])
big_sur = """Patches Root volume to fix misc issues such as:
- Non-Metal Graphics Acceleration
- Intel: Ironlake - Sandy Bridge
- Nvidia: Tesla - Fermi (8000-500 series)
- AMD: TeraScale 1 and 2 (2000-6000 series)
- Audio support for iMac7,1 and iMac8,1
WARNING: Root Volume Patching is still in active development, please
have all important user data backed up. Note when the system volume
is patched, you can no longer have Delta updates.
Supported Options:
1. Patch System Volume
2. Unpatch System Volume (Experimental)
B. Exit
"""
monterey = """Patches Root volume to fix misc issues such as:
- Metal Graphics Acceleration
- Intel: Ivy Bridge (4000 series iGPUs)
- Nvidia: Kepler (600-700)
- Non-Metal Graphics Accelertation
- Intel: Ironlake - Sandy Bridge
- Nvidia: Tesla - Fermi (8000-500 series)
- AMD: TeraScale 1 and 2 (2000-6000 series)
- Audio support for iMac7,1 and iMac8,1
- Wifi support for BCM94328, BCM94322 and Atheros cards
WARNING: Root Volume Patching is still in active development, please
have all important user data backed up. Note when the system volume
is patched, you can no longer have Delta updates.
Supported Options:
1. Patch System Volume
2. Unpatch System Volume (Experimental)
B. Exit
"""
mojave_catalina = """Patches Root volume to fix misc issues such as:
- Non-Metal Graphics Acceleration
- Intel: Ironlake - Sandy Bridge
- Nvidia: Tesla - Fermi (8000-500 series)
- AMD: TeraScale 1 and 2 (2000-6000 series)
- Audio support for iMac7,1 and iMac8,1
WARNING: Root Volume Patching is still in active development, please
have all important user data backed up. Note when the system volume
is patched, you can no longer have Delta updates.
Supported Options:
1. Patch System Volume
2. Unpatch System Volume (Experimental)
B. Exit
"""
default = """
This OS has no root patches available to apply, please ensure you're patching a booted
install that requires root patches such as macOS Big Sur or Monterey
Supported Options:
B. Exit
"""
no_patch = False
if self.constants.detected_os == self.constants.monterey:
print(monterey)
elif self.constants.detected_os == self.constants.big_sur:
print(big_sur)
elif self.constants.detected_os in [self.constants.mojave, self.constants.catalina] and self.constants.moj_cat_accel == True:
print(mojave_catalina)
else:
print(default)
no_patch = True
change_menu = input("Patch System Volume?: ")
if no_patch is not True and change_menu == "1":
SysPatch.PatchSysVolume(self.constants.custom_model or self.computer.real_model, self.constants).start_patch()
elif no_patch is not True and change_menu == "2":
SysPatch.PatchSysVolume(self.constants.custom_model or self.computer.real_model, self.constants).start_unpatch()
else:
print("Returning to main menu")
def main_menu(self): def main_menu(self):
response = None response = None
@@ -389,7 +46,7 @@ B. Exit
f"Selected Model: {self.constants.custom_model or self.computer.real_model}", f"Selected Model: {self.constants.custom_model or self.computer.real_model}",
] ]
if (self.constants.custom_model or self.computer.real_model) not in ModelArray.SupportedSMBIOS and self.constants.allow_oc_everywhere is False: if (self.constants.custom_model or self.computer.real_model) not in model_array.SupportedSMBIOS and self.constants.allow_oc_everywhere is False:
in_between = [ in_between = [
"Your model is not supported by this patcher for running unsupported OSes!", "Your model is not supported by this patcher for running unsupported OSes!",
"", "",
@@ -408,18 +65,19 @@ B. Exit
else: else:
in_between = ["This model is supported"] in_between = ["This model is supported"]
menu = Utilities.TUIMenu(title, "Please select an option: ", in_between=in_between, auto_number=True, top_level=True) menu = utilities.TUIMenu(title, "Please select an option: ", in_between=in_between, auto_number=True, top_level=True)
options = ( options = (
[["Build OpenCore", self.build_opencore]] [["Build OpenCore", build.BuildOpenCore(self.constants.custom_model or self.constants.computer.real_model, self.constants).build_opencore]]
if ((self.constants.custom_model or self.computer.real_model) in ModelArray.SupportedSMBIOS) or self.constants.allow_oc_everywhere is True if ((self.constants.custom_model or self.computer.real_model) in model_array.SupportedSMBIOS) or self.constants.allow_oc_everywhere is True
else [] else []
) + [ ) + [
["Install OpenCore to USB/internal drive", self.install_opencore], ["Install OpenCore to USB/internal drive", install.tui_disk_installation(self.constants).copy_efi],
["Post-Install Volume Patch", self.PatchVolume], ["Post-Install Volume Patch", cli_menu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).PatchVolume],
["Change Model", self.change_model], ["Change Model", cli_menu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).change_model],
["Patcher Settings", self.patcher_settings], ["Patcher Settings", cli_menu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).patcher_settings],
["Credits", self.credits], ["Installer Creation", cli_menu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).download_macOS],
["Credits", cli_menu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).credits],
] ]
for option in options: for option in options:
@@ -430,5 +88,5 @@ B. Exit
if getattr(sys, "frozen", False) and self.constants.recovery_status is False: if getattr(sys, "frozen", False) and self.constants.recovery_status is False:
subprocess.run("""osascript -e 'tell application "Terminal" to close first window' & exit""", shell=True) subprocess.run("""osascript -e 'tell application "Terminal" to close first window' & exit""", shell=True)
if __name__ == '__main__':
OpenCoreLegacyPatcher().main_menu() OpenCoreLegacyPatcher()

View File

@@ -1,12 +1,12 @@
# -*- mode: python ; coding: utf-8 -*- # -*- mode: python ; coding: utf-8 -*-
import sys, os import sys, os
sys.path.append(os.path.abspath(os.getcwd())) sys.path.append(os.path.abspath(os.getcwd()))
from Resources import Constants from resources import constants
block_cipher = None block_cipher = None
a = Analysis(['OpenCore-Patcher.command'], a = Analysis(['OpenCore-Patcher.command'],
pathex=['Resources'], pathex=['resources', 'data'],
binaries=[], binaries=[],
datas=[('payloads', 'payloads')], datas=[('payloads', 'payloads')],
hiddenimports=[], hiddenimports=[],
@@ -35,10 +35,10 @@ exe = EXE(pyz,
console=True ) console=True )
app = BUNDLE(exe, app = BUNDLE(exe,
name='OpenCore-Patcher.app', name='OpenCore-Patcher.app',
icon="OC-Patcher.icns", icon="payloads/OC-Patcher.icns",
bundle_identifier=None, bundle_identifier=None,
info_plist={ info_plist={
"CFBundleShortVersionString": Constants.Constants().patcher_version, "CFBundleShortVersionString": constants.Constants().patcher_version,
"CFBundleExecutable": "MacOS/Launcher", "CFBundleExecutable": "MacOS/Launcher",
"NSHumanReadableCopyright": "Copyright 2020-2021 Dortania" "NSHumanReadableCopyright": "Copyright 2020-2021 Dortania"
}) })

View File

@@ -18,23 +18,19 @@ Note: Only clean-installs and upgrades are supported, macOS Big Sur installs alr
* You can however reinstall macOS with this patcher and retain your original data * You can however reinstall macOS with this patcher and retain your original data
Note 2: Currently OpenCore Legacy Patcher officially supports patching to run macOS 11, Big Sur installs. For older OSes, OpenCore may function however support is currently not provided from Dortania. Note 2: Currently OpenCore Legacy Patcher officially supports patching to run macOS Big Sur and Monterey installs. For older OSes, OpenCore may function however support is currently not provided from Dortania.
* For macOS Mojave and Catalina support, we recommend the use of [dosdude1's patchers](http://dosdude1.com) * For macOS Mojave and Catalina support, we recommend the use of [dosdude1's patchers](http://dosdude1.com)
* macOS Monterey usage is provided however support is limited, currently recommended for users to run Big Sur for best compatibility
## Running from source
To run the project from source, see here: [Build and run from source](./SOURCE.md)
## Support ## Support
To get aid with the patcher, we recommend joining the [OpenCore Patcher Paradise Discord Server](https://discord.gg/rqdPgH8xSN). We're actively there and is the quickest way to receive help. For bigger issues such as patcher crashing on build and such, we recommend opening an issue right here on GitHub(Please review [How to debug with OpenCore](https://dortania.github.io/OpenCore-Legacy-Patcher/DEBUG.html) before opening issues): To get aid with the patcher, we recommend joining the [OpenCore Patcher Paradise Discord Server](https://discord.gg/rqdPgH8xSN). We're actively there and is the quickest way to receive help. For bigger issues such as patcher crashing on build and such, we recommend opening an issue right here on GitHub
* [OpenCore Legacy Patcher's Issue's tab](https://github.com/dortania/OpenCore-Legacy-Patcher/issues) * Please review [How to debug with OpenCore](https://dortania.github.io/OpenCore-Legacy-Patcher/DEBUG.html) before opening issues
Nightly builds can be found here courteous of nightly.link:
* [Nightly OpenCore Patcher (GUI)](https://nightly.link/dortania/OpenCore-Legacy-Patcher/workflows/build-gui/main/OpenCore-Patcher-GUI.app.zip)
* [Nightly OpenCore Patcher (TUI)](https://nightly.link/dortania/OpenCore-Legacy-Patcher/workflows/build-app/main/OpenCore-Patcher-TUI.app.zip)
* [Offline Variant](https://nightly.link/dortania/OpenCore-Legacy-Patcher/workflows/build-app-offline/main/OpenCore-Patcher-TUI-Offline.app.zip) (No network connection needed on target Mac for Root Patching)
* [Nightly OpenCore Patcher (CLI)](https://nightly.link/dortania/OpenCore-Legacy-Patcher/workflows/build-gui/main/OCLP-CLI.zip)
## Credits ## Credits
@@ -55,14 +51,18 @@ Nightly builds can be found here courteous of nightly.link:
* Mac Pro on OpenCore Patch set and documentation * Mac Pro on OpenCore Patch set and documentation
* [Innie](https://github.com/cdf/Innie) and [NightShiftEnabler](https://github.com/cdf/NightShiftEnabler) * [Innie](https://github.com/cdf/Innie) and [NightShiftEnabler](https://github.com/cdf/NightShiftEnabler)
* [Syncretic](https://forums.macrumors.com/members/syncretic.1173816/) * [Syncretic](https://forums.macrumors.com/members/syncretic.1173816/)
* [AAAMouSSE](https://forums.macrumors.com/threads/mp3-1-others-sse-4-2-emulation-to-enable-amd-metal-driver.2206682/) and [telemetrap](https://forums.macrumors.com/threads/mp3-1-others-sse-4-2-emulation-to-enable-amd-metal-driver.2206682/post-28447707) * [AAAMouSSE](https://forums.macrumors.com/threads/mp3-1-others-sse-4-2-emulation-to-enable-amd-metal-driver.2206682/), [telemetrap](https://forums.macrumors.com/threads/mp3-1-others-sse-4-2-emulation-to-enable-amd-metal-driver.2206682/post-28447707) and [SurPlus](https://github.com/reenigneorcim/SurPlus)
* [dosdude1](https://github.com/dosdude1) * [dosdude1](https://github.com/dosdude1)
* Main author of GUI * Main author of GUI
* Development of previous patchers, laying out much of what needs to be patched * Development of previous patchers, laying out much of what needs to be patched
* [parrotgeek1](https://github.com/parrotgeek1)
* [VMM Patch Set](https://github.com/dortania/OpenCore-Legacy-Patcher/blob/4a8f61a01da72b38a4b2250386cc4b497a31a839/payloads/Config/config.plist#L1222-L1281)
* [BarryKN](https://github.com/BarryKN) * [BarryKN](https://github.com/BarryKN)
* Development of previous patchers, laying out much of what needs to be patched * Development of previous patchers, laying out much of what needs to be patched
* [mario_bros_tech](https://github.com/mariobrostech) and the rest of the Unsupported Mac Discord * [mario_bros_tech](https://github.com/mariobrostech) and the rest of the Unsupported Mac Discord
* Catalyst that started OpenCore Legacy Patcher * Catalyst that started OpenCore Legacy Patcher
* [arter97](https://github.com/arter97/)
* [SimpleMSR](https://github.com/arter97/SimpleMSR/) to disable firmware throttling in Nehalem+ MacBooks without batteries
* MacRumors and Unsupported Mac Communities * MacRumors and Unsupported Mac Communities
* Endless testing, reporting issues * Endless testing, reporting issues
* Apple * Apple

View File

@@ -1,633 +0,0 @@
# Handle misc CLI menu options
# Copyright (C) 2020-2021, Dhinak G, Mykola Grymalyuk
from __future__ import print_function
import subprocess
from Resources import Constants, Utilities
class MenuOptions:
def __init__(self, model, versions):
self.model = model
self.constants: Constants.Constants = versions
def change_verbose(self):
Utilities.cls()
Utilities.header(["Set Verbose mode"])
change_menu = input("Enable Verbose mode(y/n/q): ")
if change_menu in {"y", "Y", "yes", "Yes"}:
self.constants.verbose_debug = True
elif change_menu in {"n", "N", "no", "No"}:
self.constants.verbose_debug = False
elif change_menu in {"q", "Q", "Quit", "quit"}:
print("Returning to previous menu")
else:
self.change_verbose()
def change_oc(self):
Utilities.cls()
Utilities.header(["Set OpenCore DEBUG mode"])
change_menu = input("Enable OpenCore DEBUG mode(y/n/q): ")
if change_menu in {"y", "Y", "yes", "Yes"}:
self.constants.opencore_debug = True
self.constants.opencore_build = "DEBUG"
elif change_menu in {"n", "N", "no", "No"}:
self.constants.opencore_debug = False
self.constants.opencore_build = "RELEASE"
elif change_menu in {"q", "Q", "Quit", "quit"}:
print("Returning to previous menu")
else:
self.change_oc()
def change_kext(self):
Utilities.cls()
Utilities.header(["Set Kext DEBUG mode"])
change_menu = input("Enable Kext DEBUG mode(y/n/q): ")
if change_menu in {"y", "Y", "yes", "Yes"}:
self.constants.kext_debug = True
elif change_menu in {"n", "N", "no", "No"}:
self.constants.kext_debug = False
elif change_menu in {"q", "Q", "Quit", "quit"}:
print("Returning to previous menu")
else:
self.change_kext()
def change_metal(self):
Utilities.cls()
Utilities.header(["Assume Metal GPU Always in iMac"])
print(
"""This is for iMacs that have upgraded Metal GPUs, otherwise
Patcher assumes based on stock configuration (ie. iMac10,x-12,x)
Valid Options:
1. None(stock GPU)
2. Nvidia GPU
3. AMD GPU
Q. Return to previous menu
Note: Patcher will detect whether hardware has been upgraded regardless, this
option is for those patching on a different machine or OCLP cannot detect.
"""
)
change_menu = input("Set GPU Patch type(ie. 1): ")
if change_menu == "1":
self.constants.metal_build = False
self.constants.imac_vendor = "None"
elif change_menu == "2":
self.constants.metal_build = True
self.constants.imac_vendor = "Nvidia"
elif change_menu == "3":
self.constants.metal_build = True
self.constants.imac_vendor = "AMD"
elif change_menu in {"q", "Q", "Quit", "quit"}:
print("Returning to previous menu")
else:
self.change_metal()
def change_serial(self):
Utilities.cls()
Utilities.header(["Set SMBIOS Spoof Level"])
print(
"""This section is for setting how OpenCore generates the SMBIOS
Recommended for adanced users who want control how serials are handled
Valid options:
1. Minimal:\tUse original serials and minimally update SMBIOS
2. Moderate:\tReplace entire SMBIOS but keep original serials
3. Advanced:\tReplace entire SMBIOS and generate new serials
Q. Return to previous menu
Note: For new users we recommend leaving as default(1. Minimal)
"""
)
change_menu = input("Set SMBIOS Spoof Level(ie. 1): ")
if change_menu == "1":
self.constants.serial_settings = "Minimal"
elif change_menu == "2":
self.constants.serial_settings = "Moderate"
elif change_menu == "3":
self.constants.serial_settings = "Advanced"
elif change_menu in {"q", "Q", "Quit", "quit"}:
print("Returning to previous menu")
else:
self.change_serial()
def change_showpicker(self):
Utilities.cls()
Utilities.header(["Set OpenCore Picker mode"])
print(
"""By default, OpenCore will show its boot picker each time on boot up,
however this can be disabled by default and be shown on command by repeatedly
pressing the "Esc" key
"""
)
change_menu = input("Show OpenCore Picker by default(y/n/q): ")
if change_menu in {"y", "Y", "yes", "Yes"}:
self.constants.showpicker = True
elif change_menu in {"n", "N", "no", "No"}:
self.constants.showpicker = False
elif change_menu in {"q", "Q", "Quit", "quit"}:
print("Returning to previous menu")
else:
self.change_showpicker()
def change_vault(self):
Utilities.cls()
Utilities.header(["Set OpenCore Vaulting"])
print(
"""By default, this patcher will sign all your files and ensure none of the
contents can be tampered with. However for more advanced users, you may
want to be able to freely edit the config.plist and files.
Note: For security reasons, OpenShell will be disabled when Vault is set.
"""
)
change_menu = input("Enable Vault(y/n/q): ")
if change_menu in {"y", "Y", "yes", "Yes"}:
self.constants.vault = True
elif change_menu in {"n", "N", "no", "No"}:
self.constants.vault = False
elif change_menu in {"q", "Q", "Quit", "quit"}:
print("Returning to previous menu")
else:
self.change_vault()
def change_sip(self):
Utilities.cls()
Utilities.header(["Set System Integrity protection"])
print(
"""SIP is used to ensure proper secuirty measures are set,
however to patch the root volume this must be disabled.
Only disable is absolutely necessary. SIP value = 0xFEF
Valid options:
1. Enable SIP
2. Disable SIP
Q. Return to previous menu
"""
)
change_menu = input("Set SIP: ")
if change_menu == "1":
self.constants.sip_status = True
elif change_menu == "2":
self.constants.sip_status = False
elif change_menu in {"q", "Q", "Quit", "quit"}:
print("Returning to previous menu")
else:
self.change_sip()
def change_sbm(self):
Utilities.cls()
Utilities.header(["Set SecureBootModel"])
print(
"""SecureBootModel is used to ensure best firmware security,
however to patch the root volume this must be disabled.
Only disable is absolutely necessary. SIP value = 0xFEF
Valid options:
1. Enable SecureBootModel
2. Disable SecureBootModel
Q. Return to previous menu
"""
)
change_menu = input("Set SecureBootModel: ")
if change_menu == "1":
self.constants.secure_status = True
elif change_menu == "2":
self.constants.secure_status = False
elif change_menu in {"q", "Q", "Quit", "quit"}:
print("Returning to previous menu")
else:
self.change_sbm()
def set_amfi(self):
Utilities.cls()
Utilities.header(["Set AMFI"])
print(
"""Required for Root Patching non-Metal GPUs
in macOS Big Sur. Without this, will receive kernel panic once
Patcher finishes installing legacy acceleration patches.
"""
)
change_menu = input("Disable AMFI(y/n/q): ")
if change_menu in {"y", "Y", "yes", "Yes"}:
self.constants.amfi_status = False
elif change_menu in {"n", "N", "no", "No"}:
self.constants.amfi_status = True
elif change_menu in {"q", "Q", "Quit", "quit"}:
print("Returning to previous menu")
else:
self.set_amfi()
def bootstrap_setting(self):
Utilities.cls()
Utilities.header(["Set Bootstrap method"])
print(
"""Sets OpenCore's bootstrap method, currently the patcher supports the
following options.
Valid options:
1. System/Library/CoreServices/boot.efi (default)
2. EFI/BOOT/BOOTx64.efi
Q. Return to previous menu
Note: S*/L*/C*/boot.efi method is only installed to the EFI partition only
and not to macOS itself.
Recommended to set to BOOTx64.efi in situations where your Mac cannot
see the EFI Boot entry in the boot picker.
"""
)
change_menu = input("Set Bootstrap method: ")
if change_menu == "1":
self.constants.boot_efi = False
elif change_menu == "2":
self.constants.boot_efi = True
elif change_menu in {"q", "Q", "Quit", "quit"}:
print("Returning to previous menu")
else:
self.bootstrap_setting()
def drm_setting(self):
Utilities.cls()
Utilities.header(["Set DRM preferences"])
print(
"""Sets OpenCore's DRM preferences for iMac13,x and iMac14,x.
In Big Sur, some DRM based content may be broken by
default in AppleTV, Photobooth, etc.
To resolve, you can opt to disable Intel QuickSync support in
favor of Nvidia's Software rendering. This can aid in DRM however
greatly hampers Video rendering performance in Final Cut Pro and
other programs relying on such features.
Recommend only disabling if absolutely required.
"""
)
change_menu = input("Enable Nvidia's Software DRM rendering(y/n/q): ")
if change_menu in {"y", "Y", "yes", "Yes"}:
self.constants.drm_support = True
elif change_menu in {"n", "N", "no", "No"}:
self.constants.drm_support = False
elif change_menu in {"q", "Q", "Quit", "quit"}:
print("Returning to previous menu")
else:
self.drm_setting()
def allow_native_models(self):
Utilities.cls()
Utilities.header(["Allow OpenCore on native Models"])
print(
"""Allows natively supported Macs to use OpenCore. Recommended
for users with 3rd Party NVMe SSDs to achieve improved overall
power usage.
"""
)
change_menu = input("Allow OpenCore on all Models(y/n/q): ")
if change_menu in {"y", "Y", "yes", "Yes"}:
self.constants.allow_oc_everywhere = True
self.constants.serial_settings = "None"
elif change_menu in {"n", "N", "no", "No"}:
self.constants.allow_oc_everywhere = False
self.constants.serial_settings = "Minimal"
elif change_menu in {"q", "Q", "Quit", "quit"}:
print("Returning to previous menu")
else:
self.allow_native_models()
def custom_cpu(self):
Utilities.cls()
Utilities.header(["Set custom CPU Model Name"])
print(
"""Change reported CPU Model name in About This Mac
Custom names will report as follows:
1: Original Name: 2.5 Ghz Dual-Core Intel Core i5
2. CPU name: Intel(R) Core(TM) i5-3210M CPU @ 2.50Ghz
3. Custom Name: 2.5Ghz Cotton Candy (example)
Q. Return to previous menu
"""
)
if self.constants.custom_cpu_model_value == "":
if self.constants.custom_cpu_model == 0:
print("Currently using original name")
else:
print("Currently using CPU name")
else:
print(f"Custom CPU name currently: {self.constants.custom_cpu_model_value}")
change_menu = input("Set custom CPU Name(1,2,3): ")
if change_menu == "1":
self.constants.custom_cpu_model = 2
self.constants.custom_cpu_model_value = ""
elif change_menu == "2":
self.constants.custom_cpu_model = 0
self.constants.custom_cpu_model_value = ""
elif change_menu == "3":
self.constants.custom_cpu_model = 1
self.constants.custom_cpu_model_value = input("Enter new CPU Name: ")
elif change_menu in {"q", "Q", "Quit", "quit"}:
print("Returning to previous menu")
else:
self.custom_cpu()
def disable_cpufriend(self):
Utilities.cls()
Utilities.header(["Disable CPU Friend?"])
print(
"""Only recommended for advanced users
Disabling CPUFriend forces macOS into using a different
Mac's power profile for CPUs and GPUs, which can harm the
hardware
"""
)
change_menu = input("Disable CPU Friend?(y/n/q): ")
if change_menu in {"y", "Y", "yes", "Yes"}:
self.constants.disallow_cpufriend = True
elif change_menu in {"n", "N", "no", "No"}:
self.constants.disallow_cpufriend = False
elif change_menu in {"q", "Q", "Quit", "quit"}:
print("Returning to previous menu")
else:
self.disable_cpufriend()
def set_smbios(self):
Utilities.cls()
Utilities.header(["Set SMBIOS Spoof Model"])
print(
"""Change model OpenCore spoofs Mac too
Valid options:
1. Default set by OpenCore (Default)
2. User Override
3. Disable all spoofing (unsupported configuration)
Q. Return to previous menu
"""
)
change_menu = input("Set SMBIOS Spoof Model: ")
if change_menu == "1":
print("Setting SMBIOS spoof to default mode")
self.constants.override_smbios = "Default"
elif change_menu == "2":
custom_smbios = input("Set new SMBIOS mode: ")
try:
test = self.constants.board_id[custom_smbios]
self.constants.override_smbios = custom_smbios
except KeyError:
print("Unsupported SMBIOS, defaulting to Default setting")
self.constants.override_smbios = "Default"
elif change_menu == "3":
print("Disabling SMBIOS spoof")
self.constants.override_smbios = self.model
elif change_menu in {"q", "Q", "Quit", "quit"}:
print("Returning to previous menu")
else:
self.set_smbios()
def allow_firewire(self):
Utilities.cls()
Utilities.header(["Allow FireWire Boot Support"])
print(
"""
In macOS Catalina and newer, Apple restricted
usage of FireWire devices to boot macOS for
security concerns relating to DMA access.
If you are comfortable lowering the security,
you can re-enable FireWire support for Catalina
and newer.
Note: MacBook5,x-7,1 don't support FireWire boot
"""
)
change_menu = input("Enable FireWire Boot support?(y/n/q): ")
if change_menu in {"y", "Y", "yes", "Yes"}:
self.constants.firewire_boot = True
elif change_menu in {"n", "N", "no", "No"}:
self.constants.firewire_boot = False
elif change_menu in {"q", "Q", "Quit", "quit"}:
print("Returning to previous menu")
else:
self.allow_firewire()
def allow_nvme(self):
Utilities.cls()
Utilities.header(["Allow NVMe UEFI Support"])
print(
"""
For machines not natively supporting NVMe,
this option allows you to see and boot NVMe
drive in OpenCore's picker
Not required if your machine natively supports NVMe
Note: You must have OpenCore on a bootable volume
first, ie. USB or SATA drive. Once loaded,
OpenCore will enable NVMe support in it's picker
"""
)
change_menu = input("Enable NVMe Boot support?(y/n/q): ")
if change_menu in {"y", "Y", "yes", "Yes"}:
self.constants.nvme_boot = True
elif change_menu in {"n", "N", "no", "No"}:
self.constants.nvme_boot = False
elif change_menu in {"q", "Q", "Quit", "quit"}:
print("Returning to previous menu")
else:
self.allow_nvme()
def allow_wowl(self):
Utilities.cls()
Utilities.header(["Allow Wake on WLAN"])
print(
"""
Due to an unfortunate bug in macOS Big Sur+, Wake on WLAN is
disabled by default for BCM943224, BCM94331 and BCM94360/2 chipsets.
This is due to Wake on WLAN creating network instability and in other cases
halving network speeds. This issue is not replicable across machines however
be prepared if enabling.
"""
)
change_menu = input("Allow Wake on WLAN?(y/n/q): ")
if change_menu in {"y", "Y", "yes", "Yes"}:
self.constants.enable_wake_on_wlan = True
elif change_menu in {"n", "N", "no", "No"}:
self.constants.enable_wake_on_wlan = False
elif change_menu in {"q", "Q", "Quit", "quit"}:
print("Returning to previous menu")
else:
self.allow_wowl()
def allow_ivy(self):
Utilities.cls()
Utilities.header(["Allow Ivy iMac iGPU"])
print(
"""
For iMac13,x systems with a Nvidia dGPU, the iGPU is disabled by default to
allow Delta Updates, FileVault, SIP and such on macOS Monterey. However due to
this, DRM and QuickSync support may be broken.
Users can choose to override this option but be aware SIP must be
disabled to run root patches to fix DRM and QuickSync.
Note: This does not apply for Big Sur, the iGPU can be renabled without
consequence
Note 2: This setting only affects iMac13,x with dGPUs
"""
)
change_menu = input("Allow Ivy iMac iGPU?(y/n/q): ")
if change_menu in {"y", "Y", "yes", "Yes"}:
self.constants.allow_ivy_igpu = True
elif change_menu in {"n", "N", "no", "No"}:
self.constants.allow_ivy_igpu = False
elif change_menu in {"q", "Q", "Quit", "quit"}:
print("Returning to previous menu")
else:
self.allow_ivy()
def latebloom_settings(self):
Utilities.cls()
Utilities.header(["Set latebloom properties"])
print(
f"""
Set latebloom properties, useful for debugging boot stalls on
pre-Sandy Bridge Macs.
Valid options:
1. Set delay (currently: {self.constants.latebloom_delay}ms)
2. Set range (currently: {self.constants.latebloom_range}ms)
3. Set debug (currently: {bool(self.constants.latebloom_debug)})
Q. Return to previous menu
"""
)
change_menu = input("Select latebloom property(1/2/3): ")
if change_menu == "1":
try:
self.constants.latebloom_delay = int(input("Set delay: "))
except ValueError:
input("Invalid value, press [ENTER] to continue")
self.latebloom_settings()
elif change_menu == "2":
try:
self.constants.latebloom_range = int(input("Set range: "))
except ValueError:
input("Invalid value, press [ENTER] to continue")
self.latebloom_settings()
elif change_menu == "3":
try:
print("Currently supports either 0(False) or 1(True)")
latebloom_debug = int(input("Set debug(0/1): "))
if latebloom_debug not in [0, 1]:
input("Invalid value, press [ENTER] to continue")
else:
self.constants.latebloom_debug = latebloom_debug
except ValueError:
input("Invalid value, press [ENTER] to continue")
self.latebloom_settings()
elif change_menu in {"q", "Q", "Quit", "quit"}:
print("Returning to previous menu")
else:
self.latebloom_settings()
def allow_moj_cat_patch(self):
Utilities.cls()
Utilities.header(["Allow Root Patching on Mojave/Catalina"])
print(
"""
This is an experimental option that allows the usage of legacy acceleration
patches in Mojave and Catalina.
The main goal of this is to allow developers to better test patch sets as well
as allow acceleration on TeraScale 2 machines. Not all features may be available
(ie. GPU switching may not work, etc)
Note: for the average user, we recommend using dosdude1's legacy patcher:
- http://dosdude1.com/software.html
"""
)
change_menu = input("Allow Root Patching on Mojave/Catalina?(y/n/q): ")
if change_menu in {"y", "Y", "yes", "Yes"}:
self.constants.moj_cat_accel = True
elif change_menu in {"n", "N", "no", "No"}:
self.constants.moj_cat_accel = False
elif change_menu in {"q", "Q", "Quit", "quit"}:
print("Returning to previous menu")
else:
self.allow_moj_cat_patch()
def disable_thunderbolt(self):
Utilities.cls()
Utilities.header(["Disable Thunderbolt on 2013-14 MacBook Pros"])
print(
"""
Some 2013-14 MacBook Pro's have issues with the built-in thunderbolt,
resulting in kernel panics and random shutdowns.
To alliviate, you can disable the thunderbolt controller on MacBookPro11,x
machines with this option.
Note: This option only works on MacBookPro11,x, file an issue if you know of
other devices that benefit from this fix.
"""
)
change_menu = input("Disable Thunderbolt?(y/n/q): ")
if change_menu in {"y", "Y", "yes", "Yes"}:
self.constants.disable_thunderbolt = True
elif change_menu in {"n", "N", "no", "No"}:
self.constants.disable_thunderbolt = False
elif change_menu in {"q", "Q", "Quit", "quit"}:
print("Returning to previous menu")
else:
self.disable_thunderbolt()
def terascale_2_accel(self):
Utilities.cls()
Utilities.header(["Set TeraScale 2 Acceleration"])
print(
"""
By default this patcher will install TeraScale 2 acceleration, however
for some laptops this may be undesired due to how degraded their dGPU
is.
Disabling TeraScale 2 acceleration will instead install basic framebuffer
support allowing for basic brightness control and let the HD3000 iGPU
handle acceleration tasks.
"""
)
change_menu = input("Allow TeraScale 2 Acceleration?(y/n/q): ")
if change_menu in {"y", "Y", "yes", "Yes"}:
self.constants.allow_ts2_accel = True
elif change_menu in {"n", "N", "no", "No"}:
self.constants.allow_ts2_accel = False
elif change_menu in {"q", "Q", "Quit", "quit"}:
print("Returning to previous menu")
else:
self.terascale_2_accel()
def dump_hardware(self):
Utilities.cls()
Utilities.header(["Dumping detected hardware"])
print("")
print(self.constants.computer)
input("\nPress [ENTER] to exit: ")

File diff suppressed because it is too large Load Diff

View File

@@ -1,110 +0,0 @@
FirmwareFeatures = {
"iMac7,1": "0xC0001407",
"iMac8,1": "0xC0001403",
"iMac9,1": "0xC0001403",
"iMac10,1": "0xE00DE137",
"iMac11,1": "0xE00DE137",
"iMac11,2": "0xC00C9423",
"iMac11,3": "0xE00DE137",
"iMac12,1": "0xE00DE137",
"iMac12,2": "0xE00DE137",
"iMac13,1": "0xE00DE137",
"iMac13,2": "0xE00DE137",
"iMac13,3": "0xE00DE137",
"iMac14,1": "0xFB0FF577",
"iMac14,2": "0xE00FE137",
"iMac14,3": "0xE00FE137",
"iMac14,4": "0xF00FE137",
"iMac15,1": "0xF80FE137",
"iMac16,1": "0xFC0FE137",
"iMac16,2": "0xFC0FE137",
"iMac17,1": "0xFC0FE137",
"iMac18,1": "0xFD0FF576",
"iMac18,2": "0xFD0FF576",
"iMac18,3": "0xFD0FF576",
"iMac19,1": "0xFD8FF576",
"iMac19,2": "0xFD8FF576",
"iMac20,1": "0xFD8FF576",
"iMac20,2": "0xFD8FF576",
"iMacPro1,1": "0xFD8FF53E",
"MacBook3,1": "0xC0001407",
"MacBook4,1": "0xC0001403",
"MacBook5,1": "0xC0001403",
"MacBook5,2": "0xC0001403",
"MacBook6,1": "0xFC0FE13F",
"MacBook7,1": "0xFC0FE13F",
"MacBook8,1": "0xFC0FE13F",
"MacBook9,1": "0xFC0FE13F",
"MacBook10,1": "0xFC0FE13F",
"MacBookAir1,1": "0xC0001403",
"MacBookAir2,1": "0xC0001403",
"MacBookAir3,1": "0xD00DE137",
"MacBookAir3,2": "0xD00DE137",
"MacBookAir4,1": "0xD00DE137",
"MacBookAir4,2": "0xD00DE137",
"MacBookAir5,1": "0xE00DE137",
"MacBookAir5,2": "0xE00DE137",
"MacBookAir6,1": "0xE00FE137",
"MacBookAir6,2": "0xE00FE137",
"MacBookAir7,1": "0xFF0FF576",
"MacBookAir7,2": "0xFF0FF576",
"MacBookAir8,1": "0xFD8FF42E",
"MacBookAir8,2": "0xFD8FF42E",
"MacBookAir9,1": "0xFFAFF06E",
"MacBookPro3,1": "0xC0001407",
"MacBookPro4,1": "0xC0001403",
"MacBookPro5,1": "0xC0001403",
"MacBookPro5,2": "0xC0001403",
"MacBookPro5,3": "0xC0001403",
"MacBookPro5,4": "0xC0001403",
"MacBookPro5,5": "0xC0001403",
"MacBookPro6,1": "0xC00DE137",
"MacBookPro6,2": "0xC00DE137",
"MacBookPro7,1": "0xC00DE137",
"MacBookPro8,1": "0xC00DE137",
"MacBookPro8,2": "0xC00DE137",
"MacBookPro8,3": "0xC00DE137",
"MacBookPro9,1": "0xC00DE137",
"MacBookPro9,2": "0xC10DF577",
"MacBookPro10,1": "0xE00DE137",
"MacBookPro10,2": "0xE00DE137",
"MacBookPro11,1": "0xEB0FF577",
"MacBookPro11,2": "0xEB0FF577",
"MacBookPro11,3": "0xEB0FF577",
"MacBookPro11,4": "0xEB0FF577",
"MacBookPro11,5": "0xEB0FF577",
"MacBookPro12,1": "0xFD0FF576",
"MacBookPro13,1": "0xFC0FE137",
"MacBookPro13,2": "0xFC0FE137",
"MacBookPro13,3": "0xFC0FE137",
"MacBookPro14,1": "0xFF0FF57E",
"MacBookPro14,2": "0xFF0FF57E",
"MacBookPro14,3": "0xFF0FF57E",
"MacBookPro15,1": "0xFD8FF426",
"MacBookPro15,2": "0xFD8FF426",
"MacBookPro15,3": "0xFD8FF426",
"MacBookPro15,4": "0xFD8FF426",
"MacBookPro16,1": "0xFDAFF066",
"MacBookPro16,2": "0xFFAFF06E",
"MacBookPro16,3": "0xFDAFF066",
"MacBookPro16,4": "0xFDAFF066",
"Macmini3,1": "0xC0001403",
"Macmini4,1": "0xC00C9423",
"Macmini5,1": "0xD00DE137",
"Macmini5,2": "0xD00DE137",
"Macmini5,3": "0xD00DE137",
"Macmini6,1": "0xE00DE137",
"Macmini6,2": "0xE00DE137",
"Macmini7,1": "0xE00DE137",
"Macmini8,1": "0xFD8FF466",
"MacPro1,1": "0x80000015",
"MacPro2,1": "0xC0000015",
"MacPro3,1": "0xC0001403",
"MacPro4,1": "0xE001F537",
"MacPro5,1": "0xE80FE137",
"MacPro6,1": "0xE90FF576",
"MacPro7,1": "0xFDAFF066",
"Xserve2,1": "0xC0001403",
"Xserve3,1": "0xE001F537",
"Dortania1,1": "0xFDAFF066",
}

94
SOURCE.md Normal file
View File

@@ -0,0 +1,94 @@
# Build and run from source
OpenCore Legacy Patcher at its core is a python-based TUI/CLI based application. This means that to run the project from source, you simply need to invoke the OpenCore-Patcher.command file via Python.
For developers wishing to validate mainline changes, you may use these nightly links:
* [GUI (Graphical Based App)](https://nightly.link/dortania/OpenCore-Legacy-Patcher/workflows/build-gui/main/OpenCore-Patcher-GUI.app.zip)
* [TUI (Text Based App)](https://nightly.link/dortania/OpenCore-Legacy-Patcher/workflows/build-app/main/OpenCore-Patcher-TUI.app.zip)
* [TUI (Text Based App) - Offline Variant](https://nightly.link/dortania/OpenCore-Legacy-Patcher/workflows/build-app/main/OpenCore-Patcher-TUI-Offline.app.zip)
**Warning**: These binaries should not be used without first consulting the [CHANGELOG](./CHANGELOG.md). Do not distribute these links in forums, instead direct to this file.
* Users running new builds of the project without understanding what has changed are at higher of bricking their installation as they do not read any warnings provided in the CHANGELOG. We wish to minimize these situations as much as possible.
## Getting Started
To start, ensure you have python 3.6 or newer installed. Additionally ensure that they were downloaded from the offical source, [python.org](https://www.python.org/downloads/macos/).
* Python installations either preinstalled or provided with Xcode/Xcode Tools are unsupported due to reliablility issues
Once Python is installed, open Terminal and run the following:
```sh
# Move into a directory to store the project
cd ~/Developer
# Clone project
git clone https://github.com/dortania/OpenCore-Legacy-Patcher
# Move into Project directory
cd ./OpenCore-Legacy-Patcher
# Install Python dependacies used by the project
pip3 install -r requirements.txt
```
## Running OpenCore Legacy Patcher
To run the project from source, simply invoke via python3:
```sh
python3 OpenCore-Patcher.command
```
Note that the OpenCore-Patcher.command file can be run as both a TUI and a CLI utility for other programs to call. If no core arguments are passed, the TUI is initialized. Otherwise the CLI will start:
```sh
python3 OpenCore-Patcher.command --build --model iMac12,2 --verbose
```
See `-h`/`--help` for more information on supported CLI arguments.
## Generating prebuilt binaries
The main goal of generating prebuilt binaries is to strip the requirement of a local python installation for users. For developers, there's very little benefit besides for usage with the project's GUI ([Generating the GUI](#generating-the-gui)). For development, simply use the OpenCore-Patcher.command file with a python3 installation.
* Note that due to PyInstaller's linking mechanism, binaries generated on Catalina and newer are not compatible with High Sierra and older
* To ensure the largest compatibility, generate binaries on macOS Mojave. These binaries will be compatible with macOS 10.9 to macOS 12.
* Currently our build system is a [Macmini8,1 provided by MacStadium](https://www.macstadium.com/opensource) running macOS Mojave (10.14.6).
```sh
# Install PyInstaller
pip3 install pyinstaller
# Move into project directory
cd ~/Developer/OpenCore-Legacy-Patcher/
# Create the pyinstaller based Application
pyinstaller OpenCore-Patcher.spec
# Post PyInstaller clean up
./after_pyinstaller.sh
# Open build folder
open ./dist/
```
Once done, you'll find the application generated at `./dist/OpenCore-Patcher.app`:
![](./images/build-dist.png)
## Generating the GUI
To generate a GUI, you will have need a core `OpenCore-Patcher` binary generated during the above stage([Generating prebuilt binaries](#generating-prebuilt-binaries)).
Once conditions are met, you'll be able to work with the GUI portion. The source of which is found at [dortania/OCLP-GUI](https://github.com/dortania/OCLP-GUI).
```sh
# Move into a directory to store the project
cd ~/Developer
# Clone project
git clone https://github.com/dortania/OCLP-GUI
# Update the OpenCore-Patcher binary from the core project
cp ./OpenCore-Legacy-Patcher/dist/OpenCore-Patcher ./OCLP-GUI/OpenCore\ Patcher/OpenCore\ Patcher/
# Rename binary to OCLP-CLI
mv ./OCLP-GUI/OpenCore\ Patcher/OpenCore\ Patcher/OCLP-GUI/OpenCore-Patcher ./OCLP-GUI/OpenCore\ Patcher/OpenCore\ Patcher/OCLP-GUI/OCLP-CLI
# Build project
cd ./OCLP-GUI/OpenCore\ Patcher; xcodebuild; cd ../../
# Open build folder
open ./OCLP-GUI/OpenCore\ Patcher/build/Release/
```

View File

@@ -1,2 +1,2 @@
#!/bin/sh #!/bin/sh
cp launcher.sh dist/OpenCore-Patcher.app/Contents/MacOS/Launcher cp payloads/launcher.sh dist/OpenCore-Patcher.app/Contents/MacOS/Launcher

View File

@@ -1,7 +1,7 @@
import subprocess import subprocess
from Resources import Constants from resources import constants
patcher_support_pkg_version = Constants.Constants().patcher_support_pkg_version patcher_support_pkg_version = constants.Constants().patcher_support_pkg_version
binary_packages = ["10.14-Mojave", "10.15-Catalina", "11-Big-Sur", "12-Monterey"] binary_packages = ["10.14-Mojave", "10.15-Catalina", "11-Big-Sur", "12-Monterey"]
for binary_package in binary_packages: for binary_package in binary_packages:

15
data/bluetooth_data.py Normal file
View File

@@ -0,0 +1,15 @@
import enum
class bluetooth_data(enum.IntEnum):
# Bluetooth Chipsets
NonApplicable = 0
BRCM2045 = 1 # TODO: Rename chipset, currently guessing MacPro1,1-3,1 name
BRCM2046 = 2 # BT 2.1
BRCM2070 = 3 # BT 2.1
BRCM20702_v1 = 4 # BT 4.0 - 2012
BRCM20702_v2 = 5 # BT 4.0 - 2013+
BRCM20703 = 6 # BT 4.2
BRCM20703_UART = 9 # BRCM20703 over UART, BT 4.2
UART = 10 # T2
PCIe = 20 # Apple Silicon

23
data/cpu_data.py Normal file
View File

@@ -0,0 +1,23 @@
import enum
class cpu_data(enum.IntEnum):
pentium_4 = 0
yonah = 1
conroe = 2
penryn = 3
nehalem = 4 # (Westmere included)
sandy_bridge = 5 # 2000
ivy_bridge = 6 # 3000
haswell = 7 # 4000
broadwell = 8 # 5000
skylake = 9 # 6000
kaby_lake = 10 # 7000
coffee_lake = 11 # 8000
comet_lake = 12 # 9000
ice_lake = 13 # 10000
apple_dtk = 112 # A12
apple_m1 = 114 # A14
apple_m1_pro = 115
apple_m1_max = 116

14
data/dylib_data.py Normal file
View File

@@ -0,0 +1,14 @@
# Data for SkyLightShim Plugin systems
class shim_list:
shim_pathing = {
"CoreWLAN.dylib": "/Systen/Library/CoreServices/WiFiAgent.app/Contents/MacOS/WiFiAgent",
"BacklightFixup.dylib": "/System/Library/CoreServices/loginwindow.app/Contents/Mac0S/loginwindow",
}
shim_legacy_accel = [
"CoreWLAN.dylib",
]
shim_legacy_accel_keyboard = [
"BacklightFixup.dylib",
]

View File

@@ -1,6 +1,6 @@
# Example Hardware probe of multiple models # Example Hardware probe of multiple models
# To be used when running validation tests # To be used when running validation tests
from Resources import device_probe from resources import device_probe
class MacBook: class MacBook:

11
data/mirror_data.py Normal file
View File

@@ -0,0 +1,11 @@
# Mirrors of Apple's InstallAssistant.ppkg
# Currently only listing important Installers no longer on Apple's servers
Install_macOS_Big_Sur_11_2_3 = {
"Version": "11.2.3",
"Build": "20D91",
"Link": "https://archive.org/download/install-assistant-20D91/InstallAssistant.pkg",
"Size": 12211077798,
"Source": "Archive.org",
"integrity": None,
}

395
data/model_array.py Normal file
View File

@@ -0,0 +1,395 @@
# Lists all models and required patches
# Copyright (C) 2020-2021, Dhinak G, Mykola Grymalyuk
SupportedSMBIOS = [
# MacBook
"MacBook4,1",
"MacBook5,1",
"MacBook5,2",
"MacBook6,1",
"MacBook7,1",
"MacBook8,1",
# MacBook Air
"MacBookAir2,1",
"MacBookAir3,1",
"MacBookAir3,2",
"MacBookAir4,1",
"MacBookAir4,2",
"MacBookAir5,1",
"MacBookAir5,2",
"MacBookAir6,1",
"MacBookAir6,2",
# MacBook Pro
"MacBookPro4,1",
"MacBookPro5,1",
"MacBookPro5,2",
"MacBookPro5,3",
"MacBookPro5,4",
"MacBookPro5,5",
"MacBookPro6,1",
"MacBookPro6,2",
"MacBookPro7,1",
"MacBookPro8,1",
"MacBookPro8,2",
"MacBookPro8,3",
"MacBookPro9,1",
"MacBookPro9,2",
"MacBookPro10,1",
"MacBookPro10,2",
"MacBookPro11,1",
"MacBookPro11,2",
"MacBookPro11,3",
# Mac Mini
"Macmini3,1",
"Macmini4,1",
"Macmini5,1",
"Macmini5,2",
"Macmini5,3",
"Macmini6,1",
"Macmini6,2",
# iMac
"iMac7,1",
"iMac8,1",
"iMac9,1",
"iMac10,1",
"iMac11,1",
"iMac11,2",
"iMac11,3",
"iMac12,1",
"iMac12,2",
"iMac13,1",
"iMac13,2",
"iMac13,3",
"iMac14,1",
"iMac14,2",
"iMac14,3",
"iMac14,4",
"iMac15,1",
# Mac Pro
"MacPro3,1",
"MacPro4,1",
"MacPro5,1",
# Xserve
"Xserve2,1",
"Xserve3,1",
]
# Audio
LegacyAudio = [
"MacBook4,1",
"MacBook5,1",
"MacBook5,2",
"MacBook6,1",
"MacBook7,1",
"MacBookAir2,1",
"MacBookAir3,1",
"MacBookAir3,2",
"MacBookAir4,1",
"MacBookAir4,2",
"MacBookPro4,1",
"MacBookPro5,1",
"MacBookPro5,2",
"MacBookPro5,3",
"MacBookPro5,4",
"MacBookPro5,5",
"MacBookPro6,1",
"MacBookPro6,2",
"MacBookPro7,1",
"MacBookPro8,1",
"MacBookPro8,2",
"MacBookPro8,3",
"Macmini3,1",
"Macmini4,1",
"Macmini5,1",
"Macmini5,2",
"Macmini5,3",
# "iMac7,1",
# "iMac8,1",
"iMac9,1",
"iMac10,1",
"iMac11,1",
"iMac11,2",
"iMac11,3",
"iMac12,1",
"iMac12,2",
"MacPro3,1",
"Dortania1,1",
]
# GPU
ModernGPU = [
"MacBookAir5,1", # Intel 4000
"MacBookAir5,2", # Intel 4000
"MacBookPro9,1", # Intel 4000 + Nvidia 650M
"MacBookPro9,2", # Intel 4000
"MacBookPro10,1", # Intel 4000 + Nvidia 650M
"MacBookPro10,2", # Intel 4000
"MacBookPro11,3", # Intel 5000 + Nvidia Kepler
"Macmini6,1", # Intel 4000
"Macmini6,2", # Intel 4000
"iMac13,1", # Intel 4000
"iMac13,2", # Intel 4000 + Nvidia Kepler
"iMac13,3", # Intel 4000
"iMac14,1", # Intel 5000 + Nvidia Kepler
"iMac14,2", # Intel 5000 + Nvidia Kepler
"iMac14,3", # Intel 5000 + Nvidia Kepler
]
LegacyGPU = [
"MacBook4,1", # GMA X3100
"MacBook5,1", # Nvidia 9000
"MacBook5,2", # Nvidia 9000
"MacBook6,1", # Nvidia 9000
"MacBook7,1", # Nvidia 300
"MacBookAir2,1", # Nvidia 9000
"MacBookAir3,1", # Nvidia 300
"MacBookAir3,2", # Nvidia 300
"MacBookAir4,1", # Intel 3000
"MacBookAir4,2", # Intel 3000
"MacBookPro4,1", # Nvidia 8000
"MacBookPro5,1", # Nvidia 9000
"MacBookPro5,2", # Nvidia 9000
"MacBookPro5,3", # Nvidia 9000
"MacBookPro5,4", # Nvidia 9000
"MacBookPro5,5", # Nvidia 9000
"MacBookPro6,1", # Intel 100 + Nvidia 300
"MacBookPro6,2", # Intel 100 + Nvidia 300
"MacBookPro7,1", # Nvidia 300
"MacBookPro8,1", # Intel 3000
"MacBookPro8,2", # Intel 3000 + AMD 6000
"MacBookPro8,3", # Intel 3000 + AMD 6000
"Macmini3,1", # Nvidia 9000
"Macmini4,1", # Nvidia 300
"Macmini5,1", # Intel 3000
"Macmini5,2", # AMD 6000
"Macmini5,3", # Intel 3000
"iMac7,1", # AMD 2000
"iMac8,1", # Nvidia and AMD 2400
"iMac9,1", # Nvidia 9000
"iMac10,1", # Nvidia 9000 and AMD 4000
"iMac11,1", # AMD 4000
"iMac11,2", # AMD 4000 and 5000
"iMac11,3", # AMD 5000
"iMac12,1", # AMD 6000
"iMac12,2", # AMD 6000
"Dortania1,1", # RTX 3080
]
LegacyGPUNvidia = [
"MacBook5,1", # Nvidia 9000
"MacBook5,2", # Nvidia 9000
"MacBook6,1", # Nvidia 9000
"MacBook7,1", # Nvidia 300
"MacBookAir2,1", # Nvidia 9000
"MacBookAir3,1", # Nvidia 300
"MacBookAir3,2", # Nvidia 300
"MacBookPro4,1", # Nvidia 8000
"MacBookPro5,1", # Nvidia 9000
"MacBookPro5,2", # Nvidia 9000
"MacBookPro5,3", # Nvidia 9000
"MacBookPro5,4", # Nvidia 9000
"MacBookPro5,5", # Nvidia 9000
"MacBookPro6,1", # Intel 100 + Nvidia 300
"MacBookPro6,2", # Intel 100 + Nvidia 300
"MacBookPro7,1", # Nvidia 300
"Macmini3,1", # Nvidia 9000
"Macmini4,1", # Nvidia 300
"iMac9,1", # Nvidia 9000
# "iMac10,1", # Nvidia 9000 and AMD 4000
]
LegacyGPUAMD = [
"MacBookPro8,2", # Intel 3000 + AMD 6000
"MacBookPro8,3", # Intel 3000 + AMD 6000
"Macmini5,2", # AMD 6000
"iMac7,1", # AMD 2000
# "iMac8,1", # Nvidia and AMD 2000
# "iMac10,1", # Nvidia 9000 and AMD 4000
"iMac11,1", # AMD 4000
"iMac11,2", # AMD 4000 and 5000
"iMac11,3", # AMD 5000
"iMac12,1", # AMD 6000
"iMac12,2", # AMD 6000
]
LegacyGPUAMDIntelGen2 = [
"MacBookPro8,2", # Intel 3000 + AMD 6000
"MacBookPro8,3", # Intel 3000 + AMD 6000
"Macmini5,2", # AMD 6000
"iMac12,1", # AMD 6000
"iMac12,2", # AMD 6000
]
LegacyGPUIntelGen1 = [
"MacBookPro6,1", # Intel 100 + Nvidia 300
"MacBookPro6,2", # Intel 100 + Nvidia 300
]
LegacyGPUIntelGen2 = [
"MacBookAir4,1", # Intel 3000
"MacBookAir4,2", # Intel 3000
"MacBookPro8,1", # Intel 3000
"MacBookPro8,2", # Intel 3000 + AMD 6000
"MacBookPro8,3", # Intel 3000 + AMD 6000
"Macmini5,1", # Intel 3000
"Macmini5,3", # Intel 3000
]
LegacyBrightness = [
"MacBook5,2",
"iMac7,1",
"iMac8,1",
"iMac9,1",
]
NVMePatch = ["MacPro3,1", "MacPro4,1", "Xserve3,1", "Dortania1,1"]
DualGPUPatch = [
"MacBookPro5,1",
"MacBookPro5,2",
"MacBookPro5,3",
"MacBookPro6,1",
"MacBookPro6,2",
"MacBookPro8,2",
"MacBookPro8,3",
"Macmini5,2",
"iMac12,1",
"iMac12,2",
"iMac13,1",
"iMac13,2",
"iMac14,2",
"iMac14,3",
"Dortania1,1",
]
DualGPUPatchRetina = [
"MacBookPro10,1",
"MacBookPro11,3",
]
IntelNvidiaDRM = [
"iMac13,1",
"iMac13,2",
"iMac14,2",
"iMac14,3",
]
IDEPatch = ["MacBook4,1", "MacBookPro4,1", "iMac7,1", "iMac8,1", "MacPro3,1", "Xserve2,1", "Dortania1,1"]
# Mac Pro and Xserve
MacPro = ["MacPro3,1", "MacPro4,1", "MacPro5,1", "Xserve2,1", "Xserve3,1", "Dortania1,1"]
SATAPatch = [
"MacBook4,1",
"MacBook5,1",
"MacBook5,2",
"MacBook6,1",
"MacBook7,1",
"MacBookAir2,1",
"MacBookAir3,1",
"MacBookAir3,2",
"MacBookAir4,1",
"MacBookAir4,2",
"MacBookPro4,1",
"MacBookPro5,1",
"MacBookPro5,2",
"MacBookPro5,3",
"MacBookPro5,4",
"MacBookPro5,5",
"MacBookPro6,1",
"MacBookPro6,2",
"MacBookPro7,1",
"MacBookPro8,1",
"MacBookPro8,2",
"MacBookPro8,3",
"MacBookPro9,1",
"MacBookPro9,2",
"Macmini3,1",
"Macmini4,1",
"Macmini5,1",
"Macmini5,2",
"Macmini5,3",
"iMac7,1",
"iMac8,1",
"iMac9,1",
"iMac10,1",
"iMac11,1",
"iMac11,2",
"iMac11,3",
"iMac12,1",
"iMac12,2",
"MacPro3,1",
"MacPro4,1",
"MacPro5,1",
"Xserve2,1",
"Xserve3,1",
"Dortania1,1",
]
NoAGPMSupport = ["MacBook4,1", "MacBookPro4,1", "iMac7,1", "iMac8,1", "MacPro3,1", "Xserve2,1", "Dortania1,1"]
AGDPSupport = [
"MacBookPro9,1",
"MacBookPro10,1",
"iMac13,1",
"iMac13,2",
"iMac14,1",
"iMac14,2",
"iMac14,3",
"iMac14,4",
"iMac15,1",
# TODO: Uncomment when dropped from macOS
# "iMac17,1",
# "iMac18,2",
# "iMac18,3",
# "iMac19,1",
# "iMac19,2",
# "iMac20,1",
# "iMac20,2",
# "iMacPro1,1",
# "MacPro6,1",
]
Missing_USB_Map = [
"MacBook4,1",
"MacBook5,1",
"MacBook5,2",
"MacBook6,1",
"MacBook7,1",
"MacBookAir2,1",
"MacBookAir3,1",
"MacBookAir3,2",
"MacBookAir4,1",
"MacBookAir4,2",
"MacBookPro4,1",
"MacBookPro5,1",
"MacBookPro5,2",
"MacBookPro5,3",
"MacBookPro5,4",
"MacBookPro5,5",
"MacBookPro6,1",
"MacBookPro6,2",
"MacBookPro7,1",
"MacBookPro8,1",
"MacBookPro8,2",
"MacBookPro8,3",
"Macmini3,1",
"Macmini4,1",
"Macmini5,1",
"Macmini5,2",
"Macmini5,3",
"iMac7,1",
"iMac8,1",
"iMac9,1",
"iMac10,1",
"iMac11,1",
"iMac11,2",
"iMac11,3",
"iMac12,1",
"iMac12,2",
"MacPro3,1",
"MacPro4,1",
"Xserve2,1",
"Xserve3,1",
]

20
data/os_data.py Normal file
View File

@@ -0,0 +1,20 @@
import enum
class os_data(enum.IntEnum):
# OS Versions, Based off Major Kernel Version
tiger = 8
leopard = 9
snow_leopard = 10
lion = 11
mountain_lion = 12
mavericks = 13
yosemite = 14
el_capitan = 15
sierra = 16
high_sierra = 17
mojave = 18
catalina = 19
big_sur = 20
monterey = 21
max_os = 99

View File

@@ -1,10 +1,20 @@
# Array of Device IDs for different devices # Array of Device IDs for different devices
class nvidia_ids: class nvidia_ids:
# Courteous of envytools as well as Macrumors: # Courteous of envytools as well as Macrumors:
# https://envytools.readthedocs.io/en/latest/hw/pciid.html # https://envytools.readthedocs.io/en/latest/hw/pciid.html
# https://forums.macrumors.com/threads/2011-imac-graphics-card-upgrade.1596614/ # https://forums.macrumors.com/threads/2011-imac-graphics-card-upgrade.1596614/
curie_ids = [
0x0040,
0x00f0,
0x0220,
0x0140,
0x0160,
0x0090,
0x01d0,
0x0390,
0x0290,
]
tesla_ids = [ tesla_ids = [
# G80 # G80
0x0190, # G80 [GeForce 8800 GTS / 8800 GTX] 0x0190, # G80 [GeForce 8800 GTS / 8800 GTX]
@@ -515,141 +525,163 @@ class nvidia_ids:
class amd_ids: class amd_ids:
legacy_gcn_ids = [
# AMDRadeonX4000 gcn_7000_ids = [
# AMDBonaireGraphicsAccelerator # GCN v1
0x6640, # AMDPitcairnGraphicsAccelerator - AMD7000Controller
0x6641, 0x6800, # HD 7970M
0x6646, 0x6801, # HD 8970M
0x6647, 0x6806, # Unknown
0x6650, 0x6808, # W7000
0x6651, 0x6810, # R7 370 / R9 270X/370X
0x665C, 0x6818, # HD 7870
0x665D, 0x6819, # HD 7850 / R7 265 / R9 270 1024SP
# AMDFijiGraphicsAccelerator # AMDTahitiGraphicsAccelerator - AMD7000Controller
0x7300, 0x6790, # Unknown
0x730F, 0x6798, # HD 7970/8970 OEM / R9 280X / D700
# AMDHawaiiGraphicsAccelerator 0x679A, # HD 7950/8950 OEM / R9 280
0x67B0, 0x679E, # HD 7870 XT
# AMDPitcairnGraphicsAccelerator 0x6780, # W9000
0x6800, # AMDVerdeGraphicsAccelerator - AMD7000Controller
0x6801, 0x6820, # HD 8890M / R9 M275X/M375X / M5100
0x6806, 0x6821, # HD 8870M / R9 M270X/M370X
0x6808, 0x6823, # HD 8850M / R9 M265X
0x6810, 0x6825, # HD 7870M
0x6818, 0x6827, # HD 7850M/8850M
0x6819, 0x682B, # HD 8830M / R7 250 / R7 M465X
# AMDTahitiGraphicsAccelerator 0x682D, # M4000
0x6790, 0x682F, # HD 7730M
0x6798, 0x6835, # R9 255
0x679A, 0x6839, # Unknown
0x679E, 0x683B, # Unknown
0x6780, 0x683D, # HD 7770/8760 / R7 250X
# AMDTongaGraphicsAccelerator 0x683F, # HD 7750/8740 / R7 250E
0x6920, ]
0x6921,
0x6930, gcn_8000_ids = [
0x6938, # GCN v2
0x6939, # AMDBonaireGraphicsAccelerator - AMD8000Controller
# AMDVerdeGraphicsAccelerator 0x6640, # M6100
0x6820, 0x6641, # HD 8930M
0x6821, 0x6646, # R9 M280X / W6170M
0x6823, 0x6647, # R9 M270X/M280X
0x6825, 0x6650, # Unknown
0x6827, 0x6651, # Unknown
0x682B, 0x665C, # HD 7790/8770 / R7 360 / R9 260/360
0x682D, 0x665D, # R7 200
0x682F, # AMDHawaiiGraphicsAccelerator - AMD8000Controller
0x6835, 0x67B0, # R9 290X/390X
0x6839, ]
0x683B,
0x683D, gcn_9000_ids = [
0x683F, # GCN v3
# AMDFijiGraphicsAccelerator - AMD9000Controller
0x7300, # R9 FURY / NANO
0x730F, # Unknown
# AMDTongaGraphicsAccelerator - AMD9000Controller
0x6920, # R9 M395/ M395X
0x6921, # R9 M295X / M390X
0x6930, # Unknown
0x6938, # R9 380X / R9 M295X
0x6939, # R9 285/380
] ]
polaris_ids = [ polaris_ids = [
# GCN v4
# AMDRadeonX4000 # AMDRadeonX4000
# AMDBaffinGraphicsAccelerator # AMDBaffinGraphicsAccelerator - AMD9500Controller
0x67E0, 0x67E0, # Pro WX 4170
0x67E3, 0x67E3, # Pro WX 4100
0x67E8, 0x67E8, # Pro WX 4130/4150
0x67EB, 0x67EB, # Pro V5300X
0x67EF, 0x67EF, # 460/560D / Pro 450/455/460/555/555X/560/560X
0x67FF, 0x67FF, # 550 640SP / RX 560/560X
0x67E1, 0x67E1, # Unknown
0x67E7, 0x67E7, # Unknown
0x67E9, 0x67E9, # Unknown
# AMDEllesmereGraphicsAccelerator # AMDEllesmereGraphicsAccelerator - AMD9500Controller
0x67C0, 0x67C0, # Pro WX 7100 Mobile
0x67C1, 0x67C1, # Unknown
0x67C2, 0x67C2, # Pro V7300X / V7350x2
0x67C4, 0x67C4, # Pro WX 7100
0x67C7, 0x67C7, # Pro WX 5100
0x67DF, 0x67DF, # 470/480/570/570X/580/580X/590
0x67D0, 0x67D0, # Pro V7300X / V7350x2
0x67C8, 0x67C8, # Unknown
0x67C9, 0x67C9, # Unknown
0x67CA, 0x67CA, # Unknown
0x67CC, 0x67CC, # Unknown
0x67CF, 0x67CF, # Unknown
] ]
vega_ids = [ vega_ids = [
# GCN v5
# AMDRadeonX5000 # AMDRadeonX5000
# AMDVega10GraphicsAccelerator # AMDVega10GraphicsAccelerator - AMD10000Controller
0x6860, 0x6860, # Instinct MI25
0x6861, 0x6861, # Pro WX 9100
0x6862, 0x6862, # Pro SSG
0x6863, 0x6863, # Vega Frontier
0x6864, 0x6864, # Pro V340
0x6867, 0x6867, # Pro Vega 56
0x6868, 0x6868, # Pro WX 8100/8200
0x6869, 0x6869, # Pro Vega 48
0x686A, 0x686A, # Unknown
0x686B, 0x686B, # Pro Vega 64X
0x686C, 0x686C, # Instinct MI25
0x686D, 0x686D, # Unknown
0x686E, 0x686E, # Unknown
0x686F, 0x686F, # Unknown
0x687F, 0x687F, # RX Vega 56/64
# AMDVega12GraphicsAccelerator # AMDVega12GraphicsAccelerator - AMD10000Controller
0x69A0, 0x69A0, # Unknown
0x69A1, 0x69A1, # Unknown
0x69A2, 0x69A2, # Unknown
0x69A3, 0x69A3, # Unknown
0x69AF, 0x69AF, # Unknown
# AMDVega20GraphicsAccelerator # AMDVega20GraphicsAccelerator - AMD10000Controller
0x66A0, 0x66A0, # Instinct
0x66A1, 0x66A1, # Pro VII/Instinct MI50
0x66A2, 0x66A2, # Unknown
0x66A3, 0x66A3, # Pro Vega II/ Pro Vega II Duo
0x66A7, 0x66A7, # Unknown
0x66AF, 0x66AF, # VII
] ]
navi_ids = [ navi_ids = [
# AMDRadeonX6000 # AMDRadeonX6000
# AMDNavi10GraphicsAccelerator # AMDNavi10GraphicsAccelerator
0x7310, 0x7310, # Pro W5700X
0x7312, 0x7312, # Pro W5700
0x7318, 0x7318, # Unknown
0x7319, 0x7319, # Unknown
0x731A, 0x731A, # Unknown
0x731B, 0x731B, # Unknown
0x731F, 0x731F, # RX 5600/5600 XT / 5700/5700 XT
# AMDNavi12GraphicsAccelerator # AMDNavi12GraphicsAccelerator
0x7360, 0x7360, # 5600M
# AMDNavi14GraphicsAccelerator # AMDNavi14GraphicsAccelerator
0x7340, 0x7340, # 5500/5500M / Pro 5500M
0x7341, 0x7341, # Pro W5500
0x7343, 0x7343, # Unknown
0x7347, 0x7347, # Pro W5500M
0x734F, 0x734F, # Pro W5300M
# AMDNavi21GraphicsAccelerator # AMDNavi21GraphicsAccelerator
0x73A2, 0x73A2, # Pro W6900X
0x73AB, 0x73AB, # Pro W6800X/Pro W6800X Duo
0x73BF, 0x73BF, # 6800/6800 XT / 6900 XT
# AMDNavi23GraphicsAccelerator
0x73E3, # Pro W6600
0x73FF, # 6600/6600 XT/6600M
] ]
r500_ids = [
0x7187, # X1300/X1550
0x7146, # X1300/X1550
0x71c5, # Mobile X1600
0x7249, # X1900 XT
]
terascale_1_ids = [ terascale_1_ids = [
0x9400, 0x9400,
0x9401, 0x9401,
@@ -688,87 +720,99 @@ class amd_ids:
] ]
terascale_2_ids = [ terascale_2_ids = [
0x6738, 0x6738, # HD 6870
0x6739, 0x6739, # HD 6850
0x6720, 0x6720, # HD 6970M/6990M
0x6722, 0x6722, # Unknown
0x6768, 0x6768, # Unknown
0x6770, 0x6770, # HD 6450A/7450A
0x6779, 0x6779, # HD 6450/7450/8450 / R5 230 OEM
0x6760, 0x6760, # HD 6400M/7400M
0x6761, 0x6761, # HD 6430M
0x68E0, 0x68E0, # HD 5430/5450/547
0x6898, 0x6898, # HD 5870
0x6899, 0x6899, # HD 5850
0x68B8, 0x68B8, # HD 5770
0x68B0, 0x68B0, # Unknown
0x68B1, 0x68B1, # Unknown
0x68A0, 0x68A0, # HD 5870 (mobile)
0x68A1, 0x68A1, # HD 5850 (mobile)
0x6840, 0x6840, # HD 7500M/7600M
0x6841, 0x6841, # HD 7550M/7570M/7650M
0x68D8, 0x68D8, # HD 5670/5690/5730
0x68C0, 0x68C0, # HD 5730 / 6570M
0x68C1, 0x68C1, # HD 5650/5750 / 6530M/6550M
0x68D9, 0x68D9, # HD 5550/5570/5630/6510/6610/7570
0x6750, 0x6750, # HD 6650A/7650A
0x6758, 0x6758, # HD 6670/7670
0x6759, 0x6759, # HD 6570/7570/8550
0x6740, 0x6740, # HD 6730M/6770M/7690M XT
0x6741, 0x6741, # HD 6630M/6650M/6750M/7670M/7690M
0x6745, 0x6745, # Unknown
] ]
class intel_ids: class intel_ids:
# https://dgpu-docs.intel.com/devices/hardware-table.html
gma_950_ids = [
0x2582, # 915G
0x2592, # 915GM
0x2772, # 945G
0x27A2, # 945GM
]
gma_x3100_ids = [
0x2a02, # 965GM
]
iron_ids = [ iron_ids = [
# AppleIntelHDGraphics IDs # AppleIntelHDGraphics IDs
0x0044, 0x0044, # Unknown
0x0046, 0x0046, # HD Graphics
] ]
sandy_ids = [ sandy_ids = [
# AppleIntelHD3000Graphics IDs # AppleIntelHD3000Graphics IDs
# AppleIntelSNBGraphicsFB IDs # AppleIntelSNBGraphicsFB IDs
0x0106, 0x0106, # HD Graphics 2000
0x0601, 0x0601, # Unknown
0x0116, 0x0116, # HD Graphics 3000
0x0102, 0x0102, # HD Graphics 2000
0x0126, 0x0126, # HD Graphics 3000
] ]
ivy_ids = [ ivy_ids = [
# AppleIntelHD4000Graphics IDs # AppleIntelHD4000Graphics IDs
# AppleIntelFramebufferCapri IDs # AppleIntelFramebufferCapri IDs
0x0152, 0x0152, # HD Graphics 2500
0x0156, 0x0156, # HD Graphics 2500
0x0162, 0x0162, # HD Graphics 4000
0x0166, 0x0166, # HD Graphics 4000
] ]
haswell_ids = [ haswell_ids = [
# AppleIntelHD5000Graphics IDs # AppleIntelHD5000Graphics IDs
# AppleIntelFramebufferAzul IDs # AppleIntelFramebufferAzul IDs
0x0D26, 0x0D26, # Iris Pro Graphics P5200
0x0A26, 0x0A26, # HD Graphics 5000
0x0A2E, 0x0A2E, # Iris Graphics 5100
0x0D22, 0x0D22, # Iris Pro Graphics 5200
0x0412, 0x0412, # HD Graphics 4600
] ]
broadwell_ids = [ broadwell_ids = [
# AppleIntelBDWGraphicsFramebuffer IDs # AppleIntelBDWGraphicsFramebuffer IDs
0x0BD1, 0x0BD1, # Unknown
0x0BD2, 0x0BD2, # Unknown
0x0BD3, 0x0BD3, # Unknown
0x1606, 0x1606, # HD Graphics
0x160E, 0x160E, # HD Graphics
0x1616, 0x1616, # HD Graphics 5500
0x161E, 0x161E, # HD Graphics 5300
0x1626, 0x1626, # HD Graphics 6000
0x1622, 0x1622, # Iris Pro Graphics 6200
0x1612, 0x1612, # HD Graphics 5600
0x162B, 0x162B, # Iris Graphics 6100
] ]
skylake_ids = [ skylake_ids = [
@@ -807,6 +851,12 @@ class intel_ids:
0x3E98, 0x3E98,
] ]
comet_lake_ids = [
0x9BC8, # UHD Graphics 630
0x9BC5, # UHD Graphics 630
0x9BC4, # UHD Graphics
]
ice_lake_ids = [ ice_lake_ids = [
# AppleIntelICLLPGraphicsFramebuffer IDs # AppleIntelICLLPGraphicsFramebuffer IDs
0xFF05, 0xFF05,
@@ -823,9 +873,9 @@ class intel_ids:
AppleIntel8254XEthernet = [ AppleIntel8254XEthernet = [
# AppleIntel8254XEthernet IDs # AppleIntel8254XEthernet IDs
0x1096, 0x1096, # 80003ES2LAN
0x100F, 0x100F, # 82545EM
0x105E, 0x105E, # 82571EB/82571GB
] ]
AppleIntelI210Ethernet = [ AppleIntelI210Ethernet = [
@@ -844,12 +894,19 @@ class intel_ids:
Intel82574L = [ Intel82574L = [
# Intel82574L IDs # Intel82574L IDs
0x104B, 0x104B, # 82566DC
0x10F6, 0x10F6, # 82574L
] ]
class broadcom_ids: class broadcom_ids:
AppleBCMWLANBusInterfacePCIe = [
0x43DC, # BCM4355
0x4464, # BCM4364
0x4488, # BCM4377b
0x4425, # Unknown
]
AirPortBrcmNIC = [ AirPortBrcmNIC = [
# AirPortBrcmNIC IDs # AirPortBrcmNIC IDs
0x43BA, # BCM43602 0x43BA, # BCM43602
@@ -886,11 +943,11 @@ class broadcom_ids:
AppleBCM5701Ethernet = [ AppleBCM5701Ethernet = [
# AppleBCM5701Ethernet IDs # AppleBCM5701Ethernet IDs
0x1684, 0x1684, # BCM5764M
0x16B0, 0x16B0, # BCM57761
0x16B4, 0x16B4, # BCM57765
0x1682, 0x1682, # BCM57762
0x1686, 0x1686, # BCM57766
] ]

38
data/sip_data.py Normal file
View File

@@ -0,0 +1,38 @@
class system_integrity_protection:
csr_values = {
# Source: macOS 11.4 (XNU's csr.h)
# https://opensource.apple.com/source/xnu/xnu-7195.121.3/bsd/sys/csr.h.auto.html
"CSR_ALLOW_UNTRUSTED_KEXTS": False, # 0x1 - Allows Unsigned Kexts - Introduced in El Capitan # noqa: E241
"CSR_ALLOW_UNRESTRICTED_FS": False, # 0x2 - File System Access - Introduced in El Capitan # noqa: E241
"CSR_ALLOW_TASK_FOR_PID": False, # 0x4 - Unrestricted task_for_pid() - Introduced in El Capitan # noqa: E241
"CSR_ALLOW_KERNEL_DEBUGGER": False, # 0x8 - Allow Kernel Debugger - Introduced in El Capitan # noqa: E241
"CSR_ALLOW_APPLE_INTERNAL": False, # 0x10 - Set AppleInternal Features - Introduced in El Capitan # noqa: E241
# "CSR_ALLOW_DESTRUCTIVE_DTRACE": False, # 0x20 - Allow destructive DTrace - Deprecated # noqa: E241
"CSR_ALLOW_UNRESTRICTED_DTRACE": False, # 0x20 - Unrestricted DTrace usage - Introduced in El Capitan # noqa: E241
"CSR_ALLOW_UNRESTRICTED_NVRAM": False, # 0x40 - Unrestricted NVRAM write - Introduced in El Capitan # noqa: E241
"CSR_ALLOW_DEVICE_CONFIGURATION": False, # 0x80 - Allow custom DeviceTree (iOS) - Introduced in El Capitan # noqa: E241
"CSR_ALLOW_ANY_RECOVERY_OS": False, # 0x100 - Skip BaseSystem Verification - Introduced in Sierra # noqa: E241
"CSR_ALLOW_UNAPPROVED_KEXTS": False, # 0x200 - Allow Unnotarized Kexts - Introduced in High Sierra # noqa: E241
"CSR_ALLOW_EXECUTABLE_POLICY_OVERRIDE": False, # 0x400 - Override Executable Policy - Introduced in Mojave # noqa: E241
"CSR_ALLOW_UNAUTHENTICATED_ROOT": False, # 0x800 - Allow Root Volume Mounting - Introduced in Big Sur # noqa: E241
}
root_patch_sip_mojave = [
# Variables required to root patch in Mojave and Catalina
"CSR_ALLOW_UNTRUSTED_KEXTS", # 0x1
"CSR_ALLOW_UNRESTRICTED_FS", # 0x2
"CSR_ALLOW_UNAPPROVED_KEXTS", # 0x200
]
root_patch_sip_big_sur = [
# Variables required to root patch in Big Sur and Monterey
"CSR_ALLOW_UNTRUSTED_KEXTS", # 0x1
"CSR_ALLOW_UNRESTRICTED_FS", # 0x2 - Required to mount and edit root volume, as well as load modded platform binaries
"CSR_ALLOW_UNAPPROVED_KEXTS", # 0x200
"CSR_ALLOW_UNAUTHENTICATED_ROOT", # 0x800 - Required to avoid KC mismatch kernel panic
]
# CSR_ALLOW_EXECUTABLE_POLICY_OVERRIDE (introduced with Mojave):
# This bit is quite strange and was originally assumed to be required for modded platform binaries
# However after extensive testing, this doesn't seem true. In addition, this bit is never flipped via
# 'csrutil disable'. Usage within the kernel is not present.

2830
data/smbios_data.py Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,4 @@
# Lists Root patches used by SysPatch.py # Lists Root patches used by sys_patch.py
# Copyright (C) 2020-2021, Dhinak G, Mykola Grymalyuk # Copyright (C) 2020-2021, Dhinak G, Mykola Grymalyuk
DeleteNvidiaAccel11 = [ DeleteNvidiaAccel11 = [
"AMDRadeonX4000.kext", "AMDRadeonX4000.kext",
@@ -93,6 +93,10 @@ AddNvidiaKeplerAccel11 = [
"NVDAStartup.kext", "NVDAStartup.kext",
] ]
AddNvidiaTeslaAccel12 = [
"NVDAStartup.kext",
]
AddAMDAccel11 = [ AddAMDAccel11 = [
"AMD2400Controller.kext", "AMD2400Controller.kext",
"AMD2600Controller.kext", "AMD2600Controller.kext",
@@ -155,10 +159,18 @@ AddIntelGen2Accel = [
"AppleIntelHD3000GraphicsGA.plugin", "AppleIntelHD3000GraphicsGA.plugin",
"AppleIntelHD3000GraphicsGLDriver.bundle", "AppleIntelHD3000GraphicsGLDriver.bundle",
"AppleIntelHD3000GraphicsVADriver.bundle", "AppleIntelHD3000GraphicsVADriver.bundle",
"AppleIntelSNBGraphicsFB.kext", # "AppleIntelSNBGraphicsFB.kext",
"AppleIntelSNBVA.bundle", "AppleIntelSNBVA.bundle",
] ]
AddIntelGen2AccelStock = [
"AppleIntelSNBGraphicsFB-Clean.kext",
]
AddIntelGen2AccelPatched = [
"AppleIntelSNBGraphicsFB.kext",
]
AddIntelGen3Accel = [ AddIntelGen3Accel = [
"AppleIntelFramebufferCapri.kext", "AppleIntelFramebufferCapri.kext",
"AppleIntelHD4000Graphics.kext", "AppleIntelHD4000Graphics.kext",
@@ -173,6 +185,16 @@ AddGeneralAccel = ["IOAcceleratorFamily2.kext", "IOSurface.kext"]
DeleteBrightness = ["AppleGraphicsControl.kext/Contents/PlugIns/AGDCBacklightControl.kext"] DeleteBrightness = ["AppleGraphicsControl.kext/Contents/PlugIns/AGDCBacklightControl.kext"]
DeleteDemux = [
"AppleGraphicsControl.kext/Contents/PlugIns/AGDCBacklightControl.kext",
"AppleGraphicsControl.kext/Contents/PlugIns/AppleMuxControl.kext",
"AppleBacklight.kext",
]
AddDemux = [
"AppleMuxControl.kext",
]
AddBrightness = [ AddBrightness = [
"AppleBacklight.kext", "AppleBacklight.kext",
"AppleBacklightExpert.kext", "AppleBacklightExpert.kext",
@@ -183,6 +205,10 @@ AddVolumeControl = [
"IOAudioFamily.kext", "IOAudioFamily.kext",
] ]
AddVolumeControlv2 = [
"AppleHDA.kext",
]
DeleteVolumeControl = [ DeleteVolumeControl = [
"AppleVirtIO.kext", "AppleVirtIO.kext",
"AppleVirtualGraphics.kext", "AppleVirtualGraphics.kext",

View File

@@ -134,7 +134,6 @@ module.exports = {
'TERMS', 'TERMS',
'HOW', 'HOW',
'PATCHEXPLAIN', 'PATCHEXPLAIN',
'CLI',
] ]
}, },

View File

@@ -9,8 +9,10 @@
* [Wake from sleep heavily distorted on AMD/ATI in macOS 11.3 and newer](#wake-from-sleep-heavily-distorted-on-amd-ati-in-macos-11-3-and-newer) * [Wake from sleep heavily distorted on AMD/ATI in macOS 11.3 and newer](#wake-from-sleep-heavily-distorted-on-amd-ati-in-macos-11-3-and-newer)
* [Unable to switch GPUs on 2011 15" and 17" MacBook Pros](#unable-to-switch-gpus-on-2011-15-and-17-macbook-pros) * [Unable to switch GPUs on 2011 15" and 17" MacBook Pros](#unable-to-switch-gpus-on-2011-15-and-17-macbook-pros)
* [Erratic Colours on ATI TeraScale 2 GPUs (HD5000/HD6000)](#erratic-colours-on-ati-terascale-2-gpus-hd5000-hd6000) * [Erratic Colours on ATI TeraScale 2 GPUs (HD5000/HD6000)](#erratic-colours-on-ati-terascale-2-gpus-hd5000-hd6000)
* [Unable to allow Safari Extensions](#unable-to-allow-Safari-Extensions)
* [Cannot Login on 2011 15" and 17" MacBook Pros](#cannot-login-on-2011-15-and-17-macbook-pros)
The below page is for users experiencing issues with their overall usage of macOS Big Sur and the Legacy Graphics Acceleration patches. Note that the following GPUs currently do not have acceleration support in Big Sur: The below page is for users experiencing issues with their overall usage of macOS Big Sur / macOS Monterey and the Legacy Graphics Acceleration patches. Note that the following GPUs currently do not have acceleration support in Big Sur / Monterey:
* Intel 3rd and 4th Gen - GMA series * Intel 3rd and 4th Gen - GMA series
@@ -33,22 +35,6 @@ For those unfamiliar with what is considered a non-Metal GPU, see below chart:
::: :::
Additionally we currently do not have macOS Monterey acceleration patches for non-Metal Macs. We recommend users either upgrade their Macs with a Metal GPU or remain on Big Sur until further development
::: details Why there's no non-Metal patches for Monterey
With macOS Monterey, please understand our current legacy acceleration patch sets are no longer functional. As of right now, only basic framebuffer and brightness control may be achieved, however proper animations and hardware acceleration is not available.
This is due to numerous changes with Skylight and other macOS frameworks relying more and more on Metal functions and thus making it even more difficult to re-add legacy OpenGL support.
> When can we expect acceleration support
For the time being, please understand we cannot predict when there will be patch sets ready. Note that it took over 300 days from Big Sur's unveiling to achieve public acceleration for non-Metal GPUs. And with TeraScale 2 acceleration, this took almost 3 years to achieve public acceleration.
So please be patient as developers are hard at work, however please expect no acceleration support in Monterey until next year at the minimum if not even later.
:::
## Downloading older non-Metal Apps ## Downloading older non-Metal Apps
Many Apple apps now have direct reliance on Metal for proper functioning, however legacy builds of these apps still do work in Big Sur. See below for archive of many apps such as Pages, iMovie, GarageBand. Many Apple apps now have direct reliance on Metal for proper functioning, however legacy builds of these apps still do work in Big Sur. See below for archive of many apps such as Pages, iMovie, GarageBand.
@@ -104,7 +90,7 @@ Due to the Metal Backend, the enhanced color output of these apps seems to heavi
## Cannot press "Done" when editing a Sidebar Widget ## Cannot press "Done" when editing a Sidebar Widget
To work around this, simply press Tab to hover over and press spacebar to simulate a click. Workaround: Press some combination of Tab, or Tab and then Shift-Tab, or just Shift-Tab until the "Done" button is highlighted. Then press spacebar to activate the button, the same as in any other dialog with a highlighted button halo.
## Wake from sleep heavily distorted on AMD/ATI in macOS 11.3 and newer ## Wake from sleep heavily distorted on AMD/ATI in macOS 11.3 and newer
@@ -136,3 +122,32 @@ Applications that can set color depth are:
* [SwitchResX](https://www.madrau.com) * [SwitchResX](https://www.madrau.com)
* [ResXtreme](https://macdownload.informer.com/resxtreme/) * [ResXtreme](https://macdownload.informer.com/resxtreme/)
## Unable to allow Safari Extensions
Due to an bug on the legacy acceleration patches, users won't be able to enable Safari Extensions
This tool can be used to work-around this issue:
* [Non-Metal Safari Extensions](https://github.com/moosethegoose2213/Non-Metal-Safari-Extensions/)
## Cannot Login on 2011 15" and 17" MacBook Pros
By default OpenCore Legacy Patcher will assume MacBookPro8,2/3 have a faulty dGPU and disable acceleration. This is the safest option for most users as enabling dGPU acceleration on faulty Macs will result in failed booting.
However if your machine does not have the dGPU disabled via NVRAM, you'll expereince a login loop. To work around this is quite simple:
1. Boot macOS in Single User Mode
* Press Cmd+S in OpenCore's menu when you turn the Mac on
2. When command line prompt appears, enter the dGPU disabler argument (at the bottom)
3. Reboot and patched macOS should work normally
4. If you still want to use the dGPU, run OCLP's TUI app and enable TS2 Acceleration. Then root patch your Mac again
* `Patcher Settings -> Misc Settings -> TeraScale 2 Accel`
5. Either Reset NVRAM or set `gpu-power-prefs` to zeros to re-enable the dGPU
```sh
# Forces GMUX to use iGPU only (ie. disable dGPU)
nvram FA4CE28D-B62F-4C99-9CC3-6815686E30F9:gpu-power-prefs=%01%00%00%00
# To reset, simply write zeros or NVRAM Reset your Mac
nvram FA4CE28D-B62F-4C99-9CC3-6815686E30F9:gpu-power-prefs=%00%00%00%00
```

View File

@@ -7,11 +7,11 @@ With OpenCore Legacy Patcher we recommend users go through the below table to un
| Features | [OpenCore Legacy Patcher](https://github.com/dortania/OpenCore-Legacy-Patcher/) | [Patched Sur](https://github.com/BenSova/Patched-Sur) | | Features | [OpenCore Legacy Patcher](https://github.com/dortania/OpenCore-Legacy-Patcher/) | [Patched Sur](https://github.com/BenSova/Patched-Sur) |
| :--- | :--- | :--- | | :--- | :--- | :--- |
| Over The Air Updates | <span style="color:#30BCD5">Native System Preferences, additionally supports Deltas (~2GB) for Metal GPUs</span> | <span style="color:red">Inside Patcher Sur app (~12GB), only available when InstallAssistants release.</span> InstallAssistants generally available same day as System Preference updates, however developer betas will lag behind by 1 day compared to OTAs | | Over The Air Updates | <span style="color:#30BCD5">Native System Preferences, additionally supports Deltas (~2GB) for Metal GPUs</span> | <span style="color:red">Inside Patcher Sur app (~12GB), only available when InstallAssistants release.</span> InstallAssistants generally available same day as System Preference updates, however developer betas will lag behind by 1 day compared to OTAs |
| FileVault | <span style="color:#30BCD5">Fully supported on all machines</span> | <span style="color:red">Not supported</span> | | FileVault | <span style="color:#30BCD5">Fully supported on all machines</span>. Note unsupported on APFS ROM Patched Macs, revert to stock firmware to resolve | <span style="color:red">Not supported</span> |
| System Integrity Protection | <span style="color:#30BCD5">Fully enabled on Metal GPUs</span> | <span style="color:red">Disabled for early 2013 and older during the patching process and first boot afterwards, otherwise enabled</span> | | System Integrity Protection | <span style="color:#30BCD5">Fully enabled on Metal GPUs</span> | <span style="color:red">Disabled for early 2013 and older during the patching process and first boot afterwards, otherwise enabled</span> |
| APFS Snapshots | <span style="color:#30BCD5">Fully enabled</span> | <span style="color:red">Disabled</span> | | APFS Snapshots | <span style="color:#30BCD5">Fully enabled</span> | <span style="color:red">Disabled</span> |
| User facing | <span style="color:red">TUI interface</span> | <span style="color:#30BCD5">SwiftUI interface, more user friendly</span> | | User facing | <span style="color:red">TUI interface</span> | <span style="color:#30BCD5">SwiftUI interface, more user friendly</span> |
| Supported OSes | <span style="color:#30BCD5">10.7-11</span> | <span style="color:red">10.15-11</span> | | Supported OSes | <span style="color:#30BCD5">10.7-12</span> | <span style="color:red">10.15-11</span> |
| Firmware Patching | <span style="color:#30BCD5">None required</span> | <span style="color:red">Required for models without native APFS support</span> | | Firmware Patching | <span style="color:#30BCD5">None required</span> | <span style="color:red">Required for models without native APFS support</span> |
| BootCamp Switching | <span style="color:red">Requires EFI Conversion for Start Disk support, otherwise still supported</span> | <span style="color:#30BCD5">Native</span> | | BootCamp Switching | <span style="color:red">Requires EFI Conversion for Start Disk support, otherwise still supported</span> | <span style="color:#30BCD5">Native</span> |
| Non-Metal GPU Acceleration | <span style="color:#30BCD5">In active development</span>, see Acceleration Progress Tracker: [Link](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108) | <span style="color:red">Currently not researching</span> | | Non-Metal GPU Acceleration | <span style="color:#30BCD5">In active development</span>, see Acceleration Progress Tracker: [Link](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108) | <span style="color:red">Currently not researching</span> |

View File

@@ -1,41 +0,0 @@
# Command Line Args
With OpenCore Legacy Patcher, we include an extra binary called [OCLP-CLI](https://github.com/dortania/OpenCore-Legacy-Patcher/releases/). The purpose of this binary is to easily run our OpenCore build process for other programs to hook onto. Below is documentation on currently supported arguments.
### Build Arguments
* **--build**: Build OpenCore
* **--model xxxx**: override default model detection
* ex. **--model iMac11,2**
* **--metal_gpu xxxx**: override default GPU detection (ie. Nvidia, AMD)
* **--metal_gpu Nvidia**
* **--smbios_spoof xxxx**: set spoofing mode, defaults to Minimal if no arg provided (ie. Minimal, Moderate, Advanced)
* ex. **--smbios_spoof Moderate**
* **--verbose**: enable verbose booting
* **--debug_oc**: enable debug OpenCore
* **--debug_kext**: enable debug kexts
* **--skip_wifi**: skip wifi patch
* **--hide_picker**: hide OpenCore's picker
* **--disable_sip**: disables SIP
* **--disable_smb**: disables SecureBootModel
* **--vault**: enable OpenCore vaulting
Example usage:
```bash
./OCLP-CLI --build --verbose --debug_oc --debug_kext --model iMac11,2
```
Note, when building OpenCore the output folder will be next to the OCLP binary as OpenCore-RELEASE or OpenCore-DEBUG folder.
### Patch System Arguments
* **--patch_sys_vol**: patches root volume with detected hardware
Example usage:
```bash
sudo ./OCLP-CLI --patch_sys_vol
```
Note, root volume patching needs to be run as sudo

View File

@@ -16,6 +16,8 @@ This patcher is made of multiple external applications from different people and
* All rights reserved to respective authors * All rights reserved to respective authors
* [AAAMouSSE](https://forums.macrumors.com/threads/mp3-1-others-sse-4-2-emulation-to-enable-amd-metal-driver.2206682/) - Syncretic * [AAAMouSSE](https://forums.macrumors.com/threads/mp3-1-others-sse-4-2-emulation-to-enable-amd-metal-driver.2206682/) - Syncretic
* [telemetrap](https://forums.macrumors.com/threads/mp3-1-others-sse-4-2-emulation-to-enable-amd-metal-driver.2206682/post-28447707) - Syncretic * [telemetrap](https://forums.macrumors.com/threads/mp3-1-others-sse-4-2-emulation-to-enable-amd-metal-driver.2206682/post-28447707) - Syncretic
* [SurPlus](https://github.com/reenigneorcim/SurPlus) - Syncretic
* [VMM Patch Set](https://github.com/dortania/OpenCore-Legacy-Patcher/blob/4a8f61a01da72b38a4b2250386cc4b497a31a839/payloads/Config/config.plist#L1222-L1281) - parrotgeek1
* Apple Binaries - Apple Inc. * Apple Binaries - Apple Inc.
Remaining files within OpenCore Legacy Patcher are copyrighted 2020-2021 Mykola Grymalyuk & Dhinak G. For integration into other projects, please request written permission. Remaining files within OpenCore Legacy Patcher are copyrighted 2020-2021 Mykola Grymalyuk & Dhinak G. For integration into other projects, please request written permission.

View File

@@ -20,10 +20,10 @@ Regarding OS support, see below:
| Support Entry | Supported OSes | Description | Comment | | Support Entry | Supported OSes | Description | Comment |
| :--- | :--- | :--- | :--- | | :--- | :--- | :--- | :--- |
| HostOS | macOS 10.9 - macOS 11 | Refers to OSes where running OpenCore-Patcher.app are supported | Supports 10.7+ if [Python 3.9 or higher](https://www.python.org/downloads/) is manually installed, simply run the `OpenCore-Patcher.command` located in the repo | | HostOS | macOS 10.9 - macOS 12 | Refers to OSes where running OpenCore-Patcher.app are supported | Supports 10.7+ if [Python 3.9 or higher](https://www.python.org/downloads/) is manually installed, simply run the `OpenCore-Patcher.command` located in the repo |
| TargetOS | macOS 11 | Refers to OSes that can be patched to run with OpenCore | May support 10.4 and newer (in a potentially broken state). No support provided. | | TargetOS | macOS 11 - macOS 12 | Refers to OSes that can be patched to run with OpenCore | May support 10.4 and newer (in a potentially broken state). No support provided. |
* macOS Monterey support is currently in beta and is not recommended for everyday users. The below page is meant to represent macOS Big Sur support and may not correctly reflect Monterey's support on each model * macOS Monterey support is currently in beta and is not recommended for everyday users.
* Recommend looking at the [macOS Monterey Support page](./MONTEREY-DROP.md) for a better idea of Monterey's current status * Recommend looking at the [macOS Monterey Support page](./MONTEREY-DROP.md) for a better idea of Monterey's current status
### MacBook ### MacBook
@@ -35,7 +35,7 @@ Regarding OS support, see below:
| MacBook3,1 | Late 2007 | ^^ | ^^ | | MacBook3,1 | Late 2007 | ^^ | ^^ |
| MacBook4,1 | Early 2008 | <span style="color:#30BCD5"> YES </span> | - No GPU Acceleration in Mavericks and newer<br/>- No Keyboard and Trackpad<br/>- No USB | | MacBook4,1 | Early 2008 | <span style="color:#30BCD5"> YES </span> | - No GPU Acceleration in Mavericks and newer<br/>- No Keyboard and Trackpad<br/>- No USB |
| MacBook5,1 | Late 2008 | ^^ | - GPU Acceleration in Public Beta, see current issues ([#108](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108))<br/> | | MacBook5,1 | Late 2008 | ^^ | - GPU Acceleration in Public Beta, see current issues ([#108](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108))<br/> |
| MacBook5,2 | Early 2009 | ^^ | - GPU Acceleration in Public Beta, see current issues ([#108](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108))<br/>- Trackpad is recognized as mouse<br/>- Brightness control partially supported | | MacBook5,2 | Early 2009 | ^^ | - GPU Acceleration in Public Beta, see current issues ([#108](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108))<br/>- Trackpad is recognized as mouse |
| MacBook6,1 | Late 2009 | ^^ | - GPU Acceleration in Public Beta, see current issues ([#108](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108))<br/> | | MacBook6,1 | Late 2009 | ^^ | - GPU Acceleration in Public Beta, see current issues ([#108](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108))<br/> |
| MacBook7,1 | Mid-2010 | ^^ | ^^ | | MacBook7,1 | Mid-2010 | ^^ | ^^ |
| MacBook8,1 | Mid-2015 | ^^ | <span style="color:green"> Everything is supported</span> | | MacBook8,1 | Mid-2015 | ^^ | <span style="color:green"> Everything is supported</span> |
@@ -107,8 +107,8 @@ Regarding OS support, see below:
| iMac5,1 | Late 2006 | ^^ | 32-Bit Firmware limitation | | iMac5,1 | Late 2006 | ^^ | 32-Bit Firmware limitation |
| iMac5,2 | ^^ | ^^ | ^^ | | iMac5,2 | ^^ | ^^ | ^^ |
| iMac6,1 | ^^ | ^^ | ^^ | | iMac6,1 | ^^ | ^^ | ^^ |
| iMac7,1 | Mid-2007 | <span style="color:#30BCD5"> YES </span> | - Requires an [SSE4.1 CPU Upgrade](https://lowendmac.com/2018/penryn-t9300-9500-cpu-upgrades-for-the-2007-imac/)<br/>- GPU Acceleration in Public Beta, see current issues ([#108](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108))<br/>- Brightness control partially supported on Nvidia GPUs, AMD unsupported<br/>- Stock Bluetooth 2.0 card non-functional | | iMac7,1 | Mid-2007 | <span style="color:#30BCD5"> YES </span> | - Requires an [SSE4.1 CPU Upgrade](https://lowendmac.com/2018/penryn-t9300-9500-cpu-upgrades-for-the-2007-imac/)<br/>- GPU Acceleration in Public Beta, see current issues ([#108](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108))<br/>- Stock Bluetooth 2.0 card non-functional |
| iMac8,1 | Early 2008 | ^^ | - GPU Acceleration in Public Beta, see current issues ([#108](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108)))<br/>- Brightness control partially supported on Nvidia GPUs, AMD unsupported | | iMac8,1 | Early 2008 | ^^ | - GPU Acceleration in Public Beta, see current issues ([#108](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108))) |
| iMac9,1 | Early 2009 | ^^ | ^^ | | iMac9,1 | Early 2009 | ^^ | ^^ |
| iMac10,1 | Late 2009 | ^^ | - GPU is socketed, [recommend upgrading to Metal GPU](https://forums.macrumors.com/threads/2011-imac-graphics-card-upgrade.1596614/?post=17425857#post-17425857) <br/>- GPU Acceleration in Public Beta, see current issues ([#108](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108)) | | iMac10,1 | Late 2009 | ^^ | - GPU is socketed, [recommend upgrading to Metal GPU](https://forums.macrumors.com/threads/2011-imac-graphics-card-upgrade.1596614/?post=17425857#post-17425857) <br/>- GPU Acceleration in Public Beta, see current issues ([#108](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108)) |
| iMac11,1 | ^^ | ^^ | ^^ | | iMac11,1 | ^^ | ^^ | ^^ |

View File

@@ -17,9 +17,9 @@ With Monterey, Apple continues their their somewhat ruthless march of dropping I
All of these models now have support in OpenCore Legacy Patcher. Note iMac15,1 does have [an unfortunate firmware bug preventing resolutions above 4k](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/359) with OpenCore Legacy Patcher All of these models now have support in OpenCore Legacy Patcher. Note iMac15,1 does have [an unfortunate firmware bug preventing resolutions above 4k](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/359) with OpenCore Legacy Patcher
## Current Hardware Drawbacks: ## Previously Broken Hardware
### macOS 12.0 Beta 4 issue on 2012 to early 2013 machines ::: details macOS 12.0 Beta 4 issue on 2012 to early 2013 machines (Resolved in 0.2.5 and newer)
Currently in macOS 12.0 Beta 4, many Ivy Bridge Macs have experienced Bluetooth issues relating to their BCM20702 chipset. Currently the exact issue is unknown however is assumed to be a bug on Apple's end. Recommend downgrading to macOS 12.0 Beta 3 till resolved: Currently in macOS 12.0 Beta 4, many Ivy Bridge Macs have experienced Bluetooth issues relating to their BCM20702 chipset. Currently the exact issue is unknown however is assumed to be a bug on Apple's end. Recommend downgrading to macOS 12.0 Beta 3 till resolved:
@@ -32,7 +32,7 @@ A temporary fix is to restart the BlueTool and bluetoothd process with each boot
sudo killall -9 BlueTool bluetoothd sudo killall -9 BlueTool bluetoothd
``` ```
## Previously Broken Hardware :::
::: details Wireless Support Dropped (Resolved in 0.2.5 and newer) ::: details Wireless Support Dropped (Resolved in 0.2.5 and newer)
@@ -102,6 +102,19 @@ By default these machines require root volume patches to gain graphics accelerat
::: :::
::: details NVIDIA Kepler dGPU Acceleration (Resolved in 0.2.5 and newer)
* NVIDIA Kepler dGPUs lost support
By default these machines require root volume patches to gain graphics acceleration in Monterey. OpenCore Legacy Patcher supports readding support however SIP can no longer be enabled due to root patching:
* MacBookPro9,1
* MacBookPro10,1
* iMac13,x
* iMac14,x
:::
::: details Non-Metal Acceleration (Resolved in 0.2.5 and newer) ::: details Non-Metal Acceleration (Resolved in 0.2.5 and newer)
* Non-Metal GPUs no longer have working acceleration patches: * Non-Metal GPUs no longer have working acceleration patches:

View File

@@ -19,7 +19,7 @@ Below is a run down of the main logic OpenCore Legacy Patcher uses to gain nativ
* EHCx and XHC1 Patches * EHCx and XHC1 Patches
* Reason: Required for proper USB operation * Reason: Required for proper USB operation
* Logic: Avoids USB maps of newer models attaching and breaking USB port functionality * Logic: Avoids USB maps of newer models attaching and breaking USB port functionality
* Models: All models require * Models: All models require when spoofing with Moderate or Advanced SMBIOS
### Booter -> Quirks ### Booter -> Quirks
@@ -53,11 +53,11 @@ Below is a run down of the main logic OpenCore Legacy Patcher uses to gain nativ
* SMC Patch * SMC Patch
* Reason: Required to avoid SMC Firmware updates * Reason: Required to avoid SMC Firmware updates
* Logic: Patches out `smc-version` in AppleSMC.kext, requires SMC-Spoof.kext for full functionality * Logic: Patches out `smc-version` in AppleSMC.kext, requires SMC-Spoof.kext for full functionality
* Models: All models require * Models: All models require when spoofing SMBIOS
* IOHIDFamily Patch * IOHIDFamily Patch
* Reason: Required for HID peripheral support in macOS on older hardware * Reason: Required for HID peripheral support in macOS on older hardware
* Logic: Tricks IOHIDFamily into thinking it's always booting recovery * Logic: Tricks IOHIDFamily into thinking it's always booting recovery
* Models: [2010 and older](https://github.com/dortania/OpenCore-Legacy-Patcher/blob/79ab028b0a039e97a528e0b99c876d95d9c2d41d/Resources/ModelArray.py#L310-L332) * Models: Penryn CPUs (Core2 series)
### Kernel -> Quirks ### Kernel -> Quirks
@@ -196,15 +196,13 @@ Below is an explanation of what Kexts OpenCore Legacy Patcher will inject into m
Unfortunately certain on-disk patches are required to achieve full functionality. Below is a breakdown of patches supported Unfortunately certain on-disk patches are required to achieve full functionality. Below is a breakdown of patches supported
Note, GPU Acceleration Patches are not public yet, the below section is simply documentation for easier research with new aids.
::: details Audio Patches ::: details Audio Patches
### Extensions ### Extensions
* AppleHDA * AppleHDA
* Reason: Re-add High Sierra's AppleHDA to achieve audio support * Reason: Re-add El Capitan's AppleHDA to achieve audio support
* Models: 2011 and older Macs (excluding MacPro4,1+) * Models: iMac7,1 and iMac8,1
::: :::

View File

@@ -38,14 +38,46 @@ Note 2: NVRAM may need to be reset to ensure SIP is correctly re-enabled
## Applying Post Install Volume Patches ## Applying Post Install Volume Patches
**Note**: For users who need Post-Install Volume patches for legacy video acceleration support, you **must** disable the following settings in "Patcher Settings" when building and installing your new OpenCore: For users with unsupported GPUs/wifi cards, you'll need to run the Post Install Root Volume patches to regain functionality. See below on whether your hardware needs root volume patching.
* SIP: Disabled * Hint: Try running the root volume patch option, the Patcher will determine and install patches only when required. So there is no harm in applying them
* SecureBootModel: Disabled
Once set, rebuild OpenCore, install to drive and reboot. Then, Post-Install Volume patches will run just fine ::: details Unsupported GPUs in macOS Big Sur
To apply the Post-Install Volume patches [to test out the Beta Graphics Acceleration Patches system](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108), select option #3 as shown below: * Nvidia:
* Tesla (8000 - 300 series)
* AMD:
* TeraScale (2000 - 6000 series)
* Intel:
* Iron Lake
* Sandy Bridge (2000 - 3000 series)
:::
::: details Unsupported GPUs in macOS Monterey
* Nvidia:
* Tesla (8000 - 300 series)
* Kepler (600 - 800 series)
* AMD:
* TeraScale (2000 - 6000 series)
* Intel:
* Iron Lake
* Sandy Bridge (2000 - 3000 series)
* Ivy Bridge (4000 series)
:::
::: details Unsupported Wireless Cards in macOS Monterey
* Broadcom:
* BCM94328
* BCM94322
* Atheros
:::
To apply the Post-Install Volume patches, select option #3 as shown below:
![](../images/root-patch.png) ![](../images/root-patch.png)

View File

@@ -58,7 +58,7 @@ To aid users in troubleshooting, we've compiled a list of users who've reported
| ^^ | ^^ | vinaypundith | - Patcher version 0.0.7 | | ^^ | ^^ | vinaypundith | - Patcher version 0.0.7 |
| MacBookPro10,1 | ^^ | traviswparker | - Stock model <br/>- Patcher version 0.0.14 | | MacBookPro10,1 | ^^ | traviswparker | - Stock model <br/>- Patcher version 0.0.14 |
| ^^ | ^^ | il-rollino | - Upgraded BCM94360CSAX <br/>- Patcher version 0.0.21 | | ^^ | ^^ | il-rollino | - Upgraded BCM94360CSAX <br/>- Patcher version 0.0.21 |
| MacBookPro10,2 | No reports | N/A | N/A | | MacBookPro10,2 | ^^ | akidone | - Upgraded BCM94360CSAX <br/>- Patcher version 0.3.0 |
### Mac mini ### Mac mini
@@ -78,8 +78,8 @@ To aid users in troubleshooting, we've compiled a list of users who've reported
| SMBIOS | Tested | Tester | Comment | | SMBIOS | Tested | Tester | Comment |
| :--- | :--- | :--- | :--- | | :--- | :--- | :--- | :--- |
| iMac7,1 | No reports | N/A | N/A | | iMac7,1 | <span style="color:#30BCD5"> YES </span> | lulujyc | iMac 20-inch 2007. Patcher version 0.3.1. The USB 1.1 controller is rather unstable on Big Sur+, using USB hubs (forcing USB 2.0) can fix unrecognized keyboard/ mouse. Otherwise runs great, including brightness control. Upgraded BCM94352HMB, manually added 3rd-party drivers. Tested: Big Sur, Monterey. |
| iMac8,1 | <span style="color:#30BCD5"> YES </span> | EduCovas | - Stock Model<br/>- Patcher version 0.0.21 | | iMac8,1 | ^^ | EduCovas | - Stock Model<br/>- Patcher version 0.0.21 |
| iMac9,1 | ^^ | Allanrfox | ^^ | | iMac9,1 | ^^ | Allanrfox | ^^ |
| ^^ | ^^ | Jakeluke | ^^ | | ^^ | ^^ | Jakeluke | ^^ |
| iMac10,1 | ^^ | Ausdauersportler | - Upgraded with WX4150 | | iMac10,1 | ^^ | Ausdauersportler | - Upgraded with WX4150 |

View File

@@ -10,6 +10,8 @@ Here are some common errors users may experience while using this patcher:
* [How to Boot Big Sur Recovery](#how-to-boot-big-sur-recovery) * [How to Boot Big Sur Recovery](#how-to-boot-big-sur-recovery)
* [Stuck on "Your Mac needs a firmware update"](#stuck-on-your-mac-needs-a-firmware-update) * [Stuck on "Your Mac needs a firmware update"](#stuck-on-your-mac-needs-a-firmware-update)
* [No Brightness Control](#no-brightness-control) * [No Brightness Control](#no-brightness-control)
* [Cannot connect Wi-Fi on Monterey with legacy cards](#cannot-connect-Wi-Fi-on-Monterey-with-legacy-cards)
* [No Graphics Acceleration on Intel Ivy Bridge and Nvidia Kepler GPUs](#no-graphics-acceleration-on-intel-ivy-bridge-and-nvidia-kepler-gpus)
## Stuck on `This version of Mac OS X is not supported on this platform` ## Stuck on `This version of Mac OS X is not supported on this platform`
@@ -68,3 +70,15 @@ With OCLP v0.0.22, we've added support for brightness control on many models. Ho
To work-around, we recommend user try out the below app: To work-around, we recommend user try out the below app:
* [Brightness Slider](https://actproductions.net/free-apps/brightness-slider/) * [Brightness Slider](https://actproductions.net/free-apps/brightness-slider/)
## Cannot connect Wi-Fi on Monterey with legacy cards
With OCLP v0.2.5, we've added support for legacy Wi-Fi on Monterey. However some users may have noticed that they can't connect to wireless networks.
To work-around, we recommend users to manually connect using the "other" option on the Wi-Fi menu bar or manually adding the network on the "Network" preference pane.
## No Graphics Acceleration on Intel Ivy Bridge and Nvidia Kepler GPUs
With macOS Monterey, Apple removed Graphics Drivers for both Intel Ivy Bride and Nvidia Kepler. To re-enable acceleration, simply run the Post Install Root Volume patches.
Once rebooted, acceleration will be re-enabled as well as brightness control for laptops.

BIN
images/build-dist.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 240 KiB

View File

@@ -2,9 +2,9 @@
# Copyright (C) 2021 Mykola Grymalyuk # Copyright (C) 2021 Mykola Grymalyuk
import plistlib import plistlib
from pathlib import Path from pathlib import Path
from Resources import Constants from resources import constants
app_path = Path.cwd() / Path ("OpenCore Patcher.app/Contents/Info.plist") app_path = Path.cwd() / Path ("OpenCore Patcher.app/Contents/Info.plist")
info = plistlib.load(Path(app_path).open("rb")) info = plistlib.load(Path(app_path).open("rb"))
info["CFBundleShortVersionString"] = Constants.Constants().patcher_version info["CFBundleShortVersionString"] = constants.Constants().patcher_version
plistlib.dump(info, Path(app_path).open("wb"), sort_keys=True) plistlib.dump(info, Path(app_path).open("wb"), sort_keys=True)

BIN
payloads/ACPI/SSDT-DGPU.aml Normal file

Binary file not shown.

View File

@@ -0,0 +1,103 @@
/* Requests power off of dGPU in MacBookPro8,2/3 (TS2 hardware failure)
* Main goal is to ensure power draw from the dGPU is reduced as
* much as possible to simulate a hardware demux without actual
* hardware modifications.
*
* Notes:
* - SSDT must be used in conjuction with '_INI' to 'XINI' patch
* to reroute PCI0 initialization.
*
* - AMD drivers in macOS may still attempt to attach and kernel
* panic. Disable the dGPU with class-code/device-id spoof or
* with '-wegnoegpu'.
*
* - dGPU will reactivate with sleep-wake, additional process
* is needed to disable the dGPU.
* - ie. AMDGPUWakeHandler.kext for macOS
*
* Ref:
* - https://www.tonymacx86.com/threads/help-macbook-pro-disable-radeon-gpu-via-dsdt.164458/
* - https://github.com/blackgate/AMDGPUWakeHandler
* - https://help.ubuntu.com/community/MacBookPro8-2/Raring
*/
DefinitionBlock ("", "SSDT", 2, "DRTNIA", "dGPU_OFF", 0x00001000)
{
External (_SB_.PCI0, DeviceObj)
External (OSYS)
Scope (_SB.PCI0)
{
OperationRegion (IOGP, SystemIO, 0x0700, 0x51)
Field (IOGP, ByteAcc, NoLock, Preserve)
{
Offset (0x10),
P710, 8,
Offset (0x28),
P728, 8,
Offset (0x40),
P740, 8,
Offset (0x50),
P750, 8
}
Method (_INI, 0, NotSerialized) // _INI: Initialize
{
Store (0x07D0, OSYS)
If (CondRefOf (\_OSI, Local0))
{
If (_OSI ("Darwin"))
{
Store (0x2710, OSYS)
}
If (\_OSI ("Linux"))
{
Store (0x03E8, OSYS)
}
If (\_OSI ("Windows 2001"))
{
Store (0x07D1, OSYS)
}
If (\_OSI ("Windows 2001 SP1"))
{
Store (0x07D1, OSYS)
}
If (\_OSI ("Windows 2001 SP2"))
{
Store (0x07D2, OSYS)
}
If (\_OSI ("Windows 2006"))
{
Store (0x07D6, OSYS)
}
If (\_OSI ("Windows 2007"))
{
Store (0x07D7, OSYS)
}
If (\_OSI ("Windows 2008"))
{
Store (0x07D8, OSYS)
}
If (\_OSI ("Windows 2009"))
{
Store (0x07D9, OSYS)
}
}
// Disables dGPU
Store ("Requesting dGPU power off", Debug)
P728 = One // Switch select
P710 = 0x02 // Switch display
P740 = 0x02 // Switch DDC
P750 = Zero // Power down discrete graphics
}
}
}

View File

@@ -31,6 +31,14 @@
<key>Path</key> <key>Path</key>
<string>SSDT-PCI.aml</string> <string>SSDT-PCI.aml</string>
</dict> </dict>
<dict>
<key>Enabled</key>
<false/>
<key>Comment</key>
<string>Requests power off of dGPU for Sandy Bridge MacBook Pros</string>
<key>Path</key>
<string>SSDT-DGPU.aml</string>
</dict>
</array> </array>
<key>Delete</key> <key>Delete</key>
<array/> <array/>
@@ -156,6 +164,36 @@
<key>TableSignature</key> <key>TableSignature</key>
<data>RFNEVA==</data> <data>RFNEVA==</data>
</dict> </dict>
<dict>
<key>Base</key>
<string>\_SB.PCI0</string>
<key>BaseSkip</key>
<integer>0</integer>
<key>Comment</key>
<string>_INI to XINI</string>
<key>Count</key>
<integer>1</integer>
<key>Enabled</key>
<false/>
<key>Find</key>
<data>X0lOSQ==</data>
<key>Limit</key>
<integer>0</integer>
<key>Mask</key>
<data></data>
<key>OemTableId</key>
<data></data>
<key>Replace</key>
<data>WElOSQ==</data>
<key>ReplaceMask</key>
<data></data>
<key>Skip</key>
<integer>0</integer>
<key>TableLength</key>
<integer>0</integer>
<key>TableSignature</key>
<data>RFNEVA==</data>
</dict>
</array> </array>
<key>Quirks</key> <key>Quirks</key>
<dict> <dict>
@@ -178,7 +216,56 @@
<key>MmioWhitelist</key> <key>MmioWhitelist</key>
<array/> <array/>
<key>Patch</key> <key>Patch</key>
<array/> <array>
<dict>
<key>Arch</key>
<string>x86_64</string>
<key>Comment</key>
<string>Skip Board ID check</string>
<key>Count</key>
<integer>0</integer>
<key>Enabled</key>
<false/>
<key>Find</key>
<data>AFAAbABhAHQAZgBvAHIAbQBTAHUAcABwAG8AcgB0AC4AcABsAGkAcwB0</data>
<key>Identifier</key>
<string>Apple</string>
<key>Limit</key>
<integer>0</integer>
<key>Mask</key>
<data></data>
<key>Replace</key>
<data>AC4ALgAuAC4ALgAuAC4ALgAuAC4ALgAuAC4ALgAuAC4ALgAuAC4ALgAu</data>
<key>ReplaceMask</key>
<data></data>
<key>Skip</key>
<integer>0</integer>
</dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
<key>Comment</key>
<string>Reroute HW_BID to OC_BID</string>
<key>Count</key>
<integer>0</integer>
<key>Enabled</key>
<false/>
<key>Find</key>
<data>SABXAF8AQgBJAEQA</data>
<key>Identifier</key>
<string>Apple</string>
<key>Limit</key>
<integer>0</integer>
<key>Mask</key>
<data></data>
<key>Replace</key>
<data>TwBDAF8AQgBJAEQA</data>
<key>ReplaceMask</key>
<data></data>
<key>Skip</key>
<integer>0</integer>
</dict>
</array>
<key>Quirks</key> <key>Quirks</key>
<dict> <dict>
<key>AllowRelocationBlock</key> <key>AllowRelocationBlock</key>
@@ -213,6 +300,8 @@
<integer>0</integer> <integer>0</integer>
<key>RebuildAppleMemoryMap</key> <key>RebuildAppleMemoryMap</key>
<false/> <false/>
<key>ResizeAppleGpuBars</key>
<integer>-1</integer>
<key>SetupVirtualMap</key> <key>SetupVirtualMap</key>
<false/> <false/>
<key>SignalAppleOS</key> <key>SignalAppleOS</key>
@@ -546,7 +635,7 @@
<key>Enabled</key> <key>Enabled</key>
<false/> <false/>
<key>MaxKernel</key> <key>MaxKernel</key>
<string></string> <string>20.99.99</string>
<key>MinKernel</key> <key>MinKernel</key>
<string>19.0.0</string> <string>19.0.0</string>
<key>BundlePath</key> <key>BundlePath</key>
@@ -610,6 +699,24 @@
<key>PlistPath</key> <key>PlistPath</key>
<string>Contents/Info.plist</string> <string>Contents/Info.plist</string>
</dict> </dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
<key>Comment</key>
<string>Disable EFI Checks</string>
<key>Enabled</key>
<false/>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string></string>
<key>BundlePath</key>
<string>EFICheckDisabler.kext</string>
<key>ExecutablePath</key>
<string></string>
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict> <dict>
<key>Arch</key> <key>Arch</key>
<string>x86_64</string> <string>x86_64</string>
@@ -958,7 +1065,7 @@
<key>BundlePath</key> <key>BundlePath</key>
<string>CSLVFixup.kext</string> <string>CSLVFixup.kext</string>
<key>Comment</key> <key>Comment</key>
<string>Fix Music.app</string> <string>Fix Music</string>
<key>Enabled</key> <key>Enabled</key>
<false/> <false/>
<key>ExecutablePath</key> <key>ExecutablePath</key>
@@ -970,6 +1077,78 @@
<key>PlistPath</key> <key>PlistPath</key>
<string>Contents/Info.plist</string> <string>Contents/Info.plist</string>
</dict> </dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
<key>BundlePath</key>
<string>SimpleMSR.kext</string>
<key>Comment</key>
<string>Disable firmware based battery throttling</string>
<key>Enabled</key>
<false/>
<key>ExecutablePath</key>
<string>Contents/MacOS/SimpleMSR</string>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string></string>
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
<key>BundlePath</key>
<string>AMDGPUWakeHandler.kext</string>
<key>Comment</key>
<string>Force disable dGPU on wake</string>
<key>Enabled</key>
<false/>
<key>ExecutablePath</key>
<string>Contents/MacOS/AMDGPUWakeHandler</string>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string></string>
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
<key>BundlePath</key>
<string>LegacyUSBVideoSupport.kext</string>
<key>Comment</key>
<string>Legacy iSight support</string>
<key>Enabled</key>
<false/>
<key>ExecutablePath</key>
<string>Contents/MacOS/LegacyUSBVideoSupport</string>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string>18.0.0</string>
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
<key>BundlePath</key>
<string>AppleRAIDCard.kext</string>
<key>Comment</key>
<string>RAID Card Support</string>
<key>Enabled</key>
<false/>
<key>ExecutablePath</key>
<string>Contents/MacOS/AppleRAIDCard</string>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string>19.0.0</string>
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
</array> </array>
<key>Block</key> <key>Block</key>
<array/> <array/>
@@ -1110,6 +1289,156 @@
<key>Skip</key> <key>Skip</key>
<integer>0</integer> <integer>0</integer>
</dict> </dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
<key>Base</key>
<string>_early_random</string>
<key>Comment</key>
<string>SurPlus v1 - PART 1 of 2 - Patch read_erandom (inlined in _early_random)</string>
<key>Count</key>
<integer>1</integer>
<key>Enabled</key>
<false/>
<key>Find</key>
<data>AHQjSIs=</data>
<key>Identifier</key>
<string>kernel</string>
<key>Limit</key>
<integer>800</integer>
<key>Mask</key>
<data></data>
<key>MaxKernel</key>
<string>21.99.99</string>
<key>MinKernel</key>
<string>20.4.0</string>
<key>Replace</key>
<data>AOsjSIs=</data>
<key>ReplaceMask</key>
<data></data>
<key>Skip</key>
<integer>0</integer>
</dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
<key>Base</key>
<string>_register_and_init_prng</string>
<key>Comment</key>
<string>SurPlus v1 - PART 2 of 2 - Patch register_and_init_prng</string>
<key>Count</key>
<integer>1</integer>
<key>Enabled</key>
<false/>
<key>Find</key>
<data>ukgBAAAx9g==</data>
<key>Identifier</key>
<string>kernel</string>
<key>Limit</key>
<integer>256</integer>
<key>Mask</key>
<data></data>
<key>MaxKernel</key>
<string>21.99.99</string>
<key>MinKernel</key>
<string>20.4.0</string>
<key>Replace</key>
<data>ukgBAADrBQ==</data>
<key>ReplaceMask</key>
<data></data>
<key>Skip</key>
<integer>0</integer>
</dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
<key>Base</key>
<string></string>
<key>Comment</key>
<string>Reroute kern.hv_vmm_present patch (1)</string>
<key>Count</key>
<integer>1</integer>
<key>Enabled</key>
<false/>
<key>Find</key>
<data>AGRpcmVjdF9oYW5kb2ZmAEVuYWJsZSBkaXJlY3QgaGFuZG9mZiBmb3IgcmVhbHRpbWUgdGhyZWFkcwA=</data>
<key>Identifier</key>
<string>kernel</string>
<key>Limit</key>
<integer>0</integer>
<key>Mask</key>
<data></data>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string>20.4.0</string>
<key>Replace</key>
<data>AGh2X3ZtbV9wcmVzZW50AEVuYWJsZSBkaXJlY3QgaGFuZG9mZiBmb3IgcmVhbHRpbWUgdGhyZWFkcwA=</data>
<key>ReplaceMask</key>
<data></data>
<key>Skip</key>
<integer>0</integer>
</dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
<key>Base</key>
<string></string>
<key>Comment</key>
<string>Reroute kern.hv_vmm_present patch (2)</string>
<key>Count</key>
<integer>1</integer>
<key>Enabled</key>
<false/>
<key>Find</key>
<data>AGh2X2Rpc2FibGUAaHZfdm1tX3ByZXNlbnQA</data>
<key>Identifier</key>
<string>kernel</string>
<key>Limit</key>
<integer>0</integer>
<key>Mask</key>
<data></data>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string>20.4.0</string>
<key>Replace</key>
<data>AGh2X2Rpc2FibGUAZGlyZWN0X2hhbmRvZmYA</data>
<key>ReplaceMask</key>
<data></data>
<key>Skip</key>
<integer>0</integer>
</dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
<key>Base</key>
<string>_IOGetVMMPresent</string>
<key>Comment</key>
<string>Force IOGetVMMPresent</string>
<key>Count</key>
<integer>0</integer>
<key>Enabled</key>
<false/>
<key>Find</key>
<data></data>
<key>Identifier</key>
<string>kernel</string>
<key>Limit</key>
<integer>0</integer>
<key>Mask</key>
<data></data>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string>20.4.0</string>
<key>Replace</key>
<data>uAEAAADD</data>
<key>ReplaceMask</key>
<data></data>
<key>Skip</key>
<integer>0</integer>
</dict>
</array> </array>
<key>Quirks</key> <key>Quirks</key>
<dict> <dict>
@@ -1126,7 +1455,7 @@
<key>DisableIoMapper</key> <key>DisableIoMapper</key>
<false/> <false/>
<key>DisableLinkeditJettison</key> <key>DisableLinkeditJettison</key>
<true/> <false/>
<key>DisableRtcChecksum</key> <key>DisableRtcChecksum</key>
<false/> <false/>
<key>ExtendBTFeatureFlags</key> <key>ExtendBTFeatureFlags</key>
@@ -1249,7 +1578,7 @@
<key>ScanPolicy</key> <key>ScanPolicy</key>
<integer>0</integer> <integer>0</integer>
<key>SecureBootModel</key> <key>SecureBootModel</key>
<string>j137</string> <string>Default</string>
<key>Vault</key> <key>Vault</key>
<string>Optional</string> <string>Optional</string>
</dict> </dict>
@@ -1339,6 +1668,7 @@
<key>7C436110-AB2A-4BBB-A880-FE41995C9F82</key> <key>7C436110-AB2A-4BBB-A880-FE41995C9F82</key>
<array> <array>
<string>boot-args</string> <string>boot-args</string>
<string>csr-active-config</string>
</array> </array>
<key>FA4CE28D-B62F-4C99-9CC3-6815686E30F9</key> <key>FA4CE28D-B62F-4C99-9CC3-6815686E30F9</key>
<array/> <array/>
@@ -1557,6 +1887,8 @@
<key>Drivers</key> <key>Drivers</key>
<array> <array>
<dict> <dict>
<key>Comment</key>
<string></string>
<key>Path</key> <key>Path</key>
<string>OpenRuntime.efi</string> <string>OpenRuntime.efi</string>
<key>Enabled</key> <key>Enabled</key>
@@ -1565,6 +1897,8 @@
<string></string> <string></string>
</dict> </dict>
<dict> <dict>
<key>Comment</key>
<string></string>
<key>Path</key> <key>Path</key>
<string>OpenCanopy.efi</string> <string>OpenCanopy.efi</string>
<key>Enabled</key> <key>Enabled</key>
@@ -1573,6 +1907,8 @@
<string></string> <string></string>
</dict> </dict>
<dict> <dict>
<key>Comment</key>
<string></string>
<key>Path</key> <key>Path</key>
<string>NvmExpressDxe.efi</string> <string>NvmExpressDxe.efi</string>
<key>Enabled</key> <key>Enabled</key>
@@ -1581,6 +1917,8 @@
<string></string> <string></string>
</dict> </dict>
<dict> <dict>
<key>Comment</key>
<string></string>
<key>Path</key> <key>Path</key>
<string>ExFatDxeLegacy.efi</string> <string>ExFatDxeLegacy.efi</string>
<key>Enabled</key> <key>Enabled</key>
@@ -1589,6 +1927,8 @@
<string></string> <string></string>
</dict> </dict>
<dict> <dict>
<key>Comment</key>
<string></string>
<key>Path</key> <key>Path</key>
<string>XhciDxe.efi</string> <string>XhciDxe.efi</string>
<key>Enabled</key> <key>Enabled</key>
@@ -1597,6 +1937,8 @@
<string></string> <string></string>
</dict> </dict>
<dict> <dict>
<key>Comment</key>
<string></string>
<key>Path</key> <key>Path</key>
<string>OpenLinuxBoot.efi</string> <string>OpenLinuxBoot.efi</string>
<key>Enabled</key> <key>Enabled</key>
@@ -1640,6 +1982,8 @@
<false/> <false/>
<key>ProvideConsoleGop</key> <key>ProvideConsoleGop</key>
<true/> <true/>
<key>ReconnectGraphicsOnConnect</key>
<false/>
<key>ReconnectOnResChange</key> <key>ReconnectOnResChange</key>
<false/> <false/>
<key>ReplaceTabWithSpace</key> <key>ReplaceTabWithSpace</key>
@@ -1648,6 +1992,8 @@
<string>Max</string> <string>Max</string>
<key>SanitiseClearScreen</key> <key>SanitiseClearScreen</key>
<false/> <false/>
<key>UIScale</key>
<integer>-1</integer>
<key>TextRenderer</key> <key>TextRenderer</key>
<string>BuiltinGraphics</string> <string>BuiltinGraphics</string>
<key>UgaPassThrough</key> <key>UgaPassThrough</key>
@@ -1698,6 +2044,8 @@
<false/> <false/>
<key>EnableVectorAcceleration</key> <key>EnableVectorAcceleration</key>
<true/> <true/>
<key>EnableVmx</key>
<false/>
<key>DisableSecurityPolicy</key> <key>DisableSecurityPolicy</key>
<false/> <false/>
<key>ExitBootServicesDelay</key> <key>ExitBootServicesDelay</key>
@@ -1714,6 +2062,8 @@
<false/> <false/>
<key>RequestBootVarRouting</key> <key>RequestBootVarRouting</key>
<true/> <true/>
<key>ResizeGpuBars</key>
<integer>-1</integer>
<key>TscSyncTimeout</key> <key>TscSyncTimeout</key>
<integer>0</integer> <integer>0</integer>
<key>UnblockFsConnect</key> <key>UnblockFsConnect</key>

BIN
payloads/Drivers/diags.efi Normal file

Binary file not shown.

Binary file not shown.

View File

@@ -1,15 +0,0 @@
diff --git a/BrcmPatchRAM/BlueToolFixup.cpp b/BrcmPatchRAM/BlueToolFixup.cpp
index 0fa891a..b64b780 100644
--- a/BrcmPatchRAM/BlueToolFixup.cpp
+++ b/BrcmPatchRAM/BlueToolFixup.cpp
@@ -37,8 +37,10 @@ bool BlueToolFixup::start(IOService *provider) {
}
setProperty("VersionInfo", kextVersion);
setName("bluetooth");
+ /*
uint8_t bytes[] {0x00, 0x00, 0x00, 0x00};
setProperty("transport-encoding", bytes, sizeof(bytes));
+ */
registerService();
return true;

Binary file not shown.

View File

@@ -0,0 +1 @@
Based off RestrictEvents.kext, stripped binary to block Apple's EFICheck driver

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -1,21 +1,12 @@
From 772e02b375b5b2186342965f3089d9d1bca053bf Mon Sep 17 00:00:00 2001
From: Dhinak G <17605561+dhinakg@users.noreply.github.com>
Date: Tue, 23 Mar 2021 17:21:48 -0400
Subject: [PATCH] Disable displaypolicyd
---
RestrictEvents/RestrictEvents.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/RestrictEvents/RestrictEvents.cpp b/RestrictEvents/RestrictEvents.cpp diff --git a/RestrictEvents/RestrictEvents.cpp b/RestrictEvents/RestrictEvents.cpp
index 69b6af8..029417c 100644 index 27562f0..66365a3 100644
--- a/RestrictEvents/RestrictEvents.cpp --- a/RestrictEvents/RestrictEvents.cpp
+++ b/RestrictEvents/RestrictEvents.cpp +++ b/RestrictEvents/RestrictEvents.cpp
@@ -35,6 +35,7 @@ struct RestrictEventsPolicy { @@ -61,6 +61,7 @@ struct RestrictEventsPolicy {
static const char *procBlacklist[] {
"/System/Library/CoreServices/ExpansionSlotNotification", "/System/Library/CoreServices/ExpansionSlotNotification",
"/System/Library/CoreServices/MemorySlotNotification", "/System/Library/CoreServices/MemorySlotNotification",
"/usr/libexec/firmwarecheckers/eficheck/eficheck", + "/usr/libexec/displaypolicyd",
+ "/usr/libexec/displaypolicyd"
}; };
char pathbuf[MAXPATHLEN]; char pathbuf[MAXPATHLEN];

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -21,6 +21,7 @@ build_types = [
bad_drivers = [ bad_drivers = [
"AudioDxe.efi", "AudioDxe.efi",
"BiosVideo.efi",
"CrScreenshotDxe.efi", "CrScreenshotDxe.efi",
"HiiDatabase.efi", "HiiDatabase.efi",
"NvmExpressDxe.efi", "NvmExpressDxe.efi",

Binary file not shown.

BIN
payloads/Tools/ocvalidate-0.7.6 Executable file

Binary file not shown.

107
resources/arguments.py Normal file
View File

@@ -0,0 +1,107 @@
import sys
from resources import defaults, build, utilities, validation, sys_patch
from data import model_array
# Generic building args
class arguments:
def __init__(self):
self.args = utilities.check_cli_args()
def parse_arguments(self, settings):
if self.args.model:
if self.args.model:
print(f"- Using custom model: {self.args.model}")
settings.custom_model = self.args.model
defaults.generate_defaults.probe(settings.custom_model, False, settings)
elif settings.computer.real_model not in model_array.SupportedSMBIOS and settings.allow_oc_everywhere is False:
print(
"""Your model is not supported by this patcher for running unsupported OSes!"
If you plan to create the USB for another machine, please select the "Change Model" option in the menu."""
)
sys.exit(1)
else:
print(f"- Using detected model: {settings.computer.real_model}")
defaults.generate_defaults.probe(settings.custom_model, True, settings)
if self.args.disk:
print(f"- Install Disk set: {self.args.disk}")
settings.disk = self.args.disk
if self.args.validate:
validation.validate(settings)
if self.args.verbose:
print("- Set verbose configuration")
settings.verbose_debug = True
else:
settings.verbose_debug = False # Override Defaults detected
if self.args.debug_oc:
print("- Set OpenCore DEBUG configuration")
settings.opencore_debug = True
settings.opencore_build = "DEBUG"
if self.args.debug_kext:
print("- Set kext DEBUG configuration")
settings.kext_debug = True
if self.args.hide_picker:
print("- Set HidePicker configuration")
settings.showpicker = False
if self.args.disable_sip:
print("- Set Disable SIP configuration")
settings.sip_status = False
else:
settings.sip_status = True # Override Defaults detected
if self.args.disable_smb:
print("- Set Disable SecureBootModel configuration")
settings.secure_status = False
else:
settings.secure_status = True # Override Defaults detected
if self.args.vault:
print("- Set Vault configuration")
settings.vault = True
if self.args.firewire:
print("- Set FireWire Boot configuration")
settings.firewire_boot = True
if self.args.nvme:
print("- Set NVMe Boot configuration")
settings.nvme_boot = True
# if self.args.disable_amfi:
# print("- Set Disable AMFI configuration")
# settings.amfi_status = False
if self.args.wlan:
print("- Set Wake on WLAN configuration")
settings.enable_wake_on_wlan = True
if self.args.disable_tb:
print("- Set Disable Thunderbolt configuration")
settings.disable_tb = True
if self.args.force_surplus:
print("- Forcing SurPlus override configuration")
settings.force_surplus = True
if self.args.moderate_smbios:
print("- Set Moderate SMBIOS Patching configuration")
settings.serial_settings = "Moderate"
if self.args.smbios_spoof:
if self.args.smbios_spoof == "Minimal":
settings.serial_settings = "Minimal"
elif self.args.smbios_spoof == "Moderate":
settings.serial_settings = "Moderate"
elif self.args.smbios_spoof == "Advanced":
settings.serial_settings = "Advanced"
else:
print(f"- Unknown SMBIOS arg passed: {self.args.smbios_spoof}")
if self.args.support_all:
print("- Building for natively supported model")
settings.allow_oc_everywhere = True
settings.serial_settings = "None"
# Avoid running the root patcher if we're just building
if self.args.build:
build.BuildOpenCore(settings.custom_model or settings.computer.real_model, settings).build_opencore()
elif self.args.patch_sys_vol:
if self.args.moj_cat_accel:
print("- Set Mojave/Catalina root patch configuration")
settings.moj_cat_accel = True
print("- Set System Volume patching")
sys_patch.PatchSysVolume(settings.custom_model or settings.computer.real_model, settings).start_patch()
elif self.args.unpatch_sys_vol:
print("- Set System Volume unpatching")
sys_patch.PatchSysVolume(settings.custom_model or settings.computer.real_model, settings).start_unpatch()

File diff suppressed because it is too large Load Diff

1248
resources/cli_menu.py Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -7,34 +7,37 @@ from __future__ import print_function
from pathlib import Path from pathlib import Path
from typing import Optional from typing import Optional
from Resources import device_probe from resources import device_probe
from data import os_data
class Constants: class Constants:
def __init__(self): def __init__(self):
# Patcher Versioning # Patcher Versioning
self.patcher_version = "0.2.5" # OpenCore-Legacy-Patcher self.patcher_version = "0.3.2" # OpenCore-Legacy-Patcher
self.patcher_support_pkg_version = "0.1.3" # PatcherSupportPkg self.patcher_support_pkg_version = "0.2.8" # PatcherSupportPkg
self.url_patcher_support_pkg = "https://github.com/dortania/PatcherSupportPkg/releases/download/"
self.nightly_url_patcher_support_pkg = "https://nightly.link/dortania/PatcherSupportPkg/workflows/build/master/"
# OpenCore Versioning # OpenCore Versioning
# https://github.com/acidanthera/OpenCorePkg # https://github.com/acidanthera/OpenCorePkg
self.opencore_commit = "ff4b099 - 09-06-2021" self.opencore_commit = "7266ec9 - 12-06-2021"
self.opencore_version = "0.7.3" self.opencore_version = "0.7.6"
# Kext Versioning # Kext Versioning
## Acidanthera ## Acidanthera
## https://github.com/acidanthera ## https://github.com/acidanthera
self.lilu_version = "1.5.6" # Lilu self.lilu_version = "1.5.8" # Lilu
self.whatevergreen_version = "1.5.3" # WhateverGreen self.whatevergreen_version = "1.5.5" # WhateverGreen
self.airportbcrmfixup_version = "2.1.3" # AirPortBrcmFixup self.airportbcrmfixup_version = "2.1.3" # AirPortBrcmFixup
self.nvmefix_version = "1.0.9" # NVMeFix self.nvmefix_version = "1.0.9" # NVMeFix
self.applealc_version = "1.6.3" # AppleALC self.applealc_version = "1.6.3" # AppleALC
self.restrictevents_version = "1.0.3" # RestrictEvents self.restrictevents_version = "1.0.5" # RestrictEvents
self.restrictevents_mbp_version = "1.0.3" # RestrictEvents blocking displaypolicyd (see RestrictEvents-MBP91.patch) self.restrictevents_mbp_version = "1.0.5" # RestrictEvents blocking displaypolicyd (see RestrictEvents-MBP91.patch)
self.featureunlock_version = "1.0.3" # FeatureUnlock self.featureunlock_version = "1.0.5" # FeatureUnlock
self.debugenhancer_version = "1.0.4" # DebugEnhancer self.debugenhancer_version = "1.0.4" # DebugEnhancer
self.cpufriend_version = "1.2.4" # CPUFriend self.cpufriend_version = "1.2.4" # CPUFriend
self.bluetool_version = "2.6.1" # BlueToolFixup self.bluetool_version = "2.6.1" # BlueToolFixup (BrcmPatchRAM)
self.cslvfixup_version = "2.6.1" # CSLVFixup self.cslvfixup_version = "2.6.1" # CSLVFixup
## Apple ## Apple
@@ -44,6 +47,8 @@ class Constants:
self.piixata_version = "1.0.1" # AppleIntelPIIXATA self.piixata_version = "1.0.1" # AppleIntelPIIXATA
self.fw_kext = "1.0.1" # IOFireWireFamily self.fw_kext = "1.0.1" # IOFireWireFamily
self.apple_trackpad = "1.0.1" # AppleUSBTrackpad self.apple_trackpad = "1.0.1" # AppleUSBTrackpad
self.apple_isight_version = "1.0.0" # AppleiSight
self.apple_raid_version = "1.0.0" # AppleRAIDCard
## Apple - Dortania Modified ## Apple - Dortania Modified
self.bcm570_version = "1.0.2" # CatalinaBCM5701Ethernet self.bcm570_version = "1.0.2" # CatalinaBCM5701Ethernet
@@ -54,7 +59,7 @@ class Constants:
## Dortania ## Dortania
## https://github.com/dortania ## https://github.com/dortania
self.backlight_injector_version = "1.0.0" # BacklightInjector self.backlight_injector_version = "1.1.0" # BacklightInjector
self.smcspoof_version = "1.0.0" # SMC-Spoof self.smcspoof_version = "1.0.0" # SMC-Spoof
self.mce_version = "1.0.0" # AppleMCEReporterDisabler self.mce_version = "1.0.0" # AppleMCEReporterDisabler
self.btspoof_version = "1.0.0" # Bluetooth-Spoof self.btspoof_version = "1.0.0" # Bluetooth-Spoof
@@ -70,6 +75,14 @@ class Constants:
## https://github.com/cdf/Innie ## https://github.com/cdf/Innie
self.innie_version = "1.3.0" # Innie self.innie_version = "1.3.0" # Innie
## arter97
## https://github.com/arter97/SimpleMSR/
self.simplemsr_version = "1.0.0" # SimpleMSR
## blackgate
## https://github.com/blackgate/AMDGPUWakeHandler
self.gpu_wake_version = "1.0.0"
# Get resource path # Get resource path
self.current_path = Path(__file__).parent.parent.resolve() self.current_path = Path(__file__).parent.parent.resolve()
self.payload_path = self.current_path / Path("payloads") self.payload_path = self.current_path / Path("payloads")
@@ -94,6 +107,7 @@ class Constants:
## Kext Settings ## Kext Settings
self.kext_debug = False # Enables Lilu debug and DebugEnhancer self.kext_debug = False # Enables Lilu debug and DebugEnhancer
self.kext_variant = "RELEASE"
## NVRAM Settings ## NVRAM Settings
self.verbose_debug = False # -v self.verbose_debug = False # -v
@@ -101,7 +115,7 @@ class Constants:
## SMBIOS Settings ## SMBIOS Settings
self.custom_cpu_model = 2 # Patch type value self.custom_cpu_model = 2 # Patch type value
self.custom_cpu_model_value = "" # New CPU name within About This Mac self.custom_cpu_model_value = "" # New CPU name within About This Mac
self.serial_settings = "Minimal" # Set SMBIOS level used self.serial_settings = "None" # Set SMBIOS level used
self.override_smbios = "Default" # Set SMBIOS model used self.override_smbios = "Default" # Set SMBIOS model used
## Latebloom Settings ## Latebloom Settings
@@ -132,6 +146,7 @@ class Constants:
## Graphics Settings ## Graphics Settings
self.metal_build = False # Set MXM Build support self.metal_build = False # Set MXM Build support
self.imac_vendor = "None" # Set MXM GPU vendor self.imac_vendor = "None" # Set MXM GPU vendor
self.imac_model = "" # Set MXM GPU model
self.drm_support = False # Set iMac14,x DRM support self.drm_support = False # Set iMac14,x DRM support
self.allow_ivy_igpu = False # Set iMac13,x iGPU support self.allow_ivy_igpu = False # Set iMac13,x iGPU support
self.moj_cat_accel = False # Set Mojave/Catalina Acceleration support self.moj_cat_accel = False # Set Mojave/Catalina Acceleration support
@@ -140,60 +155,23 @@ class Constants:
## Miscellaneous ## Miscellaneous
self.disallow_cpufriend = False # Disable CPUFriend self.disallow_cpufriend = False # Disable CPUFriend
self.enable_wake_on_wlan = False # Allow Wake on WLAN for modern Broadcom self.enable_wake_on_wlan = False # Allow Wake on WLAN for modern Broadcom
self.disable_thunderbolt = False # Disable Thunderbolt Controller self.disable_tb = False # Disable Thunderbolt Controller
self.set_alc_usage = True # Set AppleALC usage
# OS Versions self.dGPU_switch = True # Set Display GPU Switching for Windows
## Based off Major Kernel Version self.force_surplus = False # Force SurPlus patch in newer OSes
self.tiger = 8 self.force_latest_psp = False # Force latest PatcherSupportPkg
self.leopard = 9 self.disable_msr_power_ctl = False # Disable MSR Power Control (missing battery throttling)
self.snow_leopard = 10 self.software_demux = False # Enable Software Demux patch set
self.lion = 11 self.force_vmm = False # Force VMM patch
self.mountain_lion = 12 self.custom_sip_value = None # Set custom SIP value
self.mavericks = 13 self.walkthrough = False # Enable Walkthrough
self.yosemite = 14 self.disable_connectdrivers = False # Disable ConnectDrivers (hibernation)
self.el_capitan = 15
self.sierra = 16
self.high_sierra = 17
self.mojave = 18
self.catalina = 19
self.big_sur = 20
self.monterey = 21
# Vendor IDs
self.pci_nvidia = "10DE"
self.pci_amd_ati = "1002"
self.pci_intel = "8086"
self.pci_broadcom = "14E4"
self.pci_atheros = "168C"
self.pci_apple = "106B"
self.pci_aquantia = "1D6A"
self.pci_marvell = "11AB"
self.pci_syskonnect = "1148"
# Class Codes
## https://pci-ids.ucw.cz/read/PD
self.classcode_sata = "01060100"
self.classcode_nvme = "02080100"
self.classcode_nvme_generic = "02800100"
self.classcode_wifi = "00800200"
self.classcode_gpu = "00000300"
self.classcode_gpu_variant = "00800300"
self.classcode_xhci = "30030C00"
self.classcode_ethernet = "00000200"
# Nvidia GPU Architecture
self.arch_tesla = "NV50"
self.arch_fermi = "GF100"
self.arch_kepler = "GK100"
# External Files
self.url_patcher_support_pkg = "https://github.com/dortania/PatcherSupportPkg/releases/download/"
self.legacy_accel_support = [ self.legacy_accel_support = [
self.mojave, os_data.os_data.mojave,
self.catalina, os_data.os_data.catalina,
self.big_sur, os_data.os_data.big_sur,
self.monterey, os_data.os_data.monterey,
] ]
# Payload Location # Payload Location
@@ -220,6 +198,10 @@ class Constants:
def windows_ssdt_path(self): def windows_ssdt_path(self):
return self.payload_path / Path("ACPI/SSDT-PCI.aml") return self.payload_path / Path("ACPI/SSDT-PCI.aml")
@property
def demux_ssdt_path(self):
return self.payload_path / Path("ACPI/SSDT-DGPU.aml")
# Drivers # Drivers
@property @property
def nvme_driver_path(self): def nvme_driver_path(self):
@@ -233,6 +215,14 @@ class Constants:
def xhci_driver_path(self): def xhci_driver_path(self):
return self.payload_path / Path("Drivers/XhciDxe.efi") return self.payload_path / Path("Drivers/XhciDxe.efi")
@property
def diags_launcher_path(self):
return self.payload_path / Path("Drivers/diags.efi")
@property
def list_txt_path(self):
return self.payload_path / Path("List.txt")
# Kexts # Kexts
@property @property
def payload_kexts_path(self): def payload_kexts_path(self):
@@ -240,23 +230,27 @@ class Constants:
@property @property
def lilu_path(self): def lilu_path(self):
return self.payload_kexts_path / Path(f"Acidanthera/Lilu-v{self.lilu_version}.zip") return self.payload_kexts_path / Path(f"Acidanthera/Lilu-v{self.lilu_version}-{self.kext_variant}.zip")
@property @property
def whatevergreen_path(self): def whatevergreen_path(self):
return self.payload_kexts_path / Path(f"Acidanthera/WhateverGreen-v{self.whatevergreen_version}.zip") return self.payload_kexts_path / Path(f"Acidanthera/WhateverGreen-v{self.whatevergreen_version}-{self.kext_variant}.zip")
@property @property
def airportbcrmfixup_path(self): def airportbcrmfixup_path(self):
return self.payload_kexts_path / Path(f"Acidanthera/AirportBrcmFixup-v{self.airportbcrmfixup_version}.zip") return self.payload_kexts_path / Path(f"Acidanthera/AirportBrcmFixup-v{self.airportbcrmfixup_version}-{self.kext_variant}.zip")
@property @property
def restrictevents_path(self): def restrictevents_path(self):
return self.payload_kexts_path / Path(f"Acidanthera/RestrictEvents-v{self.restrictevents_version}.zip") return self.payload_kexts_path / Path(f"Acidanthera/RestrictEvents-v{self.restrictevents_version}-{self.kext_variant}.zip")
@property
def efi_disabler_path(self):
return self.payload_kexts_path / Path(f"Acidanthera/EFICheckDisabler-v{self.restrictevents_version}.zip")
@property @property
def restrictevents_mbp_path(self): def restrictevents_mbp_path(self):
return self.payload_kexts_path / Path(f"Acidanthera/RestrictEvents-MBP91-v{self.restrictevents_mbp_version}.zip") return self.payload_kexts_path / Path(f"Acidanthera/RestrictEvents-MBP91-v{self.restrictevents_mbp_version}-{self.kext_variant}.zip")
@property @property
def bcm570_path(self): def bcm570_path(self):
@@ -300,7 +294,7 @@ class Constants:
@property @property
def applealc_path(self): def applealc_path(self):
return self.payload_kexts_path / Path(f"Acidanthera/AppleALC-v{self.applealc_version}.zip") return self.payload_kexts_path / Path(f"Acidanthera/AppleALC-v{self.applealc_version}-{self.kext_variant}.zip")
@property @property
def piixata_path(self): def piixata_path(self):
@@ -312,7 +306,7 @@ class Constants:
@property @property
def cpufriend_path(self): def cpufriend_path(self):
return self.payload_kexts_path / Path(f"Acidanthera/CPUFriend-v{self.cpufriend_version}.zip") return self.payload_kexts_path / Path(f"Acidanthera/CPUFriend-v{self.cpufriend_version}-{self.kext_variant}.zip")
@property @property
def smcspoof_path(self): def smcspoof_path(self):
@@ -324,19 +318,19 @@ class Constants:
@property @property
def nvmefix_path(self): def nvmefix_path(self):
return self.payload_kexts_path / Path(f"Acidanthera/NVMeFix-v{self.nvmefix_version}.zip") return self.payload_kexts_path / Path(f"Acidanthera/NVMeFix-v{self.nvmefix_version}-{self.kext_variant}.zip")
@property @property
def featureunlock_path(self): def featureunlock_path(self):
return self.payload_kexts_path / Path(f"Acidanthera/FeatureUnlock-v{self.featureunlock_version}.zip") return self.payload_kexts_path / Path(f"Acidanthera/FeatureUnlock-v{self.featureunlock_version}-{self.kext_variant}.zip")
@property @property
def debugenhancer_path(self): def debugenhancer_path(self):
return self.payload_kexts_path / Path(f"Acidanthera/DebugEnhancer-v{self.debugenhancer_version}.zip") return self.payload_kexts_path / Path(f"Acidanthera/DebugEnhancer-v{self.debugenhancer_version}-{self.kext_variant}.zip")
@property @property
def bluetool_path(self): def bluetool_path(self):
return self.payload_kexts_path / Path(f"Acidanthera/BlueToolFixup-v{self.bluetool_version}.zip") return self.payload_kexts_path / Path(f"Acidanthera/BlueToolFixup-v{self.bluetool_version}-{self.kext_variant}.zip")
@property @property
def cslvfixup_path(self): def cslvfixup_path(self):
@@ -346,6 +340,14 @@ class Constants:
def innie_path(self): def innie_path(self):
return self.payload_kexts_path / Path(f"Misc/Innie-v{self.innie_version}.zip") return self.payload_kexts_path / Path(f"Misc/Innie-v{self.innie_version}.zip")
@property
def simplemsr_path(self):
return self.payload_kexts_path / Path(f"Misc/SimpleMSR-v{self.simplemsr_version}.zip")
@property
def gpu_wake_path(self):
return self.payload_kexts_path / Path(f"Misc/AMDGPUWakeHandler-v{self.gpu_wake_version}.zip")
@property @property
def latebloom_path(self): def latebloom_path(self):
return self.payload_kexts_path / Path(f"Misc/latebloom-v{self.latebloom_version}.zip") return self.payload_kexts_path / Path(f"Misc/latebloom-v{self.latebloom_version}.zip")
@@ -354,6 +356,14 @@ class Constants:
def apple_trackpad_path(self): def apple_trackpad_path(self):
return self.payload_kexts_path / Path(f"Misc/AppleUSBTrackpad-v{self.apple_trackpad}.zip") return self.payload_kexts_path / Path(f"Misc/AppleUSBTrackpad-v{self.apple_trackpad}.zip")
@property
def apple_isight_path(self):
return self.payload_kexts_path / Path(f"Misc/LegacyUSBVideoSupport-v{self.apple_isight_version}.zip")
@property
def apple_raid_path(self):
return self.payload_kexts_path / Path(f"Misc/AppleRAIDCard-v{self.apple_raid_version}.zip")
@property @property
def plist_folder_path(self): def plist_folder_path(self):
return self.payload_kexts_path / Path("Plists") return self.payload_kexts_path / Path("Plists")
@@ -466,12 +476,12 @@ class Constants:
@property @property
def ocvalidate_path(self): def ocvalidate_path(self):
return self.payload_path / Path("Tools/ocvalidate") return self.payload_path / Path(f"Tools/ocvalidate-{self.opencore_version}")
# Icons # Icons
@property @property
def app_icon_path(self): def app_icon_path(self):
return self.current_path / Path("OC-Patcher.icns") return self.payload_path / Path("OC-Patcher.icns")
@property @property
def icon_path_external(self): def icon_path_external(self):
@@ -519,13 +529,21 @@ class Constants:
def payload_apple_libexec_path(self): def payload_apple_libexec_path(self):
return self.payload_apple_usr_path / Path("libexec") return self.payload_apple_usr_path / Path("libexec")
@property
def payload_apple_private_path(self):
return self.payload_apple_root_path / Path("private")
@property
def payload_apple_etc_path(self):
return self.payload_apple_private_path / Path("etc")
@property @property
def payload_apple_frameworks_path(self): def payload_apple_frameworks_path(self):
return self.payload_apple_root_path / Path("Frameworks") return self.payload_apple_root_path / Path("Frameworks")
@property @property
def payload_apple_frameworks_path_accel(self): def payload_apple_frameworks_path_accel(self):
return self.payload_apple_frameworks_path / Path("Graphics-Acceleration") return self.payload_apple_frameworks_path / Path("Graphics-Acceleration-Non-Metal")
@property @property
def payload_apple_frameworks_path_accel_ts2(self): def payload_apple_frameworks_path_accel_ts2(self):
@@ -536,12 +554,12 @@ class Constants:
return self.payload_apple_frameworks_path / Path("Graphics-Acceleration-Ivy-Bridge") return self.payload_apple_frameworks_path / Path("Graphics-Acceleration-Ivy-Bridge")
@property @property
def payload_apple_lauchd_path(self): def payload_apple_frameworks_path_accel_kepler(self):
return self.payload_apple_root_path / Path("LaunchDaemons") return self.payload_apple_frameworks_path / Path("Graphics-Acceleration-Kepler")
@property @property
def payload_apple_lauchd_path_accel(self): def payload_apple_lauchd_path(self):
return self.payload_apple_lauchd_path / Path("Graphics-Acceleration") return self.payload_apple_root_path / Path("LaunchDaemons")
@property @property
def payload_apple_private_frameworks_path(self): def payload_apple_private_frameworks_path(self):
@@ -549,7 +567,7 @@ class Constants:
@property @property
def payload_apple_private_frameworks_path_accel(self): def payload_apple_private_frameworks_path_accel(self):
return self.payload_apple_private_frameworks_path / Path("Graphics-Acceleration") return self.payload_apple_private_frameworks_path / Path("Graphics-Acceleration-Non-Metal")
@property @property
def payload_apple_private_frameworks_path_accel_ts2(self): def payload_apple_private_frameworks_path_accel_ts2(self):
@@ -563,11 +581,21 @@ class Constants:
def payload_apple_private_frameworks_path_brightness(self): def payload_apple_private_frameworks_path_brightness(self):
return self.payload_apple_private_frameworks_path / Path("Brightness-Control") return self.payload_apple_private_frameworks_path / Path("Brightness-Control")
@property
def payload_apple_private_frameworks_path_legacy_drm(self):
return self.payload_apple_private_frameworks_path / Path("Legacy-GVA")
# Apple Extensions # Apple Extensions
# El Capitan Extensions
@property @property
def audio_path(self): def audio_path(self):
return self.payload_apple_kexts_path / Path("Audio") return self.payload_apple_kexts_path / Path("Audio")
# High Sierra Extensions
@property
def audio_v2_path(self):
return self.payload_apple_kexts_path / Path("Audio-v2")
# GPU Kexts and Bundles # GPU Kexts and Bundles
@property @property
@@ -610,6 +638,10 @@ class Constants:
def legacy_brightness(self): def legacy_brightness(self):
return self.payload_apple_kexts_path / Path("Brightness-Control") return self.payload_apple_kexts_path / Path("Brightness-Control")
@property
def legacy_mux_path(self):
return self.payload_apple_kexts_path / Path("Legacy-Mux")
@property @property
def legacy_wifi_coreservices(self): def legacy_wifi_coreservices(self):
return self.payload_apple_coreservices_path / Path("Legacy-Wifi") return self.payload_apple_coreservices_path / Path("Legacy-Wifi")
@@ -618,40 +650,13 @@ class Constants:
def legacy_wifi_libexec(self): def legacy_wifi_libexec(self):
return self.payload_apple_libexec_path / Path("Legacy-Wifi") return self.payload_apple_libexec_path / Path("Legacy-Wifi")
csr_values = { @property
# Source: macOS 11.4 (XNU's csr.h) def legacy_wifi_etc(self):
# https://opensource.apple.com/source/xnu/xnu-7195.121.3/bsd/sys/csr.h.auto.html return self.payload_apple_etc_path / Path("Legacy-Wifi")
"CSR_ALLOW_UNTRUSTED_KEXTS": False, # 0x1 - Allows Unsigned Kexts - Introduced in El Capitan # noqa: E241
"CSR_ALLOW_UNRESTRICTED_FS": False, # 0x2 - File System Access - Introduced in El Capitan # noqa: E241
"CSR_ALLOW_TASK_FOR_PID": False, # 0x4 - Unrestricted task_for_pid() - Introduced in El Capitan # noqa: E241
"CSR_ALLOW_KERNEL_DEBUGGER": False, # 0x8 - Allow Kernel Debugger - Introduced in El Capitan # noqa: E241
"CSR_ALLOW_APPLE_INTERNAL": False, # 0x10 - Set AppleInternal Features - Introduced in El Capitan # noqa: E241
# "CSR_ALLOW_DESTRUCTIVE_DTRACE": False, # 0x20 - Allow destructive DTrace - Deprecated # noqa: E241
"CSR_ALLOW_UNRESTRICTED_DTRACE": False, # 0x20 - Unrestricted DTrace usage - Introduced in El Capitan # noqa: E241
"CSR_ALLOW_UNRESTRICTED_NVRAM": False, # 0x40 - Unrestricted NVRAM write - Introduced in El Capitan # noqa: E241
"CSR_ALLOW_DEVICE_CONFIGURATION": False, # 0x80 - Allow custom DeviceTree (iOS) - Introduced in El Capitan # noqa: E241
"CSR_ALLOW_ANY_RECOVERY_OS": False, # 0x100 - Skip BaseSystem Verification - Introduced in Sierra # noqa: E241
"CSR_ALLOW_UNAPPROVED_KEXTS": False, # 0x200 - Allow Unnotarized Kexts - Introduced in High Sierra # noqa: E241
"CSR_ALLOW_EXECUTABLE_POLICY_OVERRIDE": False, # 0x400 - Override Executable Policy - Introduced in Mojave # noqa: E241
"CSR_ALLOW_UNAUTHENTICATED_ROOT": False, # 0x800 - Allow Root Volume Mounting - Introduced in Big Sur # noqa: E241
}
root_patch_sip_mojave = [ @property
# Variables required to root patch in Mojave and Catalina def legacy_keyboard_backlight_etc(self):
"CSR_ALLOW_UNTRUSTED_KEXTS", return self.payload_apple_etc_path / Path("Keyboard-Backlight")
"CSR_ALLOW_UNRESTRICTED_FS",
"CSR_ALLOW_UNAPPROVED_KEXTS",
"CSR_ALLOW_EXECUTABLE_POLICY_OVERRIDE",
]
root_patch_sip_big_sur = [
# Variables required to root patch in Big Sur and Monterey
"CSR_ALLOW_UNTRUSTED_KEXTS",
"CSR_ALLOW_UNRESTRICTED_FS",
"CSR_ALLOW_UNAPPROVED_KEXTS",
"CSR_ALLOW_EXECUTABLE_POLICY_OVERRIDE",
"CSR_ALLOW_UNAUTHENTICATED_ROOT",
]
sbm_values = [ sbm_values = [
"j137ap", # iMacPro1,1 "j137ap", # iMacPro1,1
@@ -682,138 +687,17 @@ class Constants:
"Mac-7BA5B2D9E42DDD94", # iMacPro1,1 "Mac-7BA5B2D9E42DDD94", # iMacPro1,1
] ]
board_id = { sandy_board_id_stock = [
"MacBook1,1": "Mac-F4208CC8", "Mac-94245B3640C91C81", # MacBookPro8,1
"MacBook2,1": "Mac-F4208CA9", "Mac-94245A3940C91C80", # MacBookPro8,2
"MacBook3,1": "Mac-F22788C8", "Mac-942459F5819B171B", # MacBookPro8,3
"MacBook4,1": "Mac-F22788A9", "Mac-C08A6BB70A942AC2", # MacBookAir4,1
"MacBook5,1": "Mac-F42D89C8", "Mac-742912EFDBEE19B3", # MacBookAir4,2
"MacBook5,2": "Mac-F22788AA", "Mac-8ED6AF5B48C039E1", # Macmini5,1
"MacBook6,1": "Mac-F22C8AC8", "Mac-4BC72D62AD45599E", # Macmini5,2
"MacBook7,1": "Mac-F22C89C8", "Mac-7BA5B2794B2CDB12", # Macmini5,3
"MacBook8,1": "Mac-BE0E8AC46FE800CC", "Mac-942B5BF58194151B", # iMac12,1
"MacBook9,1": "Mac-9AE82516C7C6B903", "Mac-942B59F58194171B", # iMac12,2
"MacBook10,1": "Mac-EE2EBD4B90B839A8", "Mac-94245AF5819B141B", # AppleInternal MacBookPro8,3
"MacBookAir1,1": "Mac-F42C8CC8", "Mac-942B5B3A40C91381", # AppleInternal iMac12,2
"MacBookAir2,1": "Mac-F42D88C8", ]
"MacBookAir3,1": "Mac-942452F5819B1C1B",
"MacBookAir3,2": "Mac-942C5DF58193131B",
"MacBookAir4,1": "Mac-C08A6BB70A942AC2",
"MacBookAir4,2": "Mac-742912EFDBEE19B3",
"MacBookAir5,1": "Mac-66F35F19FE2A0D05",
"MacBookAir5,2": "Mac-2E6FAB96566FE58C",
"MacBookAir6,1": "Mac-35C1E88140C3E6CF",
"MacBookAir6,2": "Mac-7DF21CB3ED6977E5",
"MacBookAir7,1": "Mac-9F18E312C5C2BF0B",
"MacBookAir7,2": "Mac-937CB26E2E02BB01",
"MacBookAir8,1": "Mac-827FAC58A8FDFA22",
"MacBookAir8,2": "Mac-226CB3C6A851A671",
"MacBookAir9,1": "Mac-0CFF9C7C2B63DF8D",
"MacBookPro1,1": "Mac-F425BEC8",
"MacBookPro1,2": "Mac-F42DBEC8",
"MacBookPro2,1": "Mac-F42189C8",
"MacBookPro2,2": "Mac-F42187C8",
"MacBookPro3,1": "Mac-F4238BC8",
"MacBookPro4,1": "Mac-F42C89C8",
"MacBookPro5,1": "Mac-F42D86C8",
"MacBookPro5,2": "Mac-F2268EC8",
"MacBookPro5,3": "Mac-F22587C8",
"MacBookPro5,4": "Mac-F22587A1",
"MacBookPro5,5": "Mac-F2268AC8",
"MacBookPro6,1": "Mac-F22589C8",
"MacBookPro6,2": "Mac-F22586C8",
"MacBookPro7,1": "Mac-F222BEC8",
"MacBookPro8,1": "Mac-94245B3640C91C81",
"MacBookPro8,2": "Mac-94245A3940C91C80",
"MacBookPro8,3": "Mac-942459F5819B171B",
"MacBookPro9,1": "Mac-4B7AC7E43945597E",
"MacBookPro9,2": "Mac-6F01561E16C75D06",
"MacBookPro10,1": "Mac-C3EC7CD22292981F",
"MacBookPro10,2": "Mac-AFD8A9D944EA4843",
"MacBookPro11,1": "Mac-189A3D4F975D5FFC",
"MacBookPro11,2": "Mac-3CBD00234E554E41",
"MacBookPro11,3": "Mac-2BD1B31983FE1663",
"MacBookPro11,4": "Mac-06F11FD93F0323C5",
"MacBookPro11,5": "Mac-06F11F11946D27C5",
"MacBookPro12,1": "Mac-E43C1C25D4880AD6",
"MacBookPro13,1": "Mac-473D31EABEB93F9B",
"MacBookPro13,2": "Mac-66E35819EE2D0D05",
"MacBookPro13,3": "Mac-A5C67F76ED83108C",
"MacBookPro14,1": "Mac-B4831CEBD52A0C4C",
"MacBookPro14,2": "Mac-CAD6701F7CEA0921",
"MacBookPro14,3": "Mac-551B86E5744E2388",
"MacBookPro15,1": "Mac-937A206F2EE63C01",
"MacBookPro15,2": "Mac-827FB448E656EC26",
"MacBookPro15,3": "Mac-1E7E29AD0135F9BC",
"MacBookPro15,4": "Mac-53FDB3D8DB8CA971",
"MacBookPro16,1": "Mac-E1008331FDC96864",
"MacBookPro16,2": "Mac-5F9802EFE386AA28",
"MacBookPro16,3": "Mac-E7203C0F68AA0004",
"MacBookPro16,4": "Mac-A61BADE1FDAD7B05",
"Macmini1,1": "Mac-F4208EC8",
"Macmini2,1": "Mac-F4208EAA",
"Macmini3,1": "Mac-F22C86C8",
"Macmini4,1": "Mac-F2208EC8",
"Macmini5,1": "Mac-8ED6AF5B48C039E1",
"Macmini5,2": "Mac-4BC72D62AD45599E",
"Macmini5,3": "Mac-7BA5B2794B2CDB12",
"Macmini6,1": "Mac-031AEE4D24BFF0B1",
"Macmini6,2": "Mac-F65AE981FFA204ED",
"Macmini7,1": "Mac-35C5E08120C7EEAF",
"Macmini8,1": "Mac-7BA5B2DFE22DDD8C",
"iMac4,1": "Mac-F42786C8",
"iMac4,2": "Mac-F4218EC8",
"iMac5,1": "Mac-F4228EC8",
"iMac5,2": "Mac-F4218EC8",
"iMac6,1": "Mac-F4218FC8",
"iMac7,1": "Mac-F42386C8",
"iMac8,1": "Mac-F227BEC8",
"iMac9,1": "Mac-F2218FA9",
"iMac10,1": "Mac-F221DCC8",
# "iMac10,1": "Mac-F2268CC8",
"iMac11,1": "Mac-F2268DAE",
"iMac11,2": "Mac-F2238AC8",
"iMac11,3": "Mac-F2238BAE",
"iMac12,1": "Mac-942B5BF58194151B",
"iMac12,2": "Mac-942B59F58194171B",
"iMac13,1": "Mac-00BE6ED71E35EB86",
"iMac13,2": "Mac-FC02E91DDD3FA6A4",
"iMac13,3": "Mac-7DF2A3B5E5D671ED",
"iMac14,1": "Mac-031B6874CF7F642A",
"iMac14,2": "Mac-27ADBB7B4CEE8E61",
"iMac14,3": "Mac-77EB7D7DAF985301",
"iMac14,4": "Mac-81E3E92DD6088272",
"iMac15,1": "Mac-42FD25EABCABB274",
"iMac16,1": "Mac-A369DDC4E67F1C45",
"iMac16,2": "Mac-FFE5EF870D7BA81A",
"iMac17,1": "Mac-DB15BD556843C820",
# iMac17,1": "Mac-65CE76090165799A",
# iMac17,1": "Mac-B809C3757DA9BB8D",
"iMac18,1": "Mac-4B682C642B45593E",
"iMac18,2": "Mac-77F17D7DA9285301",
"iMac18,3": "Mac-BE088AF8C5EB4FA2",
"iMac19,1": "Mac-AA95B1DDAB278B95",
"iMac19,2": "Mac-63001698E7A34814",
"iMac20,1": "Mac-CFF7D910A743CAAF",
"iMac20,2": "Mac-AF89B6D9451A490B",
"iMacPro1,1": "Mac-7BA5B2D9E42DDD94",
"MacPro1,1": "Mac-F4208DC8",
"MacPro2,1": "Mac-F4208DA9",
"MacPro3,1": "Mac-F42C88C8",
"MacPro4,1": "Mac-F221BEC8",
"MacPro5,1": "Mac-F221BEC8",
"MacPro6,1": "Mac-F60DEB81FF30ACF6",
"MacPro7,1": "Mac-27AD2F918AE68F61",
"Xserve1,1": "Mac-F4208AC8",
"Xserve2,1": "Mac-F42289C8",
"Xserve3,1": "Mac-F223BEC8",
}
target_type = {
"ADP3,2": "J273",
"MacBookAir10,1": "J313",
"MacBookPro17,1": "J293",
"Macmini9,1": "J274",
"iMac21,1": "J256",
"iMac21,2": "J257",
}

114
resources/defaults.py Normal file
View File

@@ -0,0 +1,114 @@
# Generate Default Data
from resources import utilities, device_probe, generate_smbios
from data import model_array, smbios_data
class generate_defaults:
def probe(model, host_is_target, settings):
# Generate Default Data
# Takes in Settings data set, and returns updated Settings
settings.sip_status = True
settings.secure_status = False # Default false for Monterey
settings.amfi_status = True
if host_is_target:
if utilities.check_metal_support(device_probe, settings.computer) is False:
settings.disable_cs_lv = True
if settings.computer.gpus:
for gpu in settings.computer.gpus:
if gpu.arch == device_probe.NVIDIA.Archs.Kepler:
# 12.0 (B7+): Kepler are now unsupported
settings.sip_status = False
settings.amfi_status = True
settings.allow_fv_root = True # Allow FileVault on broken seal
break
if (
isinstance(settings.computer.wifi, device_probe.Broadcom)
and settings.computer.wifi.chipset in [device_probe.Broadcom.Chipsets.AirPortBrcm4331, device_probe.Broadcom.Chipsets.AirPortBrcm43224]
) or (isinstance(settings.computer.wifi, device_probe.Atheros) and settings.computer.wifi.chipset == device_probe.Atheros.Chipsets.AirPortAtheros40):
# 12.0: Legacy Wireless chipsets require root patching
settings.sip_status = False
settings.allow_fv_root = True # Allow FileVault on broken seal
if settings.computer.gpus:
for gpu in settings.computer.gpus:
if gpu.arch in [
device_probe.AMD.Archs.Legacy_GCN_7000,
device_probe.AMD.Archs.Legacy_GCN_8000,
device_probe.AMD.Archs.Legacy_GCN_9000,
device_probe.AMD.Archs.Polaris,
device_probe.AMD.Archs.Vega,
device_probe.AMD.Archs.Navi,
]:
# Allow H.265 on AMD
try:
smbios_data.smbios_dictionary[model]["Socketed GPUs"]
settings.serial_settings = "Minimal"
except KeyError:
pass
break
elif model in ["MacPro4,1", "MacPro5,1"]:
# Allow H.265 on AMD
# Assume 2009+ machines have Polaris on pre-builts (internal testing)
# Hardware Detection will never hit this
settings.serial_settings = "Minimal"
elif model in model_array.LegacyGPU:
settings.disable_cs_lv = True
if model in model_array.LegacyGPU:
if host_is_target and utilities.check_metal_support(device_probe, settings.computer) is True:
# Building on device and we have a native, supported GPU
if settings.computer.dgpu and settings.computer.dgpu.arch == device_probe.NVIDIA.Archs.Kepler:
settings.sip_status = False
# settings.secure_status = True # Monterey
settings.allow_fv_root = True # Allow FileVault on broken seal
else:
settings.sip_status = False # Unsigned kexts
settings.secure_status = False # Root volume modified
settings.amfi_status = False # Unsigned binaries
settings.allow_fv_root = True # Allow FileVault on broken seal
if model in model_array.ModernGPU:
# Systems with Ivy or Kepler GPUs, Monterey requires root patching for accel
settings.sip_status = False # Unsigned kexts
settings.secure_status = False # Modified root volume
settings.allow_fv_root = True # Allow FileVault on broken seal
# settings.amfi_status = True # Signed bundles, Don't need to explicitly set currently
custom_cpu_model_value = utilities.get_nvram("revcpuname", "4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102", decode=True)
if custom_cpu_model_value is not None:
# TODO: Fix to not use two separate variables
settings.custom_cpu_model = 1
settings.custom_cpu_model_value = custom_cpu_model_value.split("%00")[0]
if "-v" in (utilities.get_nvram("boot-args") or ""):
settings.verbose_debug = True
if utilities.amfi_status() is False:
settings.amfi_status = False
if model in ["MacBookPro8,2", "MacBookPro8,3"]:
# Users disabling TS2 most likely have a faulty dGPU
# users can override this in settings
settings.allow_ts2_accel = False
# Check if running in RecoveryOS
settings.recovery_status = utilities.check_recovery()
# Check if model uses T2 SMBIOS, if so see if it needs root patching (determined earlier on via SIP variable)
# If not, allow SecureBootModel usage, otherwise force VMM patching
# Needed for macOS Monterey to allow OTA updates
try:
spoof_model = generate_smbios.set_smbios_model_spoof(model)
except:
# Native Macs (mainly M1s) will error out as they don't know what SMBIOS to spoof to
# As we don't spoof on native models, we can safely ignore this
spoof_model = model
if smbios_data.smbios_dictionary[spoof_model]["SecureBootModel"] is not None:
if settings.sip_status is False:
# Force VMM as root patching breaks .im4m signature
settings.secure_status = False
settings.force_vmm = True
else:
# Allow SecureBootModel
settings.secure_status = True
settings.force_vmm = False

Some files were not shown because too many files have changed in this diff Show More