Compare commits

...

375 Commits

Author SHA1 Message Date
Mykola Grymalyuk
06b3cf2e90 Fix workflow name 2021-04-17 09:45:13 -06:00
Mykola Grymalyuk
bbd379a584 Allow Root Patches by default on legacy GPUs 2021-04-17 09:44:12 -06:00
Mykola Grymalyuk
2b04a06adc Fix typo 2021-04-15 21:20:25 -06:00
Mykola Grymalyuk
703e926b96 Build CLI: Fix typo 2021-04-15 21:17:11 -06:00
Mykola Grymalyuk
3d10404da5 Fix CI building 2021-04-15 21:14:12 -06:00
Mykola Grymalyuk
41a189444b Add basic CLI support 2021-04-15 21:07:53 -06:00
Mykola Grymalyuk
6ae572f74f Misc cleanup 2021-04-15 20:46:46 -06:00
Mykola Grymalyuk
fa045e96e7 Fix GFX0 parsing for iMac11,x/12,x 2021-04-15 20:28:32 -06:00
Mykola Grymalyuk
2a12e861ac Clean up AMD brightness patch logic 2021-04-15 20:10:27 -06:00
Mykola Grymalyuk
31c0845667 Temporarily disable AMD Brightness patches
Currently will fail linking when AMDx3000 is installed
2021-04-15 19:55:51 -06:00
Mykola Grymalyuk
a97c6c9baa Merge pull request #151 from flagersgit/patch-1
Remove confusing / unapplicable language
2021-04-15 19:06:19 -06:00
Flagers
e4c433730f Remove confusing / unapplicable language 2021-04-15 20:54:06 -04:00
Mykola Grymalyuk
30be583a3d Fix iMac9,1 20” and 24” audio support 2021-04-14 11:09:23 -06:00
Mykola Grymalyuk
bbed0b4921 Update Build.py
Closes https://github.com/dortania/OpenCore-Legacy-Patcher/issues/145
2021-04-13 14:38:10 -06:00
Mykola Grymalyuk
3e784c0ae5 Fix spoofed wifi card detection 2021-04-13 12:53:23 -06:00
Mykola Grymalyuk
182b6c4291 Constants.py: Fix Atheros ID typo 2021-04-13 12:02:02 -06:00
Mykola Grymalyuk
b1f16fca1d Add gfxutil support 2021-04-13 10:31:37 -06:00
Mykola Grymalyuk
9787645542 Strip unused kext entries during build 2021-04-12 22:03:38 -06:00
Mykola Grymalyuk
af3d4c4af5 Update license 2021-04-12 21:01:18 -06:00
Mykola Grymalyuk
bdc8c2a4fc Remove reliance on WEG boot-args for non-MP models 2021-04-12 17:37:55 -06:00
Mykola Grymalyuk
be89e2ae11 Fix typo 2021-04-12 15:49:28 -06:00
Mykola Grymalyuk
55f3905dd4 Fix MacBookPro9,1 patches 2021-04-12 15:18:39 -06:00
Mykola Grymalyuk
6f0048814f Misc fixes
Closes https://github.com/dortania/OpenCore-Legacy-Patcher/issues/141
2021-04-12 14:48:53 -06:00
Mykola Grymalyuk
7895413ce2 Fix misc issues
Closes https://github.com/dortania/OpenCore-Legacy-Patcher/issues/142
Closes https://github.com/dortania/OpenCore-Legacy-Patcher/issues/140
2021-04-12 11:55:37 -06:00
Dhinak G
9254e67fc9 Update README.md 2021-04-11 22:01:10 -04:00
Mykola Grymalyuk
d815ece3c4 Fix crashing on non-iGPU machines 2021-04-11 13:58:14 -06:00
Mykola Grymalyuk
14bad15df4 Fix IMac detection 2021-04-11 13:17:17 -06:00
Mykola Grymalyuk
d830e72b62 Enhance GPU Detection logic 2021-04-11 13:00:04 -06:00
Mykola Grymalyuk
70b5399126 Format py files 2021-04-11 08:46:42 -06:00
Mykola Grymalyuk
1d8d3ef757 Sync fix naming scheme 2021-04-11 07:41:34 -06:00
Mykola Grymalyuk
9f3ee178a5 Sync fix naming scheme 2021-04-11 07:41:09 -06:00
Mykola Grymalyuk
91335ab271 Sync DONATE.md 2021-04-11 00:01:09 -06:00
Mykola Grymalyuk
8320355925 Add support for partial HD5/6000 accel 2021-04-10 23:46:37 -06:00
Mykola Grymalyuk
0b225fbbbd Add AMD brightness control patches 2021-04-10 23:42:03 -06:00
Mykola Grymalyuk
6a18334663 Add user configurable Bootstrap setting
Closes https://github.com/dortania/OpenCore-Legacy-Patcher/issues/138
2021-04-10 22:45:22 -06:00
Mykola Grymalyuk
af940152a1 Merge pull request #136 from kommtzeitkonrad/mbp5,3-tested
Add MacBookPro5,3 to TESTED.md
2021-04-10 20:45:53 -06:00
kommtzeitkonrad
66f5e8d969 Fix typo 2021-04-11 04:26:53 +02:00
Mykola Grymalyuk
b3b7508237 Clean unused binaries 2021-04-10 19:22:58 -06:00
Mykola Grymalyuk
361f9767dd Add Brightness Control patches 2021-04-10 19:22:17 -06:00
Mykola Grymalyuk
f20c9808ed Update bug_report.md 2021-04-10 15:53:38 -06:00
Mykola Grymalyuk
b6ac9f3a6f Hide OpenShell.efi by default
Closes https://github.com/dortania/OpenCore-Legacy-Patcher/issues/139
2021-04-10 15:38:26 -06:00
Mykola Grymalyuk
8365144834 Fix MacBookPro4,1 17" audio support 2021-04-10 08:40:31 -06:00
Mykola Grymalyuk
85b422b0fb Fix MacBookPro4,1 audio support 2021-04-10 08:07:22 -06:00
kommtzeitkonrad
6ebc9a08ae Add MacBookPro5,3 to TESTED.md 2021-04-10 06:42:20 +02:00
Mykola Grymalyuk
b04e396351 Syn MODELS.md 2021-04-09 18:28:37 -06:00
Mykola Grymalyuk
1ec23e9ebb Add imac7,1 24” support AppleALC 2021-04-09 18:20:15 -06:00
Mykola Grymalyuk
44637967bc Sync changelog
Closes https://github.com/dortania/OpenCore-Legacy-Patcher/issues/102
2021-04-09 18:15:59 -06:00
Mykola Grymalyuk
7d93c96343 Add AppleAirPortBrcm43224 support 2021-04-09 18:02:18 -06:00
Mykola Grymalyuk
58a9f4dd0e Fix incorrectly setting layout 13 on non-MacPro3,1 2021-04-09 14:38:38 -06:00
Mykola Grymalyuk
d2c673d9e1 Add iMac8,1 20” support to AppleALC 2021-04-09 12:09:51 -06:00
Mykola Grymalyuk
0048559acb Add AppleALC support 2021-04-09 10:22:29 -06:00
Mykola Grymalyuk
88d7bf373b Fix table 2021-04-08 07:45:27 -06:00
Mykola Grymalyuk
28861ca1a8 Add basic Xserve2,1 support 2021-04-08 07:44:27 -06:00
Mykola Grymalyuk
86ae43dc1c Add more models 2021-04-07 19:34:52 -06:00
Mykola Grymalyuk
24d96c1d37 Add Macmini6,1 to tested 2021-04-07 14:51:28 -06:00
Mykola Grymalyuk
f62e9f5d21 Fix other typo 2021-04-07 12:58:00 -06:00
Mykola Grymalyuk
d23965f1c0 Fix version 2021-04-07 12:57:24 -06:00
Mykola Grymalyuk
e9397b0237 Update TESTED.md 2021-04-07 12:56:16 -06:00
Mykola Grymalyuk
8bf7c25f69 Add more tested machines 2021-04-07 11:51:11 -06:00
Mykola Grymalyuk
0a693806d4 Add MacBookPro8,1 to TESTED.md 2021-04-07 11:26:02 -06:00
Mykola Grymalyuk
12e8b8e0a9 Update TESTED.md 2021-04-07 11:09:37 -06:00
Mykola Grymalyuk
33d95fc237 Update TESTED.md list 2021-04-07 11:02:45 -06:00
Mykola Grymalyuk
b0ff0204bd Update TESTED.md 2021-04-07 10:48:20 -06:00
Mykola Grymalyuk
7704488e24 Add Tested Models docs to determine regression 2021-04-07 10:38:26 -06:00
Mykola Grymalyuk
bf2bd694bc Merge branch 'main' of https://github.com/dortania/Opencore-Legacy-Patcher into main 2021-04-06 21:40:38 -06:00
Mykola Grymalyuk
200f6d17f9 Exclude CPUFriend from El Capitan-maxed Macs
iMac8,1 reported heavily degarded performace, most likely due to the data given to ResourceConverter.sh
2021-04-06 21:40:30 -06:00
Dhinak G
580f35bfce Another typo 2021-04-06 20:07:49 -04:00
Dhinak G
a6eda09158 Typos 2021-04-06 20:03:04 -04:00
Mykola Grymalyuk
a93da6cf9e Fix CPU Boosting on 2011 and older Macs 2021-04-06 17:15:19 -06:00
Mykola Grymalyuk
e715970b63 Add docs on how to update OpenCore 2021-04-06 12:17:50 -06:00
Mykola Grymalyuk
1b6d29d19b Fix networking support in Mojave and Catalina
Closes https://github.com/dortania/OpenCore-Legacy-Patcher/issues/131
2021-04-06 08:38:55 -06:00
Mykola Grymalyuk
e219ff809e Enable NSDefenestratorModeEnabled 2021-04-06 07:52:18 -06:00
Mykola Grymalyuk
a521667e54 Add ExFat support for models missing driver 2021-04-05 23:52:05 -06:00
Mykola Grymalyuk
7a41b0c4a5 Bump version 2021-04-05 22:59:53 -06:00
Mykola Grymalyuk
cc5d522cb9 Fix OpenCanopy and enhance build detection 2021-04-05 22:57:12 -06:00
Mykola Grymalyuk
57713ab195 Bump version 2021-04-05 15:55:14 -06:00
Mykola Grymalyuk
548dad7743 Clarify supported OSes
Closes https://github.com/dortania/OpenCore-Legacy-Patcher/issues/130
2021-04-05 15:17:13 -06:00
Mykola Grymalyuk
a5989e88a3 Constants.py: Fix version error 2021-04-05 13:46:46 -06:00
Mykola Grymalyuk
f91e7dc10d Update binaries 2021-04-05 13:35:37 -06:00
Dhinak G
c889f97a6c Fix table attempt 3 2021-04-05 15:12:49 -04:00
Dhinak G
ff8b2eff2c Fix even more broken table 2021-04-05 15:01:46 -04:00
Mykola Grymalyuk
23acd5b6cd Fix iMac12,x skipping Nvidia patch 2021-04-03 23:35:38 -06:00
Mykola Grymalyuk
50256b92c8 Set ProtectSecureBoot
As we expect users to use UEFI based Windows installs, we should avoid issues of breaking the install
2021-04-03 15:25:16 -06:00
Mykola Grymalyuk
4731c2c346 Clarify docs 2021-04-03 08:38:08 -06:00
Mykola Grymalyuk
122aec5ec3 Clarify post-install patch usage 2021-04-02 22:48:04 -06:00
Mykola Grymalyuk
e62ca075e8 Add basic download progress 2021-04-02 21:37:12 -06:00
Mykola Grymalyuk
e4d5c62ada Add RestrictEvents-MBP91.patch for easier tracking 2021-04-02 10:00:59 -06:00
Mykola Grymalyuk
9db76b5cca Fix Mac Pro output issues
Closes https://github.com/dortania/OpenCore-Legacy-Patcher/issues/123
2021-04-02 09:37:15 -06:00
Mykola Grymalyuk
df4f165122 Add Benefits and Drawbacks table
Allows us to be more transparent between patchers with our users
2021-04-01 22:54:51 -06:00
Mykola Grymalyuk
8331c23045 Merge branch 'main' of https://github.com/dortania/Opencore-Legacy-Patcher into main 2021-04-01 21:38:31 -06:00
Mykola Grymalyuk
bb1132301a Add extra permission fixes 2021-04-01 21:38:21 -06:00
Dhinak G
f6dcc35b48 Fix broken table 2021-04-01 20:55:03 -04:00
Dhinak G
9f583eb590 Update DONATE.md
soon™️, hopefully
2021-04-01 20:54:49 -04:00
Mykola Grymalyuk
5a700c729e Fix pathing typo 2021-04-01 15:18:54 -06:00
Mykola Grymalyuk
4e40da79bb Add Brightness Control backend 2021-04-01 12:53:27 -06:00
Mykola Grymalyuk
53582efd02 Update docs, add info on Metal GPU upgrades 2021-04-01 11:47:45 -06:00
Mykola Grymalyuk
9b4c66f3d3 Fix Ironlake typo 2021-03-31 19:37:02 -06:00
Mykola Grymalyuk
5c6dcc3485 Update README.md 2021-03-31 09:30:04 -06:00
Mykola Grymalyuk
898b10f932 Fix MacPro5,1 wifi logic 2021-03-31 08:11:18 -06:00
Mykola Grymalyuk
5bcc6d58c3 Add MacBook4,1 support 2021-03-31 07:27:03 -06:00
Mykola Grymalyuk
eb907d17a0 Add note about MBR2GPT 2021-03-30 13:47:20 -06:00
Mykola Grymalyuk
5e3f476884 Update copyright 2021-03-30 11:34:55 -06:00
Mykola Grymalyuk
21cc355b03 Update docs 2021-03-30 09:49:14 -06:00
Mykola Grymalyuk
a22531e1d9 Fix permissions on external files 2021-03-29 22:28:14 -06:00
Mykola Grymalyuk
324188c039 Lax SIP requirement 2021-03-29 20:50:20 -06:00
Mykola Grymalyuk
ef06f096d0 Fix SIP detection 2021-03-29 20:35:32 -06:00
Mykola Grymalyuk
afeff753ef Update docs 2021-03-29 11:31:10 -06:00
Mykola Grymalyuk
bf8892878d Set iGPUless iMacs correctly
iMac15,1 expects an iGPU, so these models should be set to iMacPro1,1 instead
2021-03-29 10:52:16 -06:00
Mykola Grymalyuk
1f6dfbfd30 Temp work-around botched download 2021-03-28 21:51:03 -06:00
Mykola Grymalyuk
eeeb222896 Fix typo 2021-03-28 17:24:49 -06:00
Mykola Grymalyuk
41733124db Fix output on iMac7,1 and 8,1 2021-03-28 17:15:09 -06:00
Mykola Grymalyuk
c9d7267280 Sync changelog 2021-03-28 16:10:09 -06:00
Mykola Grymalyuk
bb3a7eccc7 Merge pull request #120 from dortania/remote-binaries
Support Remote binaries
2021-03-28 15:58:34 -06:00
Mykola Grymalyuk
a73d5c70d4 Add support for external repos 2021-03-28 15:56:54 -06:00
Mykola Grymalyuk
c48711c4c3 Remove all Apple Binaries 2021-03-28 13:20:28 -06:00
Mykola Grymalyuk
eebb098aed Fix typo in OpenCore names 2021-03-28 13:01:39 -06:00
Mykola Grymalyuk
06ae5350cb Fix CPU calculations on MCP79 chipsets 2021-03-28 12:40:02 -06:00
Mykola Grymalyuk
69a41b2951 Increment build 2021-03-27 15:32:42 -06:00
Mykola Grymalyuk
19e43d2850 Increment OpenCore 2021-03-27 13:12:18 -06:00
Mykola Grymalyuk
c32a3d89e9 Fix AppleHDA patch crashing 2021-03-27 10:05:01 -06:00
Mykola Grymalyuk
b227480e6c Fix Broadcom Ethernet on older Macs 2021-03-26 21:15:32 -06:00
Mykola Grymalyuk
fbae80ec26 Add custom SSD icon 2021-03-26 20:38:50 -06:00
Mykola Grymalyuk
299bb0be73 ix crashing when CD is present 2021-03-26 16:30:53 -06:00
Mykola Grymalyuk
7e22a0fe46 Add automatic notarization 2021-03-26 15:19:49 -06:00
Mykola Grymalyuk
f1d5adff7a Add custom SD Card icon 2021-03-26 10:48:24 -06:00
Mykola Grymalyuk
9b4fbdfb9a Handle spaces in path names 2021-03-26 09:11:55 -06:00
Mykola Grymalyuk
e1a8cdc1d5 Add dot_clean and clarify docs
Thanks OKonnel!
2021-03-26 07:49:02 -06:00
Mykola Grymalyuk
d13f96a454 Add iMac13,3 support 2021-03-25 22:45:11 -06:00
Mykola Grymalyuk
b6599a1357 Fix typo in AGDP, AGPM and AMC building 2021-03-24 18:16:02 -06:00
Mykola Grymalyuk
ce09ccf115 Add warnings to root patcher 2021-03-24 17:46:13 -06:00
Mykola Grymalyuk
04a039caf3 Fix GPU Switching in MacBookPro9,1
Closes https://github.com/dortania/OpenCore-Legacy-Patcher/issues/116
2021-03-24 17:00:12 -06:00
Mykola Grymalyuk
f006ee4569 Info.plist: Fix typos 2021-03-24 07:42:41 -06:00
Mykola Grymalyuk
c1b7e62a02 Fix variable naming for kernel versions 2021-03-23 22:28:32 -06:00
Mykola Grymalyuk
cf11a9e7a9 Fix blackscreen on MacBookPro9,1 2021-03-23 21:13:26 -06:00
Mykola Grymalyuk
ed14fbfff0 Opt for kernel detection 2021-03-23 19:33:17 -06:00
Mykola Grymalyuk
ebc39a58eb Refactor USB map building 2021-03-23 14:16:40 -06:00
Mykola Grymalyuk
6475b3f055 Add license to site 2021-03-23 08:39:33 -06:00
Mykola Grymalyuk
bd86a8cc04 Add backend for unpatching root volume 2021-03-22 21:33:10 -06:00
Mykola Grymalyuk
de2166915a Merge branch 'main' of https://github.com/dortania/Opencore-Legacy-Patcher into main 2021-03-22 20:44:05 -06:00
Mykola Grymalyuk
bab6faac97 Set HibernateMode to Auto 2021-03-22 20:43:57 -06:00
Dhinak G
16b9cb44c2 Test self-hosted 2021-03-22 21:35:51 -04:00
Mykola Grymalyuk
3d9f3a1147 Merge branch 'main' of https://github.com/dortania/Opencore-Legacy-Patcher into main 2021-03-22 19:05:29 -06:00
Mykola Grymalyuk
0b5c244a2e Add El Capitan and newer .app support
Closes https://github.com/dortania/OpenCore-Legacy-Patcher/issues/98
2021-03-22 19:05:21 -06:00
Mykola Grymalyuk
c94aebc369 Switch to self-hosted Mojave runner 2021-03-22 18:57:44 -06:00
Mykola Grymalyuk
8fc015a108 Clarify copyright status 2021-03-22 12:51:33 -06:00
Mykola Grymalyuk
f5ba7816d9 Fix duplication 2021-03-22 10:59:57 -06:00
Mykola Grymalyuk
37c0bf1e22 Expand documentation 2021-03-22 10:55:48 -06:00
Mykola Grymalyuk
e699b6f2cb Fix USB map formatting
Closes https://github.com/dortania/OpenCore-Legacy-Patcher/issues/112
2021-03-22 07:18:20 -06:00
Mykola Grymalyuk
2904ca702c Fix 10.13 bug 2021-03-21 20:56:58 -06:00
Dhinak G
8f10f1938e FIx partition selection issue, fix prompt cancel 2021-03-21 22:50:20 -04:00
Mykola Grymalyuk
b7f7489c5d Remove SSE4,1 comment
Closes https://github.com/dortania/OpenCore-Legacy-Patcher/issues/111
2021-03-21 19:14:48 -06:00
Mykola Grymalyuk
691c462bba build.py: Fix ElCap error 2021-03-21 18:53:31 -06:00
Mykola Grymalyuk
e51ec8eb8e build.py: Work around Sierra and older limitations 2021-03-21 18:45:33 -06:00
Mykola Grymalyuk
ee7bf05780 SysPatch.py: Clean up unnessary print statments 2021-03-20 16:50:53 -06:00
Mykola Grymalyuk
3223854cdd Remove X3000 bundles
Due to linking issues, HD 5000 and 6000 are currently unsupported
2021-03-20 16:08:20 -06:00
Mykola Grymalyuk
a35384e0b1 SysPatch.py: Fix AMD linking 2021-03-20 15:57:52 -06:00
Mykola Grymalyuk
faa0456ff7 SysPatch.py: Fix model detection on patch 2021-03-20 15:29:41 -06:00
Mykola Grymalyuk
5d0d1968f5 CHANGLOG: Fix typo 2021-03-20 15:26:24 -06:00
Mykola Grymalyuk
21277e5738 Support decoding SIP value 2021-03-20 14:56:58 -06:00
Mykola Grymalyuk
4f8748932d SysPatch.py: Fix Nvidia code path 2021-03-20 12:33:52 -06:00
Mykola Grymalyuk
1b1ca79374 Heavily refactor kext patch system 2021-03-19 19:13:04 -06:00
Mykola Grymalyuk
97ae6b587c Refactor CLI Menu 2021-03-19 15:31:11 -06:00
Mykola Grymalyuk
d22588b3cd Refactor SysPatch.py 2021-03-19 14:56:33 -06:00
Mykola Grymalyuk
8041dca103 SysPatch.py: Fix typo 2021-03-18 17:26:50 -06:00
Mykola Grymalyuk
6c304402dd Add backend for GPU accel patches 2021-03-18 16:04:28 -06:00
Mykola Grymalyuk
ec3ecdca38 Sync docs 2021-03-18 12:39:53 -06:00
Mykola Grymalyuk
0fe707637a Fix misc root patching issues 2021-03-18 12:19:48 -06:00
Mykola Grymalyuk
77b19688ae Fix indentation crash 2021-03-17 13:04:48 -06:00
Mykola Grymalyuk
0d6e159b72 Hid misleading print statement 2021-03-17 12:33:46 -06:00
Mykola Grymalyuk
1afb953f05 Fix typo 2021-03-17 12:27:54 -06:00
Mykola Grymalyuk
ee07dc9936 Add Root Volume patching for older machines
Closes https://github.com/dortania/OpenCore-Legacy-Patcher/issues/87
2021-03-17 12:27:11 -06:00
Mykola Grymalyuk
254267f1be Fix misc issues 2021-03-17 12:16:57 -06:00
Mykola Grymalyuk
b78247f9e8 Implement backend for Root patching
Note: Currently non-functional for end-users
2021-03-16 23:44:05 -06:00
Mykola Grymalyuk
5bfee53d99 Actually fix site button 2021-03-16 15:05:29 -06:00
Mykola Grymalyuk
5154492c97 Fix typo 2021-03-16 14:54:48 -06:00
Mykola Grymalyuk
5c97527038 Fix “Help us improve” button 2021-03-16 14:53:56 -06:00
Mykola Grymalyuk
3fd08803d6 VuePress is garbage… 2021-03-16 13:43:08 -06:00
Mykola Grymalyuk
de5cf6f93d Update misc docs 2021-03-16 13:37:11 -06:00
Mykola Grymalyuk
60b9d9d811 Clarify support models 2021-03-16 10:43:49 -06:00
Mykola Grymalyuk
8405a8162f Add SMC Spoof to avoid smcupdater
Closes https://github.com/dortania/OpenCore-Legacy-Patcher/issues/104
2021-03-16 08:47:18 -06:00
Mykola Grymalyuk
95558ab31e Merge pull request #106 from MikeBeaton/platform-feature
PlatformFeature -> new 0.6.7 OEM detect value
2021-03-16 07:32:49 -06:00
Mike Beaton
256bd8dd71 PlatformFeature -> new 0.6.7 OEM detect value 2021-03-16 13:28:53 +00:00
Mykola Grymalyuk
c960153442 Roll back previous commit 2021-03-15 08:50:09 -06:00
Mykola Grymalyuk
c712f33cf3 Force py3.6 for pip 2021-03-15 08:46:16 -06:00
Mykola Grymalyuk
4e659ebdbb Add docs on how to debug 2021-03-14 19:05:21 -06:00
Mykola Grymalyuk
ed55cc3bbd Remove broken GUI 2021-03-14 17:12:24 -06:00
Mykola Grymalyuk
df61370b7c Sync changelog 2021-03-14 14:39:15 -06:00
Mykola Grymalyuk
79ab028b0a Re-enable legacy networking patches
Reference: https://github.com/dortania/OpenCore-Legacy-Patcher/issues/102
2021-03-14 13:37:14 -06:00
Mykola Grymalyuk
444819b6a0 Clarify BCM94322 chipset support 2021-03-14 12:03:38 -06:00
Mykola Grymalyuk
079a1ac2ff Add custom EFI Boot icons per drive type 2021-03-14 11:27:15 -06:00
Dhinak G
9113dab049 Use python from brew 2021-03-13 23:15:45 -05:00
Mykola Grymalyuk
377b29f317 Set build target to python 3.6 2021-03-13 20:59:32 -07:00
Mykola Grymalyuk
be9bb8bef1 Fix typos and link 2021-03-13 11:13:47 -07:00
Mykola Grymalyuk
51c3921cf8 Add custom icon guide 2021-03-13 10:25:56 -07:00
Mykola Grymalyuk
6f5d5922dc Disable verbose and misc fixes
Closes https://github.com/dortania/OpenCore-Legacy-Patcher/issues/97
Closes https://github.com/dortania/OpenCore-Legacy-Patcher/issues/96
2021-03-13 08:52:53 -07:00
Mykola Grymalyuk
fa5266b069 Update issue templates 2021-03-13 08:04:32 -07:00
Mykola Grymalyuk
d619f15d36 Undo previous commit 2021-03-12 13:18:30 -07:00
Mykola Grymalyuk
3e9ec51ef5 Set macOS 10.13 building 2021-03-12 13:10:27 -07:00
Mykola Grymalyuk
0ac54c7ec4 Fix copying 2021-03-12 11:50:47 -07:00
Mykola Grymalyuk
6220d21a7b Fixes BootCamp BOOTx64 compatibility
Closes https://github.com/dortania/OpenCore-Legacy-Patcher/issues/94
2021-03-12 11:50:21 -07:00
Mykola Grymalyuk
7661b52a0a Disable Vault due to breaking installations 2021-03-11 20:27:50 -07:00
Mykola Grymalyuk
8c9b47b4d5 Add example video 2021-03-11 18:47:53 -07:00
Mykola Grymalyuk
92c02996ae Fix bug 2021-03-11 15:16:30 -07:00
Mykola Grymalyuk
92d7349ec0 Sync changelog 2021-03-11 15:10:26 -07:00
Mykola Grymalyuk
1e8c00071d “Fix” builds detection breaking 2021-03-11 15:09:26 -07:00
Mykola Grymalyuk
1bf4cf7dce Clean up README 2021-03-11 12:34:20 -07:00
Dhinak G
79559943ad Update config.js 2021-03-11 14:19:48 -05:00
Dhinak G
f5dc3d7939 Update config.js 2021-03-11 14:16:17 -05:00
Dhinak G
4ed36074e6 Fix typo 2021-03-11 14:12:06 -05:00
Dhinak G
608053b8e1 Update build_test_deploy.yml 2021-03-11 14:09:24 -05:00
Dhinak G
928d7ed759 Update build_test_deploy.yml 2021-03-11 14:09:10 -05:00
Mykola Grymalyuk
f68cfbcb69 Forward build to docs 2021-03-11 12:00:15 -07:00
Mykola Grymalyuk
0ad2fb53d2 Add VuePress site 2021-03-11 11:55:16 -07:00
Mykola Grymalyuk
13d1110b7a Increment build 2021-03-11 10:43:09 -07:00
Mykola Grymalyuk
629a1469cb Allow amfi_get_out_of_my_way=1 2021-03-11 10:31:50 -07:00
Mykola Grymalyuk
231d478ff3 Merge branch 'main' of https://github.com/dortania/Opencore-Legacy-Patcher into main 2021-03-10 22:25:53 -07:00
Mykola Grymalyuk
b0d1e019f8 Fix icns and DefaultBackgroundColor 2021-03-10 22:25:42 -07:00
Dhinak G
1b6b6d75c6 Set theme jekyll-theme-minimal 2021-03-10 18:08:03 -05:00
Mykola Grymalyuk
112e4221b3 Add black background to OpenCanopy
Work-around Macs not respecting DefaultBackgroundColor
2021-03-10 10:37:50 -07:00
Mykola Grymalyuk
c18f2b6649 Remove iMac9,1 from Wifi patches
Due to stability issues
2021-03-10 09:07:56 -07:00
Mykola Grymalyuk
f3ed9f4077 Fix trailing whitespaces 2021-03-10 08:28:20 -07:00
Mykola Grymalyuk
8e22fc890b Add GopPassThrough Support to MacBookPro4,1 2021-03-10 07:24:50 -07:00
Mykola Grymalyuk
951c2b3a2a Fix GPU vendor user-configuration
Closes https://github.com/dortania/Opencore-Legacy-Patcher/issues/89
2021-03-09 23:19:37 -07:00
Mykola Grymalyuk
d605e33a72 Add user-configurable SIP and SecureBootModel 2021-03-09 22:16:03 -07:00
Mykola Grymalyuk
0359141f26 Update docs 2021-03-09 18:46:46 -07:00
Mykola Grymalyuk
fef47af891 Add user-configurable Vaulting
Closes https://github.com/dortania/Opencore-Legacy-Patcher/issues/86
2021-03-09 18:32:48 -07:00
Mykola Grymalyuk
062c93e77b Tweak settings menu 2021-03-09 14:57:25 -07:00
Mykola Grymalyuk
8b012bd940 Fix typo 2021-03-09 14:55:27 -07:00
Mykola Grymalyuk
7db3508387 Add user-configurable ShowPicker 2021-03-09 14:53:04 -07:00
Mykola Grymalyuk
a2c603d874 Fix typo 2021-03-09 14:06:10 -07:00
Mykola Grymalyuk
41091a3967 Fix External Display Support on MacBookPro10,1 2021-03-09 13:56:39 -07:00
Mykola Grymalyuk
b84f701ff4 Sync changelog 2021-03-09 07:47:12 -07:00
Mykola Grymalyuk
1563a57c33 Fix crash on MacBookPro4,1 2021-03-09 07:30:17 -07:00
Mykola Grymalyuk
61e815565a Add new SMBIOS patching options 2021-03-08 18:01:19 -07:00
Mykola Grymalyuk
04c88ab7af Increment build 2021-03-08 16:44:47 -07:00
Mykola Grymalyuk
fe107d271c Add HW_BID injection to fix boot.efi error
Closes https://github.com/dortania/Opencore-Legacy-Patcher/issues/83
2021-03-08 16:35:36 -07:00
Mykola Grymalyuk
90274eef33 Fix ThirdPartyDrives model detection
Reference: https://github.com/dortania/Opencore-Legacy-Patcher/issues/83
2021-03-07 12:43:12 -07:00
Mykola Grymalyuk
65cb3cf7f0 Use patcher_version variable for .app 2021-03-07 10:39:15 -07:00
Mykola Grymalyuk
bcf86801db Clarify SIP usage 2021-03-06 19:22:47 -07:00
Mykola Grymalyuk
8d6ba46c6f Add PanicNoKextDump for cleaner kernel panics 2021-03-06 19:21:11 -07:00
Mykola Grymalyuk
c556d4dd15 Add user-configurable Wifi and GPU patches 2021-03-06 19:01:27 -07:00
Mykola Grymalyuk
90b7ae4898 Add user-configurable OpenCore DEBUG builds 2021-03-06 17:57:30 -07:00
Mykola Grymalyuk
0a8f018332 Reduce OpenCanopy Resources size to 1/3 2021-03-06 17:35:38 -07:00
Mykola Grymalyuk
43b55435ba Increment build version 2021-03-06 17:29:21 -07:00
Mykola Grymalyuk
690ff19b47 Add User-configurable verbose and debug
Closes https://github.com/dortania/Opencore-Legacy-Patcher/issues/10
References https://github.com/dortania/Opencore-Legacy-Patcher/issues/74
2021-03-06 17:22:52 -07:00
Mykola Grymalyuk
00a1e232b4 Remove redundant hibernation patch 2021-03-06 15:31:01 -07:00
Mykola Grymalyuk
a7ebf72d1b Add NightShiftEnabler support
Closes https://github.com/dortania/Opencore-Legacy-Patcher/issues/80
2021-03-06 15:22:47 -07:00
Mykola Grymalyuk
1af5182560 Add ForceBooterSignature support
Resolves hibernation issues
Closes https://github.com/dortania/Opencore-Legacy-Patcher/issues/72
2021-03-06 14:58:04 -07:00
Mykola Grymalyuk
eb70e4611f Add iMacProMax1,1 support
Solely for easy debugging to catch most tests at once
2021-03-04 12:19:10 -07:00
Mykola Grymalyuk
c1a6a6b156 Enable ThirdPartyDrives 2021-03-04 11:59:45 -07:00
Mykola Grymalyuk
c90fdca19d Add model verification
Ref: https://github.com/dortania/Opencore-Legacy-Patcher/pull/39
2021-03-04 11:50:30 -07:00
Mykola Grymalyuk
3dcc0d0b0b Add basic debug toggle
Currently not accessible via user-input
2021-03-04 09:58:12 -07:00
Mykola Grymalyuk
5cff0a8c6c Increment build 2021-03-04 09:46:42 -07:00
Mykola Grymalyuk
b2de538e29 Remove BCM4328/4321 support
Closes https://github.com/dortania/Opencore-Legacy-Patcher/issues/27
2021-03-04 09:39:32 -07:00
Mykola Grymalyuk
6451876f18 Merge pull request #77 from dortania/hibernation
Fix hibernation
2021-03-04 09:13:50 -07:00
Mykola Grymalyuk
31d31e1f3e Clean up code 2021-03-04 09:13:12 -07:00
Mykola Grymalyuk
7c3557ec46 Swap for DiscardHibernateMap 2021-03-04 09:00:45 -07:00
Mykola Grymalyuk
d78e5eaa90 Disable RequestBootVarRouting 2021-03-04 08:44:55 -07:00
Mykola Grymalyuk
66fdbe00b0 Disable OpenRuntime.efi 2021-03-04 08:42:00 -07:00
Mykola Grymalyuk
37c1c30a2a Clean config 2021-03-04 08:41:27 -07:00
Dhinak G
2fd02f6794 Fix WiFi patch logic 2021-03-04 09:08:04 -05:00
Mykola Grymalyuk
756d9cf248 Add CPUFriend support
Reference: https://github.com/dortania/Opencore-Legacy-Patcher/issues/72
2021-03-03 18:06:58 -07:00
Mykola Grymalyuk
52a323b269 Remove accidantal MBP3,1 support 2021-03-03 09:44:10 -07:00
Mykola Grymalyuk
7ef1688195 Increment build 2021-03-03 09:36:25 -07:00
Mykola Grymalyuk
4632371437 Misc file cleanup 2021-03-02 17:22:39 -07:00
Mykola Grymalyuk
b21b10d00b Remove old SMBIOS content 2021-03-02 16:45:40 -07:00
Mykola Grymalyuk
f93b62160a Fix sleep for iMac12,x with upgraded GPUs 2021-03-02 14:35:57 -07:00
Mykola Grymalyuk
bde44fc830 Add extras notes 2021-03-02 09:00:02 -07:00
Mykola Grymalyuk
08731521ad Add Backlight patches for modded Nvidia GPUs 2021-03-02 07:30:59 -07:00
Dhinak G
6c74bfd862 Fix typo in previous commit 2021-03-02 00:03:17 -05:00
Dhinak G
6750bdf9f1 Fix typo 2021-03-02 00:02:12 -05:00
Dhinak G
f0d8399610 Merge branch 'main' of github.com:dortania/Opencore-Legacy-Patcher into main 2021-03-02 00:01:10 -05:00
Dhinak G
8271db0d26 Package as .app 2021-03-02 00:01:06 -05:00
Mykola Grymalyuk
de77968cdb Increment version 2021-03-01 21:15:46 -07:00
Dhinak G
7b0321be65 Fix typo 2021-03-01 23:06:39 -05:00
Mykola Grymalyuk
39a9c80108 Merge pull request #13 from dortania/py3
Rewrite for Python 3 support
2021-03-01 21:00:37 -07:00
Mykola Grymalyuk
b8381a8a30 Fix typo 2021-03-01 20:57:53 -07:00
Mykola Grymalyuk
c47e21d02f Add Wifi card upgrade detection
Closes https://github.com/dortania/Opencore-Legacy-Patcher/issues/70
Closes https://github.com/dortania/Opencore-Legacy-Patcher/issues/62
Closes https://github.com/dortania/Opencore-Legacy-Patcher/issues/55
2021-03-01 20:51:10 -07:00
Mykola Grymalyuk
83df3e3e12 Add upgraded GPU checks 2021-03-01 20:08:40 -07:00
Mykola Grymalyuk
9ce2e2add1 Update README 2021-03-01 17:29:12 -07:00
Mykola Grymalyuk
565589ae50 Rework SMBIOS to support original serials 2021-03-01 17:25:50 -07:00
Mykola Grymalyuk
e8c397b2a5 Remove board-id to avoid matching 2021-03-01 16:15:27 -07:00
Mykola Grymalyuk
831878494d Add universal map support 2021-03-01 16:13:57 -07:00
Mykola Grymalyuk
0cb98121e4 Inital changes for new USB map 2021-03-01 15:19:37 -07:00
Mykola Grymalyuk
5495c480d7 Fix USB map 2021-03-01 14:08:01 -07:00
Mykola Grymalyuk
2dda8e9167 Add extra version logging to config.plist 2021-03-01 13:49:03 -07:00
Mykola Grymalyuk
b7f895e940 Automatically add versioning to config.plist 2021-03-01 13:37:49 -07:00
Mykola Grymalyuk
655eac32b1 Remove old maps 2021-03-01 13:10:43 -07:00
Mykola Grymalyuk
83c678322f Forgot commit 2021-03-01 13:10:23 -07:00
Mykola Grymalyuk
1fc478feb2 Update config to 0.6.7 support 2021-03-01 13:10:11 -07:00
Mykola Grymalyuk
5c01aface2 Fix typo 2021-03-01 13:00:13 -07:00
Mykola Grymalyuk
a261ae4c83 Update binaries 2021-03-01 12:55:55 -07:00
Mykola Grymalyuk
8fe2963e2e Update docs to reflect py3 update 2021-03-01 12:11:43 -07:00
Dhinak G
6b6de4c559 Fix save 2021-03-01 12:56:57 -05:00
Dhinak G
9d151921cc Typo 2021-02-19 18:18:09 -05:00
Dhinak G
04905c6f1d Fix last 2021-02-19 17:27:54 -05:00
Dhinak G
8bbb24cece Remove directory 2021-02-19 17:27:22 -05:00
Dhinak G
37a15e2e64 Minor fixes 2021-02-19 17:24:14 -05:00
Dhinak G
7bf36a9689 set executable 2021-02-19 16:43:21 -05:00
Dhinak G
88b80e6354 Sha instead of ref 2021-02-19 16:37:37 -05:00
Dhinak G
036282a7e9 Add CI 2021-02-19 16:33:44 -05:00
Dhinak G
015701d80f Fix pyinstaller 2021-02-19 16:24:37 -05:00
Dhinak G
ae363102d7 Merge branch 'main' into py3 2021-02-19 16:21:13 -05:00
Dhinak G
8917368988 Radically revamp disk/partition selection process
Co-authored-by: Michael Eckhoff <mreckhof@gmail.com>
2021-02-19 15:40:08 -05:00
Mykola Grymalyuk
ca18f4fa9d Fix typo 2021-02-19 08:55:42 -07:00
Mykola Grymalyuk
ec0ecd5567 Replace mismatched 0.6.6 binary 2021-02-18 15:35:04 -07:00
Mykola Grymalyuk
90cd402c76 Merge pull request #57 from kommtzeitkonrad/main
Fix compatibility on older firmwares
2021-02-18 14:36:39 -07:00
Mykola Grymalyuk
b49ac3ee39 Increment OC to dbe046d
Closes https://github.com/dortania/Opencore-Legacy-Patcher/issues/59
2021-02-18 14:20:09 -07:00
kommtzeitkonrad
0e9d00caf9 Fix compatibility on older firmwares
references https://github.com/dortania/Opencore-Legacy-Patcher/issues/59
references https://github.com/acidanthera/bugtracker/issues/1502
2021-02-18 22:14:28 +01:00
kommtzeitkonrad
079d4e0564 Fix typo 2021-02-11 22:42:07 +01:00
kommtzeitkonrad
39e2a16f8f Fix typo 2021-02-11 22:26:51 +01:00
Mykola Grymalyuk
75587ab345 Update config.plist
Closes https://github.com/dortania/Opencore-Legacy-Patcher/issues/54
2021-02-09 07:10:11 -07:00
Mykola Grymalyuk
7d74495435 Add forgotten change 2021-02-08 11:53:12 -07:00
Mykola Grymalyuk
a78b201235 Re-add OpenCore GUI 2021-02-08 11:52:56 -07:00
Mykola Grymalyuk
74c0e9e717 Merge pull request #49 from BenSova/patch-1
Add a note about Big Sur not booting after removing Open Core.
2021-02-08 11:30:24 -07:00
Mykola Grymalyuk
8ed5fd8397 Misc fixes
Closes https://github.com/dortania/Opencore-Legacy-Patcher/issues/53
Closes https://github.com/dortania/Opencore-Legacy-Patcher/issues/47
Closes https://github.com/dortania/Opencore-Legacy-Patcher/issues/52
2021-02-08 11:28:55 -07:00
Dhinak G
5bfa2afc38 Add flake8 2021-01-24 17:18:46 -05:00
Dhinak G
c9fea1fe6f Rename to constants 2021-01-24 17:18:42 -05:00
Dhinak G
e2d93744f7 Add version gating 2021-01-24 15:42:13 -05:00
Dhinak G
1e17eb88ed Remove old payloads 2021-01-24 15:14:19 -05:00
Dhinak G
328527a663 Fix pathing 2021-01-24 15:12:55 -05:00
Ben Sova
4dcebb4906 Add a note about Big Sur not booting after removing Open Core. 2021-01-24 12:57:24 -07:00
Dhinak G
a7e043bf4f Remove Build-App.command 2021-01-24 13:52:48 -05:00
Dhinak G
e94f68d6e3 Switch to Python 3, part 1 2021-01-24 13:51:38 -05:00
Mykola Grymalyuk
c655c4a910 Update README.md 2021-01-11 19:58:44 -07:00
khronokernel
50e3e08ff0 Resolves firmware bricking issues
Closes https://github.com/dortania/Opencore-Legacy-Patcher/issues/43
Closes https://github.com/dortania/Opencore-Legacy-Patcher/issues/42
Closes https://github.com/dortania/Opencore-Legacy-Patcher/issues/40
Closes https://github.com/dortania/Opencore-Legacy-Patcher/issues/38
Closes https://github.com/dortania/Opencore-Legacy-Patcher/issues/32
Closes https://github.com/dortania/Opencore-Legacy-Patcher/issues/15
2021-01-11 14:23:57 -07:00
Mykola Grymalyuk
3674ca47fa Update README.md 2021-01-01 23:58:38 -07:00
Dhinak G
0e7ecc58f8 Update README.md 2020-12-22 13:14:45 -05:00
Dhinak G
84d5b99b4a Update README.md 2020-12-22 13:14:14 -05:00
Mykola Grymalyuk
1c70521fa1 Update README.md 2020-12-21 08:19:19 -07:00
Mykola Grymalyuk
9faa8f82e8 Update ModelArray.py 2020-12-21 08:18:36 -07:00
Mykola Grymalyuk
647cc0a83a Add Ivy and Haswell notes 2020-12-21 08:17:37 -07:00
Mykola Grymalyuk
12347f866a Add HiDPI patch for UEFI
Closes https://github.com/dortania/Opencore-Legacy-Patcher/issues/21
2020-12-15 15:32:26 -07:00
Mykola Grymalyuk
c6f84cc036 Fix USB Map
Closes https://github.com/dortania/Opencore-Legacy-Patcher/issues/26
2020-12-15 15:13:26 -07:00
Mykola Grymalyuk
0c8bda59a1 Remove Build App command 2020-12-15 09:17:26 -07:00
Mykola Grymalyuk
9caa39c50d Add RestrictEvents kext
Ensures firmware updates cannot be performed even within the installer
2020-12-12 13:21:23 -07:00
Mykola Grymalyuk
48d714db61 Fix BlacklistAppleUpdate
Closes https://github.com/dortania/Opencore-Legacy-Patcher/issues/17
2020-12-10 21:33:47 -07:00
Mykola Grymalyuk
59ac0c3fec Fix missing SSDT-CPBG patch 2020-12-06 09:01:25 -07:00
Mykola Grymalyuk
dc7560b142 Add MacPro3,1 to HID patch 2020-12-04 21:26:01 -07:00
Mykola Grymalyuk
0f0ca7d4ec Increment build version 2020-12-04 16:09:32 -07:00
Mykola Grymalyuk
6f4bface55 Sync changelog
Closes https://github.com/dortania/Opencore-Legacy-Patcher/issues/8
2020-12-04 16:03:43 -07:00
Mykola Grymalyuk
ad5004d3e8 Add temp workaround to macserial issue 2020-12-04 15:59:20 -07:00
Mykola Grymalyuk
fff9c4b75d Update BuildOpenCore.py 2020-12-04 15:33:21 -07:00
Mykola Grymalyuk
d6224db564 Update macserial 2020-12-04 15:27:19 -07:00
Mykola Grymalyuk
6b900d7aa8 Update README.md 2020-12-04 14:29:36 -07:00
Mykola Grymalyuk
217999a8e7 Update README.md 2020-12-04 14:29:18 -07:00
Mykola Grymalyuk
b25fa91962 Fix misc issues 2020-12-03 13:42:54 -07:00
Mykola Grymalyuk
627bc817d0 Enable Hibernation support
Closes https://github.com/dortania/Opencore-Legacy-Patcher/issues/7
2020-12-03 11:45:23 -07:00
Mykola Grymalyuk
511ea4cf68 Increment build version 2020-12-03 09:42:50 -07:00
Mykola Grymalyuk
1a37abbb4b Sync changelog 2020-12-03 09:37:19 -07:00
Mykola Grymalyuk
e284214dfb Add AGDP patch for dual GPU models 2020-12-03 09:28:37 -07:00
Mykola Grymalyuk
33df90c399 Temp remove GUI due to rendering issues 2020-12-03 09:12:01 -07:00
Mykola Grymalyuk
80e65bb6ab Add basic audio support for legacy chipets 2020-12-03 09:08:42 -07:00
Mykola Grymalyuk
513fe5cb36 Add basic troubleshooting 2020-12-03 09:00:36 -07:00
Mykola Grymalyuk
eb5280f827 Fix correcy typo
Closes https://github.com/dortania/Opencore-Legacy-Patcher/issues/5
2020-12-03 08:51:12 -07:00
Mykola Grymalyuk
bafff66417 Print IOHIDFamily patching 2020-12-02 17:23:53 -07:00
Mykola Grymalyuk
f71c8925c6 Update icon border 2020-12-02 17:23:04 -07:00
Mykola Grymalyuk
9ace5c9624 Add basic py3 support 2020-12-02 14:56:12 -07:00
Mykola Grymalyuk
939ee3f188 Add VoodooHDA payload 2020-12-02 11:12:36 -07:00
Mykola Grymalyuk
a57fa2d572 Update README.md 2020-12-02 10:35:45 -07:00
Mykola Grymalyuk
ce16e87101 Update README.md 2020-12-02 10:33:44 -07:00
Mykola Grymalyuk
abc704e6e3 Add icon 2020-12-02 10:32:46 -07:00
Mykola Grymalyuk
8480c1d7c6 Add basic app building
Currently non-functional
2020-12-02 08:13:23 -07:00
Mykola Grymalyuk
3b8168644f Fix import with py3 2020-12-01 20:55:39 -07:00
Mykola Grymalyuk
8756a2daa3 Fix incorrect DeviceProperty formatting 2020-12-01 17:43:34 -07:00
Mykola Grymalyuk
89d434e708 Increment build version 2020-12-01 17:09:52 -07:00
Mykola Grymalyuk
68cf4d1e7d Sync changelog 2020-12-01 16:39:54 -07:00
Mykola Grymalyuk
847b26bf47 Fix typo 2020-12-01 16:38:53 -07:00
Mykola Grymalyuk
c6eb016d85 Increment build version 2020-12-01 15:48:53 -07:00
Mykola Grymalyuk
362b3e4065 Sync changelog 2020-12-01 15:46:10 -07:00
Mykola Grymalyuk
0e02d45fce Revamp Airport patches 2020-12-01 15:44:19 -07:00
Mykola Grymalyuk
7df675ff42 Improve FileVault support 2020-12-01 14:37:27 -07:00
Mykola Grymalyuk
d15d691386 Expand IOHIDFamily Patch to all Nvidia chipsets 2020-12-01 14:26:42 -07:00
Mykola Grymalyuk
a8e2d1ad14 Update README.md 2020-12-01 11:45:07 -07:00
Mykola Grymalyuk
2a49219521 Increment build version 2020-12-01 11:11:40 -07:00
351 changed files with 67069 additions and 10533 deletions

4
.flake8 Normal file
View File

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

34
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@@ -0,0 +1,34 @@
---
name: Bug report
about: Create a report to help notify of issues
title: ''
labels: ''
assignees: ''
---
**Describe the bug**
A clear and concise description of what the issue is.
**To Reproduce**
Steps to reproduce the behavior:
1. Open app or .command '...'
2. Enter '....'
3. See error
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Build Folder**
If applicable, add the generated OpenCore Build to help explain your problem.
**Hardware (please complete the following information):**
- OS Running (ie. macOS 10.15.7, Catalina)
- OS Patching (ie. macOS 11.2.3, Big Sur)
- Model Patching (ie. MacPro5,1)
For in-depth hardware logs, we highly encourage users to run [IORegistryExplorer](https://github.com/khronokernel/IORegistryClone/blob/master/ioreg-210.zip?raw=true) and send the output
* ie. `File -> SaveAs`
**Additional context**
Add any other context about the problem here.

45
.github/workflows/build-app.yml vendored Normal file
View File

@@ -0,0 +1,45 @@
name: CI - Build App
on:
push:
workflow_dispatch:
release:
types: [published]
jobs:
build:
name: Build App
runs-on: self-hosted
steps:
- uses: actions/checkout@v2
# - name: Install Python Dependencies
# run: |
# python3 -m pip install -U pip
# pip3 install pyinstaller
- run: pyinstaller Opencore-Patcher.spec
- run: ./after_pyinstaller.sh
- run: 'codesign -s "Developer ID Application: Mykola Grymalyuk (S74BDJXQMD)" -v --deep --timestamp --entitlements entitlements.plist -o runtime "dist/OpenCore-Patcher.app"'
- run: cd dist; zip ../OpenCore-Patcher.zip OpenCore-Patcher; zip -r ../OpenCore-Patcher.app.zip OpenCore-Patcher.app
- run: ./../sign-app.sh
- name: Upload Binary to Artifacts
uses: actions/upload-artifact@v2
with:
name: OpenCore-Patcher
path: OpenCore-Patcher.zip
- name: Upload App to Artifacts
uses: actions/upload-artifact@v2
with:
name: OpenCore-Patcher.app
path: OpenCore-Patcher.app.zip
- name: Upload to Release
if: github.event_name == 'release'
uses: svenstaro/upload-release-action@e74ff71f7d8a4c4745b560a485cc5fdb9b5b999d
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: OpenCore-Patcher.app.zip
tag: ${{ github.ref }}
file_glob: true

29
.github/workflows/build-cli.yml vendored Normal file
View File

@@ -0,0 +1,29 @@
name: CI - Build CLI
on:
push:
workflow_dispatch:
release:
types: [published]
jobs:
build:
name: Build CLI
runs-on: self-hosted
steps:
- uses: actions/checkout@v2
- run: pyinstaller OCLP-CLI.spec
- run: cd dist; zip ../OCLP-CLI.zip OCLP-CLI
- name: Upload Binary to Artifacts
uses: actions/upload-artifact@v2
with:
name: OCLP-CLI
path: OCLP-CLI.zip
- name: Upload to Release
if: github.event_name == 'release'
uses: svenstaro/upload-release-action@e74ff71f7d8a4c4745b560a485cc5fdb9b5b999d
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: OCLP-CLI.zip
tag: ${{ github.ref }}
file_glob: true

35
.github/workflows/build-site.yml vendored Normal file
View File

@@ -0,0 +1,35 @@
name: CI - Build Site
on:
push:
branches-ignore:
- gh-pages
workflow_dispatch:
pull_request:
jobs:
build:
name: Build Site and Deploy
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v2-beta
with:
node-version: '12'
- name: Checkout Repository
uses: actions/checkout@v2
with:
fetch-depth: '0'
persist-credentials: false
submodules: 'recursive'
- name: Install
run: npm install
working-directory: 'docs'
- name: Build
run: npm run build
working-directory: 'docs'
- name: Deploy
uses: JamesIves/github-pages-deploy-action@3.7.1
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main'}}
with:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
BRANCH: gh-pages
FOLDER: docs/.vuepress/dist/
CLEAN: true

13
.gitignore vendored
View File

@@ -1,6 +1,17 @@
.DS_Store
OCLP-GUI.command
/payloads/Apple-Binaries-OCLP-main
/payloads/__MACOSX
/App
/Build-Folder
/build
/dist
/.vscode
__pycache__/
*.py[cod]
*$py.class
*$py.class
/docs/.vuepress/dist
/docs/.vuepress/.config.js.swp
/docs/yarn.lock
/docs/yarn-error.log
/docs/node_modules/

13
.pylintrc Normal file
View File

@@ -0,0 +1,13 @@
[MASTER]
init-hook="from pylint.config import find_pylintrc; import os, sys; sys.path.append(os.path.dirname(find_pylintrc()))"
[MESSAGES CONTROL]
disable=unused-import,
subprocess-run-check,
line-too-long,
too-few-public-methods,
missing-module-docstring,
missing-class-docstring,
missing-function-docstring

181
CHANGELOG.md Normal file
View File

@@ -0,0 +1,181 @@
# OpenCore Legacy Patcher changelog
## 0.0.23
- Fix MacBookPro4,1 15" and 17" audio support
- Fix iMac7,1 24" and iMac9,1 24" audio support
- Fix Macmini4,1 audio support
- Increment binaries
- AppleALC 1a3e5cb (1.6.0 rolling - 04-14-2021)
- Enhance Wifi model detection
- Hide OpenShell.efi by default
- Add Brightness Control patches for legacy Nvidia, AMD and Intel GPUs
- Models with brightness control issues in Catalina partially supported
- Add user configurable Bootstrap setting
- Enhance GPU Detection logic
- Increment AppleBackLightFixup v1.0.1
- Add panel type F10T9cde
- Enhance HDMI audio support on Mac Pros and Xserves
- Strip unused kext entries during build
- Add gfxutil support for better DeviceProperty path detection
- Add basic CLI support
- Disable SIP and SecureBootModel by default on legacy GPUs
## 0.0.22
- Add ExFat support for models missing driver
- Aids BootCamp support for EFI based installs on 2010 and older Macs
- Fix CPU Boosting on 2011 and older Macs
- Add basic support for Xserve2,1
- Add AppleALC support(99b3662 - 1.6.0 rolling - 04-09-2021), remove AppleHDA patching requirement
- Add BCM94322 and BCM94321 chipset support
## 0.0.21
- Fix botched images in OpenCanopy
- Add support for 3rd party OpenCore usage detection during building
- Mainly for users transtioning from Ausdauersportler's OpenCore configuration
## 0.0.20
- Fix CPU Calculation on early MCP79 chipsets (ie. iMac9,1, MacBook5,x)
- Increment binaries
- OpenCore c528597 (0.6.8 release - 2021-04-05)
- Lilu 3ef7ca1 (1.5.2 release - 2021-04-05)
- WhateverGreen afcd687 (1.4.9 release - 2021-04-05)
- Move Apple binaries to dedicated repo and allow custom repos
- Reduces App size 1/5th compared to 0.0.19
- Fix OpenCanopy support on iMac7,1 and 8,1
- Set iGPU-less iMacs to iMacPro1,1
- Additionally fixes Bluetooth on older iMacs with BRCM2046 modules
- Add MacBook4,1 support
- Create dedicated RestrictEvents build for MacBookPro9,1
- Fix Mac Pro and Xserve output issues
## 0.0.19
- Add SMC-Spoof.kext to avoid triggering `smcupdater`
- Add Root Volume patching for older machines
- AppleHDA Patch for 2011 and older (Excluding MacPro4,1+)
- Fix CPU Speed reporting
- Increment binaries
- OpenCore 9cd61bb (0.6.8 rolling - 2021-03-27)
- Add Mavericks and newer .app support
- Refactor USB map building, fixes USB 3.0 displaying as USB 2.0
- Fix blackscreen on MacBookPro9,1
- Update RestrictEvents with custom build (1.0.1)
- Blocks `/usr/libexec/displaypolicyd` on MacBookPro9,1 to ensure smooth GPU switching
- Add custom SD Card icon
- Add automatic codesiging and notarization
- Fix crashing when CD is present
- Add custom SSD icon
- Fix Broadcom Ethernet on older 2009-2011 Macs
## 0.0.18
- Disable Vault by default due to breaking installations
- Move BOOTx64.efi to System/Library/CoreServices/ to support GPT BootCamp installs
- Disable verbose by default, still configurable by end-user
- Remove `AppleInternal`(0x10) from SIP value
- Add Mac Pro DRM patches for Metal GPUs
- Force `Moderate` SMBIOS replacement for models without native APFS support
- Re-enable legacy BCM94322 networking patches
- Add custom drive icons for external drives
## 0.0.17
- Fix build detection breaking on older OS
## 0.0.16
- Move Serial selection to Patcher Settings
- Add new SMBIOS patching options:
- Minimal: Only update board ID and BIOSVersion, keep original serials
- Moderate: Update entire SMBIOS, keep original serials
- Advanced: Update entire SMBIOS, generate new serials
- Fix crash on MacBookPro4,1
- Fix External Display Support on MacBookPro10,1
- Inject Patcher version into NVRAM for easier debugging
- Add user-configurable ShowPicker
- Add user-configurable Vaulting, enabled by default
- Add user-configurable SIP and SecureBootModel
- Fix USB Maps not working on "Minimal" SMBIOS
- Fix GPU vendor user-configuration
- Fix custom EFI Boot icon in Mac Boot Picker
- Enable UserInterfaceTheme to ensure DefaultBackgroundColor is respected
- Enable `amfi_get_out_of_my_way=1` when SIP is disabled
## 0.0.15
- Add user-configurable OpenCore DEBUG builds
- Add user-configurable Wifi and GPU patches
- Fix ThirdPartyDrives model detection
- Add HW_BID injection to fix boot.efi error
## 0.0.14
- Enable ThirdPartyDrives to aid with hibernation on 3rd party SATA drives
- Increment OpenCore 7bb41aa (0.6.8 rolling, 2021-03-06)
- Add ForceBooterSignature to resolve hibernation issues
- Add NightShiftEnabler (1.1.0 release e1639f9)
- Add user-configurable verbose and debug settings
- Add GopPassThrough quirk for UGA-based systems
## 0.0.13
- Add CPUFriend support to resolve X86PlatformPlugin clashes
- (1.2.3 c388a62 release)
- Fix crash with MacBookAir5,x
- Fix hibernation support
- Remove Wireless patches for BCM4328/4321(14e4:4328) due to boot issues
## 0.0.12
- Convert OpenCore-Patcher binary to OpenCore-Patcher.app
- Add Backlight patches for modded Nvidia GPUs in iMac10,x-12,x
- Fix sleep for iMac12,x with upgraded GPUs
## 0.0.11
- Re-add OpenCore GUI
- Rewrite in py3
- Add OpenCore-Patcher binary for releases avoiding local python requirement
- Increment binaries
- OpenCore cbd2fa3 (0.6.7 release)
- WhateverGreen 2e19d1b (1.4.8 release)
- Rework SMBIOS allowing both original and custom serials(Should resolve all iMessage issues)
- Support upgraded GPU detection in iMac10,x-12,x
- Add Wifi card upgrade detection
## 0.0.10
- Increment binaries
- OpenCore 43f5339 (0.6.6 release)
- Lilu d107554 (1.5.1 release)
- WhateverGreen 9e53d8a (1.4.7 release)
- Add IDE support to MacPro3,1
- Set SecureBootModel to iMac Pro(should aid in booting older OSes with OpenCore)
- Update MacBookPro SMBIOS
## 0.0.9
- Resolve firmware install issues bricking Macs
## 0.0.8
- Fix USB Map
- Add HiDPI patch
## 0.0.7
- Add MacPro3,1 to HID patch
- Fix missing SSDT-CPBG patch
- Fix BlacklistAppleUpdate
- Add RestrictEvents kext
## 0.0.6
- Fix macserial crashing
## 0.0.5
- Enable hibernation support
- Work around USB Map failing
- Add checks whether booting with OpenCore
- Fix MouSSE injection
## 0.0.4
- Add basic audio support for legacy chipsets
- Add patch for dual GPU machines
## 0.0.3
- Fix Wireless patch logic
## 0.0.2
- Expand IOHIDFamily Patch to all Nvidia chipsets
- Fix Airdrop 1.0 support
- Add El Capitan era wireless cards
## 0.0.1
- Inital developer preview

BIN
OC-Patcher.icns Normal file

Binary file not shown.

160
OCLP-CLI.command Executable file
View File

@@ -0,0 +1,160 @@
#!/usr/bin/env python3
# Copyright (C) 2020-2021 Mykola Grymalyuk
from __future__ import print_function
import subprocess
import sys
import time
import platform
import argparse
from pathlib import Path
from Resources import Build, ModelArray, Constants, SysPatch, Utilities, CliMenu
class OpenCoreLegacyPatcher():
def __init__(self):
self.constants = Constants.Constants()
self.current_model: str = None
opencore_model: str = subprocess.run("nvram 4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102:oem-product".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.decode()
if not opencore_model.startswith("nvram: Error getting variable"):
opencore_model = [line.strip().split(":oem-product ", 1)[1] for line in opencore_model.split("\n") if line.strip().startswith("4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102:")][0]
self.current_model = opencore_model
else:
self.current_model = subprocess.run("system_profiler SPHardwareDataType".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
self.current_model = [line.strip().split(": ", 1)[1] for line in self.current_model.stdout.decode().split("\n") if line.strip().startswith("Model Identifier")][0]
self.constants.detected_os = int(platform.uname().release.partition(".")[0])
if self.current_model in ModelArray.NoAPFSsupport:
self.constants.serial_settings = "Moderate"
if self.current_model in ModelArray.LegacyGPU:
Build.BuildOpenCore(self.constants.custom_model or self.current_model, self.constants).check_pciid(False)
if not (self.constants.dgpu_devices and self.constants.dgpu_vendor == self.constants.pci_amd_ati and self.constants.dgpu_device in ModelArray.AMDMXMGPUs) or not (self.constants.dgpu_devices and self.constants.dgpu_vendor == self.constants.pci_nvidia and self.constants.dgpu_device in ModelArray.NVIDIAMXMGPUs):
self.constants.sip_status = False
self.constants.secure_status = False
# Logic for when user runs custom OpenCore build and do not expose it
# Note: This logic currently only applies for iMacPro1,1 users, see below threads on the culprits:
# - https://forums.macrumors.com/threads/2011-imac-graphics-card-upgrade.1596614/post-17425857
# - https://forums.macrumors.com/threads/opencore-on-the-mac-pro.2207814/
# PLEASE FOR THE LOVE OF GOD JUST SET ExposeSensitiveData CORRECTLY!!!
if self.current_model == "iMacPro1,1":
serial: str = subprocess.run("system_profiler SPHardwareDataType | grep Serial".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.decode()
serial = [line.strip().split("Number (system): ", 1)[1] for line in serial.split("\n") if line.strip().startswith("Serial")][0]
true_model = subprocess.run([str(self.constants.macserial_path), "--info", str(serial)], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
true_model = [i.partition(" - ")[2] for i in true_model.stdout.decode().split("\n") if "Model: " in i][0]
print(f"True Model: {true_model}")
if not true_model.startswith("Unknown"):
self.current_model = true_model
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('--skip_wifi', help='Skip wifi patches', 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)
# Building args requiring value values
parser.add_argument('--model', action='store', help='Set custom model', required=False)
parser.add_argument('--metal_gpu', action='store', help='Set Metal GPU Vendor', required=False)
parser.add_argument('--smbios_spoof', action='store', help='Set SMBIOS patching mode', 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('--custom_repo', action='store', help='Set SMBIOS patching mode', 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.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.skip_wifi:
print("- Set wifi skip configuration")
self.constants.wifi_build = 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.metal_gpu:
if args.metal_gpu == "Nvidia":
print("- Set Metal GPU patches to Nvidia")
self.constants.metal_build = True
self.constants.imac_vendor = "Nvidia"
elif args.metal_gpu == "AMD":
print("- Set Metal GPU patches to AMD")
self.constants.metal_build = True
self.constants.imac_vendor = "AMD"
else:
print(f"- Unknown GPU arg passed: {args.metal_gpu}")
self.constants.metal_build = False
self.constants.imac_vendor = "None"
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.build:
if args.model:
print(f"- Using custom model: {args.model}")
self.constants.custom_model = args.model
self.build_opencore()
else:
print(f"- Using detected model: {self.current_model}")
self.build_opencore()
if args.patch_sys_vol:
print("- Set System Volume patching")
if args.custom_repo:
self.constants.url_apple_binaries = args.custom_repo
print(f"- Custom set repo to: {self.constants.url_apple_binaries}")
SysPatch.PatchSysVolume(self.constants.custom_model or self.current_model, self.constants).start_patch()
elif args.unpatch_sys_vol:
print("- Set System Volume unpatching")
SysPatch.PatchSysVolume(self.constants.custom_model or self.current_model, self.constants).start_unpatch()
def build_opencore(self):
Build.BuildOpenCore(self.constants.custom_model or self.current_model, self.constants).build_opencore()
def install_opencore(self):
Build.BuildOpenCore(self.constants.custom_model or self.current_model, self.constants).copy_efi()
OpenCoreLegacyPatcher()
# Example arg for OCLP command line
# ./OCLP-CLI --build --verbose --debug_oc --debug_kext --model iMac11,2

34
OCLP-CLI.spec Normal file
View File

@@ -0,0 +1,34 @@
# -*- 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'],
binaries=[],
datas=[('payloads', 'payloads'), ('Resources', 'Resources')],
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,
[],
name='OCLP-CLI',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=True )

View File

@@ -1,226 +1,190 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# Copyright (C) 2020-2021, Dhinak G, Mykola Grymalyuk
from __future__ import print_function
from shutil import copy
from shutil import rmtree
import os
import json
import subprocess
import sys
import zipfile
import time
import platform
from Resources import *
from Resources import Build, ModelArray, Constants, SysPatch, Utilities, CliMenu
# List build versions
patcher_version = "0.0.1"
CustomSMBIOS=False
MainMenu=True
MenuWidth = 52
header = '#' * MenuWidth
subheader = '-' * MenuWidth
class OpenCoreLegacyPatcher():
def __init__(self):
self.constants = Constants.Constants()
self.current_model: str = None
opencore_model: str = subprocess.run("nvram 4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102:oem-product".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.decode()
if not opencore_model.startswith("nvram: Error getting variable"):
opencore_model = [line.strip().split(":oem-product ", 1)[1] for line in opencore_model.split("\n") if line.strip().startswith("4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102:")][0]
self.current_model = opencore_model
else:
self.current_model = subprocess.run("system_profiler SPHardwareDataType".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
self.current_model = [line.strip().split(": ", 1)[1] for line in self.current_model.stdout.decode().split("\n") if line.strip().startswith("Model Identifier")][0]
self.constants.detected_os = int(platform.uname().release.partition(".")[0])
if self.current_model in ModelArray.NoAPFSsupport:
self.constants.serial_settings = "Moderate"
if self.current_model in ModelArray.LegacyGPU:
Build.BuildOpenCore(self.constants.custom_model or self.current_model, self.constants).check_pciid(False)
if not (self.constants.dgpu_devices and self.constants.dgpu_vendor == self.constants.pci_amd_ati and self.constants.dgpu_device in ModelArray.AMDMXMGPUs) or not (self.constants.dgpu_devices and self.constants.dgpu_vendor == self.constants.pci_nvidia and self.constants.dgpu_device in ModelArray.NVIDIAMXMGPUs):
self.constants.sip_status = False
self.constants.secure_status = False
while MainMenu:
os.system('clear')
# Logic for when user runs custom OpenCore build and do not expose it
# Note: This logic currently only applies for iMacPro1,1 users, see below threads on the culprits:
# - https://forums.macrumors.com/threads/2011-imac-graphics-card-upgrade.1596614/post-17425857
# - https://forums.macrumors.com/threads/opencore-on-the-mac-pro.2207814/
# PLEASE FOR THE LOVE OF GOD JUST SET ExposeSensitiveData CORRECTLY!!!
if self.current_model == "iMacPro1,1":
serial: str = subprocess.run("system_profiler SPHardwareDataType | grep Serial".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.decode()
serial = [line.strip().split("Number (system): ", 1)[1] for line in serial.split("\n") if line.strip().startswith("Serial")][0]
true_model = subprocess.run([str(self.constants.macserial_path), "--info", str(serial)], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
true_model = [i.partition(" - ")[2] for i in true_model.stdout.decode().split("\n") if "Model: " in i][0]
print(f"True Model: {true_model}")
if not true_model.startswith("Unknown"):
self.current_model = true_model
print(header)
print(" OpenCore Legacy patcher v%s" % patcher_version)
print(" Current Model: %s" % BuildOpenCore.current_model)
print(header)
print("")
if BuildOpenCore.current_model not in ModelArray.SupportedSMBIOS:
print(" Your model is not supported by this patcher!")
print("")
print(" If you plan to create the USB for another machine,")
print(" please select option 5")
print(subheader)
print("")
elif BuildOpenCore.current_model in ("MacPro3,1", "iMac7,1"):
print(" This model is supported")
print(" However please ensure the CPU have been upgraded")
print(" to support SSE4.1+")
print(subheader)
print("")
else:
print(" This model is supported")
print(subheader)
print("")
print(" 1. Build OpenCore")
print(" 2. Install OpenCore to USB/internal drive")
print(" 3. Change model")
print(" 4. Credits")
print(" 5. Exit")
print("")
def build_opencore(self):
Build.BuildOpenCore(self.constants.custom_model or self.current_model, self.constants).build_opencore()
MainMenu = raw_input('Please select an option: ')
def install_opencore(self):
Build.BuildOpenCore(self.constants.custom_model or self.current_model, self.constants).copy_efi()
if MainMenu=="1":
OpenCoreBuilderMenu=True
while OpenCoreBuilderMenu:
os.system('clear')
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:
print(header)
print(" Build OpenCore v%s for model: %s" % (Versions.opencore_version, BuildOpenCore.current_model))
print(header)
print("")
print(" 1. Auto build OpenCore")
print(" 2. Change OpenCore version")
print(" 3. Return to main menu")
print("")
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 in {"y", "Y", "yes", "Yes"}:
print("\n".join(ModelArray.SupportedSMBIOS))
input("Press any key to continue...")
if self.constants.custom_model in ModelArray.NoAPFSsupport:
self.constants.serial_settings = "Moderate"
OpenCoreBuilderMenu = raw_input('Please select an option: ')
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 = [
# TODO: Enable setting OS target when more OSes become supported by the patcher
#[f"Change OS version:\t\t\tCurrently macOS {self.constants.os_support}", self.change_os],
[f"Enable Verbose Mode:\t\tCurrently {self.constants.verbose_debug}", CliMenu.MenuOptions(self.constants.custom_model or self.current_model, self.constants).change_verbose],
[f"Enable OpenCore DEBUG:\t\tCurrently {self.constants.opencore_debug}", CliMenu.MenuOptions(self.constants.custom_model or self.current_model, self.constants).change_oc],
[f"Enable Kext DEBUG:\t\t\tCurrently {self.constants.kext_debug}", CliMenu.MenuOptions(self.constants.custom_model or self.current_model, self.constants).change_kext],
[f"Force iMac Metal Patch:\t\tCurrently {self.constants.imac_vendor}", CliMenu.MenuOptions(self.constants.custom_model or self.current_model, self.constants).change_metal],
[f"Assume Upgraded Wifi Always:\tCurrently {self.constants.wifi_build}", CliMenu.MenuOptions(self.constants.custom_model or self.current_model, self.constants).change_wifi],
[f"Set ShowPicker Mode:\t\tCurrently {self.constants.showpicker}", CliMenu.MenuOptions(self.constants.custom_model or self.current_model, self.constants).change_showpicker],
[f"Set Vault Mode:\t\t\tCurrently {self.constants.vault}", CliMenu.MenuOptions(self.constants.custom_model or self.current_model, self.constants).change_vault],
[f"Set SIP and SecureBootModel:\tSIP: {self.constants.sip_status} SBM: {self.constants.secure_status}", CliMenu.MenuOptions(self.constants.custom_model or self.current_model, self.constants).change_sip],
[f"Set SMBIOS Mode:\t\t\tCurrently {self.constants.serial_settings}", CliMenu.MenuOptions(self.constants.custom_model or self.current_model, self.constants).change_serial],
[f"Set Generic Bootstrap:\t\t{self.constants.boot_efi}", CliMenu.MenuOptions(self.constants.custom_model or self.current_model, self.constants).bootstrap_setting],
["Set Custom Patch Repo", CliMenu.MenuOptions(self.constants.custom_model or self.current_model, self.constants).custom_repo],
]
if OpenCoreBuilderMenu=="1":
AutoBuilderMenu=True
while AutoBuilderMenu:
os.system('clear')
print(header)
print(" Building OpenCore for model: %s" % BuildOpenCore.current_model)
print(header)
print("")
print("The current working directory:")
print (" %s" % Versions.current_path)
print("")
BuildOpenCore.BuildEFI()
BuildOpenCore.BuildGUI()
BuildOpenCore.BuildSMBIOS()
BuildOpenCore.SavePlist()
BuildOpenCore.CleanBuildFolder()
print("")
print("Your OpenCore EFI has been built at:")
print(" %s" % Versions.opencore_path_done)
print("")
AutoBuilderMenu = raw_input("Press any key to return to previous menu: ")
if AutoBuilderMenu=="1":
print("Returning to previous menu...")
AutoBuilderMenu=False
OpenCoreBuilderMenu=False
elif OpenCoreBuilderMenu=="2":
ChangeOCversion=True
while ChangeOCversion:
os.system('clear')
print(header)
print(" Current OpenCore version: %s" % Versions.opencore_version)
print(header)
print("")
print(" Supported versions: 0.6.3, 0.6.4")
print("")
OpenCoreOption = raw_input('Please enter the OpenCore you want (Press enter to exit): ')
if OpenCoreOption == "":
print("Exiting...")
ChangeOCversion=False
MainMenu=True
else:
print("")
print(" New SMBIOS: %s" % OpenCoreOption)
print("")
ChangeOCversionYN = raw_input("Is this correcy? (y/n)")
if ChangeOCversionYN in {"y", "Y", "yes", "Yes"}:
ChangeOCversion=False
Versions.opencore_version = OpenCoreOption
MainMenu=True
elif OpenCoreBuilderMenu=="3":
print("\n Returning to main menu...")
OpenCoreBuilderMenu=False
MainMenu=True
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"""]).start()
def PatchVolume(self):
Utilities.cls()
Utilities.header(["Patching System Volume"])
print("""Patches Root volume to fix misc issues such as:
- Brightness control for non-Metal GPUs
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 or have FileVault
enabled.
Supported Options:
1. Patch System Volume
2. Unpatch System Volume (Experimental)
B. Exit
""")
change_menu = input("Patch System Volume?: ")
if change_menu == "1":
SysPatch.PatchSysVolume(self.constants.custom_model or self.current_model, self.constants).start_patch()
elif change_menu == "2":
SysPatch.PatchSysVolume(self.constants.custom_model or self.current_model, self.constants).start_unpatch()
else:
print("Returning to main menu")
def main_menu(self):
response = None
ModelArray.SupportedSMBIOS = ModelArray.SupportedSMBIOS11
while not (response and response == -1):
title = [
f"OpenCore Legacy Patcher v{self.constants.patcher_version}",
f"Selected Model: {self.constants.custom_model or self.current_model}",
f"Target OS: macOS {self.constants.os_support}",
]
if (self.constants.custom_model or self.current_model) not in ModelArray.SupportedSMBIOS:
in_between = [
'Your model is not supported by this patcher!',
'',
'If you plan to create the USB for another machine, please select the "Change Model" option in the menu.'
]
elif not self.constants.custom_model and self.current_model == "iMac7,1" and \
"SSE4.1" not in subprocess.run("sysctl machdep.cpu.features".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.decode():
in_between = [
'Your model requires a CPU upgrade to a CPU supporting SSE4.1+ to be supported by this patcher!',
'',
f'If you plan to create the USB for another {self.current_model} with SSE4.1+, please select the "Change Model" option in the menu.'
]
elif self.constants.custom_model == "iMac7,1":
in_between = ["This model is supported",
"However please ensure the CPU has been upgraded to support SSE4.1+"
]
else:
print("\n Not Valid Choice Try again")
OpenCoreBuilderMenu = True
in_between = ["This model is supported"]
elif MainMenu=="2":
print("\n Not yet implemented")
OpenCoreInstallerMenu=True
while OpenCoreInstallerMenu:
os.system('clear')
menu = Utilities.TUIMenu(title, "Please select an option: ", in_between=in_between, auto_number=True, top_level=True)
print(header)
print(" Install OpenCore to drive")
print(header)
print("")
print(" 1. Install to USB/internal drive")
print(" 2. Return to main menu")
print("")
options = (
[["Build OpenCore", self.build_opencore]] if ((self.constants.custom_model or self.current_model) in ModelArray.SupportedSMBIOS) else []) + [
["Install OpenCore to USB/internal drive", self.install_opencore],
["Post-Install Volume Patch", self.PatchVolume],
["Change Model", self.change_model],
["Patcher Settings", self.patcher_settings],
["Credits", self.credits]
]
OpenCoreInstallerMenu = raw_input('Please select an option: ')
for option in options:
menu.add_menu_option(option[0], function=option[1])
if OpenCoreInstallerMenu=="1":
os.system('clear')
if os.path.exists(Versions.opencore_path_done):
print("Found OpenCore in Build Folder")
BuildOpenCore.ListDiskutil()
BuildOpenCore.MoveOpenCore()
response = menu.start()
else:
print("OpenCore folder missing!")
print("Please build OpenCore first")
print("")
OpenCoreInstallerMenu = raw_input("Press any key to exit: ")
if OpenCoreInstallerMenu=="1":
print("Returning to main menu...")
OpenCoreInstallerMenu=False
elif OpenCoreInstallerMenu=="2":
print("\n Returning to main menu...")
OpenCoreInstallerMenu=False
MainMenu=True
else:
print("\n Not Valid Choice Try again")
OpenCoreInstallerMenu = True
if getattr(sys, "frozen", False):
subprocess.run("""osascript -e 'tell application "Terminal" to close first window' & exit""", shell=True)
elif MainMenu=="3":
SMBIOSMenu=True
while SMBIOSMenu:
os.system('clear')
print(header)
print(" Enter a new SMBIOS")
print(header)
print("")
print(" Tip: Run this command on the machine to find the SMBIOS")
print("")
print(" system_profiler SPHardwareDataType | grep 'Model Identifier'")
print("")
SMBIOSOption = raw_input('Please enter the SMBIOS of your machine (Press enter to exit): ')
if SMBIOSOption == "":
print("Exiting...")
SMBIOSMenu=False
MainMenu=True
else:
print("")
print(" New SMBIOS: %s" % SMBIOSOption)
print("")
SMBIOSMenuYN = raw_input("Is this correcy? (y/n)")
if SMBIOSMenuYN in {"y", "Y", "yes", "Yes"}:
SMBIOSMenu=False
BuildOpenCore.current_model = SMBIOSOption
MainMenu=True
CustomSMBIOS=True
elif MainMenu=="4":
CreditMenu=True
while CreditMenu:
os.system('clear')
print(header)
print(" Credits")
print(header)
print("")
print(" Many thanks to the following:")
print("")
print(" - Acidanthera: OpenCore, kexts and other tools")
print(" - DhinakG: Writing and maintaining this Patcher")
print(" - Khronokernel: Writing and maintaining this Patcher")
print(" - Syncretic: AAAMouSSE and telemetrap")
print("")
CreditMenu = raw_input(" Press any key to exit: ")
print("Returning to main menu...")
CreditMenu=False
MainMenu=True
elif MainMenu=="5":
print("\n Closing program...")
sys.exit(1)
else:
print("\n Not Valid Choice Try again")
MainMenu=True
OpenCoreLegacyPatcher().main_menu()

43
OpenCore-Patcher.spec Normal file
View File

@@ -0,0 +1,43 @@
# -*- 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(['OpenCore-Patcher.command'],
binaries=[],
datas=[('payloads', 'payloads'), ('Resources', 'Resources')],
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,
[],
name='OpenCore-Patcher',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=True )
app = BUNDLE(exe,
name='OpenCore-Patcher.app',
icon="OC-Patcher.icns",
bundle_identifier=None,
info_plist={
"CFBundleShortVersionString": Constants.Constants().patcher_version,
"CFBundleExecutable": "MacOS/Launcher",
"NSHumanReadableCopyright": "Copyright 2020-2021 Dortania"
})

122
README.md
View File

@@ -1,104 +1,60 @@
# OpenCore Legacy Patcher
A python script for building and booting OpenCore on legacy Macs, see [Supported SMBIOS](#supported-smbios) on whether your model is supported.
<img src="images/OC-Patcher.png" width="256">
Current TO-DO's with this patcher:
A python program for building and booting [OpenCore](https://github.com/acidanthera/OpenCorePkg) on legacy Macs, see [Supported SMBIOS](https://dortania.github.io/OpenCore-Legacy-Patcher/MODELS.html) on whether your model is supported. Designed around Big Sur support, however can be used on older OSes.
| 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.6 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. |
* [ ] Create macOS Installer
* [ ] Legacy GPU Patches
* ie. 2011 and older
* [ ] Legacy Audio Patches
* ie. 2011 and older
Supported features:
## Supported SMBIOS
* System Integrity Protection, FileVault 2, .im4m Secure Boot and Vaulting
* Native OTA OS DELTA updates on all Macs
* Recovery OS, Safe Mode and Single-user Mode booting
* Zero firmware patching required (ie. APFS ROM patching)
* GPU Switching on MacBook Pro models (2012 and newer)
Any hardware supporting SSE4.1 CPU and 64-Bit firmware work on this patcher. To check your hardware model, run the below command on the applicable machine:
Note: Only clean-installs and upgrades are supported, installs already patched with other patchers, such as [Patched Sur](https://github.com/BenSova/Patched-Sur) or [bigmac](https://github.com/StarPlayrX/bigmac), cannot be used due to broken file integrity with APFS snapshots and SIP.
```bash
system_profiler SPHardwareDataType | grep 'Model Identifier'
```
* You can however reinstall macOS with this patcher and retain your original data
<details>
<summary>SMBIOS Support Table</summary>
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.
```
MacBook5,1
MacBook5,2
MacBook6,1
MacBook7,1
For Mojave and Catalina support, we recommend the use of [dosdude1's patchers](http://dosdude1.com)
MacBookAir2,1
MacBookAir3,1
MacBookAir3,2
MacBookAir4,1
MacBookAir4,2
MacBookAir5,1
MacBookAir5,2
## How to use
MacBookPro3,1
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
See the online guide on how:
Macmini3,1
Macmini4,1
Macmini5,1
Macmini5,2
Macmini5,3
Macmini6,1
Macmini6,2
* [OpenCore Legacy Patcher Guide](https://dortania.github.io/OpenCore-Legacy-Patcher/)
iMac7,1
iMac8,1
iMac9,1
iMac10,1
iMac11,1
iMac11,2
iMac11,3
iMac12,1
iMac12,2
iMac13,1
iMac13,2
iMac14,1
iMac14,2
iMac14,3
## Patcher Warnings
MacPro3,1
MacPro4,1
MacPro5,1
Since this patcher tricks macOS into thinking you're running a newer Mac, certain functionality may be broken:
Xserve3,1
```
* Boot Camp Assistant.app
* We recommend running the assistant on a natively supported OS, running via the patcher may result in unforeseen issues
* Legacy Windows Booting
* Currently OpenCore cannot boot MBR-based installs, so Ivy Bridge and older Machines may [not be able to see Windows in OpenCore's Boot Picker](https://github.com/acidanthera/bugtracker/issues/912)
* [Solution is to convert install to UEFI](https://docs.microsoft.com/en-us/mem/configmgr/osd/deploy-use/task-sequence-steps-to-manage-bios-to-uefi-conversion), see MacRumors thread for more examples: [Installing Windows 10](https://forums.macrumors.com/threads/opencore-on-the-mac-pro.2207814/)
* Boot Buddy support
* Due to how OpenCore overwrites NVRAM, the usage of Boot Buddy and such tools are **highly** in-advised
</details>
<br>
## Support
## How to run
To get aid with the patcher, we recommend joining the [Unsupported Mac Discord Server](https://discord.gg/XbbWAsE) and heading over to our `#opencore-patcher` channel. 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:
Prerequists:
* [OpenCore Legacy Patcher's Issue's tab](https://github.com/dortania/OpenCore-Legacy-Patcher/issues)
* Supported Mac(see above)
* macOS Installer installed to USB
* See here on how to download and create an installer: [Creating a macOS Installer](https://dortania.github.io/OpenCore-Install-Guide/installer-guide/mac-install.html)
* Blank USB drives formatted as GUID Partition Table are also supported
Regarding how to debug OpenCore Patcher, we recommend seeing the below:
1. [Download the release](https://github.com/dortania/Opencore-Legacy-Patcher/releases)
2. Run the `OpenCore-Patcher.command` file
3. Once opened, select option 1 and build your EFI
* if poatching for a different patching, selectect option 3 first
4. Once finished, run option 2 a the main menu and install onto your desired drive
* [How to debug with OpenCore](https://dortania.github.io/OpenCore-Legacy-Patcher/DEBUG.html)
Once you're done making your OpenCore installer, you can simply reboot holding the Option key. In the picker, you should see a new EFI Boot Option. Boot it and from there you'll be in the OpenCore picker.
## Supporting us!
To help support this patcher, we recommend checking this page:
* [Supporting the patcher](https://dortania.github.io/OpenCore-Legacy-Patcher/DONATE.html)

737
Resources/Build.py Normal file
View File

@@ -0,0 +1,737 @@
# Commands for building the EFI and SMBIOS
# Copyright (C) 2020-2021, Dhinak G, Mykola Grymalyuk
from __future__ import print_function
import binascii
import plistlib
import shutil
import subprocess
import uuid
import zipfile
import os
import sys
import platform
from pathlib import Path
from datetime import date
from Resources import Constants, ModelArray, Utilities
def human_fmt(num):
for unit in ["B", "KB", "MB", "GB", "TB", "PB"]:
if abs(num) < 1000.0:
return "%3.1f %s" % (num, unit)
num /= 1000.0
return "%.1f %s" % (num, "EB")
def rmtree_handler(func, path, exc_info):
if exc_info[0] == FileNotFoundError:
return
raise # pylint: disable=misplaced-bare-raise
class BuildOpenCore:
def __init__(self, model, versions):
self.model = model
self.config = None
self.constants: Constants.Constants = versions
def hexswap(self, input_hex: str):
hex_pairs = [input_hex[i:i + 2] for i in range(0, len(input_hex), 2)]
hex_rev = hex_pairs[::-1]
hex_str = "".join(["".join(x) for x in hex_rev])
return hex_str.upper()
def check_pciid(self, print_status):
try:
self.constants.igpu_devices = plistlib.loads(subprocess.run("ioreg -r -n IGPU -a".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode())
self.constants.igpu_devices = [i for i in self.constants.igpu_devices if i["class-code"] == binascii.unhexlify("00000300")]
self.constants.igpu_vendor = self.hexswap(binascii.hexlify(self.constants.igpu_devices[0]["vendor-id"]).decode()[:4])
self.constants.igpu_device = self.hexswap(binascii.hexlify(self.constants.igpu_devices[0]["device-id"]).decode()[:4])
if print_status is True:
print(f"- Detected iGPU: {self.constants.igpu_vendor}:{self.constants.igpu_device}")
except ValueError:
if print_status is True:
print("- No iGPU detected")
self.constants.igpu_devices = ""
try:
self.constants.dgpu_devices = plistlib.loads(subprocess.run("ioreg -r -n GFX0 -a".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode())
self.constants.dgpu_devices = [i for i in self.constants.dgpu_devices if i["class-code"] == binascii.unhexlify("00000300")]
self.constants.dgpu_vendor = self.hexswap(binascii.hexlify(self.constants.dgpu_devices[0]["vendor-id"]).decode()[:4])
self.constants.dgpu_device = self.hexswap(binascii.hexlify(self.constants.dgpu_devices[0]["device-id"]).decode()[:4])
if print_status is True:
print(f"- Detected dGPU: {self.constants.dgpu_vendor}:{self.constants.dgpu_device}")
except ValueError:
if print_status is True:
print("- No dGPU detected")
self.constants.dgpu_devices = ""
def build_efi(self):
Utilities.cls()
if not Path(self.constants.build_path).exists():
Path(self.constants.build_path).mkdir()
print("Created build folder")
else:
print("Build folder already present, skipping")
if Path(self.constants.opencore_zip_copied).exists():
print("Deleting old copy of OpenCore zip")
Path(self.constants.opencore_zip_copied).unlink()
if Path(self.constants.opencore_release_folder).exists():
print("Deleting old copy of OpenCore folder")
shutil.rmtree(self.constants.opencore_release_folder, onerror=rmtree_handler)
print()
print(f"- Adding OpenCore v{self.constants.opencore_version} {self.constants.opencore_build}")
shutil.copy(self.constants.opencore_zip_source, self.constants.build_path)
zipfile.ZipFile(self.constants.opencore_zip_copied).extractall(self.constants.build_path)
print("- Adding config.plist for OpenCore")
# Setup config.plist for editing
shutil.copy(self.constants.plist_template, self.constants.oc_folder)
self.config = plistlib.load(Path(self.constants.plist_path).open("rb"))
# Set revision in config
self.config["#Revision"]["Build-Version"] = f"{self.constants.patcher_version} - {date.today()}"
self.config["#Revision"]["OpenCore-Version"] = f"{self.constants.opencore_version} - {self.constants.opencore_build} - {self.constants.opencore_commit}"
self.config["#Revision"]["Original-Model"] = self.model
self.config["NVRAM"]["Add"]["4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102"]["OCLP-Version"] = f"{self.constants.patcher_version}"
for name, version, path, check in [
# Essential kexts
("Lilu.kext", self.constants.lilu_version, self.constants.lilu_path, lambda: True),
("WhateverGreen.kext", self.constants.whatevergreen_version, self.constants.whatevergreen_path, lambda: True),
("RestrictEvents.kext", self.constants.restrictevents_version, self.constants.restrictevents_path, lambda: self.model in ModelArray.MacPro71),
("RestrictEvents.kext", self.constants.restrictevents_mbp_version, self.constants.restrictevents_mbp_path, lambda: self.model == "MacBookPro9,1"),
("NightShiftEnabler.kext", self.constants.nightshift_version, self.constants.nightshift_path, lambda: self.model not in ModelArray.NightShiftExclude),
("SMC-Spoof.kext", self.constants.smcspoof_version, self.constants.smcspoof_path, lambda: True),
# CPU patches
("AppleMCEReporterDisabler.kext", self.constants.mce_version, self.constants.mce_path, lambda: self.model in ModelArray.DualSocket),
("AAAMouSSE.kext", self.constants.mousse_version, self.constants.mousse_path, lambda: self.model in ModelArray.SSEEmulator),
("telemetrap.kext", self.constants.telemetrap_version, self.constants.telemetrap_path, lambda: self.model in ModelArray.MissingSSE42),
("CPUFriend.kext", self.constants.cpufriend_version, self.constants.cpufriend_path, lambda: self.model not in ModelArray.NoAPFSsupport),
# Ethernet patches
("nForceEthernet.kext", self.constants.nforce_version, self.constants.nforce_path, lambda: self.model in ModelArray.EthernetNvidia),
("MarvelYukonEthernet.kext", self.constants.marvel_version, self.constants.marvel_path, lambda: self.model in ModelArray.EthernetMarvell),
("CatalinaBCM5701Ethernet.kext", self.constants.bcm570_version, self.constants.bcm570_path, lambda: self.model in ModelArray.EthernetBroadcom),
# Legacy audio
("AppleALC.kext", self.constants.applealc_version, self.constants.applealc_path, lambda: self.model in ModelArray.LegacyAudio or self.model in ModelArray.MacPro71),
# IDE patch
("AppleIntelPIIXATA.kext", self.constants.piixata_version, self.constants.piixata_path, lambda: self.model in ModelArray.IDEPatch),
]:
self.enable_kext(name, version, path, check)
def wifi_fake_id(self):
default_path = True
self.enable_kext("AirportBrcmFixup.kext", self.constants.airportbcrmfixup_version, self.constants.airportbcrmfixup_path)
self.get_kext_by_bundle_path("AirportBrcmFixup.kext/Contents/PlugIns/AirPortBrcmNIC_Injector.kext")["Enabled"] = True
if not self.constants.custom_model:
# Try finding
arpt_path: str = subprocess.run([self.constants.gfxutil_path] + f"-v".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.decode()
try:
arpt_path = [line.strip().split("= ", 1)[1] for line in arpt_path.split("\n") if f"{wifi_vendor}:{wifi_device}".lower() in line.strip()][0]
print(f"- Found ARPT device at {arpt_path}")
default_path = False
except IndexError:
print("- Failed to find Device path")
default_path = True
if default_path is True:
if self.model in ModelArray.nvidiaHDEF:
# Nvidia chipsets all have the same path to ARPT
arpt_path = "PciRoot(0x0)/Pci(0x15,0x0)/Pci(0x0,0x0)"
elif self.model in ("iMac7,1", "iMac8,1", "MacPro3,1", "MacBookPro4,1"):
arpt_path = "PciRoot(0x0)/Pci(0x1C,0x4)/Pci(0x0,0x0)"
elif self.model in ("iMac13,1", "iMac13,2"):
arpt_path = "PciRoot(0x0)/Pci(0x1C,0x3)/Pci(0x0,0x0)"
elif self.model in ("MacPro4,1", "MacPro5,1"):
arpt_path = "PciRoot(0x0)/Pci(0x1C,0x5)/Pci(0x0,0x0)"
else:
# Assumes we have a laptop with Intel chipset
# iMac11,x-12,x also apply
arpt_path = "PciRoot(0x0)/Pci(0x1C,0x1)/Pci(0x0,0x0)"
print(f"- Using known DevicePath {arpt_path}")
print("- Applying fake ID for WiFi")
self.config["DeviceProperties"]["Add"][arpt_path] = {"device-id": binascii.unhexlify("ba430000"), "compatible": "pci14e4,43ba"}
# WiFi patches
# TODO: -a is not supported in Lion and older, need to add proper fix
if self.constants.detected_os > self.constants.lion:
try:
wifi_devices = plistlib.loads(subprocess.run("ioreg -r -n ARPT -a".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode())
except ValueError:
# Work-around Mac Pros where Wifi card may not be named ARPT (ie. installed in dedicated PCIe card slot)
wifi_devices = plistlib.loads(subprocess.run("ioreg -c IOPCIDevice -r -d2 -a".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode())
vendor_atheros = binascii.unhexlify("E4140000")
vendor_broadcom = binascii.unhexlify("8C160000")
wifi_devices = [i for i in wifi_devices if i["vendor-id"] == vendor_atheros or i["vendor-id"] == vendor_broadcom and i["class-code"] == binascii.unhexlify("00800200")]
wifi_vendor = self.hexswap(binascii.hexlify(wifi_devices[0]["vendor-id"]).decode()[:4])
wifi_device = self.hexswap(binascii.hexlify(wifi_devices[0]["device-id"]).decode()[:4])
wifi_ioname = wifi_devices[0]["IOName"]
if not self.constants.custom_model:
print(f"- Detected Wifi Card: {wifi_vendor}:{wifi_device}")
else:
wifi_devices = ""
print("- Can't run Wifi hardware detection on Snow Leopard and older")
if self.constants.wifi_build is True:
print("- Skipping Wifi patches on request")
elif not self.constants.custom_model and wifi_devices:
if wifi_vendor == self.constants.pci_broadcom:
if wifi_device in ModelArray.BCM4360Wifi and wifi_ioname not in ["pci14e4,4353", "pci14e4,4331"]:
print("- Found supported WiFi card, skipping wifi patches")
elif wifi_ioname in ["pci14e4,4353", "pci14e4,4331"] or wifi_device in ModelArray.BCM94331Wifi:
wifi_fake_id(self)
elif wifi_device in ModelArray.BCM94322Wifi:
self.enable_kext("IO80211Mojave.kext", self.constants.io80211mojave_version, self.constants.io80211mojave_path)
self.get_kext_by_bundle_path("IO80211Mojave.kext/Contents/PlugIns/AirPortBrcm4331.kext")["Enabled"] = True
elif wifi_device in ModelArray.BCM94328Wifi:
self.enable_kext("corecaptureElCap.kext", self.constants.corecaptureelcap_version, self.constants.corecaptureelcap_path)
self.enable_kext("IO80211ElCap.kext", self.constants.io80211elcap_version, self.constants.io80211elcap_path)
self.get_kext_by_bundle_path("IO80211ElCap.kext/Contents/PlugIns/AppleAirPortBrcm43224.kext")["Enabled"] = True
elif wifi_vendor == self.constants.pci_atheros and wifi_device in ModelArray.AtherosWifi:
self.enable_kext("IO80211HighSierra.kext", self.constants.io80211high_sierra_version, self.constants.io80211high_sierra_path)
self.get_kext_by_bundle_path("IO80211HighSierra.kext/Contents/PlugIns/AirPortAtheros40.kext")["Enabled"] = True
else:
if self.model in ModelArray.WifiBCM94331:
wifi_fake_id(self)
elif self.model in ModelArray.WifiBCM94322:
self.enable_kext("IO80211Mojave.kext", self.constants.io80211mojave_version, self.constants.io80211mojave_path)
self.get_kext_by_bundle_path("IO80211Mojave.kext/Contents/PlugIns/AirPortBrcm4331.kext")["Enabled"] = True
elif self.model in ModelArray.WifiBCM94328:
self.enable_kext("corecaptureElCap.kext", self.constants.corecaptureelcap_version, self.constants.corecaptureelcap_path)
self.enable_kext("IO80211ElCap.kext", self.constants.io80211elcap_version, self.constants.io80211elcap_path)
self.get_kext_by_bundle_path("IO80211ElCap.kext/Contents/PlugIns/AppleAirPortBrcm43224.kext")["Enabled"] = True
elif self.model in ModelArray.WifiAtheros:
self.enable_kext("IO80211HighSierra.kext", self.constants.io80211high_sierra_version, self.constants.io80211high_sierra_path)
self.get_kext_by_bundle_path("IO80211HighSierra.kext/Contents/PlugIns/AirPortAtheros40.kext")["Enabled"] = True
# CPUFriend
pp_map_path = Path(self.constants.platform_plugin_plist_path) / Path(f"{self.model}/Info.plist")
if self.model not in ModelArray.NoAPFSsupport:
Path(self.constants.pp_kext_folder).mkdir()
Path(self.constants.pp_contents_folder).mkdir()
shutil.copy(pp_map_path, self.constants.pp_contents_folder)
self.get_kext_by_bundle_path("CPUFriendDataProvider.kext")["Enabled"] = True
# HID patches
if self.model in ModelArray.LegacyHID:
print("- Adding IOHIDFamily patch")
self.get_item_by_kv(self.config["Kernel"]["Patch"], "Identifier", "com.apple.iokit.IOHIDFamily")["Enabled"] = True
# SSDT patches
if self.model in ModelArray.pciSSDT:
print("- Adding SSDT-CPBG.aml")
self.get_item_by_kv(self.config["ACPI"]["Add"], "Path", "SSDT-CPBG.aml")["Enabled"] = True
shutil.copy(self.constants.pci_ssdt_path, self.constants.acpi_path)
# USB Map
usb_map_path = Path(self.constants.plist_folder_path) / Path("AppleUSBMaps/Info.plist")
if usb_map_path.exists():
print(f"- Adding USB-Map.kext")
Path(self.constants.map_kext_folder).mkdir()
Path(self.constants.map_contents_folder).mkdir()
shutil.copy(usb_map_path, self.constants.map_contents_folder)
self.get_kext_by_bundle_path("USB-Map.kext")["Enabled"] = True
agdp_map_path = Path(self.constants.plist_folder_path) / Path("AppleGraphicsDevicePolicy/Info.plist")
agpm_map_path = Path(self.constants.plist_folder_path) / Path("AppleGraphicsPowerManagement/Info.plist")
amc_map_path = Path(self.constants.plist_folder_path) / Path("AppleMuxControl/Info.plist")
if self.model == "MacBookPro9,1":
print(f"- Adding Display Map Overrides")
self.config["DeviceProperties"]["Add"]["PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)"] = {"agdpmod": "vit9696"}
Path(self.constants.agdp_kext_folder).mkdir()
Path(self.constants.agdp_contents_folder).mkdir()
Path(self.constants.agpm_kext_folder).mkdir()
Path(self.constants.agpm_contents_folder).mkdir()
Path(self.constants.amc_kext_folder).mkdir()
Path(self.constants.amc_contents_folder).mkdir()
shutil.copy(agdp_map_path, self.constants.agdp_contents_folder)
shutil.copy(agpm_map_path, self.constants.agpm_contents_folder)
shutil.copy(amc_map_path, self.constants.amc_contents_folder)
self.get_kext_by_bundle_path("AGDP-Override.kext")["Enabled"] = True
self.get_kext_by_bundle_path("AGPM-Override.kext")["Enabled"] = True
self.get_kext_by_bundle_path("AMC-Override.kext")["Enabled"] = True
# AGPM Patch
if self.model in ModelArray.DualGPUPatch:
print("- Adding dual GPU patch")
self.config["DeviceProperties"]["Add"]["PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)"] = {"agdpmod": "pikera"}
# HiDPI OpenCanopy and FileVault
if self.model in ModelArray.HiDPIpicker:
print("- Setting HiDPI picker")
self.config["NVRAM"]["Add"]["4D1EDE05-38C7-4A6A-9CC6-4BCCA8B38C14"]["UIScale"] = binascii.unhexlify("02")
# Audio Patch
if self.model in ModelArray.LegacyAudio:
print("- Adding audio properties")
hdef_path = "PciRoot(0x0)/Pci(0x8,0x0)" if self.model in ModelArray.nvidiaHDEF else "PciRoot(0x0)/Pci(0x1b,0x0)"
# In AppleALC, MacPro3,1's original layout is already in use, forcing layout 13 instead
if self.model == "MacPro3,1":
self.config["DeviceProperties"]["Add"][hdef_path] = {"apple-layout-id": 90, "use-apple-layout-id": 1, "alc-layout-id": 13, }
else:
self.config["DeviceProperties"]["Add"][hdef_path] = {"apple-layout-id": 90, "use-apple-layout-id": 1, "use-layout-id": 1, }
def nvidia_patch(self):
self.constants.custom_mxm_gpu = True
print("- Adding Nvidia Brightness Control patches")
if self.model == "iMac11,1":
backlight_path = "PciRoot(0x0)/Pci(0x3,0x0)/Pci(0x0,0x0)"
self.config["DeviceProperties"]["Add"][backlight_path] = {"@0,backlight-control": binascii.unhexlify("01000000"), "@0,built-in": binascii.unhexlify("01000000")}
shutil.copy(self.constants.backlight_path, self.constants.kexts_path)
self.get_kext_by_bundle_path("AppleBacklightFixup.kext")["Enabled"] = True
elif self.model in ["iMac11,2", "iMac11,3", "iMac12,1", "iMac12,2"]:
backlight_path = "PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)"
self.config["DeviceProperties"]["Add"][backlight_path] = {"@0,backlight-control": binascii.unhexlify("01000000"), "@0,built-in": binascii.unhexlify("01000000")}
print("- Disabling unsupported iGPU")
self.config["DeviceProperties"]["Add"]["PciRoot(0x0)/Pci(0x2,0x0)"] = {"name": binascii.unhexlify("23646973706C6179"), "IOName": "#display", "class-code": binascii.unhexlify("FFFFFFFF")}
shutil.copy(self.constants.backlight_path, self.constants.kexts_path)
self.get_kext_by_bundle_path("AppleBacklightFixup.kext")["Enabled"] = True
else:
print("- Failed to determine supported model")
def amd_patch(self):
self.constants.custom_mxm_gpu = True
print("- Adding AMD DRM patches")
if self.model == "iMac11,1":
self.config["DeviceProperties"]["Add"]["PciRoot(0x0)/Pci(0x3,0x0)/Pci(0x0,0x0)"] = {"shikigva": 80, "unfairgva": 1}
elif self.model in ["iMac11,2", "iMac11,3", "iMac12,1", "iMac12,2"]:
self.config["DeviceProperties"]["Add"]["PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)"] = {"shikigva": 80, "unfairgva": 1}
print("- Disabling unsupported iGPU")
self.config["DeviceProperties"]["Add"]["PciRoot(0x0)/Pci(0x2,0x0)"] = {"name": binascii.unhexlify("23646973706C6179"), "IOName": "#display", "class-code": binascii.unhexlify("FFFFFFFF")}
# Check GPU Vendor
if self.constants.metal_build is True:
print("- Adding Metal GPU patches on request")
if self.constants.imac_vendor == "AMD":
amd_patch(self)
elif self.constants.imac_vendor == "Nvidia":
nvidia_patch(self)
else:
print("- Failed to find vendor")
elif self.constants.custom_model == "None":
self.check_pciid(True)
if self.constants.dgpu_devices and self.constants.dgpu_vendor == self.constants.pci_amd_ati and self.constants.dgpu_device in ModelArray.AMDMXMGPUs:
amd_patch(self)
elif self.constants.dgpu_devices and self.constants.dgpu_vendor == self.constants.pci_nvidia and self.constants.dgpu_device in ModelArray.NVIDIAMXMGPUs:
nvidia_patch(self)
elif self.model in ModelArray.MacPro71:
print("- Adding Mac Pro, Xserve DRM patches")
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " shikigva=128 unfairgva=1 -wegtree"
# Add OpenCanopy
print("- Adding OpenCanopy GUI")
shutil.rmtree(self.constants.resources_path, onerror=rmtree_handler)
shutil.copy(self.constants.gui_path, self.constants.oc_folder)
self.config["UEFI"]["Drivers"] = ["OpenCanopy.efi", "OpenRuntime.efi"]
# Exfat check
if self.model in ModelArray.NoExFat:
print("- Adding ExFatDxeLegacy.efi")
shutil.copy(self.constants.exfat_legacy_driver_path, self.constants.drivers_path)
self.config["UEFI"]["Drivers"] += ["ExFatDxeLegacy.efi"]
# Add UGA to GOP layer
if self.model in ModelArray.UGAtoGOP:
print("- Adding UGA to GOP Patch")
self.config["UEFI"]["Output"]["GopPassThrough"] = True
# ThridPartDrives Check
if self.model not in ModelArray.NoSATAPatch:
print("- Adding SATA Hibernation Patch")
self.config["Kernel"]["Quirks"]["ThirdPartyDrives"] = True
# DEBUG Settings
if self.constants.verbose_debug is True:
print("- Enabling Verbose boot")
self.config["Kernel"]["Quirks"]["PanicNoKextDump"] = True
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " -v debug=0x100"
if self.constants.kext_debug is True:
print("- Enabling DEBUG Kexts")
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " -liludbgall"
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " msgbuf=1048576"
if self.constants.opencore_debug is True:
print("- Enabling DEBUG OpenCore")
self.config["Misc"]["Debug"]["Target"] = 67
self.config["Misc"]["Debug"]["DisplayLevel"] = 672151678018
if self.constants.showpicker is True:
print("- Enabling ShowPicker")
self.config["Misc"]["Boot"]["ShowPicker"] = True
else:
print("- Hiding picker and enabling PollAppleHotKeys")
self.config["Misc"]["Boot"]["ShowPicker"] = False
if self.constants.vault is True:
print("- Setting Vault configuration")
self.config["Misc"]["Security"]["Vault"] = "Secure"
self.get_tool_by__path("OpenShell.efi")["Enabled"] = False
if self.constants.sip_status is False:
print("- Disabling SIP")
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["csr-active-config"] = binascii.unhexlify("EF0F0000")
self.config["NVRAM"]["Delete"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"] += ["csr-active-config"]
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " amfi_get_out_of_my_way=1"
if self.constants.secure_status is False:
print("- Disabling SecureBootModel")
self.config["Misc"]["Security"]["SecureBootModel"] = "Disabled"
def set_smbios(self):
spoofed_model = self.model
# TODO: Set check as global variable
if self.model in ModelArray.MacBookAir61:
print("- Spoofing to MacBookAir6,1")
spoofed_model = "MacBookAir6,1"
spoofed_board = "Mac-35C1E88140C3E6CF"
elif self.model in ModelArray.MacBookAir62:
print("- Spoofing to MacBookAir6,2")
spoofed_model = "MacBookAir6,2"
spoofed_board = "Mac-7DF21CB3ED6977E5"
elif self.model in ModelArray.MacBookPro111:
print("- Spoofing to MacBookPro11,1")
spoofed_model = "MacBookPro11,1"
spoofed_board = "Mac-189A3D4F975D5FFC"
elif self.model in ModelArray.MacBookPro113:
print("- Spoofing to MacBookPro11,3")
spoofed_model = "MacBookPro11,3"
spoofed_board = "Mac-2BD1B31983FE1663"
elif self.model in ModelArray.Macmini71:
print("- Spoofing to Macmini7,1")
spoofed_model = "Macmini7,1"
spoofed_board = "Mac-35C5E08120C7EEAF"
elif self.model in ModelArray.iMacPro11:
print("- Spoofing to iMacPro1,1")
spoofed_model = "iMacPro1,1"
spoofed_board = "Mac-7BA5B2D9E42DDD94"
elif self.model in ModelArray.iMac151:
# Check for upgraded GPUs on iMacs
if self.constants.metal_build is True:
print("- Spoofing to iMacPro1,1")
spoofed_model = "iMacPro1,1"
spoofed_board = "Mac-7BA5B2D9E42DDD94"
elif (self.constants.current_gpuv == "AMD (0x1002)") & (self.constants.current_gpud in ModelArray.AMDMXMGPUs) & (self.constants.custom_model == "None"):
print("- Spoofing to iMacPro1,1")
spoofed_model = "iMacPro1,1"
spoofed_board = "Mac-7BA5B2D9E42DDD94"
elif (self.constants.current_gpuv == "NVIDIA (0x10de)") & (self.constants.current_gpud in ModelArray.NVIDIAMXMGPUs) & (self.constants.custom_model == "None"):
print("- Spoofing to iMacPro1,1")
spoofed_model = "iMacPro1,1"
spoofed_board = "Mac-7BA5B2D9E42DDD94"
else:
print("- Spoofing to iMac15,1")
spoofed_model = "iMac15,1"
spoofed_board = "Mac-42FD25EABCABB274"
elif self.model in ModelArray.iMac144:
print("- Spoofing to iMac14,4")
spoofed_model = "iMac14,4"
spoofed_board = "Mac-81E3E92DD6088272"
elif self.model in ModelArray.MacPro71:
print("- Spoofing to MacPro7,1")
spoofed_model = "MacPro7,1"
spoofed_board = "Mac-27AD2F918AE68F61"
self.spoofed_model = spoofed_model
self.spoofed_board = spoofed_board
self.config["#Revision"]["Spoofed-Model"] = self.spoofed_model
# Setup menu
def minimal_serial_patch(self):
self.config["PlatformInfo"]["PlatformNVRAM"]["BID"] = self.spoofed_board
self.config["PlatformInfo"]["SMBIOS"]["BoardProduct"] = self.spoofed_board
self.config["PlatformInfo"]["UpdateNVRAM"] = True
def moderate_serial_patch(self):
self.config["PlatformInfo"]["Automatic"] = True
self.config["PlatformInfo"]["UpdateDataHub"] = True
self.config["PlatformInfo"]["UpdateNVRAM"] = True
self.config["UEFI"]["ProtocolOverrides"]["DataHub"] = True
self.config["PlatformInfo"]["Generic"]["SystemProductName"] = self.spoofed_model
def adanced_serial_patch(self):
macserial_output = subprocess.run([self.constants.macserial_path] + f"-g -m {self.spoofed_model} -n 1".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
macserial_output = macserial_output.stdout.decode().strip().split(" | ")
self.config["PlatformInfo"]["Automatic"] = True
self.config["PlatformInfo"]["UpdateDataHub"] = True
self.config["PlatformInfo"]["UpdateNVRAM"] = True
self.config["UEFI"]["ProtocolOverrides"]["DataHub"] = True
self.config["PlatformInfo"]["Generic"]["ROM"] = binascii.unhexlify("0016CB445566")
self.config["PlatformInfo"]["Generic"]["SystemProductName"] = self.spoofed_model
self.config["PlatformInfo"]["Generic"]["SystemSerialNumber"] = macserial_output[0]
self.config["PlatformInfo"]["Generic"]["MLB"] = macserial_output[1]
self.config["PlatformInfo"]["Generic"]["SystemUUID"] = str(uuid.uuid4()).upper()
if self.constants.serial_settings == "Moderate":
print("- Using Moderate SMBIOS patching")
moderate_serial_patch(self)
elif self.constants.serial_settings == "Advanced":
print("- Using Advanced SMBIOS patching")
adanced_serial_patch(self)
else:
print("- Using Minimal SMBIOS patching")
self.spoofed_model = self.model
minimal_serial_patch(self)
# USB Map Patching
new_map_ls = Path(self.constants.map_contents_folder) / Path("Info.plist")
map_config = plistlib.load(Path(new_map_ls).open("rb"))
for model_controller in ModelArray.ControllerTypes:
model_patch = f"{self.model}{model_controller}"
try:
# Avoid erroring out when specific identity not found
map_config["IOKitPersonalities_x86_64"][model_patch]["model"] = self.spoofed_model
except KeyError:
continue
plistlib.dump(map_config, Path(new_map_ls).open("wb"), sort_keys=True)
if self.model == "MacBookPro9,1":
new_agdp_ls = Path(self.constants.agdp_contents_folder) / Path("Info.plist")
new_agpm_ls = Path(self.constants.agpm_contents_folder) / Path("Info.plist")
new_amc_ls = Path(self.constants.amc_contents_folder) / Path("Info.plist")
agdp_config = plistlib.load(Path(new_agdp_ls).open("rb"))
agpm_config = plistlib.load(Path(new_agpm_ls).open("rb"))
amc_config = plistlib.load(Path(new_amc_ls).open("rb"))
agdp_config["IOKitPersonalities"]["AppleGraphicsDevicePolicy"]["ConfigMap"][self.spoofed_board] = agdp_config["IOKitPersonalities"]["AppleGraphicsDevicePolicy"]["ConfigMap"].pop(self.model)
agpm_config["IOKitPersonalities"]["AGPM"]["Machines"][self.spoofed_board] = agpm_config["IOKitPersonalities"]["AGPM"]["Machines"].pop(self.model)
amc_config["IOKitPersonalities"]["AppleMuxControl"]["ConfigMap"][self.spoofed_board] = amc_config["IOKitPersonalities"]["AppleMuxControl"]["ConfigMap"].pop(self.model)
plistlib.dump(agdp_config, Path(new_agdp_ls).open("wb"), sort_keys=True)
plistlib.dump(agpm_config, Path(new_agpm_ls).open("wb"), sort_keys=True)
plistlib.dump(amc_config, Path(new_amc_ls).open("wb"), sort_keys=True)
@staticmethod
def get_item_by_kv(iterable, key, value):
item = None
for i in iterable:
if i[key] == value:
item = i
break
return item
def get_kext_by_bundle_path(self, bundle_path):
kext = self.get_item_by_kv(self.config["Kernel"]["Add"], "BundlePath", bundle_path)
if not kext:
print(f"- Could not find kext {bundle_path}!")
raise IndexError
return kext
def get_tool_by__path(self, bundle_path):
tool = self.get_item_by_kv(self.config["Misc"]["Tools"], "Path", bundle_path)
if not tool:
print(f"- Could not find Tool {bundle_path}!")
raise IndexError
return tool
def enable_kext(self, kext_name, kext_version, kext_path, check=False):
kext = self.get_kext_by_bundle_path(kext_name)
if callable(check) and not check():
# Check failed
return
print(f"- Adding {kext_name} {kext_version}")
shutil.copy(kext_path, self.constants.kexts_path)
kext["Enabled"] = True
def cleanup(self):
print("- Cleaning up files")
# Remove unused kexts
for kext in list(self.config["Kernel"]["Add"]):
if not kext["Enabled"]:
self.config["Kernel"]["Add"].remove(kext)
plistlib.dump(self.config, Path(self.constants.plist_path).open("wb"), sort_keys=True)
for kext in self.constants.kexts_path.rglob("*.zip"):
with zipfile.ZipFile(kext) as zip_file:
zip_file.extractall(self.constants.kexts_path)
kext.unlink()
for item in self.constants.oc_folder.rglob("*.zip"):
with zipfile.ZipFile(item) as zip_file:
zip_file.extractall(self.constants.oc_folder)
item.unlink()
for i in self.constants.build_path.rglob("__MACOSX"):
shutil.rmtree(i)
Path(self.constants.opencore_zip_copied).unlink()
def sign_files(self):
if self.constants.vault is True:
print("- Vaulting EFI")
subprocess.run([self.constants.vault_path] + f"{self.constants.oc_folder}/".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
def build_opencore(self):
self.build_efi()
self.set_smbios()
self.cleanup()
self.sign_files()
print("")
print("Your OpenCore EFI has been built at:")
print(f" {self.constants.opencore_release_folder}")
print("")
if self.constants.gui_mode is False:
input("Press [Enter] to go back.\n")
def copy_efi(self):
Utilities.cls()
Utilities.header(["Installing OpenCore to Drive"])
if not self.constants.opencore_release_folder.exists():
Utilities.TUIOnlyPrint(
["Installing OpenCore to Drive"],
"Press [Enter] to go back.\n",
[
"""OpenCore folder missing!
Please build OpenCore first!"""
],
).start()
return
print("\nDisk picker is loading...")
all_disks = {}
# TODO: AllDisksAndPartitions is not supported in Snow Leopard and older
try:
# High Sierra and newer
disks = plistlib.loads(subprocess.run("diskutil list -plist physical".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode())
except ValueError:
# Sierra and older
disks = plistlib.loads(subprocess.run("diskutil list -plist".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode())
for disk in disks["AllDisksAndPartitions"]:
disk_info = plistlib.loads(subprocess.run(f"diskutil info -plist {disk['DeviceIdentifier']}".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode())
try:
all_disks[disk["DeviceIdentifier"]] = {"identifier": disk_info["DeviceNode"], "name": disk_info["MediaName"], "size": disk_info["TotalSize"], "partitions": {}}
for partition in disk["Partitions"]:
partition_info = plistlib.loads(subprocess.run(f"diskutil info -plist {partition['DeviceIdentifier']}".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode())
all_disks[disk["DeviceIdentifier"]]["partitions"][partition["DeviceIdentifier"]] = {
"fs": partition_info.get("FilesystemType", partition_info["Content"]),
"type": partition_info["Content"],
"name": partition_info.get("VolumeName", ""),
"size": partition_info["TotalSize"],
}
except KeyError:
# Avoid crashing with CDs installed
continue
# TODO: Advanced mode
menu = Utilities.TUIMenu(
["Select Disk"],
"Please select the disk you would like to install OpenCore to: ",
in_between=["Missing disks? Ensure they have an EFI or FAT32 partition."],
return_number_instead_of_direct_call=True,
loop=True,
)
for disk in all_disks:
if not any(all_disks[disk]["partitions"][partition]["fs"] in ("msdos", "EFI") for partition in all_disks[disk]["partitions"]):
continue
menu.add_menu_option(f"{disk}: {all_disks[disk]['name']} ({human_fmt(all_disks[disk]['size'])})", key=disk[4:])
response = menu.start()
if response == -1:
return
disk_identifier = "disk" + response
selected_disk = all_disks[disk_identifier]
menu = Utilities.TUIMenu(
["Select Partition"],
"Please select the partition you would like to install OpenCore to: ",
return_number_instead_of_direct_call=True,
loop=True,
in_between=["Missing partitions? Ensure they are formatted as an EFI or FAT32.", "", "* denotes likely candidate."],
)
for partition in selected_disk["partitions"]:
if selected_disk["partitions"][partition]["fs"] not in ("msdos", "EFI"):
continue
text = f"{partition}: {selected_disk['partitions'][partition]['name']} ({human_fmt(selected_disk['partitions'][partition]['size'])})"
if selected_disk["partitions"][partition]["type"] == "EFI" or (
selected_disk["partitions"][partition]["type"] == "Microsoft Basic Data" and selected_disk["partitions"][partition]["size"] < 1024 * 1024 * 512
): # 512 megabytes:
text += " *"
menu.add_menu_option(text, key=partition[len(disk_identifier) + 1:])
response = menu.start()
if response == -1:
return
# TODO: Apple Script fails in Yosemite(?) and older
args = [
"osascript",
"-e",
f'''do shell script "diskutil mount {disk_identifier}s{response}"'''
' with prompt "OpenCore Legacy Patcher needs administrator privileges to mount your EFI."'
" with administrator privileges"
" without altering line endings",
]
if self.constants.detected_os > self.constants.yosemite:
result = subprocess.run(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
else:
result = subprocess.run(f"diskutil mount {disk_identifier}s{response}".split(), stdout=subprocess.PIPE, stderr=subprocess.PIPE)
if result.returncode != 0:
if "execution error" in result.stderr.decode() and result.stderr.decode().strip()[-5:-1] == "-128":
# cancelled prompt
return
else:
Utilities.TUIOnlyPrint(
["Copying OpenCore"], "Press [Enter] to go back.\n", ["An error occurred!"] + result.stderr.decode().split("\n") + ["", "Please report this to the devs at GitHub."]
).start()
return
# TODO: Remount if readonly
drive_host_info = plistlib.loads(subprocess.run(f"diskutil info -plist {disk_identifier}".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode())
partition_info = plistlib.loads(subprocess.run(f"diskutil info -plist {disk_identifier}s{response}".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode())
sd_type = drive_host_info["MediaName"]
try:
ssd_type = drive_host_info["SolidState"]
except KeyError:
ssd_type = False
mount_path = Path(partition_info["MountPoint"])
disk_type = partition_info["BusProtocol"]
Utilities.cls()
Utilities.header(["Copying OpenCore"])
if mount_path.exists():
if (mount_path / Path("EFI/OC")).exists():
print("- Removing preexisting EFI/OC folder")
shutil.rmtree(mount_path / Path("EFI/OC"), onerror=rmtree_handler)
if (mount_path / Path("System")).exists():
print("- Removing preexisting System folder")
shutil.rmtree(mount_path / Path("System"), onerror=rmtree_handler)
print("- Coping OpenCore onto EFI partition")
shutil.copytree(self.constants.opencore_release_folder / Path("EFI/OC"), mount_path / Path("EFI/OC"))
shutil.copytree(self.constants.opencore_release_folder / Path("System"), mount_path / Path("System"))
if self.constants.boot_efi is True:
print("- Converting Bootstrap to BOOTx64.efi")
if (mount_path / Path("EFI/BOOT")).exists():
shutil.rmtree(mount_path / Path("EFI/BOOT"), onerror=rmtree_handler)
Path(mount_path / Path("EFI/BOOT")).mkdir()
shutil.move(mount_path / Path("System/Library/CoreServices/boot.efi"), mount_path / Path("EFI/BOOT/BOOTx64.efi"))
shutil.rmtree(mount_path / Path("System"), onerror=rmtree_handler)
# Array filled with common SD Card names
# Note most USB-based SD Card readers generally report as "Storage Device", and no reliable way to detect further
if sd_type in ["SD Card Reader", "SD/MMC"]:
print("- Adding SD Card icon")
shutil.copy(self.constants.icon_path_sd, mount_path)
elif ssd_type is True:
print("- Adding SSD icon")
shutil.copy(self.constants.icon_path_ssd, mount_path)
elif disk_type == "USB":
print("- Adding External USB Drive icon")
shutil.copy(self.constants.icon_path_external, mount_path)
else:
print("- Adding Internal Drive icon")
shutil.copy(self.constants.icon_path_internal, mount_path)
print("- Cleaning install location")
subprocess.run(f"dot_clean {mount_path}".split(), stdout=subprocess.PIPE, stderr=subprocess.PIPE)
print("- Unmounting EFI partition")
subprocess.run(f"diskutil umount {mount_path}".split(), stdout=subprocess.PIPE, stderr=subprocess.PIPE)
print("- OpenCore transfer complete")
print("\nPress [Enter] to continue.\n")
input()
else:
Utilities.TUIOnlyPrint(["Copying OpenCore"], "Press [Enter] to go back.\n", ["EFI failed to mount!", "Please report this to the devs at GitHub."]).start()

View File

@@ -1,315 +0,0 @@
# Commands for building the EFI and SMBIOS
from __future__ import print_function
from shutil import copy
from shutil import rmtree
from distutils.dir_util import copy_tree
import os
import json
import subprocess
import sys
import zipfile
import Versions
import ModelArray
# Find SMBIOS of machine
current_model = subprocess.Popen("system_profiler SPHardwareDataType".split(), stdout=subprocess.PIPE)
current_model = [line.strip().split(": ", 1)[1] for line in current_model.stdout.read().split("\n") if line.strip().startswith("Model Identifier")][0]
OCExist = False
def BuildEFI():
if not os.path.exists(Versions.build_path):
os.makedirs(Versions.build_path)
print("Created Build Folder")
else:
print("Build Folder already present, skipping")
# Copy OpenCore into Build Folder
if os.path.exists(Versions.opencore_path_build):
print("Deleting old copy of OpenCore zip")
os.remove(Versions.opencore_path_build)
if os.path.exists(Versions.opencore_path_done):
print("Deleting old copy of OpenCore folder")
rmtree(Versions.opencore_path_done)
print("")
print("- Adding OpenCore v%s" % Versions.opencore_version)
copy(Versions.opencore_path, Versions.build_path)
zipfile.ZipFile(Versions.opencore_path_build).extractall(Versions.build_path)
print("- Adding config.plist v%s" % Versions.opencore_version)
# Setup config.plist for editing
copy(Versions.plist_path, Versions.plist_path_build)
with open(Versions.plist_path_build_full, 'r') as file :
Versions.plist_data = file.read()
print("- Adding Lilu %s" % Versions.lilu_version)
copy(Versions.lilu_path, Versions.kext_path_build)
print("- Adding WhateverGreen %s" % Versions.whatevergreen_version)
copy(Versions.whatevergreen_path, Versions.kext_path_build)
# Checks for kexts
# CPU Kext Patches
if current_model in ModelArray.DualSocket:
print("- Adding AppleMCEReporterDisabler v%s" % Versions.mce_version)
copy(Versions.mce_path, Versions.kext_path_build)
Versions.plist_data = Versions.plist_data.replace(
"<false/><!--AppleMCEReporterDisabler-->",
"<true/><!--AppleMCEReporterDisabler-->"
)
if current_model in ModelArray.SSEEmulator:
print("- Adding AAAMouSSE v%s" % Versions.mousse_version)
copy(Versions.mousse_version, Versions.kext_path_build)
Versions.plist_data = Versions.plist_data.replace(
"<false/><!--AAAMouSSE-->",
"<true/><!--AAAMouSSE-->"
)
if current_model in ModelArray.MissingSSE42:
print("- Adding telemetrap %s" % Versions.telemetrap_version)
copy(Versions.telemetrap_path, Versions.kext_path_build)
Versions.plist_data = Versions.plist_data.replace(
"<false/><!--telemetrap-->",
"<true/><!--telemetrap-->"
)
# Ethernet Patches
if current_model in ModelArray.EthernetNvidia:
print("- Adding nForceEthernet v%s" % Versions.nforce_version)
copy(Versions.nforce_path, Versions.kext_path_build)
Versions.plist_data = Versions.plist_data.replace(
"<false/><!--nForceEthernet-->",
"<true/><!--nForceEthernet-->"
)
if current_model in ModelArray.EthernetMarvell:
print("- Adding MarvelYukonEthernet v%s" % Versions.marvel_version)
copy(Versions.marvel_path, Versions.kext_path_build)
Versions.plist_data = Versions.plist_data.replace(
"<false/><!--MarvelYukonEthernet-->",
"<true/><!--MarvelYukonEthernet-->"
)
if current_model in ModelArray.EthernetBroadcom:
print("- Adding CatalinaBCM5701Ethernet %s" % Versions.bcm570_version)
copy(Versions.bcm570_path, Versions.kext_path_build)
Versions.plist_data = Versions.plist_data.replace(
"<false/><!--CatalinaBCM5701Ethernet-->",
"<true/><!--CatalinaBCM5701Ethernet-->"
)
# Wifi Patches
if current_model in ModelArray.WifiAtheros:
print("- Adding IO80211HighSierra v%s" % Versions.io80211high_sierra_version)
copy(Versions.io80211high_sierra_path, Versions.kext_path_build)
Versions.plist_data = Versions.plist_data.replace(
"<false/><!--IO80211HighSierra-->",
"<true/><!--IO80211HighSierra-->"
)
Versions.plist_data = Versions.plist_data.replace(
"<false/><!--AirPortAtheros40-->",
"<true/><!--AirPortAtheros40-->"
)
if current_model in ModelArray.WifiBCM94328:
print("- Wifi patches currently unsupported")
# TO-DO: Add El Capitan's IO80211
if current_model in ModelArray.WifiBCM94322:
print("- Adding IO80211Mojave %s" % Versions.io80211mojave_version)
copy(Versions.io80211mojave_path, Versions.kext_path_build)
Versions.plist_data = Versions.plist_data.replace(
"<false/><!--IO80211Mojave-->",
"<true/><!--IO80211Mojave-->"
)
Versions.plist_data = Versions.plist_data.replace(
"<false/><!--AirPortBrcm4331-->",
"<true/><!--AirPortBrcm4331-->"
)
if current_model in ModelArray.WifiBCM943224:
print("- Adding IO80211Mojave %s" % Versions.io80211mojave_version)
copy(Versions.io80211mojave_path, Versions.kext_path_build)
Versions.plist_data = Versions.plist_data.replace(
"<false/><!--IO80211Mojave-->",
"<true/><!--IO80211Mojave-->"
)
Versions.plist_data = Versions.plist_data.replace(
"<false/><!--AirPortBrcm4331-->",
"<true/><!--AirPortBrcm4331-->"
)
if current_model in ModelArray.WifiBCM94331:
print("- Adding AirportBrcmFixup and appling fake ID")
copy(Versions.airportbcrmfixup_path, Versions.kext_path_build)
Versions.plist_data = Versions.plist_data.replace(
"<false/><!--AirportBrcmFixup-->",
"<true/><!--AirportBrcmFixup-->"
)
Versions.plist_data = Versions.plist_data.replace(
"<false/><!--AirPortBrcmNIC_Injector-->",
"<true/><!--AirPortBrcmNIC_Injector-->"
)
if current_model in ("iMac13,1", "iMac13,2"):
Versions.plist_data = Versions.plist_data.replace(
"#PciRoot(0x0)/Pci(0x1C,0x1)Pci(0x0,0x0)",
"PciRoot(0x0)/Pci(0x1C,0x3)Pci(0x0,0x0)"
)
else:
Versions.plist_data = Versions.plist_data.replace(
"#PciRoot(0x0)/Pci(0x1C,0x1)Pci(0x0,0x0)",
"PciRoot(0x0)/Pci(0x1C,0x1)Pci(0x0,0x0)"
)
usb_map_path = os.path.join(Versions.current_path, "payloads/Kexts/Maps/Zip/" "USB-Map-%s.zip" % current_model)
if os.path.exists(usb_map_path):
print("- Adding USB Map for %s" % current_model)
copy(usb_map_path, Versions.kext_path_build)
map_name = ("USB-Map-%s.kext" % current_model)
Versions.plist_data = Versions.plist_data.replace(
"USB-Map-SMBIOS.kext",
map_name
)
def BuildGUI():
print("- Adding OpenCanopy GUI")
rmtree(Versions.gui_path_build)
copy(Versions.gui_path, Versions.plist_path_build)
Versions.plist_data = Versions.plist_data.replace(
"#OpenCanopy.efi",
"OpenCanopy.efi"
)
def BuildSMBIOS():
# Set new SMBIOS
new_model = current_model
if current_model in ModelArray.MacBookAir61:
print("- Spoofing to MacBookAir6,1")
new_model = "MacBookAir6,1"
if current_model in ModelArray.MacBookAir62:
print("- Spoofing to MacBookAir6,2")
new_model = "MacBookAir6,2"
if current_model in ModelArray.MacBookPro111:
print("- Spoofing to MacBookPro11,1")
new_model = "MacBookPro11,1"
if current_model in ModelArray.MacBookPro112:
print("- Spoofing to MacBookPro11,2")
new_model = "MacBookPro11,2"
if current_model in ModelArray.Macmini71:
print("- Spoofing to Macmini7,1")
new_model = "Macmini7,1"
if current_model in ModelArray.iMac151:
print("- Spoofing to iMac15,1")
new_model = "iMac15,1"
if current_model in ModelArray.iMac144:
print("- Spoofing to iMac14,4")
new_model = "iMac14,4"
if current_model in ModelArray.MacPro71:
print("- Spoofing to MacPro7,1")
new_model = "MacPro7,1"
# Grab serials from macserial
serialData = subprocess.Popen((r"./payloads/tools/macserial -g -m " + new_model + " -n 1").split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
serialData = serialData.stdout.read().strip().split(" | ")
# Patch SMBIOS
Versions.plist_data = Versions.plist_data.replace(
"iMac19,1",
new_model
)
# Patch Number Serial
Versions.plist_data = Versions.plist_data.replace(
"W00000000001",
serialData[0]
)
# Patch MLB
Versions.plist_data = Versions.plist_data.replace(
"M0000000000000001",
serialData[1]
)
# Patch UUID
uuidGen = subprocess.Popen(["uuidgen"], stdout=subprocess.PIPE).communicate()[0]
Versions.plist_data = Versions.plist_data.replace(
"00000000-0000-0000-0000-000000000000",
uuidGen
)
def SavePlist():
with open(Versions.plist_path_build_full, 'w') as file:
file.write(Versions.plist_data)
def CleanBuildFolder():
# Clean up Build Folder
print("")
print("Cleaning build folder")
os.chdir(Versions.kext_path_build)
for item in os.listdir(Versions.kext_path_build):
if item.endswith(".zip"):
file_name = os.path.abspath(item)
zip_ref = zipfile.ZipFile(file_name)
zip_ref.extractall(Versions.kext_path_build)
zip_ref.close()
os.remove(file_name)
# Clean up Python's unzip
if os.path.exists("__MACOSX"):
rmtree("__MACOSX")
os.chdir(Versions.plist_path_build)
os.chdir(Versions.plist_path_build)
for item in os.listdir(Versions.plist_path_build):
if item.endswith(".zip"):
file_name = os.path.abspath(item)
zip_ref = zipfile.ZipFile(file_name)
zip_ref.extractall(Versions.plist_path_build)
zip_ref.close()
os.remove(file_name)
if os.path.exists("__MACOSX"):
rmtree("__MACOSX")
os.chdir(Versions.build_path)
if os.path.exists("__MACOSX"):
rmtree("__MACOSX")
os.remove(Versions.opencore_path_build)
os.chdir(Versions.current_path)
def ListDiskutil():
DiskMenu = True
while DiskMenu:
os.system('clear')
print("Loading diskutil...(This may take some time)")
diskList = subprocess.Popen(["diskutil", "list"], stdout=subprocess.PIPE).communicate()[0]
print(diskList)
ChosenDisk = raw_input('Please select the disk you want to install OpenCore to(ie. disk1): ')
ChosenDisk = ChosenDisk + "s1"
print("Trying to mount %s" % ChosenDisk)
diskMount = subprocess.Popen(["sudo", "diskutil", "mount", ChosenDisk], stdout=subprocess.PIPE).communicate()[0]
print(diskMount)
DiskMenu = raw_input("Press any key to continue: ")
def MoveOpenCore():
print("")
efiVol = "/Volumes/EFI"
if os.path.exists(efiVol):
print("Coping OpenCore onto Volumes/EFI")
if os.path.exists("/Volumes/EFI/EFI"):
print("Cleaning EFI folder")
rmtree("/Volumes/EFI/EFI")
if os.path.exists(Versions.opencore_path_done):
copy_tree(Versions.opencore_path_done, efiVol)
copy(Versions.icon_path, efiVol)
print("OpenCore transfer complete")
print("")
else:
print("Couldn't find EFI partition")
print("Please ensure your drive is formatted as GUID Partition Table")
print("")
def MountOpenCore():
subprocess.Popen((r"sudo diskutil mount $(nvram 4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102:boot-path | sed 's/.*GPT,\([^,]*\),.*/\1/')").split())

272
Resources/CliMenu.py Normal file
View File

@@ -0,0 +1,272 @@
# Handle misc CLI menu options
# Copyright (C) 2020-2021, Dhinak G, Mykola Grymalyuk
from __future__ import print_function
import subprocess
import sys
import time
import platform
from Resources import Build, ModelArray, Constants, SysPatch, Utilities
class MenuOptions:
def __init__(self, model, versions):
self.model = model
self.constants: Constants.Constants = versions
def change_os(self):
Utilities.cls()
Utilities.header(["Select Patcher's Target OS"])
print(f"""
Minimum Target:\t{self.constants.min_os_support}
Maximum Target:\t{self.constants.max_os_support}
Current target:\t{self.constants.os_support}
""")
temp_os_support = float(input("Please enter OS target: "))
if (self.constants.max_os_support < temp_os_support) or (temp_os_support < self.constants.min_os_support):
print("Unsupported entry")
else:
self.constants.os_support = temp_os_support
if temp_os_support == 11.0:
ModelArray.SupportedSMBIOS = ModelArray.SupportedSMBIOS11
elif temp_os_support == 12.0:
ModelArray.SupportedSMBIOS = ModelArray.SupportedSMBIOS12
def change_verbose(self):
Utilities.cls()
Utilities.header(["Set Verbose mode"])
change_menu = input("Enable Verbose mode(y/n): ")
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
else:
print("Invalid option")
def change_oc(self):
Utilities.cls()
Utilities.header(["Set OpenCore DEBUG mode"])
change_menu = input("Enable OpenCore DEBUG mode(y/n): ")
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"
else:
print("Invalid option")
def change_kext(self):
Utilities.cls()
Utilities.header(["Set Kext DEBUG mode"])
change_menu = input("Enable Kext DEBUG mode(y/n): ")
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
else:
print("Invalid option")
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
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"
else:
print("Invalid option")
def change_wifi(self):
Utilities.cls()
Utilities.header(["Assume Upgraded Wifi Always"])
print("""This is for Macs with upgraded wifi cards(ie. BCM94360/2)
Note: Patcher will detect whether hardware has been upgraded regardless, this
option is for those patching on a different machine or cannot detect.
""")
change_menu = input("Enable Upgraded Wifi build algorithm?(y/n): ")
if change_menu in {"y", "Y", "yes", "Yes"}:
self.constants.wifi_build = True
elif change_menu in {"n", "N", "no", "No"}:
self.constants.wifi_build = False
else:
print("Invalid option")
def change_serial(self):
Utilities.cls()
Utilities.header(["Set SMBIOS Mode"])
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
Note: For new users we recommend leaving as default(1. Minimal)
""")
change_menu = input("Set SMBIOS Mode(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"
else:
print("Invalid option")
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): ")
if change_menu in {"y", "Y", "yes", "Yes"}:
self.constants.showpicker = True
elif change_menu in {"n", "N", "no", "No"}:
self.constants.showpicker = False
else:
print("Invalid option")
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 secuirty reasons, OpenShell will be disabled when Vault is set.
""")
change_menu = input("Enable Vault(y/n): ")
if change_menu in {"y", "Y", "yes", "Yes"}:
self.constants.vault = True
elif change_menu in {"n", "N", "no", "No"}:
self.constants.vault = False
else:
print("Invalid option")
def change_sip(self):
Utilities.cls()
Utilities.header(["Set SIP and SecureBootModel"])
print("""SIP and SecureBootModel are used to ensure proper OTA functionality,
however to patch the root volume both of these must be disabled.
Only disable is absolutely necessary. SIP value = 0xFEF
Note: for minor changes, SIP can be adjusted in recovery like normal.
Additionally, when disabling SIP via the patcher amfi_get_out_of_my_way=1
will be added to boot-args.
Valid options:
1. Enable Both
2. Disable SIP only
3. Disable SecureBootModel Only
4. Disable Both
""")
change_menu = input("Set SIP and SecureBootModel(ie. 1): ")
if change_menu == "1":
self.constants.sip_status = True
self.constants.secure_status = True
elif change_menu == "2":
self.constants.sip_status = False
self.constants.secure_status = True
elif change_menu == "3":
self.constants.sip_status = True
self.constants.secure_status = False
elif change_menu == "4":
self.constants.sip_status = False
self.constants.secure_status = False
else:
print("Invalid option")
def change_imac_nvidia(self):
Utilities.cls()
Utilities.header(["Force iMac Nvidia Patches"])
print("""Specifically for iMac10,x-12,x with Metal Nvidia GPU upgrades
By default the patcher will try to detect what hardware is
running, however this will enforce iMac Nvidia Build Patches.
""")
change_menu = input("Assume iMac Nvidia patches(y/n): ")
if change_menu in {"y", "Y", "yes", "Yes"}:
self.constants.imac_nvidia_build = True
elif change_menu in {"n", "N", "no", "No"}:
self.constants.imac_nvidia_build = False
else:
print("Invalid option")
def custom_repo(self):
Utilities.cls()
Utilities.header(["Set custom patch repo"])
print(f"""For users participating in OpenCore Patcher betas, this is
where you can add custom repos such as Google Drive links.
Valid options:
1. Set custom location
2. Reset repo location
3. Exit
Current repo:
{self.constants.url_apple_binaries}
""")
change_menu = input("Set custom location?: ")
if change_menu == "1":
self.constants.url_backup = self.constants.url_apple_binaries
self.constants.url_apple_binaries = input("Enter new URL: ")
elif change_menu == "2":
if self.constants.url_backup != "":
self.constants.url_apple_binaries = self.constants.url_backup
else:
print("Invalid option")
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
3. Exit
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
else:
print("Invalid option")

326
Resources/Constants.py Normal file
View File

@@ -0,0 +1,326 @@
# pylint: disable=multiple-statements
# Define Files
# Copyright (C) 2020-2021, Dhinak G, Mykola Grymalyuk
from __future__ import print_function
from pathlib import Path
class Constants:
def __init__(self):
self.patcher_version = "0.0.23"
self.opencore_commit = "c528597 - 2021-04-05"
self.opencore_version = "0.6.8"
self.lilu_version = "1.5.2"
self.whatevergreen_version = "1.4.9"
self.airportbcrmfixup_version = "2.1.2"
self.bcm570_version = "1.0.1"
self.marvel_version = "1.0.0"
self.nforce_version = "1.0.0"
self.mce_version = "1.0.0"
self.mousse_version = "0.93"
self.telemetrap_version = "1.0.0"
self.corecaptureelcap_version = "1.0.0"
self.io80211elcap_version = "1.0.0"
self.io80211high_sierra_version = "1.0.0"
self.io80211mojave_version = "1.0.0"
self.applealc_version = "1.6.0"
self.restrictevents_version = "1.0.0"
self.restrictevents_mbp_version = "1.0.1"
self.piixata_version = "1.0.0"
self.backlight_version = "1.0.1"
self.cpufriend_version = "1.2.3"
self.nightshift_version = "1.1.0"
self.smcspoof_version = "1.0.0"
self.cputscsync = "1.0.3"
self.hibernationfixup = "1.3.9"
# Get resource path
self.current_path = Path(__file__).parent.parent.resolve()
self.payload_path = self.current_path / Path("payloads")
self.custom_model: str = None
self.custom_mxm_gpu: str = None
self.current_gpuv: str = None
self.current_gpud: str = None
self.igpu_vendor = ""
self.igpu_device = ""
self.dgpu_vendor = ""
self.dgpu_device = ""
# Patcher Settings
self.opencore_debug = False
self.opencore_build = "RELEASE"
self.kext_debug = False
self.verbose_debug = False
self.os_support = 11.0
self.min_os_support = 11.0
self.max_os_support = 11.0
self.metal_build = False
self.imac_vendor = "None"
self.wifi_build = False
self.gui_mode = False
self.serial_settings = "Minimal"
self.showpicker = True
self.vault = False
self.sip_status = True
self.secure_status = True
self.detected_os = 0
self.boot_efi = False
# OS Versions
self.tiger = 8
self.leopard = 9
self.snow_leopard = 10
self.lion = 11
self.mountain_lion = 12
self.mavericks = 13
self.yosemite = 14
self.el_capitan = 15
self.sierra = 16
self.high_sierra = 17
self.mojave = 18
self.catalina = 19
self.big_sur = 20
# Vendor IDs
self.pci_nvidia = "10DE"
self.pci_amd_ati = "1002"
self.pci_intel = "8086"
self.pci_broadcom = "14E4"
self.pci_atheros = "168C"
# External Files
self.url_backup = ""
self.url_apple_binaries = "https://github.com/dortania/Apple-Binaries-OCLP/archive/refs/heads/main.zip"
# Payload Location
# OpenCore
@property
def opencore_zip_source(self): return self.payload_path / Path(f"OpenCore/OpenCore-{self.opencore_build}.zip")
@property
def plist_template(self): return self.payload_path / Path(f"Config/config.plist")
# ACPI
@property
def pci_ssdt_path(self): return self.payload_path / Path("ACPI/SSDT-CPBG.aml")
# Drivers
@property
def nvme_driver_path(self): return self.payload_path / Path("Drivers/NvmExpressDxe.efi")
@property
def exfat_legacy_driver_path(self): return self.payload_path / Path("Drivers/ExFatDxeLegacy.efi")
# Kexts
@property
def payload_kexts_path(self): return self.payload_path / Path("Kexts")
@property
def lilu_path(self): return self.payload_kexts_path / Path(f"Acidanthera/Lilu-v{self.lilu_version}.zip")
@property
def whatevergreen_path(self): return self.payload_kexts_path / Path(f"Acidanthera/WhateverGreen-v{self.whatevergreen_version}.zip")
@property
def airportbcrmfixup_path(self): return self.payload_kexts_path / Path(f"Acidanthera/AirportBrcmFixup-v{self.airportbcrmfixup_version}.zip")
@property
def restrictevents_path(self): return self.payload_kexts_path / Path(f"Acidanthera/RestrictEvents-v{self.restrictevents_version}.zip")
@property
def restrictevents_mbp_path(self): return self.payload_kexts_path / Path(f"Acidanthera/RestrictEvents-MBP91-v{self.restrictevents_mbp_version}.zip")
@property
def bcm570_path(self): return self.payload_kexts_path / Path(f"Ethernet/CatalinaBCM5701Ethernet-v{self.bcm570_version}.zip")
@property
def marvel_path(self): return self.payload_kexts_path / Path(f"Ethernet/MarvelYukonEthernet-v{self.marvel_version}.zip")
@property
def nforce_path(self): return self.payload_kexts_path / Path(f"Ethernet/nForceEthernet-v{self.nforce_version}.zip")
@property
def mce_path(self): return self.payload_kexts_path / Path(f"Misc/AppleMCEReporterDisabler-v{self.mce_version}.zip")
@property
def mousse_path(self): return self.payload_kexts_path / Path(f"SSE/AAAMouSSE-v{self.mousse_version}.zip")
@property
def telemetrap_path(self): return self.payload_kexts_path / Path(f"SSE/telemetrap-v{self.telemetrap_version}.zip")
@property
def corecaptureelcap_path(self): return self.payload_kexts_path / Path(f"Wifi/corecaptureElCap-v{self.corecaptureelcap_version}.zip")
@property
def io80211elcap_path(self): return self.payload_kexts_path / Path(f"Wifi/IO80211ElCap-v{self.io80211elcap_version}.zip")
@property
def io80211high_sierra_path(self): return self.payload_kexts_path / Path(f"Wifi/IO80211HighSierra-v{self.io80211high_sierra_version}.zip")
@property
def io80211mojave_path(self): return self.payload_kexts_path / Path(f"Wifi/IO80211Mojave-v{self.io80211mojave_version}.zip")
@property
def applealc_path(self): return self.payload_kexts_path / Path(f"Acidanthera/AppleALC-v{self.applealc_version}.zip")
@property
def piixata_path(self): return self.payload_kexts_path / Path(f"Misc/AppleIntelPIIXATA-v{self.piixata_version}.zip")
@property
def backlight_path(self): return self.payload_kexts_path / Path(f"Misc/AppleBacklightFixup-v{self.backlight_version}.zip")
@property
def cpufriend_path(self): return self.payload_kexts_path / Path(f"Acidanthera/CPUFriend-v{self.cpufriend_version}.zip")
@property
def nightshift_path(self): return self.payload_kexts_path / Path(f"Misc/NightShiftEnabler-v{self.nightshift_version}.zip")
@property
def smcspoof_path(self): return self.payload_kexts_path / Path(f"Misc/SMC-Spoof-v{self.smcspoof_version}.zip")
@property
def cputscsync_path(self): return self.payload_kexts_path / Path(f"Acidanthera/CpuTscSync-v{self.cputscsync}.zip")
@property
def hibernationfixup_path(self): return self.payload_kexts_path / Path(f"Acidanthera/HibernationFixup-v{self.hibernationfixup}.zip")
@property
def plist_folder_path(self): return self.payload_kexts_path / Path(f"Plists")
@property
def platform_plugin_plist_path(self): return self.plist_folder_path / Path(f"PlatformPlugin")
# Build Location
@property
def build_path(self): return self.current_path / Path("Build-Folder/")
@property
def opencore_release_folder(self): return self.build_path / Path(f"OpenCore-{self.opencore_build}")
@property
def opencore_zip_copied(self): return self.build_path / Path(f"OpenCore-{self.opencore_build}.zip")
@property
def oc_folder(self): return self.opencore_release_folder / Path("EFI/OC/")
@property
def plist_path(self): return self.oc_folder / Path("config.plist")
@property
def acpi_path(self): return self.oc_folder / Path("ACPI")
@property
def drivers_path(self): return self.oc_folder / Path("Drivers")
@property
def kexts_path(self): return self.oc_folder / Path("Kexts")
@property
def resources_path(self): return self.oc_folder / Path("Resources")
@property
def map_kext_folder(self): return self.kexts_path / Path("USB-Map.kext")
@property
def map_contents_folder(self): return self.map_kext_folder / Path("Contents")
@property
def pp_kext_folder(self): return self.kexts_path / Path("CPUFriendDataProvider.kext")
@property
def pp_contents_folder(self): return self.pp_kext_folder / Path("Contents")
@property
def agdp_kext_folder(self): return self.kexts_path / Path("AGDP-Override.kext")
@property
def agdp_contents_folder(self): return self.agdp_kext_folder / Path("Contents")
@property
def agpm_kext_folder(self): return self.kexts_path / Path("AGPM-Override.kext")
@property
def agpm_contents_folder(self): return self.agpm_kext_folder / Path("Contents")
@property
def amc_kext_folder(self): return self.kexts_path / Path("AMC-Override.kext")
@property
def amc_contents_folder(self): return self.amc_kext_folder / Path("Contents")
# Tools
@property
def macserial_path(self): return self.payload_path / Path("Tools/macserial")
@property
def gfxutil_path(self): return self.payload_path / Path("Tools/gfxutil")
@property
def vault_path(self): return self.payload_path / Path("Tools/CreateVault/sign.command")
# Icons
@property
def app_icon_path(self): return self.current_path / Path("OC-Patcher.icns")
@property
def icon_path_external(self): return self.payload_path / Path("Icon/External/.VolumeIcon.icns")
@property
def icon_path_internal(self): return self.payload_path / Path("Icon/Internal/.VolumeIcon.icns")
@property
def icon_path_sd(self): return self.payload_path / Path("Icon/SD-Card/.VolumeIcon.icns")
@property
def icon_path_ssd(self): return self.payload_path / Path("Icon/SSD/.VolumeIcon.icns")
@property
def gui_path(self): return self.payload_path / Path("Icon/Resources.zip")
# Apple Paylods Paths
@property
def payload_apple_root_path_unzip(self): return self.payload_path / Path("Apple-Binaries-OCLP-main")
@property
def payload_apple_root_path_zip(self): return self.payload_path / Path("Apple.zip")
@property
def payload_apple_root_path(self): return self.payload_path / Path("Apple")
@property
def payload_apple_kexts_path(self): return self.payload_apple_root_path / Path("Extensions")
@property
def payload_apple_frameworks_path(self): return self.payload_apple_root_path / Path("Frameworks")
@property
def payload_apple_frameworks_path_accel(self): return self.payload_apple_frameworks_path / Path("Graphics-Acceleration")
@property
def payload_apple_lauchd_path(self): return self.payload_apple_root_path / Path("LaunchDaemons")
@property
def payload_apple_lauchd_path_accel(self): return self.payload_apple_lauchd_path / Path("Graphics-Acceleration")
@property
def payload_apple_private_frameworks_path(self): return self.payload_apple_root_path / Path("PrivateFrameworks")
@property
def payload_apple_private_frameworks_path_accel(self): return self.payload_apple_private_frameworks_path / Path("Graphics-Acceleration")
@property
def payload_apple_private_frameworks_path_brightness(self): return self.payload_apple_private_frameworks_path / Path("Brightness-Control")
# Apple Extensions
@property
def applehda_path(self): return self.payload_apple_kexts_path / Path("Audio/AppleHDA.kext")
# GPU Kexts and Bundles
@property
def legacy_graphics(self): return self.payload_apple_kexts_path / Path("Graphics-Acceleration")
@property
def legacy_nvidia_path(self): return self.legacy_graphics / Path("Nvidia-Tesla-Fermi")
@property
def legacy_amd_path(self): return self.legacy_graphics / Path("AMD-ATI")
@property
def legacy_intel_gen1_path(self): return self.legacy_graphics / Path("Intel-Gen5-Ironlake")
@property
def legacy_intel_gen2_path(self): return self.legacy_graphics / Path("Intel-Gen6-SandyBridge")
@property
def legacy_brightness(self): return self.payload_apple_kexts_path / Path("Brightness-Control")
# Apple Frameworks
@property
def coredisplay_path(self): return self.payload_apple_frameworks_path_accel / Path("CoreDisplay.framework")
@property
def iosurface_f_path(self): return self.payload_apple_frameworks_path_accel / Path("IOSurface.framework")
@property
def opengl_path(self): return self.payload_apple_frameworks_path_accel / Path("OpenGL.framework")
# Apple LaunchDaemons
@property
def hiddhack_path(self): return self.payload_apple_lauchd_path_accel / Path("HiddHack.plist")
# Apple PrivateFrameworks
@property
def gpusupport_path(self): return self.payload_apple_private_frameworks_path_accel / Path("GPUSupport.framework")
@property
def skylight_path(self): return self.payload_apple_private_frameworks_path_accel / Path("SkyLight.framework")
csr_values = {
"CSR_ALLOW_UNTRUSTED_KEXTS ": False, # 0x1 - Introduced in El Capitan
"CSR_ALLOW_UNRESTRICTED_FS ": False, # 0x2 - Introduced in El Capitan
"CSR_ALLOW_TASK_FOR_PID ": False, # 0x4 - Introduced in El Capitan
"CSR_ALLOW_KERNEL_DEBUGGER ": False, # 0x8 - Introduced in El Capitan
"CSR_ALLOW_APPLE_INTERNAL ": False, # 0x10 - Introduced in El Capitan
"CSR_ALLOW_UNRESTRICTED_DTRACE ": False, # 0x20 - Introduced in El Capitan
"CSR_ALLOW_UNRESTRICTED_NVRAM ": False, # 0x40 - Introduced in El Capitan
"CSR_ALLOW_DEVICE_CONFIGURATION ": False, # 0x80 - Introduced in El Capitan
"CSR_ALLOW_ANY_RECOVERY_OS ": False, # 0x100 - Introduced in Sierra
"CSR_ALLOW_UNAPPROVED_KEXTS ": False, # 0x200 - Introduced in High Sierra
"CSR_ALLOW_EXECUTABLE_POLICY_OVERRIDE": False, # 0x400 - Introduced in Mojave
"CSR_ALLOW_UNAUTHENTICATED_ROOT ": False, # 0x800 - Introduced in Big Sur
}
sbm_values = [
"j137",
"j680",
"j132",
"j174",
"j140k",
"j780",
"j213",
"j140a",
"j152f",
"j160",
"j230k",
"j214k",
"j223",
"j215",
"j185",
"j185f",
]

File diff suppressed because it is too large Load Diff

405
Resources/SysPatch.py Normal file
View File

@@ -0,0 +1,405 @@
# Framework for mounting and patching macOS root volume
# Copyright (C) 2020-2021, Dhinak G, Mykola Grymalyuk
# Missing Features:
# - Full System/Library Snapshotting (need to research how Apple achieves this)
# - Temorary Work-around: sudo bless --mount /System/Volumes/Update/mnt1 --bootefi --last-sealed-snapshot
# - Work-around battery throttling on laptops with no battery (IOPlatformPluginFamily.kext/Contents/PlugIns/ACPI_SMC_PlatformPlugin.kext/Contents/Resources/)
# - Add kmutil error checking
from __future__ import print_function
import binascii
import plistlib
import shutil
import signal
import subprocess
import sys
import uuid
import zipfile
import os
from pathlib import Path
from datetime import date
from Resources import Constants, ModelArray, Utilities
class PatchSysVolume:
def __init__(self, model, versions):
self.model = model
self.constants: Constants.Constants = versions
def hexswap(self, input_hex: str):
hex_pairs = [input_hex[i:i + 2] for i in range(0, len(input_hex), 2)]
hex_rev = hex_pairs[::-1]
hex_str = "".join(["".join(x) for x in hex_rev])
return hex_str.upper()
def csr_decode(self, sip_raw, print_status):
sip_int = int.from_bytes(sip_raw, byteorder='little')
i = 0
for current_sip_bit in self.constants.csr_values:
if sip_int & (1 << i):
temp = True
self.constants.csr_values[current_sip_bit] = True
else:
temp = False
if print_status is True:
print(f"- {current_sip_bit}\t {temp}")
i = i + 1
# TODO: Fix this garbage when I have more sanity
if ((self.constants.csr_values["CSR_ALLOW_UNTRUSTED_KEXTS "] is True) and (self.constants.csr_values["CSR_ALLOW_UNRESTRICTED_FS "] is True) and (self.constants.csr_values["CSR_ALLOW_UNRESTRICTED_DTRACE "] is True) and (self.constants.csr_values["CSR_ALLOW_UNRESTRICTED_NVRAM "] is True) and (self.constants.csr_values["CSR_ALLOW_DEVICE_CONFIGURATION "] is True) and (self.constants.csr_values["CSR_ALLOW_UNAPPROVED_KEXTS "] is True) and (self.constants.csr_values["CSR_ALLOW_EXECUTABLE_POLICY_OVERRIDE"] is True) and (self.constants.csr_values["CSR_ALLOW_UNAUTHENTICATED_ROOT "] is True)):
self.sip_patch_status = False
else:
self.sip_patch_status = True
def find_mount_root_vol(self, patch):
root_partition_info = plistlib.loads(subprocess.run("diskutil info -plist /".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode())
self.root_mount_path = root_partition_info["DeviceIdentifier"]
self.mount_location = "/System/Volumes/Update/mnt1"
self.mount_extensions = f"{self.mount_location}/System/Library/Extensions"
self.mount_frameworks = f"{self.mount_location}/System/Library/Frameworks"
self.mount_lauchd = f"{self.mount_location}/System/Library/LaunchDaemons"
self.mount_private_frameworks = f"{self.mount_location}/System/Library/PrivateFrameworks"
if self.root_mount_path.startswith("disk"):
self.root_mount_path = self.root_mount_path[:-2] if self.root_mount_path.endswith('s1') else self.root_mount_path
print(f"- Found Root Volume at: {self.root_mount_path}")
if Path(self.mount_extensions).exists():
print("- Root Volume is already mounted")
if patch is True:
self.patch_root_vol()
else:
self.unpatch_root_vol()
else:
print("- Mounting drive as writable")
subprocess.run(f"sudo mount -o nobrowse -t apfs /dev/{self.root_mount_path} {self.mount_location}".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
if Path(self.mount_extensions).exists():
print("- Sucessfully mounted the Root Volume")
if patch is True:
self.patch_root_vol()
else:
self.unpatch_root_vol()
else:
print("- Failed to mount the Root Volume")
else:
print("- Could not find root volume")
def delete_old_binaries(self, vendor_patch):
for delete_current_kext in vendor_patch:
delete_path = Path(self.mount_extensions) / Path(delete_current_kext)
if Path(delete_path).exists():
print(f"- Deleting {delete_current_kext}")
subprocess.run(f"sudo rm -R {delete_path}".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
else:
print(f"- Couldn't find {delete_current_kext}, skipping")
def add_new_binaries(self, vendor_patch, vendor_location):
for add_current_kext in vendor_patch:
existing_path = Path(self.mount_extensions) / Path(add_current_kext)
if Path(existing_path).exists():
print(f"- Found conflicting kext, Deleting Root Volume's {add_current_kext}")
subprocess.run(f"sudo rm -R {existing_path}".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
print(f"- Adding {add_current_kext}")
subprocess.run(f"sudo cp -R {vendor_location}/{add_current_kext} {self.mount_extensions}".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
subprocess.run(f"sudo chmod -Rf 755 {self.mount_extensions}/{add_current_kext}".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
subprocess.run(f"sudo chown -Rf root:wheel {self.mount_extensions}/{add_current_kext}".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
else:
print(f"- Adding {add_current_kext}")
subprocess.run(f"sudo cp -R {vendor_location}/{add_current_kext} {self.mount_extensions}".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
subprocess.run(f"sudo chmod -Rf 755 {self.mount_extensions}/{add_current_kext}".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
subprocess.run(f"sudo chown -Rf root:wheel {self.mount_extensions}/{add_current_kext}".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
def add_brightness_patch(self):
print("- Merging legacy Brightness Control Patches")
self.delete_old_binaries(ModelArray.DeleteBrightness)
self.add_new_binaries(ModelArray.AddBrightness, self.constants.legacy_brightness)
subprocess.run(f"sudo ditto {self.constants.payload_apple_private_frameworks_path_brightness} {self.mount_private_frameworks}".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
subprocess.run(f"sudo chmod -R 755 {self.mount_private_frameworks}/DisplayServices.framework".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
subprocess.run(f"sudo chown -R root:wheel {self.mount_private_frameworks}/DisplayServices.framework".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
def check_pciid(self):
try:
self.igpu_devices = plistlib.loads(subprocess.run("ioreg -r -n IGPU -a".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode())
self.igpu_devices = [i for i in self.igpu_devices if i["class-code"] == binascii.unhexlify("00000300")]
self.igpu_vendor = self.hexswap(binascii.hexlify(self.igpu_devices[0]["vendor-id"]).decode()[:4])
self.igpu_device = self.hexswap(binascii.hexlify(self.igpu_devices[0]["device-id"]).decode()[:4])
print(f"- Detected iGPU: {self.igpu_vendor}:{self.igpu_device}")
except ValueError:
print("- No iGPU detected")
self.igpu_devices = ""
try:
self.dgpu_devices = plistlib.loads(subprocess.run("ioreg -r -n GFX0 -a".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode())
self.dgpu_devices = [i for i in self.dgpu_devices if i["class-code"] == binascii.unhexlify("00000300")]
self.dgpu_vendor = self.hexswap(binascii.hexlify(self.dgpu_devices[0]["vendor-id"]).decode()[:4])
self.dgpu_device = self.hexswap(binascii.hexlify(self.dgpu_devices[0]["device-id"]).decode()[:4])
print(f"- Detected dGPU: {self.dgpu_vendor}:{self.dgpu_device}")
except ValueError:
print("- No dGPU detected")
self.dgpu_devices = ""
def gpu_accel_patches_11(self):
if self.dgpu_devices:
if self.dgpu_vendor == self.constants.pci_nvidia:
print("- Merging legacy Nvidia Kexts and Bundles")
self.delete_old_binaries(ModelArray.DeleteNvidiaAccel11)
self.add_new_binaries(ModelArray.AddNvidiaAccel11, self.constants.legacy_nvidia_path)
elif self.dgpu_vendor == self.constants.pci_amd_ati:
print("- Merging legacy AMD Kexts and Bundles")
self.delete_old_binaries(ModelArray.DeleteAMDAccel11)
self.add_new_binaries(ModelArray.AddAMDAccel11, self.constants.legacy_amd_path)
if self.igpu_devices:
if self.igpu_vendor == self.constants.pci_intel:
if self.igpu_device in ModelArray.IronLakepciid:
print("- Merging legacy Intel 1st Gen Kexts and Bundles")
self.delete_old_binaries(ModelArray.DeleteNvidiaAccel11)
self.add_new_binaries(ModelArray.AddIntelGen1Accel, self.constants.legacy_intel_gen1_path)
elif self.igpu_device in ModelArray.SandyBridgepiciid:
print("- Merging legacy Intel 2nd Gen Kexts and Bundles")
self.delete_old_binaries(ModelArray.DeleteNvidiaAccel11)
self.add_new_binaries(ModelArray.AddIntelGen2Accel, self.constants.legacy_intel_gen2_path)
if self.model in ModelArray.LegacyGPUAMDIntelGen2:
# Swap custom AppleIntelSNBGraphicsFB-AMD.kext, required to fix linking
subprocess.run(f"sudo rm -R {self.mount_extensions}/AppleIntelSNBGraphicsFB.kext".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
subprocess.run(f"sudo cp -R {self.constants.legacy_amd_path}/AMD-Link/AppleIntelSNBGraphicsFB.kext {self.mount_extensions}".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
elif self.igpu_vendor == self.constants.pci_nvidia:
if not self.dgpu_devices:
# Avoid patching twice, as Nvidia iGPUs will only have Nvidia dGPUs
print("- Merging legacy Nvidia Kexts and Bundles")
self.delete_old_binaries(ModelArray.DeleteNvidiaAccel11)
self.add_new_binaries(ModelArray.AddNvidiaAccel11, self.constants.legacy_nvidia_path)
# Frameworks
print("- Merging legacy Frameworks")
subprocess.run(f"sudo ditto {self.constants.payload_apple_frameworks_path_accel} {self.mount_frameworks}".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
if self.model in ModelArray.LegacyBrightness:
self.add_brightness_patch()
# LaunchDaemons
print("- Adding HiddHack.plist")
subprocess.run(f"sudo ditto {self.constants.payload_apple_lauchd_path_accel} {self.mount_lauchd}".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
subprocess.run(f"sudo chmod 755 {self.mount_lauchd}/HiddHack.plist".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
subprocess.run(f"sudo chown root:wheel {self.mount_lauchd}/HiddHack.plist".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
# PrivateFrameworks
print("- Merging legacy PrivateFrameworks")
subprocess.run(f"sudo ditto {self.constants.payload_apple_private_frameworks_path_accel} {self.mount_private_frameworks}".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
# Sets AppKit to Catalina Window Drawing codepath
# Disabled upon ASentientBot request
print("- Enabling NSDefenestratorModeEnabled")
subprocess.run("defaults write -g NSDefenestratorModeEnabled -bool true".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
def patch_root_vol(self):
print(f"- Detecting patches for {self.model}")
rebuild_required = False
# TODO: Create Backup of S*/L*/Extensions, Frameworks and PrivateFramework to easily revert changes
# APFS snapshotting seems to ignore System Volume changes inconcistently, would like a backup to avoid total brick
# Perhaps a basic py2 script to run in recovery to restore
print("- Creating backup snapshot of user data (This may take some time)")
subprocess.run("tmutil snapshot".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
# Ensures no .DS_Stores got in
print("- Preparing Files")
subprocess.run(f"sudo find {self.constants.payload_apple_root_path} -name '.DS_Store' -delete".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
if self.model in ModelArray.LegacyGPU:
self.check_pciid()
if self.dgpu_devices and self.dgpu_vendor == self.constants.pci_amd_ati and self.dgpu_device in ModelArray.AMDMXMGPUs:
print("- Detected Metal-based AMD GPU, skipping legacy patches")
elif self.dgpu_devices and self.dgpu_vendor == self.constants.pci_nvidia and self.dgpu_device in ModelArray.NVIDIAMXMGPUs:
print("- Detected Metal-based Nvidia GPU, skipping legacy patches")
else:
if Path(self.constants.hiddhack_path).exists():
print("- Detected legacy GPU, attempting legacy acceleration patches")
self.gpu_accel_patches_11()
else:
if self.dgpu_devices:
if self.dgpu_vendor == self.constants.pci_nvidia:
print("- Adding Nvidia Brightness Control patches")
self.add_new_binaries(ModelArray.AddNvidiaBrightness11, self.constants.legacy_nvidia_path)
elif self.dgpu_vendor == self.constants.pci_amd_ati:
if self.dgpu_device in ModelArray.TeraScale1pciid:
print("- Adding AMD/ATI TeraScale 1 Brightness Control patches")
self.add_new_binaries(ModelArray.AddAMDTeraScale1Brightness11, self.constants.legacy_amd_path)
elif self.dgpu_device in ModelArray.TeraScale2pciid:
print("- Adding AMD/ATI TeraScale 2 Brightness Control patches")
self.add_new_binaries(ModelArray.AddAMDTeraScale2Brightness11, self.constants.legacy_amd_path)
else:
print("- Could not find supported Legacy AMD/ATI GPU")
if self.igpu_devices:
if self.igpu_vendor == self.constants.pci_intel:
if self.igpu_device in ModelArray.IronLakepciid:
print("- Adding Intel Ironlake Brightness Control patches")
self.add_new_binaries(ModelArray.AddIntelGen1Brightness, self.constants.legacy_intel_gen1_path)
elif self.igpu_device in ModelArray.SandyBridgepiciid:
print("- Adding Intel Sandy Bridge Brightness Control patches")
self.add_new_binaries(ModelArray.AddIntelGen2Brightness, self.constants.legacy_intel_gen2_path)
if self.dgpu_devices and self.dgpu_vendor == self.constants.pci_amd_ati and self.dgpu_device in ModelArray.TeraScale2pciid:
# Swap custom AppleIntelSNBGraphicsFB-AMD.kext, required to fix linking
subprocess.run(f"sudo rm -R {self.mount_extensions}/AppleIntelSNBGraphicsFB.kext".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
subprocess.run(f"sudo cp -R {self.constants.legacy_amd_path}/AMD-Link/AppleIntelSNBGraphicsFB.kext {self.mount_extensions}".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
elif self.igpu_vendor == self.constants.pci_nvidia and not self.dgpu_devices:
# Avoid patching twice, as Nvidia iGPUs will only have Nvidia dGPUs
print("- Adding Nvidia Brightness Control patches")
self.add_new_binaries(ModelArray.AddNvidiaBrightness11, self.constants.legacy_nvidia_path)
if self.model in ModelArray.LegacyBrightness:
self.add_brightness_patch()
rebuild_required = True
if rebuild_required is True:
self.rebuild_snapshot()
def unpatch_root_vol(self):
print("- Creating backup snapshot of user data (This may take some time)")
subprocess.run("tmutil snapshot".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
print("- Reverting to last signed APFS snapshot")
subprocess.run(f"sudo bless --mount {self.mount_location} --bootefi --last-sealed-snapshot".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
def rebuild_snapshot(self):
if self.constants.gui_mode is False:
input("Press [ENTER] to continue with cache rebuild")
print("- Rebuilding Kernel Cache (This may take some time)")
subprocess.run(f"sudo kmutil install --volume-root {self.mount_location} --update-all".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
if self.constants.gui_mode is False:
input("Press [ENTER] to continue with snapshotting")
print("- Creating new APFS snapshot")
subprocess.run(f"sudo bless --folder {self.mount_location}/System/Library/CoreServices --bootefi --create-snapshot".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
def unmount_drive(self):
print("- Unmounting Root Volume (Don't worry if this fails)")
subprocess.run(f"sudo diskutil unmount {self.root_mount_path}".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
def check_status(self):
nvram_dump = plistlib.loads(subprocess.run("nvram -x -p".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode())
try:
self.sip_status = nvram_dump["csr-active-config"]
except KeyError:
self.sip_status = b'\x00\x00\x00\x00'
self.smb_model: str = subprocess.run("nvram 94B73556-2197-4702-82A8-3E1337DAFBFB:HardwareModel ".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.decode()
if not self.smb_model.startswith("nvram: Error getting variable"):
self.smb_model = [line.strip().split(":HardwareModel ", 1)[1] for line in self.smb_model.split("\n") if line.strip().startswith("94B73556-2197-4702-82A8-3E1337DAFBFB:")][0]
if self.smb_model.startswith("j137"):
self.smb_status = True
else:
self.smb_status = False
else:
self.smb_status = False
self.fv_status = True
self.fv_status: str = subprocess.run("fdesetup status".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.decode()
if self.fv_status.startswith("FileVault is Off"):
self.fv_status = False
else:
self.fv_status = True
self.sip_patch_status = True
self.csr_decode(self.sip_status, False)
def check_files(self):
if Path(self.constants.payload_apple_root_path).exists():
print("- Found Apple Binaries")
if self.constants.gui_mode is False:
patch_input = input("Would you like to redownload?(y/n): ")
if patch_input in {"y", "Y", "yes", "Yes"}:
shutil.rmtree(Path(self.constants.payload_apple_root_path))
self.download_files()
else:
self.download_files()
else:
print("- Apple binaries missing")
self.download_files()
def download_files(self):
Utilities.cls()
print("- Downloading Apple binaries")
popen_oclp = subprocess.Popen(f"curl -S -L {self.constants.url_apple_binaries} --output {self.constants.payload_apple_root_path_zip}".split(), stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, universal_newlines=True)
for stdout_line in iter(popen_oclp.stdout.readline, ""):
print(stdout_line, end="")
popen_oclp.stdout.close()
if self.constants.payload_apple_root_path_zip.exists():
print("- Download completed")
print("- Unzipping download...")
try:
subprocess.run(f"unzip {self.constants.payload_apple_root_path_zip}".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT, cwd=self.constants.payload_path).stdout.decode()
print("- Renaming folder")
os.rename(self.constants.payload_apple_root_path_unzip, self.constants.payload_apple_root_path)
print("- Binaries downloaded to:")
print(self.constants.payload_path)
if self.constants.gui_mode is False:
input("Press [ENTER] to continue")
except zipfile.BadZipFile:
print("- Couldn't unzip")
os.remove(self.constants.payload_apple_root_path_zip)
else:
print("- Download failed, please verify the below link works:")
print(self.constants.url_apple_binaries)
def start_patch(self):
# Check SIP
if self.constants.custom_model is not None:
print("Root Patching must be done on target machine!")
elif self.model in ModelArray.NoRootPatch11:
print("Root Patching not required for this machine!")
elif self.model not in ModelArray.SupportedSMBIOS:
print("Cannot run on this machine, model is unsupported!")
elif self.constants.detected_os < self.constants.big_sur:
print(f"Cannot run on this OS, requires macOS 11!")
else:
self.check_status()
Utilities.cls()
if (self.sip_patch_status is False) and (self.smb_status is False):
print("- Detected SIP and SecureBootModel are disabled, continuing")
if self.constants.gui_mode is False:
input("\nPress [ENTER] to continue")
self.check_files()
if self.constants.payload_apple_root_path.exists():
self.find_mount_root_vol(True)
self.unmount_drive()
print("- Patching complete")
print("\nPlease reboot the machine for patches to take effect")
if self.sip_patch_status is True:
print("SIP set incorrectly, cannot patch on this machine!")
print("Please disable SIP and SecureBootModel in Patcher Settings")
self.csr_decode(self.sip_status, True)
print("")
if self.smb_status is True:
print("SecureBootModel set incorrectly, unable to patch!")
print("Please disable SecureBootModel in Patcher Settings")
print("")
if self.fv_status is True:
print("FileVault enabled, unable to patch!")
print("Please disable FileVault in System Preferences")
print("")
if self.constants.gui_mode is False:
input("Press [Enter] to go exit.")
def start_unpatch(self):
if self.constants.custom_model is not None:
print("Unpatching must be done on target machine!")
elif self.constants.detected_os < self.constants.big_sur:
print(f"Cannot run on this OS, requires macOS 11!")
else:
self.check_status()
Utilities.cls()
if (self.sip_patch_status is False) and (self.smb_status is False):
print("- Detected SIP and SecureBootModel are disabled, continuing")
if self.constants.gui_mode is False:
input("\nPress [ENTER] to continue")
self.find_mount_root_vol(False)
self.unmount_drive()
print("- Unpatching complete")
print("\nPlease reboot the machine for patches to take effect")
if self.sip_patch_status is True:
print("SIP set incorrectly, cannot unpatch on this machine!")
print("Please disable SIP and SecureBootModel in Patcher Settings")
self.csr_decode(self.sip_status, True)
print("")
if self.smb_status is True:
print("SecureBootModel set incorrectly, unable to unpatch!")
print("Please disable SecureBootModel in Patcher Settings")
print("")
if self.fv_status is True:
print("FileVault enabled, unable to unpatch!")
print("Please disable FileVault in System Preferences")
print("")
if self.constants.gui_mode is False:
input("Press [Enter] to go exit.")

124
Resources/Utilities.py Normal file
View File

@@ -0,0 +1,124 @@
# Copyright (C) 2020-2021, Dhinak G
from __future__ import print_function
import os
import math as m
def header(lines):
lines = [i for i in lines if i is not None]
total_length = len(max(lines, key=len)) + 4
print("#" * (total_length))
for line in lines:
left_side = m.floor(((total_length - 2 - len(line.strip())) / 2))
print("#" + " " * left_side + line.strip() + " " * (total_length - len("#" + " " * left_side + line.strip()) - 1) + "#")
print("#" * total_length)
def cls():
os.system('cls' if os.name == 'nt' else 'clear')
# def menu(title, prompt, menu_options, add_quit=True, auto_number=False, in_between=[], top_level=False):
# return_option = ["Q", "Quit", None] if top_level else ["B", "Back", None]
# if add_quit: menu_options.append(return_option)
# cls()
# header(title)
# print()
# for i in in_between: print(i)
# if in_between: print()
# for index, option in enumerate(menu_options):
# if auto_number and not (index == (len(menu_options) - 1) and add_quit):
# option[0] = str((index + 1))
# print(option[0] + ". " + option[1])
# print()
# selected = input(prompt)
# keys = [option[0].upper() for option in menu_options]
# if not selected or selected.upper() not in keys:
# return
# if selected.upper() == return_option[0]:
# return -1
# else:
# menu_options[keys.index(selected.upper())][2]() if menu_options[keys.index(selected.upper())][2] else None
class TUIMenu():
def __init__(self, title, prompt, options=None, return_number_instead_of_direct_call=False, add_quit=True, auto_number=False, in_between=None, top_level=False, loop=False):
self.title = title
self.prompt = prompt
self.in_between = in_between or []
self.options = options or []
self.return_number_instead_of_direct_call = return_number_instead_of_direct_call
self.auto_number = auto_number
self.add_quit = add_quit
self.top_level = top_level
self.loop = loop
self.added_quit = False
def add_menu_option(self, name, description="", function=None, key=""):
self.options.append([key, name, description, function])
def start(self):
return_option = ["Q", "Quit"] if self.top_level else ["B", "Back"]
if self.add_quit and not self.added_quit:
self.add_menu_option(
return_option[1], function=None, key=return_option[0])
self.added_quit = True
while True:
cls()
header(self.title)
print()
for i in self.in_between:
print(i)
if self.in_between:
print()
for index, option in enumerate(self.options):
if self.auto_number and not (index == (len(self.options) - 1) and self.add_quit):
option[0] = str((index + 1))
print(option[0] + ". " + option[1])
for i in option[2]:
print("\t" + i)
print()
selected = input(self.prompt)
keys = [option[0].upper() for option in self.options]
if not selected or selected.upper() not in keys:
if self.loop:
continue
else:
return
if self.add_quit and selected.upper() == return_option[0]:
return -1
elif self.return_number_instead_of_direct_call:
return self.options[keys.index(selected.upper())][0]
else:
self.options[keys.index(selected.upper())][3]() if self.options[keys.index(selected.upper())][3] else None
if not self.loop:
return
class TUIOnlyPrint():
def __init__(self, title, prompt, in_between=None):
self.title = title
self.prompt = prompt
self.in_between = in_between or []
def start(self):
cls()
header(self.title)
print()
for i in self.in_between:
print(i)
if self.in_between:
print()
return input(self.prompt)

View File

@@ -1,72 +0,0 @@
# Define Files
from __future__ import print_function
from shutil import copy
from shutil import rmtree
import os
import json
import subprocess
import sys
# List build versions
opencore_version = "0.6.4"
lilu_version = "1.4.9"
whatevergreen_version = "1.4.4"
airportbcrmfixup_version = "2.1.1"
bcm570_version = "1.0.0"
marvel_version = "1.0.0"
nforce_version = "1.0.0"
mce_version = "1.0.0"
mousse_version = "0.93"
telemetrap_version = "1.0.0"
io80211high_sierra_version = "1.0.0"
io80211mojave_version = "1.0.0"
# List current location
os.chdir(os.path.dirname(os.path.realpath(__file__)))
os.chdir("..")
current_path = os.getcwd()
# Payload Location
# OpenCore
opencore_path = os.path.join(current_path, "payloads/OpenCore/" "OpenCore-v%s.zip" % opencore_version)
plist_path = os.path.join(current_path, "payloads/Config/v%s/" "config.plist" % opencore_version)
# ACPI
pci_ssdt_path = os.path.join(current_path, "payloads/ACPI/" "SSDT-CPBG.aml")
# Drivers
nvme_driver_path = os.path.join(current_path, "payloads/Drivers/" "NvmExpressDxe.efi")
# Kexts
lilu_path = os.path.join(current_path, "payloads/Kexts/Acidanthera/" "Lilu-v%s.zip" % lilu_version)
whatevergreen_path = os.path.join(current_path, "payloads/Kexts/Acidanthera/" "WhateverGreen-v%s.zip" % whatevergreen_version)
airportbcrmfixup_path = os.path.join(current_path, "payloads/Kexts/Acidanthera/" "AirportBrcmFixup-v%s.zip" % airportbcrmfixup_version)
bcm570_path = os.path.join(current_path, "payloads/Kexts/Ethernet/" "CatalinaBCM5701Ethernet-v%s.zip" % bcm570_version)
marvel_path = os.path.join(current_path, "payloads/Kexts/Ethernet/" "MarvelYukonEthernet-v%s.zip" % marvel_version)
nforce_path = os.path.join(current_path, "payloads/Kexts/Ethernet/" "nForceEthernet-v%s.zip" % nforce_version)
mce_path = os.path.join(current_path, "payloads/Kexts/Misc/" "AppleMCEReporterDisabler-v%s.zip" % mce_version)
mousse_path = os.path.join(current_path, "payloads/Kexts/SSE/" "AAAMouSSE-v%s.zip" % mousse_version)
telemetrap_path = os.path.join(current_path, "payloads/Kexts/SSE/" "telemetrap-v%s.zip" % telemetrap_version)
io80211high_sierra_path = os.path.join(current_path, "payloads/Kexts/Wifi/" "IO80211HighSierra-v%s.zip" % io80211high_sierra_version)
io80211mojave_path = os.path.join(current_path, "payloads/Kexts/Wifi/" "IO80211Mojave-v%s.zip" % io80211mojave_version)
# Build Location
opencore_path_build = os.path.join(current_path, "Build-Folder/" "OpenCore-v%s.zip" % opencore_version)
plist_path_build = os.path.join(current_path, "Build-Folder/" "OpenCore-v%s/EFI/OC/" % opencore_version)
plist_path_build_full = os.path.join(current_path, "Build-Folder/" "OpenCore-v%s/EFI/OC/config.plist" % opencore_version)
acpi_path_build = os.path.join(current_path, "Build-Folder/" "OpenCore-v%s/EFI/OC/ACPI" % opencore_version)
drivers_path_build = os.path.join(current_path, "Build-Folder/" "OpenCore-v%s/EFI/OC/Drivers" % opencore_version)
kext_path_build = os.path.join(current_path, "Build-Folder/" "OpenCore-v%s/EFI/OC/Kexts" % opencore_version)
opencore_path_done = os.path.join(current_path, "Build-Folder/" "OpenCore-v%s" % opencore_version)
build_path = os.path.join(current_path, r'Build-Folder/')
gui_path_build = os.path.join(current_path, "Build-Folder/" "OpenCore-v%s/EFI/OC/Resources" % opencore_version)
# Tools
macserial_path = os.path.join(current_path, "payloads/" "Tools")
# Icons
icon_path = os.path.join(current_path, "payloads/Icon/" ".VolumeIcon.icns")
gui_path = os.path.join(current_path, "payloads/Icon/" "Resources.zip")

2
after_pyinstaller.sh Executable file
View File

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

14
docs/.markdownlint.json Normal file
View File

@@ -0,0 +1,14 @@
{
"default": true,
"line_length": false,
"no-alt-text": false,
"no-inline-html": false,
"header-increment": false,
"no-duplicate-header": false,
"fenced-code-language": false,
"no-emphasis-as-heading": false,
"single-title": false,
"ul-style": {
"style": "asterisk"
}
}

10
docs/.markdownlintignore Normal file
View File

@@ -0,0 +1,10 @@
/node_modules/
/_book/
*.json
/extra-files/
/.git/
/icons/
/images/
/styles/
/.github/
/.vuepress/

143
docs/.vuepress/config.js Executable file
View File

@@ -0,0 +1,143 @@
const {
description
} = require('../package')
module.exports = {
title: 'OpenCore Legacy Patcher',
head: [
['meta', {
name: 'theme-color',
content: '#3eaf7c'
}],
['meta', {
name: 'apple-mobile-web-app-capable',
content: 'yes'
}],
['meta', {
name: 'apple-mobile-web-app-status-bar-style',
content: 'black'
}],
["link", {
rel: "'stylesheet",
href: "/styles/website.css"
},]
],
base: '/OpenCore-Legacy-Patcher/',
watch: {
$page(newPage, oldPage) {
if (newPage.key !== oldPage.key) {
requestAnimationFrame(() => {
if (this.$route.hash) {
const element = document.getElementById(this.$route.hash.slice(1));
if (element && element.scrollIntoView) {
element.scrollIntoView();
}
}
});
}
}
},
markdown: {
extendMarkdown: md => {
md.use(require('markdown-it-multimd-table'), {
rowspan: true,
});
}
},
theme: 'vuepress-theme-succinct',
globalUIComponents: [
'ThemeManager'
],
themeConfig: {
lastUpdated: true,
repo: 'https://github.com/dortania/OpenCore-Legacy-Patcher/',
docsDir: 'docs',
docsBranch: 'main',
editLinks: true,
editLinkText: 'Help us improve this page!',
logo: 'homepage.png',
sidebar: [{
title: 'Introduction',
collapsable: false,
sidebarDepth: 1,
children: [
'START',
'MODELS',
['BENIFITS', 'Benefits and drawbacks'],
]
},
{
title: 'Setting up',
collapsable: false,
sidebarDepth: 1,
children: [
'INSTALLER',
'BUILD',
]
},
{
title: 'Installation',
collapsable: false,
sidebarDepth: 1,
children: [
'BOOT',
'POST-INSTALL',
]
},
{
title: 'Misc',
collapsable: false,
sidebarDepth: 1,
children: [
'TROUBLESHOOTING',
'DEBUG',
'UPDATE',
'UNINSTALL',
'ICNS',
]
},
{
title: 'Credit',
collapsable: false,
sidebarDepth: 1,
children: [
'DONATE',
'LICENSE',
]
},
{
title: 'Documentation',
collapsable: false,
sidebarDepth: 1,
children: [
'TESTED',
'TERMS',
'HOW',
'PATCHEXPLAIN',
]
},
],
},
plugins: [
'@vuepress/plugin-back-to-top',
'vuepress-plugin-smooth-scroll',
['vuepress-plugin-medium-zoom',
{
selector: "img",
options: {
background: 'var(--bodyBgColor)'
}
}],
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 270 KiB

View File

@@ -0,0 +1,49 @@
/**
* Custom Styles here.
*
* refhttps://v1.vuepress.vuejs.org/config/#index-styl
*/
[data-theme='light']
--sideBgColor $sideBgColor
[data-theme='dark']
--sideBgColor $sideBgColorDark
--dropShadowColor $dropShadowColor
.home .hero img
max-width 450px!important
.navbar
filter drop-shadow(0px 1px 1px var(--dropShadowColor))
.sidebar
background-color var(--sideBgColor)
div[class*="language-"]
pre, pre[class*="language-"]
margin-top 0
html {
overflow-y: scroll;
overflow-x: hidden;
background-color: unset;
}
::-webkit-scrollbar {
width 0px
background transparent /* make scrollbar transparent */
}
tr
&:nth-child(1n)
background-color var(--bodyBgColor)
&:nth-child(2n)
background-color var(--sideBgColor)
.dropdown-wrapper .nav-dropdown
border 1px solid var(--sideBgColor)!important
background-color var(--sideBgColor)!important
box-shadow 0px 0px 2px var(--bodyBgColor)
right -12%!important

View File

@@ -0,0 +1,23 @@
/**
* Custom palette here.
*
* refhttps://v1.vuepress.vuejs.org/zh/config/#palette-styl
*/
$bodyFontSize = 16px
$fallbackTheme = 'dark'
$dropShadowColor = #111112
// Light Theme
$accentColor = #19b3e7
$textColor = #2c3e50
$bodyBgColor = #fff
$sideBgColor = #fff
$badgeTipColor = #caf2ff
// Dark Theme
$accentColorDark = #30BCD5
$textColorDark = #ccc
$bodyBgColorDark = #2d3033
$sideBgColorDark = #363b40
$badgeTipColorDark = #023e52

21
docs/BENIFITS.md Normal file
View File

@@ -0,0 +1,21 @@
# Benefits and Drawbacks between OpenCore Legacy Patcher and other patchers
With OpenCore Legacy Patcher we recommend users go through the below table to understand what the benefits and drawbacks are compared to other patchers. There are positive and negatives to each and we feel transparency is most important when patching another users machine. There should be no grey areas where users may be mislead.
| 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> |
| FileVault | <span style="color:#30BCD5">Supported on Metal GPUs</span> | <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</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> |
| Supported OSes | <span style="color:#30BCD5">10.7-11</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> |
| BootCamp Switching | <span style="color:red">Requires EFI Conversion for Start Disk support, otherwise still supported</span> | <span style="color:#30BCD5">Native</span> |
| Brightness Control on Legacy GPUs | <span style="color:#30BCD5">Supported</span> | <span style="color:#30BCD5">Supported</span> |
| Legacy 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> |
| WPA Wifi Support | <span style="color:#30BCD5">Native, stable</span> | <span style="color:red">Unstable</span> |
| HEVC/H.265 Support for Mac Pros and iMacs with Polaris+ GPUs | <span style="color:#30BCD5">Supported</span> | <span style="color:red">Not supported</span> |
| Big Sur-styled Boot Picker | <span style="color:#30BCD5">Available</span> | <span style="color:red">Not available</span> |
| El Capitan-era Wifi cards | <span style="color:#30BCD5">Supported</span> | <span style="color:red">Not supported</span> |
| Hibernation Support | <span style="color:#30BCD5">Supports 3rd party SATA SSDs in addition to stock models</span> | <span style="color:red">Only supports stock drives</span> |

22
docs/BOOT.md Normal file
View File

@@ -0,0 +1,22 @@
# Booting OpenCore and macOS
Now we finally get to boot OpenCore!
Reboot machine while holding `Option` to select the EFI Boot entry with the OpenCore icon:
* This will be the Mac Boot Picker
![](../images/efi-boot.png)
Now that you've loaded OpenCore, now select Install macOS!:
* This will be the OpenCore Picker
![](../images/oc-boot.png)
After plenty of verbose booting, you will reach the installer screen! From there it's just like any normal macOS install. For an example of how the boot process looks, see the following video:
* [OpenCore Legacy Patcher Boot Process](https://www.youtube.com/watch?v=AN3zsbQV_n4)
# Once installed and booting, head to [Post-Installation](./POST-INSTALL.md)

37
docs/BUILD.md Normal file
View File

@@ -0,0 +1,37 @@
# Building and installing OpenCore
Now that we have a macOS installer, lets now build our OpenCore configuration!
First Download the latest release:
* [OpenCore Legacy Patcher Releases](https://github.com/dortania/Opencore-Legacy-Patcher/releases)
Next, run the `OpenCore-Patcher.app`:
![](../images/first-run.png)
From here you have a couple important options:
* Build OpenCore
* Install OpenCore to USB/internal drive
* Change Model
* Patcher Settings
If you're patching for a different machine than you're running, please select "Change Model" and enter the updated SMBIOS. For more advanced users, you may also tweak the patcher's build settings via "Patcher Settings"
Now lets enter "Build OpenCore":
![](../images/build-efi.png)
The process should be quite quick to build, once finished you'll be plopped back to the main menu.
Next lets run `Install OpenCore to USB/internal drive`:
| Select Drive | Select EFI/FAT32 Partition |
| :--- | :--- |
| ![](../images/disk-start.png) | ![](../images/disk-efi.png) |
* If you have issues, please ensure you install OpenCore onto a FAT32 partition to ensure your Mac is able to boot it. You will need to format your drive as GUID/GPT in Disk Utility
# Once finished, head to [Booting OpenCore and macOS](./BOOT.md)

49
docs/DEBUG.md Normal file
View File

@@ -0,0 +1,49 @@
# How to debug with OpenCore
For those who've hit an odd bug and unsure if it's user error or patcher, the below will tell you how to get more verbose debug information as well as logs to help [file issues with us](https://github.com/dortania/OpenCore-Legacy-Patcher/issues)
* For users who are less experienced, we recommend asking on the [Unsupported Mac Discord Server](https://discord.gg/XbbWAsE) for help.
## Debugging yourself
The easiest way to debug yourself is via Patcher Settings. Here there are many different settings however the 3 main options that will help are:
* "Enable Verbose Mode"
* "Enable OpenCore DEBUG"
* "Enable Kext DEBUG"
When you've enabled these 3 options, rebuild OpenCore and install to your drive. This will provide much greater debug information as well as write logs to the EFI Partition.
## Obtaining OpenCore logs from disk
With "Enable OpenCore DEBUG" set, every boot there will be a .txt file generated in your disk. To grab these logs, [download and run MountEFI](https://github.com/corpnewt/MountEFI):
![](../images/mountefi.png)
Once you've mounted the EFI Partition of the drive you have macOS on, you should see some nice logs:
![](../images/logs-efi.png)
## Obtaining Kernel logs from macOS
With "Enable Kext DEBUG" set, every boot will now have much more detailed logs stored in the OS. To get these logs, simply run the below command:
```sh
sudo dmesg > ~/Desktop/DMESG.txt
```
From there, you'll have a log on your desktop.
## Filing an issue with us
Now that you have proper logs, you can now [file issues with us](https://github.com/dortania/OpenCore-Legacy-Patcher/issues). Reminder we want the following info:
* Model patching for (ie. MacBookPro10,1)
* Target OS (ie. macOS 11.2.3)
* Host OS (ie. macOS 10.15.7)
* Upload of your OpenCore Build Folder
* Upload of your OpenCore log (if applicable)
* Upload of your Kernel log (if applicable)
Additionally, please search whether the issue has been reported before. This avoids having duplicate issues.

32
docs/DONATE.md Normal file
View File

@@ -0,0 +1,32 @@
# Supporting the patcher
OpenCore Legacy Patcher is a hobby project for us developers, and while we love helping out the community it's very difficult for us to troubleshoot issues remotely. The best way for us to get to work on the patcher, fix issues and add enhancements is having the hardware in-hand. As a hobby project, neither of the main developers can afford to buy every legacy Mac to test on.
The best way to support us in all honesty is to donate any old hardware you no longer need, as this allows us to have machines to test locally and push fixes much faster. While we appreciate cash donations, this makes it much more difficult for us to handle as an organization.
Main hardware we'd appreciate:
* Any Mac you own
* Does require SSE4,1 CPU to test on Sierra and newer however
Additionally, hardware info dumps are greatly beneficial for us to determine what patches a machine might need:
* [IORegistryExplorer](https://github.com/khronokernel/IORegistryClone/blob/master/ioreg-210.zip?raw=true)
* `File -> SaveAs` and open an issue on Github
* Note: We want IOReg dumps of hardware not running on OpenCore, instead running a clean, supported OS
If you have any legacy hardware you're willing to donate, please contact us at the following email:
* khronokernel@icloud.com
Current hardware we own:
| Model | CPU | GPU | Owner | Notes |
| :--- | :--- | :--- | :--- | :--- |
| MacBook7,1 | Penryn | GT320M | Dhinak | N/A |
| MacBook7,1 | Penryn | GT320M | Mykola | N/A |
| iMac11,2 | Clarksdale | HD4670 | Mykola | N/A |
<!-- | MacBookPro5,3 | Penryn | 9400M + 9600M | Dhinak | Display's partially broken | -->
<!-- | Macmini4,1 | Penryn | GT320M | Dhinak | N/A | -->

9
docs/HOW.md Normal file
View File

@@ -0,0 +1,9 @@
# Boot Process with OpenCore Legacy Patcher
OpenCore Legacy Patcher itself is actually quite a "dumb" program, and essentially edits a config.plist file and moves files around, it actually has little logic regarding the boot process. The real magic of OCLP is [OpenCorePkg](https://github.com/acidanthera/OpenCorePkg), our back-end and what makes this patcher so powerful.
## Boot Process with OpenCore
To understand a bit more of how OpenCore is able revive older Macs in such a native-like way, we need to go over *how* OpenCore works with your Mac:
![](../images/oc-explained.png)

105
docs/ICNS.md Normal file
View File

@@ -0,0 +1,105 @@
# Creating custom icons for OpenCore and Mac Boot Picker
For users who want to customize your setup to be more personal, OpenCore does allow for custom icons and images in the boot picker.
* [Custom OpenCore icons](#custom-opencore-icons)
* [Custom Mac Boot Picker icons](#custom-mac-boot-picker-icons)
* [Installing updated icons](#installing-updated-icons)
# Custom OpenCore icons
To generate custom OpenCore icons, you'll need the following:
* Images in PNG format
* Each image, with the following res:
* Cursor — Mouse cursor (mandatory, up to 144x144).
* Selected — Selected item (mandatory, 144x144).
* Selector — Selecting item (mandatory, up to 144x40).
* Left — Scrolling left (mandatory, 40x40).
* Right — Scrolling right (mandatory, 40x40).
* HardDrive — Generic OS (mandatory, 128x128).
* Background — Centred background image. (Recommended max size 1920x1080)
* Apple — Apple OS (128x128).
* AppleRecv — Apple Recovery OS (128x128).
* AppleTM — Apple Time Machine (128x128).
* Windows — Windows (128x128).
* Other — Custom entry (see [Entries](https://dortania.github.io/docs/latest/Configuration.html), 128x128).
* ResetNVRAM — Reset NVRAM system action or tool (128x128).
* Shell — Entry with UEFI Shell name for e.g. OpenShell (128x128).
* Tool — Any other tool (128x128).
Note, for each image we recommend having one of double the size. This ensures that icons are scaled correctly since .icns support dedicated images depending on HiDPI or not.
Once you have a custom image you want to use(for example, as a background), download the [latest release of OpenCorePkg](https://github.com/acidanthera/OpenCorePkg/releases) and enter the `Utilities/icnspack/` folder:
![](../images/icnspack-folder.png)
Now `cd` this folder in terminal and run the following:
```sh
./icnspack Background.icns <insert_x1_image> <insert_x2_image>
```
Once done, you'll see your custom icon generated in `icnspack`'s folder:
![](../images/icnspack-done.png)
# Custom Mac Boot Picker icons
Custom boot picker icons is much more complicated on Legacy Macs, on late 2013+ Macs the [Custom OpenCore icons](#custom-opencore-icons) method will work just fine. However on many 2012 and older Macs, the icons generated will be incompatible with the firmware.
To generate legacy icons, you'll need the following:
* A machine running macOS 10.4 through 10.11
* Icon Composer.app (Requires Apple Developer Account for official download)
* Users without the developer account can find a mirrors here:
* [Icon Composer 10.6](https://github.com/dortania/OpenCore-Legacy-Patcher/blob/main/docs/Icon-Composer-10.6.zip)
* [Icon Composer 10.11](https://github.com/dortania/OpenCore-Legacy-Patcher/blob/main/docs/Icon-Composer-10.11.zip)
* PNG Image you wish to convert
Head to [developer.apple's More Downloads page](https://developer.apple.com/download/more/) and search for `Graphics Tools` that is supported by your OS(note for 10.6 and older, the app is hidden inside `Developer Tools`):
![](../images/graphics-download.png)
Once downloaded, open the disk image and you'll find Icon Composer.app:
![Graphics Open](../images/graphics-open.png)
Now run the app and simply drag the images to each section as so:
![](../images/icon-SL.png)
Now save and export the new icns
# Installing updated icons
To install, please ensure that Vault is disabled when you built OpenCore. If you're unsure, simply rebuild OpenCore with the Patcher setting "Vault" set to false.
* <span style="color:red"> Warning</span>: Editing your OpenCore EFI incorrectly can result in a bricked install. Please ensure you have a natively supported version of macOS installed to boot into in case of issues.
Now that you've verified you can edit OpenCore safely, you'll need to mount the drive that OpenCore is stored on. To do this, download [MountEFI](https://github.com/corpnewt/MountEFI) and run it:
![](../images/mountefi.png)
Select the drive you installed OpenCore to and mount it.
* [Updating OpenCore icons](#updating-opencore-icons)
* [Updating Mac Boot Picker icons](#updating-mac-boot-picker-icons)
### Updating OpenCore icons
Head to `EFI/OC/Resources/Image/` on your drive and you'll see all the custom icons. For Background.icns, we need to ensure the file matches the theme OpenCore has set so we add the prefix `Modern` to it:
![](../images/background-moved.png)
Now reboot and you should see your updated icon(s)!
### Updating Mac Boot Picker icons
To update the Mac Boot Picker icons is actually quite simple, on the root of your drive simply drop the icon onto the root of the drive with the name `.VolumeIcon.icns`
![](../images/mac-icns-drive.png)
Now reboot and you'll see the new icon!

58
docs/INSTALLER.md Normal file
View File

@@ -0,0 +1,58 @@
# Download and build macOS Installers
* [Downloading](#downloading)
* [Building](#building)
This doc is centered around downloading and writing the macOS installer to a USB. If you're already familiar with how to do this, you can skip.
* Note: 16GB+ USB will be required for the installer
## Downloading
The simplest way to download macOS installs would be to use installinstallmacos:
```sh
[ ! -d ~/macOS-installer/ ] && mkdir ~/macOS-installer; cd ~/macOS-installer; [ ! -f ~/macOS-installer/installinstallmacos.py ] && curl -O https://raw.githubusercontent.com/munki/macadmin-scripts/main/installinstallmacos.py; sudo python installinstallmacos.py
```
* Note: On El Capitan (10.11) and older, you'll need to specify a catalog at the end of the command:
```
--catalogurl https://swscan.apple.com/content/catalogs/others/index-11-10.15-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog
```
![](../images/munki.png)
As you can see, we get a nice list of macOS installers. If you need a particular versions of macOS, you can select it by typing the number next to it. For this example we'll choose 10:
![](../images/munki-process.png)
This is going to take a while as we're downloading the entire 12GB+ macOS installer.
Once finished, you'll find in your `~/macOS-Installer/` folder a DMG containing the macOS Installer, called `Install_macOS_11.1-20C69.dmg` for example. Mount it and you'll find the installer application.
* Note: We recommend to move the Install macOS.app into the `/Applications` folder, as we'll be executing commands from there.
* Note 2: Running Cmd+Shift+G in Finder will allow you to easily jump to `~/macOS-installer`
![](../images/munki-done-2.png)
![](../images/munki-dmg.png)
## Building
Now we'll be formatting the USB to prep for both the macOS installer and OpenCore. We'll want to use macOS Extended (HFS+) with a GUID partition map(Using GUID is important for the patcher). This will create two partitions: the main `MyVolume` and a second called `EFI` which is used as a boot partition where your Mac's firmware will check for boot files. `EFI` partitions will be hidden by default, so don't worry if you don't immediately see them.
* Note: By default, Disk Utility only shows partitions press Cmd/Win+2 to show all devices (alternatively you can press the View button)
![Formatting the USB](../images/format-usb.png)
Next run the `createinstallmedia` command provided by [Apple](https://support.apple.com/en-us/HT201372). Note that the command is made for USB's formatted with the name `MyVolume`:
```sh
sudo /Applications/Install\ macOS\ Big\ Sur.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume
```
* Note: You can also replace the `createinstallmedia` path with that of where your installer's located (same idea with the drive name).
![](../images/createinstallmedia.png)
# Once finished, head to [Building and installing OpenCore](./BUILD.md)

Binary file not shown.

BIN
docs/Icon-Composer-10.6.zip Normal file

Binary file not shown.

35
docs/LICENSE.md Normal file
View File

@@ -0,0 +1,35 @@
# OpenCore Legacy Patcher Licence
This patcher is made of multiple external applications from different people and organizations. See each program for their licensing:
* BSD 3-Clause "New" or "Revised" License
* [OpenCorePkg](https://github.com/acidanthera/OpenCorePkg/blob/master/LICENSE.txt)
* [Lilu](https://github.com/acidanthera/Lilu/blob/master/LICENSE.txt)
* [WhateverGreen](https://github.com/acidanthera/WhateverGreen/blob/master/LICENSE.txt)
* [AirportBrcmFixup](https://github.com/acidanthera/AirportBrcmFixup/blob/master/LICENSE.txt)
* [CPUFriend](https://github.com/acidanthera/CPUFriend/blob/master/LICENSE)
* [RestrictEvents](https://github.com/acidanthera/RestrictEvents/blob/master/LICENSE.txt)
* [NightShiftEnabler](https://github.com/cdf/NightShiftEnabler/blob/master/LICENSE.txt)
* 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
* [telemetrap](https://forums.macrumors.com/threads/mp3-1-others-sse-4-2-emulation-to-enable-amd-metal-driver.2206682/post-28447707) - Syncretic
* Apple Binaries - Apple Inc.
Remaining files within OpenCore Legacy Patcher are copyrighted 2020-2021 Mykola Grymalyuk & Dhinak G, under the BSD-3 Clause license:
```
Copyright (c) 2020-2021, Dhinak G
Copyright (c) 2020-2021, Mykola Grymalyuk
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
```

138
docs/MODELS.md Normal file
View File

@@ -0,0 +1,138 @@
# Supported Models
Any hardware supporting SSE4.1 CPU and 64-Bit firmware work on this patcher. To check your hardware model, run the below command on the applicable machine in terminal:
```bash
system_profiler SPHardwareDataType | grep 'Model Identifier'
```
The below table will list all supported and unsupported functions of the patcher currently:
* [MacBook](#macbook)
* [MacBook Air](#macbook-air)
* [MacBook Pro](#macbook-pro)
* [Mac mini](#mac-mini)
* [iMac](#imac)
* [Mac Pro](#mac-pro)
* [Xserve](#xserve)
Regarding OS support, see below:
| Support Entry | Supported OSes | Description | Comment |
| :--- | :--- | :--- | :--- |
| HostOS | macOS 10.9-11 | Refers to OSes where running OpenCore-Patcher.app are supported | Supports 10.7+ if [python 3.6 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 | Unofficially supports 10.4 and newer, no support provided via this patcher |
### MacBook
| SMBIOS | Year | Supported | Comment |
| :--- | :--- | :--- | :--- |
| MacBook1,1 | Mid-2006 | <span style="color:red"> NO </span> | 32-Bit CPU limitation |
| MacBook2,1 | Late 2006 | ^^ | 32-Bit Firmware limitation |
| 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<br/>- No Ethernet) |
| MacBook5,1 | Late 2008 | ^^ | - No GPU Acceleration in Big Sur([#108](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108))<br/>- Trackpad is recognized as mouse |
| MacBook5,2 | Early 2009 | ^^ | - No GPU Acceleration in Big Sur([#108](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108))<br/>- Trackpad is recognized as mouse<br/>- Brightness control partially supported |
| MacBook6,1 | Late 2009 | ^^ | - No GPU Acceleration in Big Sur([#108](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108))<br/> |
| MacBook7,1 | Mid-2010 | ^^ | ^^ |
### MacBook Air
| SMBIOS | Year | Supported | Comment |
| :--- | :--- | :--- | :--- |
| MacBookAir1,1 | Early 2008 | <span style="color:red"> NO </span> | Requires SSE4.1 CPU |
| MacBookAir2,1 | Late 2008 |<span style="color:#30BCD5"> YES </span> | No GPU Acceleration in Big Sur([#108](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108)) |
| MacBookAir3,1 | Late 2010 | ^^ | ^^ |
| MacBookAir3,2 | ^^ | ^^ | ^^ |
| MacBookAir4,1 | Mid-2011 | ^^ | ^^ |
| MacBookAir4,2 | ^^ | ^^ | ^^ |
| MacBookAir5,1 | Mid-2012 |^^ | <span style="color:green"> Everything is supported</span> |
| MacBookAir5,2 | ^^ | ^^ | ^^ |
### MacBook Pro
| SMBIOS | Year | Supported | Comment |
| :--- | :--- | :--- | :--- |
| MacBookPro1,1 | Early 2006 | <span style="color:red"> NO </span> | 32-Bit CPU limitation |
| MacBookPro1,2 | ^^ | ^^ | ^^ |
| MacBookPro2,1 | Late 2006 | ^^ | 32-Bit Firmware limitation |
| MacBookPro2,2 | Late 2006 | ^^ | ^^ |
| MacBookPro3,1 | Mid-2007 | ^^ | Requires SSE4.1 CPU |
| MacBookPro4,1 | Early 2008 | <span style="color:#30BCD5"> YES </span> | No GPU Acceleration in Big Sur([#108](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108)) |
| MacBookPro5,1 | Late 2008 | ^^ | ^^ |
| MacBookPro5,2 | Early 2009 | ^^ | ^^ |
| MacBookPro5,3 | Mid-2009 | ^^ | ^^ |
| MacBookPro5,4 | ^^ | ^^ | ^^ |
| MacBookPro5,5 | ^^ | ^^ | ^^ |
| MacBookPro6,1 | Mid-2010 | ^^ | ^^ |
| MacBookPro6,2 | ^^ | ^^ | ^^ |
| MacBookPro7,1 | ^^ | ^^ | ^^ |
| MacBookPro8,1 | Early 2011 | ^^ | ^^ |
| MacBookPro8,2 | ^^ | ^^ | ^^ |
| MacBookPro8,3 | ^^ | ^^ | ^^ |
| MacBookPro9,1 | Mid-2012 | ^^ | <span style="color:green"> Everything is supported</span> |
| MacBookPro9,2 | ^^ | ^^ | ^^ |
| MacBookPro10,1 | Mid-2012, Early 2013 | ^^ | ^^ |
| MacBookPro10,2 | Late 2012, Early 2013 | ^^ | ^^ |
### Mac mini
| SMBIOS | Year | Supported | Comment |
| :--- | :--- | :--- | :--- |
| Macmini1,1 | Early 2006 | <span style="color:red"> NO </span> | 32-Bit CPU limitation |
| Macmini2,1 | Mid-2007 | ^^ | 32-Bit Firmware limitation |
| Macmini3,1 | Early 2009 | <span style="color:#30BCD5"> YES </span> | No GPU Acceleration in Big Sur([#108](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108)) |
| Macmini4,1 | Mid-2010 | ^^ | ^^ |
| Macmini5,1 | Mid-2011 | ^^ | ^^ |
| Macmini5,2 | ^^ | ^^ | ^^ |
| Macmini5,3 | ^^ | ^^ | ^^ |
| Macmini6,1 | Late 2012 | ^^ | <span style="color:green"> Everything is supported</span> |
| Macmini6,2 | ^^ | ^^ | ^^ |
### iMac
| SMBIOS | Year | Supported | Comment |
| :--- | :--- | :--- | :--- |
| iMac4,1 | Early 2006 | <span style="color:red"> NO </span> | 32-Bit CPU limitation |
| iMac4,2 | Mid-2006 | ^^ | ^^ |
| iMac5,1 | Late 2006 | ^^ | 32-Bit Firmware limitation |
| iMac5,2 | ^^ | ^^ | ^^ |
| iMac6,1 | ^^ | ^^ | ^^ |
| iMac7,1 | Mid-2007 | <span style="color:#30BCD5"> YES </span> | - Requires an SSE4.1 CPU Upgrade<br/>- No GPU Acceleration in Big Sur([#108](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108))<br/>- Brightness control partially supported on Nvidia GPUs, AMD unsupported |
| iMac8,1 | Early 2008 | ^^ | - No GPU Acceleration in Big Sur([#108](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108)))<br/>- Brightness control partially supported on Nvidia GPUs, AMD unsupported |
| 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) |
| iMac11,1 | ^^ | ^^ | ^^ |
| iMac11,2 | Mid-2010 | ^^ | ^^ |
| iMac11,3 | ^^ | ^^ | ^^ |
| iMac12,1 | Mid-2011 | ^^ | ^^ |
| iMac12,2 | ^^ | ^^ | ^^ |
| iMac13,1 | Late 2012 | ^^ | <span style="color:green"> Everything is supported</span> |
| iMac13,2 | ^^ | ^^ | ^^ |
| iMac13,3 | ^^ | ^^ | ^^ |
| iMac14,1 | Late 2013 | ^^ | ^^ |
| iMac14,2 | ^^ | ^^ | ^^ |
| iMac14,3 | ^^ | ^^ | ^^ |
* For iMac10,1 through iMac12,x, we highly recommend users upgrade the GPU to a Metal supported model. See here for more information: [iMac late 2009 to mid-2012 Graphics Card Upgrade Guide](https://forums.macrumors.com/threads/2011-imac-graphics-card-upgrade.1596614/?post=17425857#post-17425857)
### Mac Pro
| SMBIOS | Year | Supported | Comment |
| :--- | :--- | :--- | :--- |
| MacPro1,1 | Mid-2006 | <span style="color:red"> NO </span> | 32-Bit Firmware limitation |
| MacPro2,1 | Mid-2007 | ^^ | ^^ |
| MacPro3,1 | Early 2008 | <span style="color:#30BCD5"> YES </span> | - Potential boot issues with built-in USB 1.1 ports (recommend using a USB 2.0 hub or dedicated USB PCIe controller)<br/>- Potential boot issues with stock Bluetooth card, recommend removing to avoid kernel panics |
| MacPro4,1 | Early 2009 | ^^ | <span style="color:green"> Everything is supported as long as GPU is Metal capable </span> |
| MacPro5,1 | Mid-2010, Mid-2012 | ^^ | ^^ |
### Xserve
| SMBIOS | Year | Supported | Comment |
| :--- | :--- | :--- | :--- |
| Xserve1,1 | Mid-2006 | <span style="color:red"> NO </span> | 32-Bit Firmware limitation |
| Xserve2,1 | Early 2008 | <span style="color:#30BCD5"> YES </span> | <span style="color:green"> Everything is supported as long as GPU is Metal capable </span> |
| Xserve3,1 | Early 2009 | ^^ | ^^ |
# Once you've verified your hardware is supported, head to [Download and build macOS Installers](./INSTALLER.md)

297
docs/PATCHEXPLAIN.md Normal file
View File

@@ -0,0 +1,297 @@
# Explaining the patches in OpenCore Legacy Patcher
In our patcher, there are numerous patches used to ensure a stable system. Here we're going to go over what patches are used and why we recommend or even require them.
* [OpenCore Settings](#opencore-settings)
* [Injected Kexts](#injected-kexts)
* [On-Disk Patches](#on-disk-patches)
## OpenCore Settings
Below is a run down of the main logic OpenCore Legacy Patcher uses to gain native support in macOS. Note OpenCore's configuration is documented within [OpenCorePkg](https://github.com/acidanthera/OpenCorePkg) as well as an online version provided by us:
* [OpenCorePkg Online Docs](https://dortania.github.io/docs/latest/Configuration.html)
::: details Configuration Explanation
### ACPI -> Patch
* EHCx and XHC1 Patches
* Reason: Required for proper USB operation
* Logic: Avoids USB maps of newer models attaching and breaking USB port functionality
* Models: All models require
### Booter -> Quirks
* ForceBooterSignature
* Reason: Required to ensure Hibernation support
* Logic: Tricks boot.efi into thinking OpenCore is Apple's firmware
* Models: All models require
### DeviceProperties -> Add
* `PciRoot(0x0)/Pci(0x15,0x0)/Pci(0x0,0x0)`
* `PciRoot(0x0)/Pci(0x1C,0x4)/Pci(0x0,0x0)`
* `PciRoot(0x0)/Pci(0x1C,0x3)/Pci(0x0,0x0)`
* `PciRoot(0x0)/Pci(0x1C,0x5)/Pci(0x0,0x0)`
* `PciRoot(0x0)/Pci(0x1C,0x1)/Pci(0x0,0x0)`
* Reason: Required to ensure Wifi works with full, native support
* Logic: Tricks AirPortBrcmNIC.kext into thinking our device is a BCM94360 (`14e4,43ba`)
* Models: Machines with BCM943224 and BCM94331 chipsets
* `PciRoot(0x0)/Pci(0x3,0x0)/Pci(0x0,0x0)`
* `PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)`
* Reason: Required to ensure Brightness Control works on upgraded iMacs
* Logic: Sets AppleBackLight properties
* Models: iMac11,x and iMac12,x with upgraded Nvidia Metal GPUs
* `PciRoot(0x0)/Pci(0x2,0x0)`
* Reason: Disables internal GPU to fix sleep issues on upgrades iMacs
* Logic: Tricks macOS into thinking iGPU is a generic PCI device
* Models: iMac12,x with upgraded Metal GPUs
### Kernel -> Patch
* SMC Patch
* Reason: Required to avoid SMC Firmware updates
* Logic: Patches out `smc-version` in AppleSMC.kext, requires SMC-Spoof.kext for full functionality
* Models: All models require
* IOHIDFamily Patch
* Reason: Required for HID peripheral support in macOS on older hardware
* 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)
### Kernel -> Quirks
* ThridPartyDrives
* Reason: Required to avoid Hibernation wake issues on 3rd party drives
* Logic: Patches AppleAHCIPort.kext into support
* Models: All models with standard SATA ports
* PanicNoKextDump
* Reason: Avoids kext dump on kernel panics, easier kernel debugging
* Logic: Patches Kernel to not dump dump unnecessary info
* Models: Only set when Verbose Boot is enabled by the user
### Misc -> Security
* SecureBootModel
* Reason: Required to ensure seamless OS updates with Big Sur
* Logic: Sets iMacPro1,1's Secure Enclave Identifier (j137)
* Models: All models require
### NVRAM -> Add
* `-v debug=0x100`
* Reason: Used to see debug info of macOS's kernel and kexts, and avoids reboots on panic
* Logic: Adds args to NVRAM
* Models: Only set when Verbose Boot is enabled by the user
* `-liludbgall`
* Reason: Enables Lilu and plugin debug logging
* Logic: Adds args to NVRAM
* Models: Only set when Kext DEBUG is enabled by the user
* `msgbuf=1048576`
* Reason: Sets message buffer size to 1MB, ensures boot logs are retained
* Logic: Adds args to NVRAM
* Models: Only set when Kext DEBUG is enabled by the user
* `agdpmod=pikera`
* Reason: Fixes GPU switching on MacBookPro9,x
* Logic: Adds args to NVRAM
* Models: MacBookPro9,x
* `shikigva=80 unfairgva=1`
* `shikigva=128 unfairgva=1 -wegtree`
* Reason: Fixes DRM support on models with upgraded AMD Metal GPUs
* Logic: Adds args to NVRAM
* Models: Models with upgraded AMD Metal GPUs
### UEFI -> ProtocolOverrides
* GopPassThrough
* Reason: Used for proper output on machines with UGA firmware but GOP GPU
* Logic: Provide GOP protocol instances on top of UGA protocol instances
* Models: MacPro3,1, MacBook4,1 iMac7,1-8,1
:::
## Injected Kext
Below is an explanation of what Kexts OpenCore Legacy Patcher will inject into memory on boot-up.
::: details Injected Kext Explanation
### Acidanthera
* Lilu
* Reason: Patching engine for other kexts
* Models: All models require
* WhateverGreen
* Reason: Patches GPU Frameworks and kext to ensure proper support
* Models: All models require
* CPUFriend
* Reason: Patches IOx86PlatformPlugin to restore previous CPU profiles
* Models: 2012 and newer models
* AirportBrcmFixup
* Reason: Patches IO80211 and co to fix networking support for unsupported cards
* Models: BCM943224 and BCM94331
* RestrictEvents
* Reason: Disables memory errors on MacPro7,1
* Models: Mac Pros and Xserves
### Ethernet
* nForceEthernet
* Reason: Inject old Nvidia Ethernet kext to resolve networking in Catalina and newer
* Models: 2010 and older Nvidia Ethernet require
* MarvelYukonEthernet
* Reason: Inject old Marvel Ethernet kext to resolve networking in Catalina and newer
* Models: 2008 and older Marvel Ethernet require
* CatalinaBCM5701Ethernet
* Reason: Inject old Broadcom Ethernet kext to resolve networking in Big Sur
* Logic: Patch out conflicting symbols to not colide existing BCM5701Ethernet
* Models: 2011 and older Broadcom Ethernet require
### Maps
* USBMap
* Reason: Inject old USB map profiles to fix USB
* Models: All models require
### SSE
* AAMouSSE
* Reason: Translates SSE4.2 instructions to compatible code for SSE4,1 CPUs, required for AMD Metal drives
* Models: MacPro3,1
* telemetrap
* Reason: Ensures temelemtry.plugin doesn't run, required for SSE4,1 CPUs
* Models: Penryn CPUs
### Wifi
* IO80211HighSierra
* Reason: Re-inject Atheros wifi drivers from High Sierra
* Logic: Patch out conflicting symbols to not colide existing IO80211Family
* Models: Atheros cards
* IO80211Mojave
* Reason: Re-inject Broadcom wifi drivers from Mojave
* Logic: Patch out conflicting symbols to not colide existing IO80211Family
* Models: BCM94322
### Misc
* AppleBackLightFixup
* Reason: Patch AppleBacklight for iMacs with Nvidia Metal GPU upgrades
* Models: iMac11,x, iMac12,x with upgraded Nvidia Metal GPUs
* AppleIntelPIIXATA
* Reason: Fix IDE support on MacPro3,1
* Models: MacPro3,1
* AppleIntelMCEDisabler
* Reason: Fix dual socket support in Catalina and newer
* Models: Mac Pros and Xserves
* NightShiftEnabler
* Reason: Enables NightShift support on unsupported models
* Models: 2011 and older, MacBookPro9,x included
* SMC-Spoof
* Reason: Spoofs SMC version to 9.9999
* Models: All models require
:::
## On-Disk Patches
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
### Extensions
* AppleHDA
* Reason: Re-add High Sierra's AppleHDA to achieve audio support
* Models: 2011 and older Macs (excluding MacPro4,1+)
:::
::: details Acceleration Patches
### Extensions
#### General Patches
* IOSurface.kext
* Reason: Fixes immediate logout on login
* Logic: Downgrade to Catalina IOSurface
* Note: For AMD and Intel, additional `addMemoryRegion/removeMemoryRegion` patch added changing the first conditional jump to non conditional jump
* At Offset `0xdb52` and `0xdbc6`, replace following bytes with `0xeb`
#### Dropped Acceleration Binaries
* Nvidia Binaries
* GeForceGA.bundle
* GeForceTesla.kext
* Skip IOFree Panic - Mojave+
* At Offset `0x5CF9A` replace following bytes with `0xEB`
* Avoids `addMemoryRegion/removeMemoryRegion` calls
* At Offset `0x5527` and `0x77993`, replace following bytes with `0x909090909090`
* GeForceTeslaGLDriver.bundle
* GeForceTeslaVADriver.bundle
* NVDANV50HalTesla.kext
* NVDAResmanTesla.kext
* AMD/ATI Binaries
* AMD2400Controller.kext
* AMD2600Controller.kext
* AMD3800Controller.kext
* AMD4600Controller.kext
* AMD4800Controller.kext
* AMD5000Controller.kext
* AMD6000Controller.kext
* AMDFramebuffer.kext
* AMDLegacyFramebuffer.kext
* AMDLegacySupport.kext
* AMDRadeonVADriver.bundle
* AMDRadeonVADriver2.bundle
* AMDRadeonX3000.kext
* AMDRadeonX3000GLDriver.bundle
* AMDShared.bundle
* AMDSupport.kext
* ATIRadeonX2000.kext
* ATIRadeonX2000GA.plugin
* ATIRadeonX2000GLDriver.bundle
* ATIRadeonX2000VADriver.bundle
* Intel 5th Gen Binaries
* AppleIntelFramebufferAzul.kext
* AppleIntelFramebufferCapri.kext
* AppleIntelHDGraphics.kext
* AppleIntelHDGraphicsFB.kext
* AppleIntelHDGraphicsGA.plugin
* AppleIntelHDGraphicsGLDriver.bundle
* AppleIntelHDGraphicsVADriver.bundle
* Intel 6th Gen Binaries
* AppleIntelHD3000Graphics.kext
* AppleIntelHD3000GraphicsGA.plugin
* AppleIntelHD3000GraphicsGLDriver.bundle
* AppleIntelHD3000GraphicsVADriver.bundle
* AppleIntelSNBGraphicsFB.kext
* AppleIntelSNBVA.bundle
### Frameworks
* CoreDisplay.framework
* Logic: Copied from Mojave, heavy modifications/shims
* IOSurface.framework
* OpenGL.framework
* Logic: Copied from Mojave
### PrivateFrameworks
* GPUSupport.framework
* Logic: Copied from Mojave
* SkyLight.framework
* Logic: Copied from Mojave, heavy modifications/shims
### LaunchDaemons
* HiddHack.plist
* Reason: Fixes unresponsive input when patching Skylight
* Logic: Forces `hidd` to register events, as Skylight handles them by default in Big Sur
:::

35
docs/POST-INSTALL.md Normal file
View File

@@ -0,0 +1,35 @@
# Post-Installation
* [Booting without USB drive](#booting-without-usb-drive)
* [Booting seamlessly without Verbose or OpenCore Picker](#booting-seamlessly-without-verbose-or-opencore-picker)
## Booting without USB drive
Once you've installed macOS through OpenCore, you can boot up and go through the regular install process. To boot without the USB drive plugged in is quite simple:
* Download OpenCore Legacy Patcher
* Change Patcher settings as you'd like
* Build OpenCore again
* Install OpenCore to internal drive
* Reboot holding Option, and select the internal EFI
And voila! No more USB drive required
## Booting seamlessly without Verbose or OpenCore Picker
To do this, run the OpenCore Patcher and head to Patcher Settings:
![](../images/settings.png)
Here you can change different patcher settings, however the main interest is:
* Set ShowPicker Mode
Once you've toggled them both off, build your OpenCore EFI once again and install to your desired drive. Now to show the OpenCore selector, you can simply hold down the "ESC" key while clicking on EFI boot, then you can release the "ESC" key when you see the cursor arrow at the top left.
**Note**: For users who need Post-Install Volume patches for Audio support, you **must** disable the following settings in "Patcher Settings" when building and installing your new OpenCore:
* SIP: Disabled
* SecureBootModel: Disabled
Once set, rebuild OpenCore, install to drive and reboot. Then, Post-Install Volume patches will run just fine

20
docs/README.md Normal file
View File

@@ -0,0 +1,20 @@
---
home: true
heroImage: /homepage.png
heroText: OpenCore Legacy Patcher
actionText: Getting Started→
actionLink: START.md
meta:
- name: description
content: Experience macOS just like before
features:
- title: Built with security in mind
details: Supporting System Integrity Protection(SIP), FileVault 2, .im4m Secure Boot and Vaulting. You're just as secure as a supported Mac
- title: Native OTA updates
details: Install updates the moment they come out just like on a supported Mac, and no more 12GB+ updates.
- title: Zero firmware patching
details: No need to patch APFS ROM support, all protocol upgrades are done in memory and never permanent.
footer: Copyright © Dortania 2020-2021
---

23
docs/START.md Normal file
View File

@@ -0,0 +1,23 @@
# What is OpenCore?
This is a sophisticated boot loader used to inject and patch data in memory, instead of on disk. This means we're able to get near-native experience on many unsupported Macs with Metal GPUs. This includes many of the long desired features of other patchers such as:
* System Integrity Protection, FileVault 2, .im4m Secure Boot and Vaulting
* Native OTA OS DELTA updates on all Macs
* Recovery OS, Safe Mode and Single-user Mode booting
While many PC users from the Hackintosh community are familiar with OpenCore, OpenCore was designed as Mac and PC agnostic ensuring both platforms can use it easily. And with OpenCore Legacy Patcher, we help automate the process making running with OpenCore that much easier.
For advanced troubleshooting, we highly recommend users check out the [Unsupported Mac Discord Server](https://discord.gg/XbbWAsE) as this is generally the quickest way to get a hold of us developers and get help from the community.
For those who wish to support this patcher, please see the [Supporting the Patcher page](./DONATE.md)
## How do I get started?
1. The first step of ensuring whether your model is support is checking here:
* [Supported Models](./MODELS.md)
2. [Download and build macOS Installer](./INSTALLER.md)
3. [Run the `OpenCore-Patcher.app`](./BUILD.md)
4. [Reboot and boot OpenCore](./BOOT.md)

39
docs/TERMS.md Normal file
View File

@@ -0,0 +1,39 @@
# OpenCore Patcher Terminology
With OpenCore Legacy Patcher, we use a lot of different terms to refer to hardware including `SSE4.1`, `32-Bit Firmware`, etc. This page is to help users understand what all these confusing words mean.
# Terminology
Term | Description
--- | ---
**macOS** | Apple's own UNIX based OS used for Mac machines and "What makes a Mac a Mac".
**Windows** | Microsoft's proprietary OS that is used and supported on a wide range of devices
**Linux** | Family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically packaged in a Linux distribution. Note that while macOS and Linux may be UNIX-based, they're vastly different.
**Bootloader** | Piece of software that loads an OS, usually made by the OS creators. OpenCore is technically not a bootloader per se (see boot manager explanation down below). Apple's Boot.efi would be the actual boot loader in a Mac.
**Boot Manager** | Piece of software that manages bootloaders we have many of these: Clover, systemd-boot, OpenCore, rEFInd, rEFIt... These are generally seen as prepping the system for the actual boot loader.
---
Term | Description
--- | ---
**OpenCore** | The new hotness on the scene, made with security in mind by the [Acidanthera team](https://github.com/acidanthera), has faster booting and lighter weight than previous boot managers. Supports many native Mac features such as SIP, FileVault, Secure Boot, etc
**ACPI** | Tables defined in your firmware defining your hardware and different methods, tied directly to how IOKit/IOService handles device setup
**NVRAM** | Non-volitile storage, where many variables are stored including default boot options, Hibernation keys, Secure Boot information, etc
---
Term | Description
--- | ---
**XNU** | Also known as **X** is **N**ot **U**nix, XNU is referred to as macOS's "kernel" and the heart of what makes macOS tick
**Kexts** | Also known as **K**ernel **Ext**ensions, are macOS's drivers. They're used to perform different tasks like device drivers or for a different purpose (in this patcher) like patching the OS, injecting information or running tasks.
**KernelCollection** | Also known as the ImmutableKernel and PrelinkedKernel, this is a bundle of the kernel(XNU) and kernel extensions(Kexts) that we use to boot macOS. This is also what OpenCore patches in memory to allow us to have a seamless experience <br/>- PrelinkedKernel: Default caching system since 10.7 <br/>- ImmutableKernel: Secure Boot based caching system since 10.13 <br/>- KernelCollection: Merge of both Prelinked and ImmutableKernel's since macOS 11, Big Sur
**IOKit** | Backbone of how Kernel Extentions (Kexts) probe and attach onto hardware, starts quickly after kernel initates
**WindowServer** | Backbone of the GUI interface in macOS, one of the first userfacing userspace programs to kick-in
**OTA** | Short for **O**ver **T**he **A**ir, refers to native OS updates via System Preferences like a supported Mac
**DELTA** | Often used with OTA, refers to OS updates that much smaller than full installers (generally ~3GB), note Deltas require the root volume to be unmotified otherwise ~12GB updates will occur.
---
Term | Description
--- | ---
**EFI** | It can denote two things: <br/>- Mac's firmware, which is the same as UEFI, but pretty modified for Macs only, so not so "Universal" <br/>- The partition on your hard drive that stores software read by the UEFI to load OSes (like the Windows bootloader) or UEFI Applications (like OpenCore), it's FAT32 formatted and has an ID type of EF00 (in hex). It can be named ESP or SYSTEM, and it's usually from 100MB to 400MB in size but the size doesn't reflect upon anything.
**HFS+** | Also known as MacOS Journaled, this was the default macOS drive format up until macOS 10.13, format was designed around spinning disks
**APFS** | This was the default macOS drive from macOS 10.13 and onwards for SSDs, and standard for all drives in Mojave. Format was designed around SSDs primarily.
**32 and 64-Bit CPU** | The bit number of a CPU determines how much data a CPU can address. <br/>- 32-Bit CPUs were only supported up-to Mac OS X 10.6, Snow Leopard.
**32-Bit Firmware** | The bit number of a Firmware determines how much data the firmware can address. In some older Macs, it's common to have a 64-Bit CPU can have a 32-Bit firmware<br/>- 32-Bit Firmwares were only supported up-to Mac OS X 10.7, Lion.
**SSE Instructions** | Also known as **S**IMD **S**ingle-Precision Floating-Point **I**nstructions, these are defined as instruction sets supported by your CPU. In macOS, there are a certain number of instruction sets required for normal operation: <br/>- SSE3: Required for all Intel CPUs since Mac OS X 10.4, Tiger <br/>- SSSE3: Required for all Intel 64-Bit CPUs since Mac OS X 10.6, Snow Leopard <br/>- SSE4.1: Required for all Intel CPUs since macOS 10.12, Sierra
---

115
docs/TESTED.md Normal file
View File

@@ -0,0 +1,115 @@
# Tested Models on OpenCore Legacy Patcher
To aid users in troubleshooting, we've compiled a list of users who've reported success with OpenCore Legacy patcher as well as the version used. This should aid users in verifying whether issues with the patcher are regression-related with newer versions.
### MacBook
| SMBIOS | Tested | Tester | Comment |
| :--- | :--- | :--- | :--- |
| MacBook4,1 | <span style="color:#30BCD5"> YES </span> | Mami | - Stock Model<br/>- Couldn't install due to broke USB support |
| MacBook5,1 | ^^ | air.man | - Stock Model<br/>- Patcher version 0.0.19 |
| MacBook5,2 | ^^ | Finder352 | ^^ |
| MacBook6,1 | ^^ | Finder352 | ^^ |
| MacBook7,1 | ^^ | MykolaG | ^^ |
| ^^ | ^^ | Jazzzny | ^^ |
| ^^ | ^^ | AlexSakha67 | - Stock Model<br/>- Patcher version 0.0.20 |
### MacBook Air
| SMBIOS | Year | Supported | Comment |
| :--- | :--- | :--- | :--- |
| MacBookAir2,1 | No reports | N/A | N/A |
| MacBookAir3,1 | ^^ | ^^ | ^^ |
| MacBookAir3,2 | ^^ | ^^ | ^^ |
| MacBookAir4,1 | ^^ | ^^ | ^^ |
| MacBookAir4,2 | ^^ | ^^ | ^^ |
| MacBookAir5,1 | <span style="color:#30BCD5"> YES </span> | Ausdauersportler | - Stock Model<br/>- Patcher version 0.0.9 |
| ^^ | ^^ | webg3 | Stock Model |
| MacBookAir5,2 | ^^ | Bab-droid | - Stock Model<br/>- Patcher version 0.0.19 |
| ^^ | ^^ | K-Hobert | - Stock model <br/>- Patcher version unknown |
| ^^ | ^^ | cboukouv | - Stock model <br/>- Patcher version 0.0.21 |
### MacBook Pro
| SMBIOS | Tested | Tester | Comment |
| :--- | :--- | :--- | :--- |
| MacBookPro4,1 | <span style="color:#30BCD5"> YES </span> | cboukouv | - Stock model <br/>- Patcher version 0.0.19 |
| MacBookPro5,1 | ^^ | GURU_Jasho#5736 | - Stock model <br/>- Patcher version 0.0.21 |
| MacBookPro5,2 | ^^ | hvds | ^^ |
| MacBookPro5,3 | ^^ | kommtzeitkonrad | - Stock model <br/>- Patcher version 0.0.22 |
| MacBookPro5,4 | No reports | N/A | N/A |
| MacBookPro5,5 | ^^ | ^^ | ^^ |
| MacBookPro6,1 | ^^ | ^^ | ^^ |
| MacBookPro6,2 | <span style="color:#30BCD5"> YES </span> | Jakeluke | - Stock model, dGPU broken <br/>- Patcher version unknown |
| MacBookPro7,1 | No reports | N/A | N/A |
| MacBookPro8,1 | <span style="color:#30BCD5"> YES </span> | AvaQueen | - Stock model <br/>- Patcher version 0.0.19 |
| MacBookPro8,2 | ^^ | air.man | - Stock model, dGPU disabled <br/>- Patcher version 0.0.22 |
| ^^ | ^^ | cboukouv | - Stock model <br/>- Patcher version 0.0.19 |
| MacBookPro8,3 | No reports | N/A | N/A |
| MacBookPro9,1 | <span style="color:#30BCD5"> YES </span> | jbdamiano | - Stock model <br/>- Patcher version 0.0.19 |
| ^^ | ^^ | dennes544 | ^^|
| ^^ | ^^ | cgrazy | ^^ |
| ^^ | ^^ | LIPA85 | ^^ |
| MacBookPro9,2 | ^^ | alexx17xx | - Stock model <br/>- Patcher version 0.0.19 |
| ^^ | ^^ | Arvxistanx | ^^ |
| ^^ | ^^ | CyberDroid1 | - Stock model<br/>- Patcher version 0.0.16 |
| ^^ | ^^ | woefi | - BCM94331CAX upgrade<br/>- Patcher version 0.0.13 |
| ^^ | ^^ | whgmkeller | - Stock model<br/>- Patcher version 0.0.11 |
| MacBookPro10,1 | ^^ | traviswparker | - Stock model <br/>- Patcher version 0.0.14 |
| ^^ | ^^ | il-rollino | - Upgraded BCM94360CSAX <br/>- Patcher version 0.0.21 |
| MacBookPro10,2 | No reports | N/A | N/A |
### Mac mini
| SMBIOS | Tested | Tester | Comment |
| :--- | :--- | :--- | :--- |
| Macmini3,1 | No reports | N/A | N/A |
| Macmini4,1 | ^^ | ^^ | ^^ |
| Macmini5,1 | ^^ | ^^ | ^^ |
| Macmini5,2 | ^^ | ^^ | ^^ |
| Macmini5,3 | ^^ | ^^ | ^^ |
| Macmini6,1 | <span style="color:#30BCD5"> YES </span> | cicofz | - Stock model <br/>- Patcher version 0.0.21 |
| ^^ | ^^ | Stig124 | - Stock model <br/>- Patcher version 0.0.19 |
| ^^ | ^^ | mwidjaya | - Stock model <br/>- Patcher version 0.0.18 |
| Macmini6,2 | ^^ | Shelbs | - Stock model <br/>- Patcher version 0.0.16 |
### iMac
| SMBIOS | Tested | Tester | Comment |
| :--- | :--- | :--- | :--- |
| iMac7,1 | No reports | N/A | N/A |
| iMac8,1 | <span style="color:#30BCD5"> YES </span> | EduCovas | - Stock Model<br/>- Patcher version 0.0.21 |
| iMac9,1 | ^^ | Allanrfox | ^^ |
| ^^ | ^^ | Jakeluke | ^^ |
| iMac10,1 | ^^ | Ausdauersportler | - Upgraded with WX4150 |
| iMac11,1 | ^^ | internetzel | - Upgraded with RX580 mobile |
| iMac11,2 | ^^ | MykolaG | - Stock Model<br/>- Patcher version 0.0.21 |
| ^^ | ^^ | iMac-iPad | - Stock Model<br/>- Patcher version 0.0.21 |
| iMac11,3 | ^^ | Ausdauersportler | - Upgraded with Polaris GPU<br/>- Upgraded BCM943602CDP<br/>- Patcher version 0.0.21 |
| iMac12,1 | ^^ | shnockdu | - Upgraded with Kepler GPU<br/>- Patcher version 0.0.21 |
| ^^ | ^^ | StephN999 | - Upgraded WX4150 GPU<br/>- Upgraded BCM94360CD<br/>- Patcher version 0.0.21 |
| iMac12,2 | ^^ | Ausdauersportler | - Upgraded with Polaris GPU<br/>- Upgraded BCM943602CDP<br/>- Patcher version 0.0.21 |
| iMac13,1 | ^^ | alexx17xx | - Stock Model<br/>- Patcher version 0.0.19 |
| iMac13,2 | ^^ | Alain13 | ^^ |
| ^^ | ^^ | algernonpule | - Stock Model<br/>- Patcher version 0.0.19 |
| iMac13,3 | No reports | N/A | N/A |
| iMac14,1 | <span style="color:#30BCD5"> YES </span> | woefi | - Upgraded NVMe<br/>- Patcher version 0.0.21 |
| ^^ | ^^ | mikeboss | - Stock Model<br/>- Patcher version 0.0.19 |
| iMac14,2 | ^^ | OKonnel | - Stock Model<br/>- Patcher version 0.0.22 |
| ^^ | ^^ | mibaxx | - Stock Model<br/>- Patcher version 0.0.21 |
| iMac14,3 | No reports | N/A | N/A |
### Mac Pro
| SMBIOS | Tested | Tester | Comment |
| :--- | :--- | :--- | :--- |
| MacPro3,1 | <span style="color:#30BCD5"> YES </span> | christiann | - Upgraded with RX 560 and BCM94322<br/>- Stock Bluetooth card removed<br/>- Patcher version 0.0.21 |
| ^^ | ^^ | gw463 | - Upgraded GTX 680<br/>- Upgraded BCM94360<br/>- Patcher version 0.0.22 |
| ^^ | ^^ | AlexSakha67 | - Upgraded R9 280<br/>- Patcher version 0.0.20 |
| ^^ | ^^ | nekton1 | - Upgraded GTX 680<br/>- Patcher version 0.0.20 |
| ^^ | ^^ | Pri-est | - Patcher version 0.0.9 |
| MacPro4,1 | ^^ | ^^ | - Patcher version 0.0.9 |
| MacPro5,1 | ^^ | woefi | - Upgraded with RX 580<br/>- Patcher version 0.0.21 |
| ^^ | ^^ | Mabrouk Oscar | - Patcher version 0.0.21 |
| ^^ | ^^ | astuffedtiger | - MacPro4,1 flashed to 5,1<br/>- Patcher version 0.0.18 |

71
docs/TROUBLESHOOTING.md Normal file
View File

@@ -0,0 +1,71 @@
# Troubleshooting
Here are some common errors users may experience while using this patcher:
* [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)
* [Cannot boot macOS without the USB](#cannot-boot-macos-without-the-usb)
* [Infinite Recovery OS Booting](#infinite-recovery-os-reboot)
* [Reboot when entering Hibernation (`Sleep Wake Failure`)](#reboot-when-entering-hibernation-sleep-wake-failure)
* [Booting with a non-flashed GPU](#booting-with-a-non-flashed-gpu)
* [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)
* [No Brightness Control](#no-brightness-control)
## Stuck on `This version of Mac OS X is not supported on this platform`
This means macOS has detected a SMBIOS it does not support, to resolve this ensure you're booting OpenCore **before** the macOS installer in the boot picker. Reminder the option will be called `EFI Boot`
Once you've booted OpenCore at least once, your hardware should now auto boot it until either NVRAM reset or you remove the drive with OpenCore installed.
## Cannot boot macOS without the USB
By default, the OpenCore Patcher won't install OpenCore onto the internal drive itself during installs. Instead, you'll need to either [manually transfer](https://dortania.github.io/OpenCore-Post-Install/universal/oc2hdd.html) OpenCore to the internal drive's EFI or run this patcher's Option 2 again but select your internal drive.
Reminder that once this is done, you'll need to select OpenCore in the boot picker again for your hardware to remember this entry and auto boot from then on.
## Infinite Recovery OS Booting
With OpenCore Legacy Patcher, we rely on Apple Secure Boot to ensure OS updates work correctly and reliably with Big Sur. However this installs NVRAM variables that will confuse your Mac if not running with OpenCore. To resolve, simply uninstall OpenCore and [reset NVRAM](https://support.apple.com/en-mide/HT201255).
* Note: Machines with modded root volumes will also result in infinite recovery until integrity is restored
## Reboot when entering Hibernation (`Sleep Wake Failure`)
[Known issue on some models](https://github.com/dortania/Opencore-Legacy-Patcher/issues/72), temporary fix is to disable Hibernation:
```
sudo pmset -a hibernatemode 0
```
## Booting with a non-flashed GPU
For Mac Pro, Xserve and iMac users with non-flashed GPUs, you can still easily boot OpenCore and view the entire boot process. To do so, make sure SIP is disabled(to allow NVRAM write access) and run the following:
```sh
sudo bless --verbose --file /Volumes/VOLNAME/EFI/OC/OpenCore.efi --folder /Volumes/VOLNAME/EFI/OC --setBoot
```
* Note you will need to replace `VOLNAME` with the Volume name of your USB or hard drive with OpenCore
* Note 2: Once done, you can re-enable SIP
* Note 3: The EFI partition OpenCore was installed on must be mounted, if it's unmounted simply rerun "Install OpenCore to drive"
Once you boot OpenCore for the first time, LauncherOption will install itself as the top boot priority making OpenCore always launch. Combined with `RequestBootVar`, all boot options must go through OpenCore ensuring seamless usage even with OS installation and updates.
## How to Boot Big Sur Recovery
By default, the patcher will try to hide extra boot options such as recovery from the user. To make them appear, simply press the "Spacebar" inside OpenCore's Picker to list all boot options.
## Stuck on "Your Mac needs a firmware update"
Full error: "Your Mac needs a firmware update in order to install to this Volume. Please select a Mac OS Extended (Journaled) volume instead."
This error occurs when macOS determines the firmware to not have full APFS support. To resolve is quite simple, when building OpenCore head to "Patcher Settings" and enable "Moderate SMBIOS Patching" or higher. This will ensure that the firmware reported will show as supporting full APFS capabilities.
## No Brightness Control
With OCLP v0.0.22, we've added support for brightness control on many models. However some users may have noticed that their brightness keys do not work.
To work-around, we recommend user try out the below app:
* [Brightness Slider](https://actproductions.net/free-apps/brightness-slider/)

11
docs/UNINSTALL.md Normal file
View File

@@ -0,0 +1,11 @@
# Uninstalling OpenCore
To remove OpenCore is actually quite simply:
1. Remove OpenCore either from the USB or internal drive
* You'll need to mount the drive's EFI partition, and delete the EFI folder
* [See here for example how to mount](https://dortania.github.io/OpenCore-Post-Install/universal/oc2hdd.html)
2. Reset NVRAM
* [Reset NVRAM or PRAM on your Mac](https://support.apple.com/HT204063)
Know that if you are on Big Sur when you remove the EFI folder, your Mac will no longer boot and show the prohibited symbol. Be ready to install an older version of macOS before you uninstall OpenCore.

22
docs/UPDATE.md Normal file
View File

@@ -0,0 +1,22 @@
# Updating OpenCore and Co.
With OpenCore Legacy Patcher, generally there's very little reason for users to update the OpenCore installed on their machine unless you feel there's a benefit with new versions for your setup.
For those who do wish to update, it's actually quite easy. Simply [download the latest release](https://github.com/dortania/OpenCore-Legacy-Patcher/releases) and rerun the patcher:
![](../images/first-run.png)
Then simply rebuild your OpenCore build and install again. Then voila, OpenCore is updated!
To check what version of OpenCore and Patcher version you're currently running, you can run the following in terminal:
```bash
# OpenCore Version
nvram 4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102:opencore-version
# Patcher Version
nvram 4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102:OCLP-Version
```
![](../images/oclp-version.png)
From this, we can see we're running a RELEASE version of OpenCore 0.6.8 built on March 27th, 2021 with Patcher Version 0.0.20!

12795
docs/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

51
docs/package.json Normal file
View File

@@ -0,0 +1,51 @@
{
"name": "OpenCore-Legacy-Patcher",
"version": "0.0.1",
"description": "Guide to put macOS on unsupported devices",
"main": "",
"author": {
"name": "Dortania",
"url": "https://github.com/dortania"
},
"repository": {
"type": "git",
"url": "git+https://github.com/dortania/OpenCore-Legacy-Patcher.git"
},
"scripts": {
"dev": "vuepress dev",
"build": "vuepress build",
"fix-lint": "run-script-os",
"fix-lint:default": "(echo Attempting to fix lint... && markdownlint -c .markdownlint.json -p .markdownlintignore '**/*.md' -f && echo Fixed successfully, please commit.) || (echo Fix failed! && exit 1)",
"fix-lint:win32": "(echo Attempting to fix lint... && markdownlint -c .markdownlint.json -p .markdownlintignore **/*.md -f && echo Fixed successfully, please commit.) || (echo Fix failed! && exit 1)",
"lint": "run-script-os",
"lint:default": "(echo Linting... && markdownlint -c .markdownlint.json -p .markdownlintignore '**/*.md' && echo Lint passed.) || (echo Lint failed! Please review and fix errors. && exit 1)",
"lint:win32": "(echo Linting... && markdownlint -c .markdownlint.json -p .markdownlintignore **/*.md && echo Lint passed.) || (echo Lint failed! Please review and fix errors. && exit 1)",
"lint-ci": "run-script-os",
"lint-ci:default": "(echo Linting... && markdownlint -c .markdownlint.json -p .markdownlintignore '**/*.md' && echo Lint passed.) || ((echo Lint failed, attempting fix... && markdownlint -c .markdownlint.json -p .markdownlintignore '**/*.md' -f && echo Fix generated successfully. Please apply the following diff using git apply && git diff) || echo Fix failed! && exit 1)",
"lint-ci:win32": "(echo Linting... && markdownlint -c .markdownlint.json -p .markdownlintignore **/*.md && echo Lint passed.) || ((echo Lint failed, attempting fix... && markdownlint -c .markdownlint.json -p .markdownlintignore **/*.md -f && echo Fix generated successfully. Please apply the following diff using git apply && git diff) || echo Fix failed! && exit 1)",
"sort-dict": "node ./scripts/sortDict.js",
"spellcheck": "run-script-os",
"spellcheck:default": "(spellchecker --plugins spell indefinite-article repeated-words syntax-urls --dictionaries dictionary/dictionary.txt dictionary/opencorekeys.txt --files '**/*.md' && echo Spellcheck passed.) || (echo Spellcheck failed! Please review and fix errors/add words to dictionary as needed. && exit 1)",
"spellcheck:win32": "(spellchecker --plugins spell indefinite-article repeated-words syntax-urls --dictionaries dictionary/dictionary.txt dictionary/opencorekeys.txt --files **/*.md && echo Spellcheck passed.) || (echo Spellcheck failed! Please review and fix errors/add words to dictionary as needed. && exit 1)",
"test": "run-script-os",
"test:default": "npm run lint --silent; npm run spellcheck --silent",
"test:win32": "npm run lint --silent & npm run spellcheck --silent"
},
"license": "CC-BY-NC-SA-4.0",
"devDependencies": {
"@vuepress/plugin-back-to-top": "^1.7.1",
"markdown-it-multimd-table": "^4.0.3",
"markdown-link-check": "^3.8.5",
"markdownlint-cli": "^0.26.0",
"run-script-os": "^1.1.4",
"spellchecker-cli": "^4.4.0",
"vuepress": "^1.7.1",
"vuepress-plugin-medium-zoom": "^1.1.9",
"vuepress-plugin-zooming": "^1.1.8",
"vuepress-theme-book": "0.0.5",
"vuepress-theme-dark-new": "^0.1.2",
"vuepress-theme-succinct": "^1.6.4",
"vuepress-theme-yuu": "^2.3.0"
},
"homepage": "https://dortania.github.io/OpenCore-Legacy-Patcher/"
}

View File

@@ -0,0 +1,9 @@
from pathlib import Path
import subprocess
for i in [i for i in list(Path().resolve().glob("**/*.md")) if "node_modules" not in str(i.parent) and "_book" not in str(i.parent)]:
#bert = subprocess.run(['npx', 'markdown-link-check', '"' + str(i) + '"', '-c', '.markdownlinkcheck.json'], capture_output=True, shell=True, cwd=Path().resolve())
bert = subprocess.run('npx markdown-link-check "' + str(i) + '"', stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True, cwd=Path().resolve())
outpot = bert.stdout.decode().replace("\r", "").split("\n")
outpot = [i for i in outpot if ("FILE: " in i or " → Status: " in i) and " → Status: 429" not in i]
[print(i) for i in outpot]

26
docs/scripts/sortDict.js Normal file
View File

@@ -0,0 +1,26 @@
const fs = require("fs");
process.chdir(__dirname);
console.log("Reading dictionary.txt");
let dictionary = fs.readFileSync("../dictionary/dictionary.txt", { encoding: "UTF8" })
.replace("\r", "").split("\n");
let ocDictionary = fs.readFileSync("../dictionary/opencorekeys.txt", { encoding: "UTF8" })
.replace("\r", "").split("\n");
dictionary = dictionary.filter(string => string != "");
ocDictionary = ocDictionary.filter(string => string != "");
dictionary = dictionary.filter((string, index) => dictionary.indexOf(string) == index);
ocDictionary = ocDictionary.filter((string, index) => ocDictionary.indexOf(string) == index);
dictionary = dictionary.filter(string => !ocDictionary.includes(string));
console.log("Sorting...");
dictionary.sort();
ocDictionary.sort();
console.log("Writing dictionary.txt");
fs.writeFileSync("../dictionary/dictionary.txt", dictionary.join("\n"));
fs.writeFileSync("../dictionary/opencorekeys.txt", ocDictionary.join("\n"));

8
entitlements.plist Normal file
View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
</dict>
</plist>

BIN
images/OC-Build.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB

BIN
images/OC-Patcher.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 270 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 KiB

BIN
images/OC-Picker-SD.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

BIN
images/OC-Picker-SSD.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

BIN
images/background-moved.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

BIN
images/build-efi.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 370 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 292 KiB

BIN
images/disk-efi.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 435 KiB

BIN
images/disk-start.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 404 KiB

BIN
images/efi-boot.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

BIN
images/first-run.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 304 KiB

BIN
images/format-usb.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 706 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 374 KiB

BIN
images/graphics-open.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 514 KiB

BIN
images/icns-sl-save.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

BIN
images/icnspack-done.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 505 KiB

BIN
images/icnspack-folder.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 493 KiB

BIN
images/icon-SL.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 232 KiB

BIN
images/logs-efi.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 453 KiB

BIN
images/mac-icns-drive.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 394 KiB

BIN
images/mountefi.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB

BIN
images/munki-dmg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 349 KiB

BIN
images/munki-done-2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 392 KiB

BIN
images/munki-process.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 791 KiB

BIN
images/munki.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 291 KiB

BIN
images/oc-boot.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

BIN
images/oc-explained.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 544 KiB

BIN
images/oclp-version.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

BIN
images/settings.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 311 KiB

5
launcher.sh Executable file
View File

@@ -0,0 +1,5 @@
#!/bin/bash
cd "$(dirname "$0")"
chmod +x OpenCore-Patcher
open OpenCore-Patcher

View File

@@ -1,15 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<!--OpenCore 0.6.4 config-->
<dict>
<key>#Revision</key>
<dict>
<key>Build-Version</key>
<string></string>
<key>OpenCore-Version</key>
<string></string>
<key>Original-Model</key>
<string></string>
</dict>
<key>ACPI</key>
<dict>
<key>Add</key>
<array>
<dict>
<key>Enabled</key>
<false/><!--SSDT-CPBG-->
<false/>
<key>Comment</key>
<string>Patch CPBG for Arrendale, Lynnfield and Clarkdale</string>
<key>Path</key>
@@ -21,6 +29,10 @@
<key>Patch</key>
<array>
<dict>
<key>Base</key>
<string></string>
<key>BaseSkip</key>
<integer>0</integer>
<key>Comment</key>
<string>XHC1 to SHC1</string>
<key>Count</key>
@@ -47,6 +59,10 @@
<data></data>
</dict>
<dict>
<key>Base</key>
<string></string>
<key>BaseSkip</key>
<integer>0</integer>
<key>Comment</key>
<string>EHC1 to EH01</string>
<key>Count</key>
@@ -73,6 +89,10 @@
<data></data>
</dict>
<dict>
<key>Base</key>
<string></string>
<key>BaseSkip</key>
<integer>0</integer>
<key>Comment</key>
<string>EHC2 to EH02</string>
<key>Count</key>
@@ -117,6 +137,8 @@
<dict>
<key>MmioWhitelist</key>
<array/>
<key>Patch</key>
<array/>
<key>Quirks</key>
<dict>
<key>AllowRelocationBlock</key>
@@ -135,12 +157,14 @@
<false/>
<key>EnableWriteUnprotector</key>
<false/>
<key>ForceBooterSignature</key>
<true/>
<key>ForceExitBootServices</key>
<false/>
<key>ProtectMemoryRegions</key>
<false/>
<key>ProtectSecureBoot</key>
<false/>
<true/>
<key>ProtectUefiServices</key>
<false/>
<key>ProvideCustomSlide</key>
@@ -160,15 +184,7 @@
<key>DeviceProperties</key>
<dict>
<key>Add</key>
<dict>
<key>#PciRoot(0x0)/Pci(0x1C,0x1)Pci(0x0,0x0)</key>
<dict>
<key>device-id</key>
<data>ukMAAA==</data>
<key>compatible</key>
<string>pci14e4,43ba</string>
</dict>
</dict>
<dict/>
<key>Delete</key>
<dict/>
</dict>
@@ -182,7 +198,7 @@
<key>Comment</key>
<string>Patching Engine</string>
<key>Enabled</key>
<true/><!--Lilu-->
<true/>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
@@ -194,13 +210,31 @@
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
<key>Comment</key>
<string>AppleHDA Patching</string>
<key>Enabled</key>
<false/>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string>19.0.0</string>
<key>BundlePath</key>
<string>AppleALC.kext</string>
<key>ExecutablePath</key>
<string>Contents/MacOS/AppleALC</string>
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
<key>Comment</key>
<string>GPU Patching</string>
<key>Enabled</key>
<true/><!--WEG-->
<true/>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
@@ -212,13 +246,31 @@
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
<key>Comment</key>
<string>Process Blocker</string>
<key>Enabled</key>
<false/>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string></string>
<key>BundlePath</key>
<string>RestrictEvents.kext</string>
<key>ExecutablePath</key>
<string>Contents/MacOS/RestrictEvents</string>
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
<key>Comment</key>
<string>SSE Emulator</string>
<key>Enabled</key>
<false/><!--AAAMouSSE-->
<false/>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
@@ -236,7 +288,7 @@
<key>Comment</key>
<string>SSE Patcher</string>
<key>Enabled</key>
<false/><!--telemetrap-->
<false/>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
@@ -254,7 +306,7 @@
<key>Comment</key>
<string>4331 Wifi Patch</string>
<key>Enabled</key>
<false/><!--AirportBrcmFixup-->
<false/>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
@@ -272,7 +324,7 @@
<key>Comment</key>
<string>4331 Wifi Patch</string>
<key>Enabled</key>
<false/><!--AirPortBrcmNIC_Injector-->
<false/>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
@@ -290,7 +342,7 @@
<key>Comment</key>
<string>Dual Socket Patch</string>
<key>Enabled</key>
<false/><!--AppleMCEReporterDisabler-->
<false/>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
@@ -308,7 +360,7 @@
<key>Comment</key>
<string>BCM Ethernet patch</string>
<key>Enabled</key>
<false/><!--CatalinaBCM5701Ethernet-->
<false/>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
@@ -320,13 +372,67 @@
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
<key>Comment</key>
<string>BCM94328 Wifi Patch</string>
<key>Enabled</key>
<false/>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string>16.0.0</string>
<key>BundlePath</key>
<string>corecaptureElCap.kext</string>
<key>ExecutablePath</key>
<string>Contents/MacOS/corecaptureElCap</string>
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
<key>Comment</key>
<string>BCM94328 Wifi Patch</string>
<key>Enabled</key>
<false/>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string>16.0.0</string>
<key>BundlePath</key>
<string>IO80211ElCap.kext</string>
<key>ExecutablePath</key>
<string>Contents/MacOS/IO80211ElCap</string>
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
<key>Comment</key>
<string>BCM94328 Wifi Patch</string>
<key>Enabled</key>
<false/>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string>16.0.0</string>
<key>BundlePath</key>
<string>IO80211ElCap.kext/Contents/PlugIns/AppleAirPortBrcm43224.kext</string>
<key>ExecutablePath</key>
<string>Contents/MacOS/AppleAirPortBrcm43224</string>
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
<key>Comment</key>
<string>Atheros Wifi Patch</string>
<key>Enabled</key>
<false/><!--IO80211HighSierra-->
<false/>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
@@ -344,7 +450,7 @@
<key>Comment</key>
<string>Atheros Wifi Patch</string>
<key>Enabled</key>
<false/><!--AirPortAtheros40-->
<false/>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
@@ -362,7 +468,7 @@
<key>Comment</key>
<string>Broadcom Wifi Patch</string>
<key>Enabled</key>
<false/><!--IO80211Mojave-->
<false/>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
@@ -375,10 +481,12 @@
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
<key>Comment</key>
<string>Broadcom Wifi Patch</string>
<key>Enabled</key>
<false/><!--AirPortBrcm4331-->
<false/>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
@@ -396,7 +504,7 @@
<key>Comment</key>
<string>Marvel Ethernet Patch</string>
<key>Enabled</key>
<false/><!--MarvelYukonEthernet-->
<false/>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
@@ -414,7 +522,7 @@
<key>Comment</key>
<string>Nvidia Ethernet Patch</string>
<key>Enabled</key>
<false/><!--nForceEthernet-->
<false/>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
@@ -430,20 +538,236 @@
<key>Arch</key>
<string>x86_64</string>
<key>Comment</key>
<string>USB Map</string>
<string>VoodooHDA</string>
<key>Enabled</key>
<true/>
<false/>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string>18.0.0</string>
<key>BundlePath</key>
<string>VoodooHDA.kext</string>
<key>ExecutablePath</key>
<string>Contents/MacOS/VoodooHDA</string>
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
<key>Comment</key>
<string>AppleIntelPIIXATA</string>
<key>Enabled</key>
<false/>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string>20.0.0</string>
<key>BundlePath</key>
<string>AppleIntelPIIXATA.kext</string>
<key>ExecutablePath</key>
<string>Contents/MacOS/AppleIntelPIIXATA</string>
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
<key>Comment</key>
<string>AppleBacklightFixup - Modded Nvidia GPUs</string>
<key>Enabled</key>
<false/>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string></string>
<key>BundlePath</key>
<string>USB-Map-SMBIOS.kext</string>
<string>AppleBacklightFixup.kext</string>
<key>ExecutablePath</key>
<string>Contents/MacOS/AppleBacklightFixup</string>
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
<key>Comment</key>
<string>NightShiftEnabler</string>
<key>Enabled</key>
<false/>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string></string>
<key>BundlePath</key>
<string>NightShiftEnabler.kext</string>
<key>ExecutablePath</key>
<string>Contents/MacOS/NightShiftEnabler</string>
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
<key>Comment</key>
<string>CPUFriend - Patching X86PlatformPlugin</string>
<key>Enabled</key>
<false/>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string></string>
<key>BundlePath</key>
<string>CPUFriend.kext</string>
<key>ExecutablePath</key>
<string>Contents/MacOS/CPUFriend</string>
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
<key>Comment</key>
<string>CPUFriendDataProvider - Data for CPU Friend</string>
<key>Enabled</key>
<false/>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string></string>
<key>BundlePath</key>
<string>CPUFriendDataProvider.kext</string>
<key>ExecutablePath</key>
<string></string>
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
<key>Comment</key>
<string>USB Map</string>
<key>Enabled</key>
<false/>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string></string>
<key>BundlePath</key>
<string>USB-Map.kext</string>
<key>ExecutablePath</key>
<string></string>
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
<key>Comment</key>
<string>SMC Spoof</string>
<key>Enabled</key>
<false/>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string></string>
<key>BundlePath</key>
<string>SMC-Spoof.kext</string>
<key>ExecutablePath</key>
<string></string>
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
<key>Comment</key>
<string>AppleGraphicsDevicePolicy Override</string>
<key>Enabled</key>
<false/>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string></string>
<key>BundlePath</key>
<string>AGDP-Override.kext</string>
<key>ExecutablePath</key>
<string></string>
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
<key>Comment</key>
<string>AppleGraphicsPowerManagement Override</string>
<key>Enabled</key>
<false/>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string></string>
<key>BundlePath</key>
<string>AGPM-Override.kext</string>
<key>ExecutablePath</key>
<string></string>
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
<key>Comment</key>
<string>AppleMuxControl Override</string>
<key>Enabled</key>
<false/>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string></string>
<key>BundlePath</key>
<string>AMC-Override.kext</string>
<key>ExecutablePath</key>
<string></string>
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
<key>Comment</key>
<string>CpuTscSync</string>
<key>Enabled</key>
<false/>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string></string>
<key>BundlePath</key>
<string>CpuTscSync.kext</string>
<key>ExecutablePath</key>
<string>Contents/MacOS/CpuTscSync</string>
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
<key>Comment</key>
<string>HibernationFixup</string>
<key>Enabled</key>
<false/>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string></string>
<key>BundlePath</key>
<string>HibernationFixup.kext</string>
<key>ExecutablePath</key>
<string>Contents/MacOS/HibernationFixup</string>
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
</array>
<key>Block</key>
<array/>
@@ -474,7 +798,7 @@
<key>Count</key>
<integer>1</integer>
<key>Enabled</key>
<false/><!--IOHIDFamily-->
<false/>
<key>Find</key>
<data></data>
<key>Identifier</key>
@@ -494,6 +818,36 @@
<key>Skip</key>
<integer>0</integer>
</dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
<key>Base</key>
<string></string>
<key>Comment</key>
<string>Patch AppleSMC</string>
<key>Count</key>
<integer>1</integer>
<key>Enabled</key>
<true/>
<key>Find</key>
<data>c21jLXZlcnNpb24=</data>
<key>Identifier</key>
<string>com.apple.driver.AppleSMC</string>
<key>Limit</key>
<integer>0</integer>
<key>Mask</key>
<data></data>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string></string>
<key>Replace</key>
<data>b2xkLXZlcnNpb24=</data>
<key>ReplaceMask</key>
<data></data>
<key>Skip</key>
<integer>0</integer>
</dict>
</array>
<key>Quirks</key>
<dict>
@@ -529,6 +883,8 @@
<false/>
<key>PowerTimeoutKernelPanic</key>
<false/>
<key>SetApfsTrimTimeout</key>
<integer>-1</integer>
<key>ThirdPartyDrives</key>
<false/>
<key>XhciPortLimit</key>
@@ -553,17 +909,23 @@
<key>ConsoleAttributes</key>
<integer>0</integer>
<key>HibernateMode</key>
<string>None</string>
<string>Auto</string>
<key>HideAuxiliary</key>
<true/>
<key>LauncherPath</key>
<string>Default</string>
<key>LauncherOption</key>
<string>Full</string>
<key>PickerAttributes</key>
<integer>1</integer>
<integer>17</integer>
<key>PickerAudioAssist</key>
<false/>
<key>PickerMode</key>
<string>External</string>
<key>PickerVariant</key>
<string>Modern</string>
<key>PollAppleHotKeys</key>
<false/>
<true/>
<key>ShowPicker</key>
<true/>
<key>TakeoffDelay</key>
@@ -602,16 +964,14 @@
<integer>0</integer>
<key>AuthRestart</key>
<false/>
<key>BootProtect</key>
<string>Bootstrap</string>
<key>BlacklistAppleUpdate</key>
<false/>
<true/>
<key>DmgLoading</key>
<string>Signed</string>
<key>EnablePassword</key>
<false/>
<key>ExposeSensitiveData</key>
<integer>6</integer>
<integer>15</integer>
<key>HaltLevel</key>
<integer>2147483648</integer>
<key>PasswordHash</key>
@@ -621,7 +981,7 @@
<key>ScanPolicy</key>
<integer>0</integer>
<key>SecureBootModel</key>
<string>x86legacy</string>
<string>j137</string>
<key>Vault</key>
<string>Optional</string>
</dict>
@@ -649,7 +1009,7 @@
<key>Arguments</key>
<string></string>
<key>Auxiliary</key>
<false/>
<true/>
<key>Name</key>
<string>OpenShell.efi</string>
<key>Comment</key>
@@ -680,13 +1040,15 @@
<dict>
<key>rtc-blacklist</key>
<data></data>
<key>OCLP-Version</key>
<string></string>
</dict>
<key>7C436110-AB2A-4BBB-A880-FE41995C9F82</key>
<dict>
<key>SystemAudioVolume</key>
<data>Rg==</data>
<key>boot-args</key>
<string>-v keepsyms=1 debug=0x100</string>
<string>keepsyms=1 debug=0x100</string>
<key>run-efi-updater</key>
<string>No</string>
<key>csr-active-config</key>
@@ -703,6 +1065,7 @@
<key>4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102</key>
<array>
<string>rtc-blacklist</string>
<string>OCLP-Version</string>
</array>
<key>7C436110-AB2A-4BBB-A880-FE41995C9F82</key>
<array>
@@ -745,38 +1108,147 @@
<key>PlatformInfo</key>
<dict>
<key>Automatic</key>
<true/>
<false/>
<key>CustomMemory</key>
<false/>
<key>DataHub</key>
<dict>
<key>ARTFrequency</key>
<integer>0</integer>
<key>BoardProduct</key>
<string></string>
<key>BoardRevision</key>
<data></data>
<key>DevicePathsSupported</key>
<integer>0</integer>
<key>FSBFrequency</key>
<integer>0</integer>
<key>InitialTSC</key>
<integer>0</integer>
<key>PlatformName</key>
<string></string>
<key>SmcBranch</key>
<data></data>
<key>SmcPlatform</key>
<data></data>
<key>SmcRevision</key>
<data></data>
<key>StartupPowerEvents</key>
<integer>0</integer>
<key>SystemProductName</key>
<string></string>
<key>SystemSerialNumber</key>
<string></string>
<key>SystemUUID</key>
<string></string>
</dict>
<key>Generic</key>
<dict>
<key>AdviseWindows</key>
<false/>
<key>SystemMemoryStatus</key>
<string>Auto</string>
<key>MaxBIOSVersion</key>
<true/>
<key>MLB</key>
<string>M0000000000000001</string>
<string></string>
<key>ProcessorType</key>
<integer>0</integer>
<key>ROM</key>
<data>ESIzRFVm</data>
<data></data>
<key>SpoofVendor</key>
<true/>
<key>SystemProductName</key>
<string>iMac19,1</string>
<string></string>
<key>SystemSerialNumber</key>
<string>W00000000001</string>
<string></string>
<key>SystemUUID</key>
<string>00000000-0000-0000-0000-000000000000</string>
<string></string>
</dict>
<key>PlatformNVRAM</key>
<dict>
<key>BID</key>
<string></string>
<key>FirmwareFeatures</key>
<data></data>
<key>FirmwareFeaturesMask</key>
<data></data>
<key>MLB</key>
<string></string>
<key>ROM</key>
<data></data>
<key>SystemSerialNumber</key>
<string></string>
<key>SystemUUID</key>
<string></string>
</dict>
<key>SMBIOS</key>
<dict>
<key>BIOSReleaseDate</key>
<string></string>
<key>BIOSVendor</key>
<string></string>
<key>BIOSVersion</key>
<string>9999.999.999.999.999</string>
<key>BoardAssetTag</key>
<string></string>
<key>BoardLocationInChassis</key>
<string></string>
<key>BoardManufacturer</key>
<string></string>
<key>BoardProduct</key>
<string></string>
<key>BoardSerialNumber</key>
<string></string>
<key>BoardType</key>
<integer>0</integer>
<key>BoardVersion</key>
<string></string>
<key>ChassisAssetTag</key>
<string></string>
<key>ChassisManufacturer</key>
<string></string>
<key>ChassisSerialNumber</key>
<string></string>
<key>ChassisType</key>
<integer>0</integer>
<key>ChassisVersion</key>
<string></string>
<key>FirmwareFeatures</key>
<data></data>
<key>FirmwareFeaturesMask</key>
<data></data>
<key>PlatformFeature</key>
<integer>-1</integer>
<key>ProcessorType</key>
<integer>0</integer>
<key>SmcVersion</key>
<data></data>
<key>SystemFamily</key>
<string></string>
<key>SystemManufacturer</key>
<string></string>
<key>SystemProductName</key>
<string></string>
<key>SystemSKUNumber</key>
<string></string>
<key>SystemSerialNumber</key>
<string></string>
<key>SystemUUID</key>
<string></string>
<key>SystemVersion</key>
<string></string>
</dict>
<key>UpdateDataHub</key>
<true/>
<false/>
<key>UpdateNVRAM</key>
<true/>
<false/>
<key>UpdateSMBIOS</key>
<true/>
<key>UpdateSMBIOSMode</key>
<string>Create</string>
<key>UseRawUuidEncoding</key>
<false/>
</dict>
<key>UEFI</key>
<dict>
@@ -795,6 +1267,21 @@
<key>MinVersion</key>
<integer>0</integer>
</dict>
<key>AppleInput</key>
<dict>
<key>AppleEvent</key>
<string>Builtin</string>
<key>CustomDelays</key>
<string>Disabled</string>
<key>KeyInitialDelay</key>
<integer>0</integer>
<key>KeySubsequentDelay</key>
<integer>5</integer>
<key>PointerSpeedDiv</key>
<integer>1</integer>
<key>PointerSpeedMul</key>
<integer>1</integer>
</dict>
<key>Audio</key>
<dict>
<key>AudioCodec</key>
@@ -808,26 +1295,24 @@
<key>MinimumVolume</key>
<integer>20</integer>
<key>PlayChime</key>
<string>Disabled</string>
<key>ResetTrafficClass</key>
<false/>
<key>SetupDelay</key>
<integer>0</integer>
<key>VolumeAmplifier</key>
<integer>0</integer>
</dict>
<key>ConnectDrivers</key>
<true/>
<key>Drivers</key>
<array>
<string>#NvmExpressDxe.efi</string>
<string>#OpenCanopy.efi</string>
<string>OpenRuntime.efi</string>
</array>
<array/>
<key>Input</key>
<dict>
<key>KeyFiltering</key>
<false/>
<key>KeyForgetThreshold</key>
<integer>5</integer>
<key>KeyMergeThreshold</key>
<integer>2</integer>
<key>KeySupport</key>
<false/>
<key>KeySupportMode</key>
@@ -851,6 +1336,8 @@
<false/>
<key>ForceResolution</key>
<false/>
<key>GopPassThrough</key>
<false/>
<key>IgnoreTextInGraphics</key>
<false/>
<key>ProvideConsoleGop</key>
@@ -876,8 +1363,6 @@
<true/>
<key>AppleDebugLog</key>
<true/>
<key>AppleEvent</key>
<false/>
<key>AppleFramebufferInfo</key>
<false/>
<key>AppleImageConversion</key>
@@ -893,7 +1378,7 @@
<key>AppleSmcIo</key>
<false/>
<key>AppleUserInterfaceTheme</key>
<false/>
<true/>
<key>DataHub</key>
<false/>
<key>DeviceProperties</key>
@@ -909,8 +1394,10 @@
</dict>
<key>Quirks</key>
<dict>
<key>DeduplicateBootOrder</key>
<true/>
<key>ActivateHpetSupport</key>
<false/>
<key>DisableSecurityPolicy</key>
<false/>
<key>ExitBootServicesDelay</key>
<integer>0</integer>
<key>IgnoreInvalidFlexRatio</key>

View File

@@ -1,919 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<!--OpenCore 0.6.3 config-->
<dict>
<key>ACPI</key>
<dict>
<key>Add</key>
<array>
<dict>
<key>Enabled</key>
<false/><!--SSDT-CPBG-->
<key>Comment</key>
<string>Patch CPBG for Arrendale, Lynnfield and Clarkdale</string>
<key>Path</key>
<string>SSDT-CPBG.aml</string>
</dict>
</array>
<key>Delete</key>
<array/>
<key>Patch</key>
<array>
<dict>
<key>Comment</key>
<string>XHC1 to SHC1</string>
<key>Count</key>
<integer>0</integer>
<key>Enabled</key>
<true/>
<key>Find</key>
<data>WEhDMQ==</data>
<key>Limit</key>
<integer>0</integer>
<key>Mask</key>
<data></data>
<key>OemTableId</key>
<data></data>
<key>Replace</key>
<data>U0hDMQ==</data>
<key>ReplaceMask</key>
<data></data>
<key>Skip</key>
<integer>0</integer>
<key>TableLength</key>
<integer>0</integer>
<key>TableSignature</key>
<data></data>
</dict>
<dict>
<key>Comment</key>
<string>EHC1 to EH01</string>
<key>Count</key>
<integer>0</integer>
<key>Enabled</key>
<true/>
<key>Find</key>
<data>RUhDMQ==</data>
<key>Limit</key>
<integer>0</integer>
<key>Mask</key>
<data></data>
<key>OemTableId</key>
<data></data>
<key>Replace</key>
<data>RUgwMQ==</data>
<key>ReplaceMask</key>
<data></data>
<key>Skip</key>
<integer>0</integer>
<key>TableLength</key>
<integer>0</integer>
<key>TableSignature</key>
<data></data>
</dict>
<dict>
<key>Comment</key>
<string>EHC2 to EH02</string>
<key>Count</key>
<integer>0</integer>
<key>Enabled</key>
<true/>
<key>Find</key>
<data>RUhDMg==</data>
<key>Limit</key>
<integer>0</integer>
<key>Mask</key>
<data></data>
<key>OemTableId</key>
<data></data>
<key>Replace</key>
<data>RUgwMg==</data>
<key>ReplaceMask</key>
<data></data>
<key>Skip</key>
<integer>0</integer>
<key>TableLength</key>
<integer>0</integer>
<key>TableSignature</key>
<data></data>
</dict>
</array>
<key>Quirks</key>
<dict>
<key>FadtEnableReset</key>
<false/>
<key>NormalizeHeaders</key>
<false/>
<key>RebaseRegions</key>
<false/>
<key>ResetHwSig</key>
<false/>
<key>ResetLogoStatus</key>
<false/>
</dict>
</dict>
<key>Booter</key>
<dict>
<key>MmioWhitelist</key>
<array/>
<key>Quirks</key>
<dict>
<key>AvoidRuntimeDefrag</key>
<false/>
<key>DevirtualiseMmio</key>
<false/>
<key>DisableSingleUser</key>
<false/>
<key>DisableVariableWrite</key>
<false/>
<key>DiscardHibernateMap</key>
<false/>
<key>EnableSafeModeSlide</key>
<false/>
<key>EnableWriteUnprotector</key>
<false/>
<key>ForceExitBootServices</key>
<false/>
<key>ProtectMemoryRegions</key>
<false/>
<key>ProtectSecureBoot</key>
<false/>
<key>ProtectUefiServices</key>
<false/>
<key>ProvideCustomSlide</key>
<false/>
<key>ProvideMaxSlide</key>
<integer>0</integer>
<key>RebuildAppleMemoryMap</key>
<false/>
<key>SetupVirtualMap</key>
<false/>
<key>SignalAppleOS</key>
<false/>
<key>SyncRuntimePermissions</key>
<false/>
</dict>
</dict>
<key>DeviceProperties</key>
<dict>
<key>Add</key>
<dict>
<key>#PciRoot(0x0)/Pci(0x1C,0x1)Pci(0x0,0x0)</key>
<dict>
<key>device-id</key>
<data>ukMAAA==</data>
<key>compatible</key>
<string>pci14e4,43ba</string>
</dict>
</dict>
<key>Delete</key>
<dict/>
</dict>
<key>Kernel</key>
<dict>
<key>Add</key>
<array>
<dict>
<key>Arch</key>
<string>x86_64</string>
<key>Comment</key>
<string>Patching Engine</string>
<key>Enabled</key>
<true/><!--Lilu-->
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string></string>
<key>BundlePath</key>
<string>Lilu.kext</string>
<key>ExecutablePath</key>
<string>Contents/MacOS/Lilu</string>
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
<key>Comment</key>
<string>GPU Patching</string>
<key>Enabled</key>
<true/><!--WEG-->
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string></string>
<key>BundlePath</key>
<string>WhateverGreen.kext</string>
<key>ExecutablePath</key>
<string>Contents/MacOS/WhateverGreen</string>
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
<key>Comment</key>
<string>SSE Emulator</string>
<key>Enabled</key>
<false/><!--AAAMouSSE-->
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string>18.0.0</string>
<key>BundlePath</key>
<string>AAAMouSSE.kext</string>
<key>ExecutablePath</key>
<string>Contents/MacOS/MouSSE</string>
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
<key>Comment</key>
<string>SSE Patcher</string>
<key>Enabled</key>
<false/><!--telemetrap-->
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string>18.0.0</string>
<key>BundlePath</key>
<string>telemetrap.kext</string>
<key>ExecutablePath</key>
<string>Contents/MacOS/telemetrap</string>
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
<key>Comment</key>
<string>4331 Wifi Patch</string>
<key>Enabled</key>
<false/><!--AirportBrcmFixup-->
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string>20.0.0</string>
<key>BundlePath</key>
<string>AirportBrcmFixup.kext</string>
<key>ExecutablePath</key>
<string>Contents/MacOS/AirportBrcmFixup</string>
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
<key>Comment</key>
<string>4331 Wifi Patch</string>
<key>Enabled</key>
<false/><!--AirPortBrcmNIC_Injector-->
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string>20.0.0</string>
<key>BundlePath</key>
<string>AirportBrcmFixup.kext/Contents/PlugIns/AirPortBrcmNIC_Injector.kext</string>
<key>ExecutablePath</key>
<string></string>
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
<key>Comment</key>
<string>Dual Socket Patch</string>
<key>Enabled</key>
<false/><!--AppleMCEReporterDisabler-->
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string>19.0.0</string>
<key>BundlePath</key>
<string>AppleMCEReporterDisabler.kext</string>
<key>ExecutablePath</key>
<string></string>
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
<key>Comment</key>
<string>BCM Ethernet patch</string>
<key>Enabled</key>
<false/><!--CatalinaBCM5701Ethernet-->
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string>20.0.0</string>
<key>BundlePath</key>
<string>CatalinaBCM5701Ethernet.kext</string>
<key>ExecutablePath</key>
<string>Contents/MacOS/CatalinaBCM5701Ethernet</string>
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
<key>Comment</key>
<string>Atheros Wifi Patch</string>
<key>Enabled</key>
<false/><!--IO80211HighSierra-->
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string>18.0.0</string>
<key>BundlePath</key>
<string>IO80211HighSierra.kext</string>
<key>ExecutablePath</key>
<string>Contents/MacOS/IO80211HighSierra</string>
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
<key>Comment</key>
<string>Atheros Wifi Patch</string>
<key>Enabled</key>
<false/><!--AirPortAtheros40-->
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string>18.0.0</string>
<key>BundlePath</key>
<string>IO80211HighSierra.kext/Contents/PlugIns/AirPortAtheros40.kext</string>
<key>ExecutablePath</key>
<string>Contents/MacOS/AirPortAtheros40</string>
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
<key>Comment</key>
<string>Broadcom Wifi Patch</string>
<key>Enabled</key>
<false/><!--IO80211Mojave-->
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string>19.0.0</string>
<key>BundlePath</key>
<string>IO80211Mojave.kext</string>
<key>ExecutablePath</key>
<string>Contents/MacOS/IO80211Mojave</string>
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>Comment</key>
<string>Broadcom Wifi Patch</string>
<key>Enabled</key>
<false/><!--AirPortBrcm4331-->
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string>19.0.0</string>
<key>BundlePath</key>
<string>IO80211Mojave.kext/Contents/PlugIns/AirPortBrcm4331.kext</string>
<key>ExecutablePath</key>
<string>Contents/MacOS/AirPortBrcm4331</string>
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
<key>Comment</key>
<string>Marvel Ethernet Patch</string>
<key>Enabled</key>
<false/><!--MarvelYukonEthernet-->
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string>19.0.0</string>
<key>BundlePath</key>
<string>MarvelYukonEthernet.kext</string>
<key>ExecutablePath</key>
<string>Contents/MacOS/MarvelYukonEthernet</string>
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
<key>Comment</key>
<string>Nvidia Ethernet Patch</string>
<key>Enabled</key>
<false/><!--nForceEthernet-->
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string>19.0.0</string>
<key>BundlePath</key>
<string>nForceEthernet.kext</string>
<key>ExecutablePath</key>
<string>Contents/MacOS/nForceEthernet</string>
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
<key>Comment</key>
<string>USB Map</string>
<key>Enabled</key>
<true/>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string></string>
<key>BundlePath</key>
<string>USB-Map-SMBIOS.kext</string>
<key>ExecutablePath</key>
<string></string>
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
</array>
<key>Block</key>
<array/>
<key>Emulate</key>
<dict>
<key>DummyPowerManagement</key>
<false/>
<key>Cpuid1Data</key>
<data></data>
<key>Cpuid1Mask</key>
<data></data>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string></string>
</dict>
<key>Force</key>
<array/>
<key>Patch</key>
<array>
<dict>
<key>Arch</key>
<string>x86_64</string>
<key>Base</key>
<string>_isSingleUser</string>
<key>Comment</key>
<string>Patch IOHIDFamily</string>
<key>Count</key>
<integer>1</integer>
<key>Enabled</key>
<false/><!--IOHIDFamily-->
<key>Find</key>
<data></data>
<key>Identifier</key>
<string>com.apple.iokit.IOHIDFamily</string>
<key>Limit</key>
<integer>0</integer>
<key>Mask</key>
<data></data>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string>20.0.0</string>
<key>Replace</key>
<data>uAEAAADD</data>
<key>ReplaceMask</key>
<data></data>
<key>Skip</key>
<integer>0</integer>
</dict>
</array>
<key>Quirks</key>
<dict>
<key>AppleCpuPmCfgLock</key>
<false/>
<key>AppleXcpmCfgLock</key>
<false/>
<key>AppleXcpmExtraMsrs</key>
<false/>
<key>AppleXcpmForceBoost</key>
<false/>
<key>CustomSMBIOSGuid</key>
<false/>
<key>DisableIoMapper</key>
<false/>
<key>DisableLinkeditJettison</key>
<true/>
<key>DisableRtcChecksum</key>
<false/>
<key>ExtendBTFeatureFlags</key>
<false/>
<key>ExternalDiskIcons</key>
<false/>
<key>ForceSecureBootScheme</key>
<false/>
<key>IncreasePciBarSize</key>
<false/>
<key>LapicKernelPanic</key>
<false/>
<key>LegacyCommpage</key>
<false/>
<key>PanicNoKextDump</key>
<false/>
<key>PowerTimeoutKernelPanic</key>
<false/>
<key>ThirdPartyDrives</key>
<false/>
<key>XhciPortLimit</key>
<false/>
</dict>
<key>Scheme</key>
<dict>
<key>FuzzyMatch</key>
<true/>
<key>KernelArch</key>
<string>x86_64</string>
<key>KernelCache</key>
<string>Auto</string>
</dict>
</dict>
<key>Misc</key>
<dict>
<key>BlessOverride</key>
<array/>
<key>Boot</key>
<dict>
<key>ConsoleAttributes</key>
<integer>0</integer>
<key>HibernateMode</key>
<string>None</string>
<key>HideAuxiliary</key>
<true/>
<key>PickerAttributes</key>
<integer>1</integer>
<key>PickerAudioAssist</key>
<false/>
<key>PickerMode</key>
<string>External</string>
<key>PollAppleHotKeys</key>
<false/>
<key>ShowPicker</key>
<true/>
<key>TakeoffDelay</key>
<integer>0</integer>
<key>Timeout</key>
<integer>5</integer>
</dict>
<key>Debug</key>
<dict>
<key>AppleDebug</key>
<true/>
<key>ApplePanic</key>
<true/>
<key>DisableWatchDog</key>
<false/>
<key>DisplayDelay</key>
<integer>0</integer>
<key>DisplayLevel</key>
<integer>2147483650</integer>
<key>SerialInit</key>
<false/>
<key>SysReport</key>
<false/>
<key>Target</key>
<integer>3</integer>
</dict>
<key>Entries</key>
<array/>
<key>Security</key>
<dict>
<key>AllowNvramReset</key>
<true/>
<key>AllowSetDefault</key>
<true/>
<key>ApECID</key>
<integer>0</integer>
<key>AuthRestart</key>
<false/>
<key>BootProtect</key>
<string>Bootstrap</string>
<key>DmgLoading</key>
<string>Signed</string>
<key>EnablePassword</key>
<false/>
<key>ExposeSensitiveData</key>
<integer>6</integer>
<key>HaltLevel</key>
<integer>2147483648</integer>
<key>PasswordHash</key>
<data></data>
<key>PasswordSalt</key>
<data></data>
<key>ScanPolicy</key>
<integer>0</integer>
<key>SecureBootModel</key>
<string>x86legacy</string>
<key>Vault</key>
<string>Optional</string>
</dict>
<key>Tools</key>
<array>
<dict>
<key>Arguments</key>
<string></string>
<key>Auxiliary</key>
<true/>
<key>Name</key>
<string>BootKicker.efi</string>
<key>Comment</key>
<string>BootKicker.efi</string>
<key>Enabled</key>
<true/>
<key>Path</key>
<string>BootKicker.efi</string>
</dict>
<dict>
<key>Arguments</key>
<string></string>
<key>Auxiliary</key>
<false/>
<key>Name</key>
<string>OpenShell.efi</string>
<key>Comment</key>
<string>OpenShell.efi</string>
<key>Enabled</key>
<true/>
<key>Path</key>
<string>OpenShell.efi</string>
</dict>
</array>
</dict>
<key>NVRAM</key>
<dict>
<key>Add</key>
<dict>
<key>4D1EDE05-38C7-4A6A-9CC6-4BCCA8B38C14</key>
<dict>
<key>DefaultBackgroundColor</key>
<data>AAAAAA==</data>
<key>UIScale</key>
<data>AQ==</data>
</dict>
<key>4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102</key>
<dict>
<key>rtc-blacklist</key>
<data></data>
</dict>
<key>7C436110-AB2A-4BBB-A880-FE41995C9F82</key>
<dict>
<key>SystemAudioVolume</key>
<data>Rg==</data>
<key>boot-args</key>
<string>-v keepsyms=1 debug=0x100</string>
<key>run-efi-updater</key>
<string>No</string>
<key>csr-active-config</key>
<data>AAAAAA==</data>
</dict>
</dict>
<key>Delete</key>
<dict>
<key>4D1EDE05-38C7-4A6A-9CC6-4BCCA8B38C14</key>
<array>
<string>UIScale</string>
<string>DefaultBackgroundColor</string>
</array>
<key>4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102</key>
<array>
<string>rtc-blacklist</string>
</array>
<key>7C436110-AB2A-4BBB-A880-FE41995C9F82</key>
<array>
<string>boot-args</string>
</array>
</dict>
<key>LegacyEnable</key>
<false/>
<key>LegacyOverwrite</key>
<false/>
<key>LegacySchema</key>
<dict>
<key>7C436110-AB2A-4BBB-A880-FE41995C9F82</key>
<array>
<string>EFILoginHiDPI</string>
<string>EFIBluetoothDelay</string>
<string>LocationServicesEnabled</string>
<string>SystemAudioVolume</string>
<string>SystemAudioVolumeDB</string>
<string>SystemAudioVolumeSaved</string>
<string>bluetoothActiveControllerInfo</string>
<string>bluetoothInternalControllerInfo</string>
<string>flagstate</string>
<string>fmm-computer-name</string>
<string>nvda_drv</string>
<string>prev-lang:kbd</string>
</array>
<key>8BE4DF61-93CA-11D2-AA0D-00E098032B8C</key>
<array>
<string>Boot0080</string>
<string>Boot0081</string>
<string>Boot0082</string>
<string>BootNext</string>
<string>BootOrder</string>
</array>
</dict>
<key>WriteFlash</key>
<true/>
</dict>
<key>PlatformInfo</key>
<dict>
<key>Automatic</key>
<true/>
<key>CustomMemory</key>
<false/>
<key>Generic</key>
<dict>
<key>AdviseWindows</key>
<false/>
<key>SystemMemoryStatus</key>
<string>Auto</string>
<key>MLB</key>
<string>M0000000000000001</string>
<key>ProcessorType</key>
<integer>0</integer>
<key>ROM</key>
<data>ESIzRFVm</data>
<key>SpoofVendor</key>
<true/>
<key>SystemProductName</key>
<string>iMac19,1</string>
<key>SystemSerialNumber</key>
<string>W00000000001</string>
<key>SystemUUID</key>
<string>00000000-0000-0000-0000-000000000000</string>
</dict>
<key>UpdateDataHub</key>
<true/>
<key>UpdateNVRAM</key>
<true/>
<key>UpdateSMBIOS</key>
<true/>
<key>UpdateSMBIOSMode</key>
<string>Create</string>
</dict>
<key>UEFI</key>
<dict>
<key>APFS</key>
<dict>
<key>EnableJumpstart</key>
<true/>
<key>GlobalConnect</key>
<false/>
<key>HideVerbose</key>
<true/>
<key>JumpstartHotPlug</key>
<false/>
<key>MinDate</key>
<integer>0</integer>
<key>MinVersion</key>
<integer>0</integer>
</dict>
<key>Audio</key>
<dict>
<key>AudioCodec</key>
<integer>0</integer>
<key>AudioDevice</key>
<string>PciRoot(0x0)/Pci(0x1b,0x0)</string>
<key>AudioOut</key>
<integer>0</integer>
<key>AudioSupport</key>
<false/>
<key>MinimumVolume</key>
<integer>20</integer>
<key>PlayChime</key>
<false/>
<key>VolumeAmplifier</key>
<integer>0</integer>
</dict>
<key>ConnectDrivers</key>
<true/>
<key>Drivers</key>
<array>
<string>#NvmExpressDxe.efi</string>
<string>#OpenCanopy.efi</string>
<string>OpenRuntime.efi</string>
</array>
<key>Input</key>
<dict>
<key>KeyFiltering</key>
<false/>
<key>KeyForgetThreshold</key>
<integer>5</integer>
<key>KeyMergeThreshold</key>
<integer>2</integer>
<key>KeySupport</key>
<false/>
<key>KeySupportMode</key>
<string>Auto</string>
<key>KeySwap</key>
<false/>
<key>PointerSupport</key>
<false/>
<key>PointerSupportMode</key>
<string>ASUS</string>
<key>TimerResolution</key>
<integer>50000</integer>
</dict>
<key>Output</key>
<dict>
<key>ClearScreenOnModeSwitch</key>
<false/>
<key>ConsoleMode</key>
<string></string>
<key>DirectGopRendering</key>
<false/>
<key>ForceResolution</key>
<false/>
<key>IgnoreTextInGraphics</key>
<false/>
<key>ProvideConsoleGop</key>
<true/>
<key>ReconnectOnResChange</key>
<false/>
<key>ReplaceTabWithSpace</key>
<false/>
<key>Resolution</key>
<string>Max</string>
<key>SanitiseClearScreen</key>
<false/>
<key>TextRenderer</key>
<string>BuiltinGraphics</string>
<key>UgaPassThrough</key>
<false/>
</dict>
<key>ProtocolOverrides</key>
<dict>
<key>AppleAudio</key>
<false/>
<key>AppleBootPolicy</key>
<true/>
<key>AppleDebugLog</key>
<true/>
<key>AppleEvent</key>
<false/>
<key>AppleFramebufferInfo</key>
<false/>
<key>AppleImageConversion</key>
<false/>
<key>AppleImg4Verification</key>
<false/>
<key>AppleKeyMap</key>
<false/>
<key>AppleRtcRam</key>
<false/>
<key>AppleSecureBoot</key>
<false/>
<key>AppleSmcIo</key>
<false/>
<key>AppleUserInterfaceTheme</key>
<false/>
<key>DataHub</key>
<false/>
<key>DeviceProperties</key>
<false/>
<key>FirmwareVolume</key>
<false/>
<key>HashServices</key>
<false/>
<key>OSInfo</key>
<false/>
<key>UnicodeCollation</key>
<false/>
</dict>
<key>Quirks</key>
<dict>
<key>DeduplicateBootOrder</key>
<true/>
<key>ExitBootServicesDelay</key>
<integer>0</integer>
<key>IgnoreInvalidFlexRatio</key>
<false/>
<key>ReleaseUsbOwnership</key>
<false/>
<key>RequestBootVarRouting</key>
<true/>
<key>TscSyncTimeout</key>
<integer>0</integer>
<key>UnblockFsConnect</key>
<false/>
</dict>
<key>ReservedMemory</key>
<array/>
</dict>
</dict>
</plist>

Binary file not shown.

Binary file not shown.

BIN
payloads/Icon/External/.VolumeIcon.icns vendored Executable file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

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