mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-15 05:08:20 +10:00
Compare commits
242 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e31519ac96 | ||
|
|
49fa20ecc3 | ||
|
|
3364ed702a | ||
|
|
32a0289af3 | ||
|
|
a3208acbfe | ||
|
|
983a7bf8d3 | ||
|
|
5d85a98637 | ||
|
|
ba2149407d | ||
|
|
458a2a406a | ||
|
|
374263f926 | ||
|
|
1b5fb1cef6 | ||
|
|
e7897ae857 | ||
|
|
b34239fb8e | ||
|
|
53ea72ed93 | ||
|
|
462e268d0d | ||
|
|
df709afa8d | ||
|
|
7b332e87c4 | ||
|
|
1b2eea6b50 | ||
|
|
0077d6267c | ||
|
|
b18236b237 | ||
|
|
c748b03544 | ||
|
|
81369d1bab | ||
|
|
bf3cc2c9d1 | ||
|
|
159f624060 | ||
|
|
8234738403 | ||
|
|
bf19adef35 | ||
|
|
6c2ed9ad5a | ||
|
|
ac4b796c95 | ||
|
|
afdf49a074 | ||
|
|
48c838d92b | ||
|
|
3e453f4789 | ||
|
|
c7b282b53c | ||
|
|
8c6c723e13 | ||
|
|
9dfe616af8 | ||
|
|
fb9634d29b | ||
|
|
4edbf9df60 | ||
|
|
cd45f7b04c | ||
|
|
6a5ac03c72 | ||
|
|
81ecf14bab | ||
|
|
d84990e91d | ||
|
|
d1726f95fc | ||
|
|
45332d2cf9 | ||
|
|
9e7ad38020 | ||
|
|
18805c8e78 | ||
|
|
98b7824619 | ||
|
|
438ae23ee7 | ||
|
|
0e22a9fb00 | ||
|
|
f78e8edf4e | ||
|
|
986878055f | ||
|
|
1da93b1ca0 | ||
|
|
950f645f02 | ||
|
|
f0c73164d9 | ||
|
|
5b3425d0c4 | ||
|
|
0e1aaf0bbd | ||
|
|
ff685e3504 | ||
|
|
bae1a19cfe | ||
|
|
76aa3bb80f | ||
|
|
ab4089c37b | ||
|
|
a907e05bca | ||
|
|
8944c789b0 | ||
|
|
600e71581c | ||
|
|
15e4650785 | ||
|
|
201bc141bb | ||
|
|
3c69cb6c65 | ||
|
|
9955b76c1e | ||
|
|
d77680f25c | ||
|
|
10354d717e | ||
|
|
0b51a7e9c8 | ||
|
|
372ad31d83 | ||
|
|
d4836514fd | ||
|
|
077af5afb3 | ||
|
|
6ca3e3524e | ||
|
|
8c646b7897 | ||
|
|
90a9ff8bb2 | ||
|
|
1198a37969 | ||
|
|
296978676a | ||
|
|
29fa274096 | ||
|
|
dfdf4529d2 | ||
|
|
28746bbe2b | ||
|
|
60c8cd12cd | ||
|
|
71a045fb13 | ||
|
|
10d11c3b1b | ||
|
|
f0c282cbbc | ||
|
|
7b0b9ea18b | ||
|
|
3f6d8c2283 | ||
|
|
ff5a7f3a35 | ||
|
|
515bd5950f | ||
|
|
b1d5851131 | ||
|
|
3298625351 | ||
|
|
ff4a19b268 | ||
|
|
9b4a1e992b | ||
|
|
fc59cfffa1 | ||
|
|
cf884532d7 | ||
|
|
0b1092d4b9 | ||
|
|
cddd7af701 | ||
|
|
6cb2141654 | ||
|
|
a5fcc35d3c | ||
|
|
8cc22fd88a | ||
|
|
66435c7c08 | ||
|
|
3569a265e6 | ||
|
|
3515d81c26 | ||
|
|
3416a4bbdd | ||
|
|
6a5787abae | ||
|
|
a104316037 | ||
|
|
cabdfe9a27 | ||
|
|
c535609a32 | ||
|
|
a095edc380 | ||
|
|
f1ac88d23b | ||
|
|
4a1918238e | ||
|
|
33653a7108 | ||
|
|
03f65d1766 | ||
|
|
cb7d62f2ee | ||
|
|
4139e555cc | ||
|
|
244d7cfbf9 | ||
|
|
d9dcfc6125 | ||
|
|
c41ffaafc2 | ||
|
|
741eda5fd8 | ||
|
|
1678005ceb | ||
|
|
df029110c7 | ||
|
|
59f43e0ea0 | ||
|
|
9bdc5148c4 | ||
|
|
3283cf514b | ||
|
|
991e449d26 | ||
|
|
f880751539 | ||
|
|
8eade66017 | ||
|
|
bb09b0432f | ||
|
|
eca98c65d3 | ||
|
|
3af8687f42 | ||
|
|
0af93e7936 | ||
|
|
b8904387f3 | ||
|
|
91b2a8b673 | ||
|
|
96748952d3 | ||
|
|
5eddcadaac | ||
|
|
43131150a4 | ||
|
|
5fefc7185e | ||
|
|
ff00e2683e | ||
|
|
e94264f039 | ||
|
|
7fc36ac098 | ||
|
|
8711b4069a | ||
|
|
70cb12413a | ||
|
|
a6dc58a81d | ||
|
|
f8da16bf0a | ||
|
|
e43fecb4bc | ||
|
|
d6ed03eb8a | ||
|
|
49e1fb1ad2 | ||
|
|
ab1dab7fe5 | ||
|
|
6c44472e00 | ||
|
|
d1f545e356 | ||
|
|
e61544dcb9 | ||
|
|
889293ca8a | ||
|
|
a280e22cdb | ||
|
|
bb26a5a5d8 | ||
|
|
ba543ca5cf | ||
|
|
592b0a707f | ||
|
|
8da87aea28 | ||
|
|
4842028516 | ||
|
|
8b6bcd47d2 | ||
|
|
081bb56dd0 | ||
|
|
418de07f84 | ||
|
|
18e3fa37ff | ||
|
|
c36296f2a0 | ||
|
|
8159761833 | ||
|
|
87526226cd | ||
|
|
1cf1e3491d | ||
|
|
9cf19319c5 | ||
|
|
8b47c4fe7b | ||
|
|
3b3f5b3290 | ||
|
|
637981b405 | ||
|
|
20b40f33ce | ||
|
|
9a388009cd | ||
|
|
a4bcefd748 | ||
|
|
7885673363 | ||
|
|
d7aa3889f9 | ||
|
|
4dc76e26fc | ||
|
|
648bb67b73 | ||
|
|
686698272b | ||
|
|
6349b64faf | ||
|
|
09b9194b91 | ||
|
|
827aa96168 | ||
|
|
02ae3c8393 | ||
|
|
8f6bd87721 | ||
|
|
cef684beb9 | ||
|
|
6c7c60fb62 | ||
|
|
1b786e57c3 | ||
|
|
35e6104786 | ||
|
|
ed7c0c6760 | ||
|
|
25522069dc | ||
|
|
cbbbe16031 | ||
|
|
8ed540c7b4 | ||
|
|
467016521f | ||
|
|
33d166a4f8 | ||
|
|
a03623e678 | ||
|
|
bb424e8ab9 | ||
|
|
9e98121e45 | ||
|
|
f7d842a7f4 | ||
|
|
a1981ab56d | ||
|
|
e820a9ecc8 | ||
|
|
b13d47df08 | ||
|
|
e6adcdabac | ||
|
|
3c4795fb47 | ||
|
|
aaf74b2b6a | ||
|
|
2c4b29400e | ||
|
|
98da3a16a8 | ||
|
|
b24ee0e38c | ||
|
|
f557b10c3c | ||
|
|
b876eda144 | ||
|
|
4c8e256e7e | ||
|
|
447afac6eb | ||
|
|
657fc97f4f | ||
|
|
1d8f87fb78 | ||
|
|
c6a34ddeb8 | ||
|
|
694d0397ea | ||
|
|
9cbc243581 | ||
|
|
04a83462c3 | ||
|
|
2e3152f23b | ||
|
|
ba1ac0501b | ||
|
|
3ce8b18ecb | ||
|
|
baaa897d10 | ||
|
|
86ffb83c86 | ||
|
|
db708022e9 | ||
|
|
cc2eebfd42 | ||
|
|
8490893960 | ||
|
|
15a5e54cbb | ||
|
|
1bc9f3d396 | ||
|
|
ca22da4ebb | ||
|
|
e609866c5e | ||
|
|
bb5673e770 | ||
|
|
024d41c946 | ||
|
|
44c4a488f4 | ||
|
|
5c09c10301 | ||
|
|
4f74629e3f | ||
|
|
56194be716 | ||
|
|
8cfa90f352 | ||
|
|
1064be45df | ||
|
|
0428244e60 | ||
|
|
135125bae6 | ||
|
|
120f893d1f | ||
|
|
a33c19448f | ||
|
|
b8e29eca28 | ||
|
|
d4873f8070 | ||
|
|
c42ec31415 | ||
|
|
8f251c1214 |
34
.github/ISSUE_TEMPLATE/bug_report.md
vendored
34
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@@ -1,34 +0,0 @@
|
||||
---
|
||||
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.
|
||||
143
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
Normal file
143
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
Normal file
@@ -0,0 +1,143 @@
|
||||
name: Bug Report
|
||||
description: File a bug report
|
||||
title: "[Bug]: "
|
||||
labels: [bug]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thanks for taking the time to fill out this bug report!
|
||||
- type: dropdown
|
||||
id: machine
|
||||
attributes:
|
||||
label: Machine Model
|
||||
description: What model was being patched?
|
||||
options:
|
||||
- MacBook4,1
|
||||
- MacBook5,1
|
||||
- MacBook5,2
|
||||
- MacBook6,1
|
||||
- MacBook7,1
|
||||
- MacBook8,1
|
||||
- MacBookAir2,1
|
||||
- MacBookAir3,1
|
||||
- MacBookAir3,2
|
||||
- MacBookAir4,1
|
||||
- MacBookAir4,2
|
||||
- MacBookAir5,1
|
||||
- MacBookAir5,2
|
||||
- MacBookAir6,1
|
||||
- MacBookAir6,2
|
||||
- MacBookPro4,1
|
||||
- MacBookPro5,1
|
||||
- MacBookPro5,2
|
||||
- MacBookPro5,3
|
||||
- MacBookPro5,4
|
||||
- MacBookPro5,5
|
||||
- MacBookPro6,1
|
||||
- MacBookPro6,2
|
||||
- MacBookPro7,1
|
||||
- MacBookPro8,1
|
||||
- MacBookPro8,2
|
||||
- MacBookPro8,3
|
||||
- MacBookPro9,1
|
||||
- MacBookPro9,2
|
||||
- MacBookPro10,1
|
||||
- MacBookPro10,2
|
||||
- MacBookPro11,1
|
||||
- MacBookPro11,2
|
||||
- MacBookPro11,3
|
||||
- Macmini3,1
|
||||
- Macmini4,1
|
||||
- Macmini5,1
|
||||
- Macmini5,2
|
||||
- Macmini5,3
|
||||
- Macmini6,1
|
||||
- Macmini6,2
|
||||
- iMac7,1
|
||||
- iMac8,1
|
||||
- iMac9,1
|
||||
- iMac10,1
|
||||
- iMac11,1
|
||||
- iMac11,2
|
||||
- iMac11,3
|
||||
- iMac12,1
|
||||
- iMac12,2
|
||||
- iMac13,1
|
||||
- iMac13,2
|
||||
- iMac13,3
|
||||
- iMac14,1
|
||||
- iMac14,2
|
||||
- iMac14,3
|
||||
- iMac14,4
|
||||
- iMac15,1
|
||||
- MacPro3,1
|
||||
- MacPro4,1
|
||||
- MacPro5,1
|
||||
- Xserve2,1
|
||||
- Xserve3,1
|
||||
- Other/Non-Applicable
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
id: version
|
||||
attributes:
|
||||
label: Application Version
|
||||
description: What build version of our software are you running?
|
||||
options:
|
||||
- Latest Build (nightly)
|
||||
- Latest Release
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
id: variant
|
||||
attributes:
|
||||
label: Application Variant
|
||||
description: What variant of our software are you running?
|
||||
options:
|
||||
- GUI (Graphical User Interface)
|
||||
- TUI (Text User Interface)
|
||||
- CLI (Command Line Interface)
|
||||
- Other/Non-Applicable
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
id: os-version
|
||||
attributes:
|
||||
label: What versions of macOS are you seeing the problem on?
|
||||
multiple: true
|
||||
options:
|
||||
- macOS 12, Monterey
|
||||
- macOS 11, Big Sur
|
||||
- macOS 10.15, Catalina
|
||||
- macOS 10.14, Mojave
|
||||
- macOS 10.13, High Sierra
|
||||
- macOS 10.12, Sierra
|
||||
- macOS 10.11, El Capitan
|
||||
- Other/Non-Applicable
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
id: where-issue
|
||||
attributes:
|
||||
label: Where does this issue happen?
|
||||
multiple: true
|
||||
options:
|
||||
- Between booting macOS and Login Screen
|
||||
- Within macOS (Before Logging in)
|
||||
- Within macOS (After Logging in)
|
||||
- Other/Non-Applicable
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: what-happened
|
||||
attributes:
|
||||
label: What is the Isssue?
|
||||
description: Additionally, explain what you expected to happen?
|
||||
value: "Please clearly explain the issue"
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: extra-info
|
||||
attributes:
|
||||
label: Any Additional Information
|
||||
1
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
1
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
blank_issues_enabled: false
|
||||
33
.github/workflows/build-app-offline.yml
vendored
Normal file
33
.github/workflows/build-app-offline.yml
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
name: CI - Build Offline TUI
|
||||
|
||||
on:
|
||||
push:
|
||||
workflow_dispatch:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build Offline TUI
|
||||
runs-on: x86_64_mojave
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- run: python3 create-offline-build.py
|
||||
- run: /Library/Frameworks/Python.framework/Versions/3.9/bin/pyinstaller OpenCore-Patcher.spec
|
||||
- run: ./after_pyinstaller.sh
|
||||
- run: 'codesign -s "Developer ID Application: Mykola Grymalyuk (S74BDJXQMD)" -v --force --deep --timestamp --entitlements entitlements.plist -o runtime "dist/OpenCore-Patcher.app"'
|
||||
- run: cd dist; zip -r ../OpenCore-Patcher-TUI-Offline.app.zip OpenCore-Patcher.app
|
||||
- name: Upload App to Artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: OpenCore-Patcher-TUI-Offline.app
|
||||
path: OpenCore-Patcher-TUI-Offline.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-TUI.app.zip
|
||||
tag: ${{ github.ref }}
|
||||
file_glob: true
|
||||
24
.github/workflows/build-app.yml
vendored
24
.github/workflows/build-app.yml
vendored
@@ -1,4 +1,4 @@
|
||||
name: CI - Build App
|
||||
name: CI - Build TUI
|
||||
|
||||
on:
|
||||
push:
|
||||
@@ -8,31 +8,27 @@ on:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build App
|
||||
runs-on: self-hosted
|
||||
name: Build TUI
|
||||
runs-on: x86_64_mojave
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Install Python Dependencies
|
||||
run: pip3 install --upgrade pyinstaller requests
|
||||
|
||||
- run: pyinstaller OpenCore-Patcher.spec
|
||||
- run: /Library/Frameworks/Python.framework/Versions/3.9/bin/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
|
||||
- run: 'codesign -s "Developer ID Application: Mykola Grymalyuk (S74BDJXQMD)" -v --force --deep --timestamp --entitlements entitlements.plist -o runtime "dist/OpenCore-Patcher.app"'
|
||||
- run: cd dist; zip -r ../OpenCore-Patcher-TUI.app.zip OpenCore-Patcher.app
|
||||
- run: ./../sign-tui.sh
|
||||
- name: Upload App to Artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: OpenCore-Patcher.app
|
||||
path: OpenCore-Patcher.app.zip
|
||||
name: OpenCore-Patcher-TUI.app
|
||||
path: OpenCore-Patcher-TUI.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
|
||||
file: OpenCore-Patcher-TUI.app.zip
|
||||
tag: ${{ github.ref }}
|
||||
file_glob: true
|
||||
|
||||
32
.github/workflows/build-cli.yml
vendored
32
.github/workflows/build-cli.yml
vendored
@@ -1,32 +0,0 @@
|
||||
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
|
||||
- name: Install Python Dependencies
|
||||
run: pip3 install --upgrade pyinstaller requests
|
||||
|
||||
- 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
|
||||
50
.github/workflows/build-gui.yml
vendored
Normal file
50
.github/workflows/build-gui.yml
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
name: CI - Build GUI
|
||||
|
||||
on:
|
||||
push:
|
||||
workflow_dispatch:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build GUI
|
||||
runs-on: x86_64_mojave
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- run: /Library/Frameworks/Python.framework/Versions/3.9/bin/pyinstaller OCLP-CLI.spec
|
||||
- run: cd dist; cp OCLP-CLI ../; cd ..
|
||||
- run: zip OCLP-CLI.zip OCLP-CLI
|
||||
- name: Download latest nightly OCLP-GUI
|
||||
run: curl -S -L https://nightly.link/dortania/OCLP-GUI/workflows/build-app/master/OpenCore-Patcher-GUI.app.zip --output ./OpenCore-Patcher-GUI.app.zip
|
||||
- run: unzip -o OpenCore-Patcher-GUI.app.zip
|
||||
- run: unzip OpenCore-Patcher-GUI.app.zip; rm OpenCore-Patcher-GUI.app.zip
|
||||
- name: Merge new GUI
|
||||
run: cp OCLP-CLI OpenCore\ Patcher.app/Contents/Resources/
|
||||
- run: python3 merge_gui.py
|
||||
- run: 'codesign -s "Developer ID Application: Mykola Grymalyuk (S74BDJXQMD)" -v --force --deep --timestamp --entitlements entitlements.plist -o runtime "OpenCore Patcher.app/Contents/Resources/OCLP-CLI"'
|
||||
- run: 'codesign -s "Developer ID Application: Mykola Grymalyuk (S74BDJXQMD)" -v --force --deep --timestamp --entitlements entitlements.plist -o runtime "OpenCore Patcher.app/Contents/Resources/oclpd"'
|
||||
- run: 'codesign -s "Developer ID Application: Mykola Grymalyuk (S74BDJXQMD)" -v --force --deep --timestamp --entitlements entitlements.plist -o runtime "OpenCore Patcher.app"'
|
||||
- run: ditto -c -k --sequesterRsrc --keepParent OpenCore\ Patcher.app OpenCore-Patcher-GUI.app.zip
|
||||
- run: ./../sign-gui.sh
|
||||
- name: Upload GUI to Artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: OpenCore-Patcher-GUI.app
|
||||
path: OpenCore-Patcher-GUI.app.zip
|
||||
- name: Upload CLI 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: OpenCore-Patcher-GUI.app.zip
|
||||
tag: ${{ github.ref }}
|
||||
file_glob: true
|
||||
- name: Validate OpenCore
|
||||
run: ./OCLP-CLI --validate
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,7 +1,7 @@
|
||||
.DS_Store
|
||||
OCLP-GUI.command
|
||||
/payloads/Apple
|
||||
/payloads/Apple.zip
|
||||
/payloads/*.zip
|
||||
/payloads/__MACOSX
|
||||
/App
|
||||
/Build-Folder
|
||||
|
||||
136
CHANGELOG.md
136
CHANGELOG.md
@@ -1,9 +1,97 @@
|
||||
# OpenCore Legacy Patcher changelog
|
||||
|
||||
## 0.2.5
|
||||
|
||||
- Implement Latebloom configuration via command line tool
|
||||
- Implement Root Volume backups in addition to APFS snapshot reversions
|
||||
- Backups applicable to machines with sealed APFS snapshots
|
||||
- Allow Root Patching on Mojave and Catalina
|
||||
- Currently experimental
|
||||
- Allow disabling of faulty Thunderbolt controllers on 2013-2014 MacBook Pros
|
||||
- Currently limited to MacBookPro11,x
|
||||
- Set iMacPro1,1 SMBIOS for Mac Pro and Xserve models
|
||||
- Allows for wider array of OS support (High Sierra+)
|
||||
- Use plist override for BCM943224 and BCM94331 support in Big Sur+
|
||||
- Allows for older OS support through OpenCore
|
||||
- Increment Binaries:
|
||||
- OpenCore 0.7.2 release
|
||||
- Lilu 1.5.5 release
|
||||
- AppleALC 1.6.3 release
|
||||
- WhateverGreen 1.5.2 release
|
||||
- FeatureUnlock 1.0.3 release
|
||||
- PatcherSupportPkg 0.1.2 release
|
||||
- Allow iGPU/dGPU switching in Windows
|
||||
- Applicable to MacBook Pros with Intel iGPU and Nvidia/AMD dGPU
|
||||
- Clean up Patcher Settings
|
||||
- Allow disabling of TeraScale 2 Acceleration during root volume patch
|
||||
- Use for MacBookPro8,x with heavily degraded dGPUs
|
||||
- Add non-Metal Monterey Acceleration
|
||||
- Currently supports:
|
||||
- Intel Ironlake and Sandy Bridge
|
||||
- Nvidia Tesla
|
||||
- AMD TeraScale 1 and 2
|
||||
- Allow Trackpad gestures on MacBook4,1 and MacBook5,2
|
||||
- System Preferences will not report settings however
|
||||
- Allow Root Volume Patched Systems to use FileVault 2
|
||||
- Requires macOS 11.3 (20E232) or newer
|
||||
- Add offline TUI build
|
||||
- Allows for root patching without network connection
|
||||
- Add Legacy Wireless support for Monterey
|
||||
- Applicable for BCM94328, BCM94322 and Atheros chipsets
|
||||
- Add Legacy Bluetooth support for Monterey
|
||||
- Applicable for BRCM2046 and BRCM2070 chipsets
|
||||
- Disable Library Validation allowing for AMFI usage
|
||||
- Remove reliance on amfi_get_out_of_my_way=1
|
||||
- Add Kepler Accleration Patches for Monterey Beta 7 and newer
|
||||
- Add FirmwareFeature upgrading to all Models
|
||||
- Fixes Monterey Beta 7 installation issues
|
||||
- Add iMac7,1 USB map
|
||||
|
||||
## 0.2.4
|
||||
|
||||
- Fix BlessOverride typo
|
||||
- Fix Wake on WLAN typo
|
||||
- Fix Catalyst App crashing in macOS 11.5 (ie. Messages.app)
|
||||
- Increment Binaries
|
||||
- PatcherSupportPkg 0.0.15 release
|
||||
- Implement Latebloom.kext support (v0.19)
|
||||
- Work around macOS 11.3+ race condition on pre-Sandy Bridge Macs
|
||||
- Disable USB Map injection when unneeded
|
||||
|
||||
## 0.2.3
|
||||
|
||||
- Fix more IORegistry issues
|
||||
- Implement OpenCore GUI
|
||||
- Ensure symlinks are preserved
|
||||
- Enable TeraScale 2 patches by default on all models
|
||||
- Fix NightShift support for macOS Monterey
|
||||
- Add UniversalControl support
|
||||
- Currently not enabled by Apple in macOS Monterey Beta 2/iOS 15 Beta 2
|
||||
- Add optional Wake in WLAN setting
|
||||
- Note: enabling may create network instability
|
||||
- Increment Binaries
|
||||
- OpenCore 0.7.1 release (07-05-2021)
|
||||
- FeatureUnlock 1.0.3 rolling (07-07-2021)
|
||||
- Previously known as SidecarFixup
|
||||
- Lilu 1.5.4 release (07-05-2021)
|
||||
- AppleALC 1.6.2 release
|
||||
- WhateverGreen 1.6.2 release
|
||||
- PatcherSupportPkg 0.0.13 release
|
||||
- Fix Intel HD4000 DRM Support in macOS Monterey (thanks EduCovas!)
|
||||
- Support optionally re-enabling iGPU in iMac14,x with dGPUs
|
||||
- Fix Windows scanning in OpenCore menu when Windows and macOS are stored on the same ESP
|
||||
|
||||
## 0.2.2
|
||||
|
||||
- Fix IORegistry issue
|
||||
- Fix Root Patch Failure on Nvidia Tesla GPUs
|
||||
|
||||
## 0.2.1
|
||||
|
||||
- Fix NVMe Crash on build
|
||||
|
||||
## 0.2.0
|
||||
|
||||
- Refactor device probe logic
|
||||
- Implement PatcherSupportPkg v0.0.10
|
||||
- Reduces binary sizes depending on OS
|
||||
@@ -17,17 +105,21 @@
|
||||
- Lilu 1.5.4 rolling (f69a972 - 06-20-2021)
|
||||
- RestrictEvents 1.0.3 rolling (3773ce2 - 06-20-2021)
|
||||
- SidecarFixup 1.0.2 rolling (2c29166 - 06-21-2021)
|
||||
- PatcherSupportPkg 0.0.18
|
||||
- Allow AirPlay to Mac support on Skylake - Coffeelake Macs
|
||||
|
||||
## 0.1.9
|
||||
|
||||
- Fix incorrect AMFI and SIP detection
|
||||
|
||||
## 0.1.8
|
||||
|
||||
- Fix Kernel Panic in Big Sur and Monterey
|
||||
- Increment binaries:
|
||||
- Lilu (1.5.4 rolling - 06-15-2021)
|
||||
|
||||
## 0.1.7
|
||||
|
||||
- Add FireWire Boot Support for Catalina and newer
|
||||
- Add NVMe firmware support for older models (ie. MacPro3,1)
|
||||
- OpenCore must be stored on a bootable volume (ie. USB or SATA)
|
||||
@@ -68,6 +160,7 @@
|
||||
- User configurable, those prone to seizures are recommended to avoid or have another setup the machine due to initial colour strobing before forcing Million Colours on the display with SwitchResX or ResXtreme
|
||||
|
||||
## 0.1.6
|
||||
|
||||
- Add XHCI UEFI Driver for 3rd Party USB 3.0 Controllers
|
||||
- Allows for Boot Support from OpenCore' Picker
|
||||
- Fix UEFI output on MacPro3,1 with PC GPUs
|
||||
@@ -84,6 +177,7 @@
|
||||
- Fix GPU Switching on MacBookPro6,x
|
||||
|
||||
## 0.1.5
|
||||
|
||||
- Fix crashing when Wireless module not present
|
||||
- Add iMac10,1 default dGPU pathing
|
||||
- Add agdpmod=vit9696 to all Nvidia Metal iMacs
|
||||
@@ -99,9 +193,11 @@
|
||||
- Add SeedUtil option to Advanced Patcher Settings
|
||||
|
||||
## 0.1.4
|
||||
|
||||
- Fix Device Path formatting on 2012+ iMacs
|
||||
|
||||
## 0.1.3
|
||||
|
||||
- Fix internal PCIe devices reporting as external
|
||||
- Opt for `built-in` when device path is detectable
|
||||
- Innie 0ccd95e (1.3.0 release - 01-16-2021)
|
||||
@@ -120,6 +216,7 @@
|
||||
- Fix NVMe properties not applying when OpenCore is installed
|
||||
|
||||
## 0.1.2
|
||||
|
||||
- Fix IDE support on 2008 era MacBooks, iMacs and Xserves
|
||||
- Fix reduced output speeds on BCM94360 series Wifi cards
|
||||
- Fix accidentally disabling non-existent iGPU in iMac11,2
|
||||
@@ -145,6 +242,7 @@
|
||||
- SidecarFixup efdf11c (1.0.0 release - 05-02-2021)
|
||||
|
||||
## 0.1.1
|
||||
|
||||
- Fix iMac11,3 GFX0 pathing
|
||||
- Add MouSSE support to iMac10,1 with Metal AMD GPU
|
||||
- Fix iMac11,1 and iMac11,3 Nvidia boot issues after PRAM reset
|
||||
@@ -164,9 +262,11 @@
|
||||
- Fix Acceleration Linking for Intel Ironlake iGPUs
|
||||
|
||||
## 0.1.0
|
||||
|
||||
- Fix crash on iMacs with Metal GPUs
|
||||
|
||||
## 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
|
||||
@@ -187,6 +287,7 @@
|
||||
- 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
|
||||
@@ -195,11 +296,13 @@
|
||||
- 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 transitioning 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)
|
||||
@@ -215,6 +318,7 @@
|
||||
- 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+)
|
||||
@@ -233,6 +337,7 @@
|
||||
- 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
|
||||
@@ -243,12 +348,14 @@
|
||||
- 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
|
||||
- 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
|
||||
@@ -264,12 +371,14 @@
|
||||
- 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
|
||||
@@ -278,70 +387,83 @@
|
||||
- Add GopPassThrough quirk for UGA-based systems
|
||||
|
||||
## 0.0.13
|
||||
|
||||
- Add CPUFriend support to resolve X86PlatformPlugin clashes
|
||||
- (1.2.3 c388a62 release)
|
||||
- (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)
|
||||
- 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)
|
||||
- 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
|
||||
|
||||
- Initial developer preview
|
||||
|
||||
208
OCLP-CLI.command
208
OCLP-CLI.command
@@ -9,7 +9,7 @@ import platform
|
||||
import argparse
|
||||
from pathlib import Path
|
||||
|
||||
from Resources import Build, ModelArray, Constants, SysPatch, device_probe, Utilities
|
||||
from Resources import Build, ModelArray, Constants, SysPatch, device_probe, Utilities, ModelExample
|
||||
|
||||
|
||||
class OpenCoreLegacyPatcher:
|
||||
@@ -20,6 +20,9 @@ class OpenCoreLegacyPatcher:
|
||||
self.constants.computer = device_probe.Computer.probe()
|
||||
self.computer = self.constants.computer
|
||||
self.constants.detected_os = int(platform.uname().release.partition(".")[0])
|
||||
self.constants.detected_os_minor = int(platform.uname().release.partition(".")[2].partition(".")[0])
|
||||
detected_os_build: str = subprocess.run("sw_vers -buildVersion".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.decode()
|
||||
self.constants.detected_os_build = detected_os_build
|
||||
|
||||
custom_cpu_model_value = Utilities.get_nvram("revcpuname", "4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102", decode=True)
|
||||
if custom_cpu_model_value is not None:
|
||||
@@ -40,7 +43,6 @@ class OpenCoreLegacyPatcher:
|
||||
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)
|
||||
@@ -48,17 +50,26 @@ class OpenCoreLegacyPatcher:
|
||||
parser.add_argument("--support_all", help="Allow OpenCore on natively supported Models", action="store_true", required=False)
|
||||
parser.add_argument("--firewire", help="Enable FireWire Booting", action="store_true", required=False)
|
||||
parser.add_argument("--nvme", help="Enable NVMe Booting", action="store_true", required=False)
|
||||
parser.add_argument("--disable_amfi", help="Disable AMFI", action="store_true", required=False)
|
||||
parser.add_argument("--wlan", help="Enable Wake on WLAN support", action="store_true", required=False)
|
||||
# parser.add_argument("--disable_amfi", help="Disable AMFI", action="store_true", required=False)
|
||||
parser.add_argument("--moderate_smbios", help="Moderate SMBIOS Patching", action="store_true", required=False)
|
||||
parser.add_argument("--moj_cat_accel", help="Allow Root Patching on Mojave and Catalina", action="store_true", required=False)
|
||||
parser.add_argument("--disable_thunderbolt", help="Disable Thunderbolt on 2013-2014 MacBook Pros", action="store_true", required=False)
|
||||
|
||||
# Building args requiring value values
|
||||
# Building args requiring value values (ie. --model iMac12,2)
|
||||
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("--disk", action="store", help="Specifies disk to install to", required=False)
|
||||
parser.add_argument("--smbios_spoof", action="store", help="Set SMBIOS patching mode", required=False)
|
||||
parser.add_argument("--lb_delay", action="store", help="Set Latebloom delay in ms", required=False)
|
||||
parser.add_argument("--lb_range", action="store", help="Set Latebloom range in ms", required=False)
|
||||
parser.add_argument("--lb_debug", action="store", help="Set Latebloom debug", required=False)
|
||||
|
||||
# SysPatch args
|
||||
parser.add_argument("--patch_sys_vol", help="Patches root volume", action="store_true", required=False)
|
||||
parser.add_argument("--unpatch_sys_vol", help="Unpatches root volume, EXPERIMENTAL", action="store_true", required=False)
|
||||
parser.add_argument("--terascale_2", help="Enable TeraScale 2 Acceleration", action="store_true", required=False)
|
||||
# parser.add_argument("--patch_disk", action="store", help="Specifies disk to root patch", required=False)
|
||||
|
||||
parser.add_argument("--validate", help="Validate", action="store_true", required=False)
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
@@ -71,6 +82,14 @@ class OpenCoreLegacyPatcher:
|
||||
else:
|
||||
print("- Using default payloads location")
|
||||
|
||||
if args.disk:
|
||||
print(f"- Install Disk set: {args.disk}")
|
||||
self.constants.disk = args.disk
|
||||
if args.validate:
|
||||
self.validate()
|
||||
# if args.patch_disk:
|
||||
# print(f"- Patch Disk set: {args.patch_disk}")
|
||||
# self.constants.patch_disk = args.patch_disk
|
||||
if args.verbose:
|
||||
print("- Set verbose configuration")
|
||||
self.constants.verbose_debug = True
|
||||
@@ -81,9 +100,6 @@ class OpenCoreLegacyPatcher:
|
||||
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
|
||||
@@ -102,22 +118,18 @@ class OpenCoreLegacyPatcher:
|
||||
if args.nvme:
|
||||
print("- Set NVMe Boot configuration")
|
||||
self.constants.nvme_boot = True
|
||||
if args.disable_amfi:
|
||||
print("- Set Disable AMFI configuration")
|
||||
self.constants.disable_amfi = 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.disable_amfi:
|
||||
# print("- Set Disable AMFI configuration")
|
||||
# self.constants.amfi_status = False
|
||||
if args.wlan:
|
||||
print("- Set Wake on WLAN configuration")
|
||||
self.constants.enable_wake_on_wlan = True
|
||||
if args.disable_thunderbolt:
|
||||
print("- Set Disable Thunderbolt configuration")
|
||||
self.constants.disable_thunderbolt = True
|
||||
if args.moderate_smbios:
|
||||
print("- Set Moderate SMBIOS Patching configuration")
|
||||
self.constants.serial_settings = "Moderate"
|
||||
if args.smbios_spoof:
|
||||
if args.smbios_spoof == "Minimal":
|
||||
self.constants.serial_settings = "Minimal"
|
||||
@@ -128,6 +140,30 @@ class OpenCoreLegacyPatcher:
|
||||
else:
|
||||
print(f"- Unknown SMBIOS arg passed: {args.smbios_spoof}")
|
||||
|
||||
if args.lb_delay:
|
||||
try:
|
||||
self.constants.latebloom_delay = int(args.lb_delay)
|
||||
print(f"- Set LateBloom delay: {args.lb_delay}")
|
||||
except ValueError:
|
||||
print(f"- Invalid LateBloom delay: {args.lb_delay}")
|
||||
|
||||
if args.lb_range:
|
||||
try:
|
||||
self.constants.latebloom_range = int(args.lb_range)
|
||||
print(f"- Set LateBloom range: {args.lb_range}")
|
||||
except ValueError:
|
||||
print(f"- Invalid LateBloom range: {args.lb_range}")
|
||||
|
||||
if args.lb_debug:
|
||||
try:
|
||||
self.constants.latebloom_debug = int(args.lb_debug)
|
||||
if self.constants.latebloom_debug in [0, 1]:
|
||||
print(f"- Set LateBloom debug: {args.lb_debug}")
|
||||
else:
|
||||
print(f"- Invalid LateBloom debug: {args.lb_debug}")
|
||||
except ValueError:
|
||||
print(f"- Invalid LateBloom range: {args.lb_debug}")
|
||||
|
||||
if args.support_all:
|
||||
print("- Building for natively supported model")
|
||||
self.constants.allow_oc_everywhere = True
|
||||
@@ -148,11 +184,12 @@ If you plan to create the USB for another machine, please select the "Change Mod
|
||||
sys.exit(1)
|
||||
else:
|
||||
print(f"- Using detected model: {self.constants.computer.real_model}")
|
||||
self.set_defaults(self.constants.custom_model, True)
|
||||
self.build_opencore()
|
||||
if args.patch_sys_vol:
|
||||
if args.terascale_2:
|
||||
print("- Set TeraScale 2 Accel configuration")
|
||||
self.constants.terascale_2_patch = True
|
||||
if args.moj_cat_accel:
|
||||
print("- Set Mojave/Catalina root patch configuration")
|
||||
self.constants.moj_cat_accel = True
|
||||
print("- Set System Volume patching")
|
||||
self.patch_vol()
|
||||
elif args.unpatch_sys_vol:
|
||||
@@ -160,46 +197,53 @@ If you plan to create the USB for another machine, please select the "Change Mod
|
||||
self.unpatch_vol()
|
||||
|
||||
def set_defaults(self, model, host_is_target):
|
||||
# Defaults
|
||||
self.constants.sip_status = True
|
||||
self.constants.secure_status = False # Default false for Monterey
|
||||
self.constants.disable_amfi = False
|
||||
|
||||
if model in ModelArray.LegacyGPU:
|
||||
if host_is_target:
|
||||
if Utilities.check_metal_support(device_probe, self.computer) is False:
|
||||
self.constants.disable_cs_lv = True
|
||||
if self.computer.dgpu and self.computer.dgpu.arch == device_probe.NVIDIA.Archs.Kepler:
|
||||
self.constants.sip_status = False
|
||||
self.constants.amfi_status = True
|
||||
self.constants.allow_fv_root = True # Allow FileVault on broken seal
|
||||
if (
|
||||
host_is_target
|
||||
and self.computer.dgpu
|
||||
and self.computer.dgpu.arch
|
||||
in [
|
||||
device_probe.AMD.Archs.Legacy_GCN,
|
||||
device_probe.AMD.Archs.Polaris,
|
||||
device_probe.AMD.Archs.Vega,
|
||||
device_probe.AMD.Archs.Navi,
|
||||
device_probe.NVIDIA.Archs.Kepler,
|
||||
]
|
||||
):
|
||||
isinstance(self.computer.wifi, device_probe.Broadcom)
|
||||
and self.computer.wifi.chipset in [device_probe.Broadcom.Chipsets.AirPortBrcm4331, device_probe.Broadcom.Chipsets.AirPortBrcm43224]
|
||||
) or (isinstance(self.computer.wifi, device_probe.Atheros) and self.computer.wifi.chipset == device_probe.Atheros.Chipsets.AirPortAtheros40):
|
||||
self.constants.sip_status = False
|
||||
self.constants.allow_fv_root = True # Allow FileVault on broken seal
|
||||
elif model in ModelArray.LegacyGPU:
|
||||
self.constants.disable_cs_lv = True
|
||||
if model in ModelArray.LegacyGPU:
|
||||
if host_is_target and Utilities.check_metal_support(device_probe, self.computer) is True:
|
||||
# Building on device and we have a native, supported GPU
|
||||
self.constants.sip_status = True
|
||||
# self.constants.secure_status = True # Monterey
|
||||
self.constants.disable_amfi = False
|
||||
if self.computer.dgpu and self.computer.dgpu.arch == device_probe.NVIDIA.Archs.Kepler:
|
||||
self.constants.sip_status = False
|
||||
# self.constants.secure_status = True # Monterey
|
||||
self.constants.amfi_status = True
|
||||
self.constants.allow_fv_root = True # Allow FileVault on broken seal
|
||||
else:
|
||||
self.constants.sip_status = True
|
||||
# self.constants.secure_status = True # Monterey
|
||||
self.constants.amfi_status = True
|
||||
else:
|
||||
self.constants.sip_status = False # Unsigned kexts
|
||||
self.constants.sip_status = False # Unsigned kexts
|
||||
self.constants.secure_status = False # Root volume modified
|
||||
self.constants.disable_amfi = True # Unsigned binaries
|
||||
self.constants.amfi_status = False # Unsigned binaries
|
||||
self.constants.allow_fv_root = True # Allow FileVault on broken seal
|
||||
if model in ModelArray.ModernGPU:
|
||||
if host_is_target and model in ["iMac13,1", "iMac13,3"] and self.computer.dgpu:
|
||||
# Some models have a supported dGPU, others don't
|
||||
self.constants.sip_status = True
|
||||
# self.constants.secure_status = True # Monterey
|
||||
# self.constants.disable_amfi = False # Signed bundles, Don't need to explicitly set currently
|
||||
else:
|
||||
self.constants.sip_status = False # Unsigned kexts
|
||||
self.constants.secure_status = False # Modified root volume
|
||||
# self.constants.disable_amfi = False # Signed bundles, Don't need to explicitly set currently
|
||||
self.constants.sip_status = False # Unsigned kexts
|
||||
self.constants.secure_status = False # Modified root volume
|
||||
self.constants.allow_fv_root = True # Allow FileVault on broken seal
|
||||
# self.constants.amfi_status = True # Signed bundles, Don't need to explicitly set currently
|
||||
if model == "MacBook8,1":
|
||||
# MacBook8,1 has an odd bug where it cannot install Monterey with Minimal spoofing
|
||||
self.constants.serial_settings == "Moderate"
|
||||
|
||||
if self.constants.latebloom_delay == 0:
|
||||
self.constants.latebloom_delay, self.constants.latebloom_range, self.constants.latebloom_debug = Utilities.latebloom_detection(model)
|
||||
|
||||
if Utilities.get_nvram("gpu-power-prefs", "FA4CE28D-B62F-4C99-9CC3-6815686E30F9", decode=True):
|
||||
self.constants.allow_ts2_accel = False
|
||||
|
||||
def patch_vol(self):
|
||||
SysPatch.PatchSysVolume(self.constants.custom_model or self.constants.computer.real_model, self.constants).start_patch()
|
||||
|
||||
@@ -212,6 +256,52 @@ If you plan to create the USB for another machine, please select the "Change Mod
|
||||
def install_opencore(self):
|
||||
Build.BuildOpenCore(self.constants.custom_model or self.constants.computer.real_model, self.constants).copy_efi()
|
||||
|
||||
def validate(self):
|
||||
# Runs through ocvalidate to check for errors
|
||||
|
||||
valid_dumps = [
|
||||
ModelExample.MacBookPro.MacBookPro92_Stock,
|
||||
# ModelExample.MacBookPro.MacBookPro171_Stock,
|
||||
# ModelExample.Macmini.Macmini91_Stock,
|
||||
ModelExample.iMac.iMac81_Stock,
|
||||
ModelExample.iMac.iMac112_Stock,
|
||||
ModelExample.iMac.iMac122_Upgraded,
|
||||
ModelExample.MacPro.MacPro31_Stock,
|
||||
ModelExample.MacPro.MacPro31_Upgrade,
|
||||
ModelExample.MacPro.MacPro31_Modern_AMD,
|
||||
ModelExample.MacPro.MacPro31_Modern_Kepler,
|
||||
ModelExample.MacPro.MacPro41_Upgrade,
|
||||
ModelExample.MacPro.MacPro41_Modern_AMD,
|
||||
ModelExample.MacPro.MacPro41_51__Flashed_Modern_AMD,
|
||||
]
|
||||
self.constants.validate = True
|
||||
|
||||
for model in ModelArray.SupportedSMBIOS:
|
||||
print(f"Validating predefined model: {model}")
|
||||
self.constants.custom_model = model
|
||||
self.build_opencore()
|
||||
result = subprocess.run([self.constants.ocvalidate_path, f"{self.constants.opencore_release_folder}/EFI/OC/config.plist"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
if result.returncode != 0:
|
||||
print("Error on build!")
|
||||
print(result.stdout.decode())
|
||||
raise Exception(f"Validation failed for predefined model: {model}")
|
||||
else:
|
||||
print(f"Validation succeeded for predefined model: {model}")
|
||||
|
||||
for model in valid_dumps:
|
||||
self.constants.computer = model
|
||||
self.computer = self.constants.computer
|
||||
self.constants.custom_model = ""
|
||||
print(f"Validating dumped model: {self.computer.real_model}")
|
||||
self.build_opencore()
|
||||
result = subprocess.run([self.constants.ocvalidate_path, f"{self.constants.opencore_release_folder}/EFI/OC/config.plist"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
if result.returncode != 0:
|
||||
print("Error on build!")
|
||||
print(result.stdout.decode())
|
||||
raise Exception(f"Validation failed for predefined model: {self.computer.real_model}")
|
||||
else:
|
||||
print(f"Validation succeeded for predefined model: {self.computer.real_model}")
|
||||
|
||||
|
||||
OpenCoreLegacyPatcher()
|
||||
|
||||
|
||||
@@ -6,8 +6,9 @@ block_cipher = None
|
||||
|
||||
|
||||
a = Analysis(['OCLP-CLI.command'],
|
||||
pathex=['Resources'],
|
||||
binaries=[],
|
||||
datas=[('payloads', 'payloads'), ('Resources', 'Resources')],
|
||||
datas=[('payloads', 'payloads')],
|
||||
hiddenimports=[],
|
||||
hookspath=[],
|
||||
runtime_hooks=[],
|
||||
|
||||
@@ -17,8 +17,60 @@ class OpenCoreLegacyPatcher:
|
||||
self.constants.computer = device_probe.Computer.probe()
|
||||
self.computer = self.constants.computer
|
||||
self.constants.detected_os = int(platform.uname().release.partition(".")[0])
|
||||
self.constants.detected_os_minor = int(platform.uname().release.partition(".")[2].partition(".")[0])
|
||||
detected_os_build: str = subprocess.run("sw_vers -buildVersion".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.decode()
|
||||
self.constants.detected_os_build = detected_os_build
|
||||
self.set_defaults(self.computer.real_model, True)
|
||||
|
||||
def set_defaults(self, model, host_is_target):
|
||||
# Defaults
|
||||
self.constants.sip_status = True
|
||||
self.constants.secure_status = False # Default false for Monterey
|
||||
self.constants.amfi_status = True
|
||||
|
||||
if host_is_target:
|
||||
if Utilities.check_metal_support(device_probe, self.computer) is False:
|
||||
self.constants.disable_cs_lv = True
|
||||
if self.computer.dgpu and self.computer.dgpu.arch == device_probe.NVIDIA.Archs.Kepler:
|
||||
self.constants.sip_status = False
|
||||
self.constants.amfi_status = True
|
||||
self.constants.allow_fv_root = True # Allow FileVault on broken seal
|
||||
if (
|
||||
isinstance(self.computer.wifi, device_probe.Broadcom)
|
||||
and self.computer.wifi.chipset in [device_probe.Broadcom.Chipsets.AirPortBrcm4331, device_probe.Broadcom.Chipsets.AirPortBrcm43224]
|
||||
) or (isinstance(self.computer.wifi, device_probe.Atheros) and self.computer.wifi.chipset == device_probe.Atheros.Chipsets.AirPortAtheros40):
|
||||
self.constants.sip_status = False
|
||||
self.constants.allow_fv_root = True # Allow FileVault on broken seal
|
||||
elif model in ModelArray.LegacyGPU:
|
||||
self.constants.disable_cs_lv = True
|
||||
|
||||
if model in ModelArray.LegacyGPU:
|
||||
if host_is_target and Utilities.check_metal_support(device_probe, self.computer) is True:
|
||||
# Building on device and we have a native, supported GPU
|
||||
if self.computer.dgpu and self.computer.dgpu.arch == device_probe.NVIDIA.Archs.Kepler:
|
||||
self.constants.sip_status = False
|
||||
# self.constants.secure_status = True # Monterey
|
||||
self.constants.allow_fv_root = True # Allow FileVault on broken seal
|
||||
else:
|
||||
self.constants.sip_status = True
|
||||
# self.constants.secure_status = True # Monterey
|
||||
self.constants.amfi_status = True
|
||||
else:
|
||||
self.constants.sip_status = False # Unsigned kexts
|
||||
self.constants.secure_status = False # Root volume modified
|
||||
self.constants.amfi_status = False # Unsigned binaries
|
||||
self.constants.allow_fv_root = True # Allow FileVault on broken seal
|
||||
if model in ModelArray.ModernGPU:
|
||||
self.constants.sip_status = False # Unsigned kexts
|
||||
self.constants.secure_status = False # Modified root volume
|
||||
self.constants.allow_fv_root = True # Allow FileVault on broken seal
|
||||
# self.constants.amfi_status = True # Signed bundles, Don't need to explicitly set currently
|
||||
|
||||
|
||||
if model == "MacBook8,1":
|
||||
# MacBook8,1 has an odd bug where it cannot install Monterey with Minimal spoofing
|
||||
self.constants.serial_settings = "Moderate"
|
||||
|
||||
custom_cpu_model_value = Utilities.get_nvram("revcpuname", "4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102", decode=True)
|
||||
if custom_cpu_model_value is not None:
|
||||
# TODO: Fix to not use two separate variables
|
||||
@@ -28,50 +80,21 @@ class OpenCoreLegacyPatcher:
|
||||
if "-v" in (Utilities.get_nvram("boot-args") or ""):
|
||||
self.constants.verbose_debug = True
|
||||
|
||||
if Utilities.amfi_status() is False:
|
||||
self.constants.amfi_status = False
|
||||
|
||||
if Utilities.get_nvram("gpu-power-prefs", "FA4CE28D-B62F-4C99-9CC3-6815686E30F9", decode=True):
|
||||
self.constants.allow_ts2_accel = False
|
||||
|
||||
if self.constants.latebloom_delay == 0:
|
||||
self.constants.latebloom_delay, self.constants.latebloom_range, self.constants.latebloom_debug = Utilities.latebloom_detection(model)
|
||||
|
||||
if Utilities.get_nvram("gpu-power-prefs", "FA4CE28D-B62F-4C99-9CC3-6815686E30F9", decode=True):
|
||||
self.constants.allow_ts2_accel = False
|
||||
|
||||
# Check if running in RecoveryOS
|
||||
self.constants.recovery_status = Utilities.check_recovery()
|
||||
|
||||
def set_defaults(self, model, host_is_target):
|
||||
# Defaults
|
||||
self.constants.sip_status = True
|
||||
self.constants.secure_status = False # Default false for Monterey
|
||||
self.constants.disable_amfi = False
|
||||
|
||||
if model in ModelArray.LegacyGPU:
|
||||
if (
|
||||
host_is_target
|
||||
and self.computer.dgpu
|
||||
and self.computer.dgpu.arch
|
||||
in [
|
||||
device_probe.AMD.Archs.Legacy_GCN,
|
||||
device_probe.AMD.Archs.Polaris,
|
||||
device_probe.AMD.Archs.Vega,
|
||||
device_probe.AMD.Archs.Navi,
|
||||
device_probe.NVIDIA.Archs.Kepler,
|
||||
]
|
||||
):
|
||||
# Building on device and we have a native, supported GPU
|
||||
self.constants.sip_status = True
|
||||
# self.constants.secure_status = True # Monterey
|
||||
self.constants.disable_amfi = False
|
||||
else:
|
||||
self.constants.sip_status = False # Unsigned kexts
|
||||
self.constants.secure_status = False # Root volume modified
|
||||
self.constants.disable_amfi = True # Unsigned binaries
|
||||
if model in ModelArray.ModernGPU:
|
||||
if host_is_target and model in ["iMac13,1", "iMac13,3"] and self.computer.dgpu:
|
||||
# Some models have a supported dGPU, others don't
|
||||
self.constants.sip_status = True
|
||||
# self.constants.secure_status = True # Monterey
|
||||
# self.constants.disable_amfi = False # Signed bundles, Don't need to explicitly set currently
|
||||
else:
|
||||
self.constants.sip_status = False # Unsigned kexts
|
||||
self.constants.secure_status = False # Modified root volume
|
||||
# self.constants.disable_amfi = False # Signed bundles, Don't need to explicitly set currently
|
||||
if model == "MacBook8,1":
|
||||
# MacBook8,1 has an odd bug where it cannot install Monterey with Minimal spoofing
|
||||
self.constants.serial_settings == "Moderate"
|
||||
|
||||
def build_opencore(self):
|
||||
Build.BuildOpenCore(self.constants.custom_model or self.constants.computer.real_model, self.constants).build_opencore()
|
||||
|
||||
@@ -108,27 +131,124 @@ system_profiler SPHardwareDataType | grep 'Model Identifier'
|
||||
title = ["Adjust Patcher Settings"]
|
||||
menu = Utilities.TUIMenu(title, "Please select an option: ", auto_number=True, top_level=True)
|
||||
options = [
|
||||
[f"Enable Verbose Mode:\t\tCurrently {self.constants.verbose_debug}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).change_verbose],
|
||||
[f"Enable OpenCore DEBUG:\t\tCurrently {self.constants.opencore_debug}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).change_oc],
|
||||
[f"Enable Kext DEBUG:\t\t\tCurrently {self.constants.kext_debug}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).change_kext],
|
||||
[f"Set ShowPicker Mode:\t\tCurrently {self.constants.showpicker}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).change_showpicker],
|
||||
[f"Set Vault Mode:\t\t\tCurrently {self.constants.vault}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).change_vault],
|
||||
[f"Allow FireWire Boot:\t\tCurrently {self.constants.firewire_boot}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).allow_firewire],
|
||||
[f"Allow NVMe Boot:\t\t\tCurrently {self.constants.nvme_boot}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).allow_nvme],
|
||||
["Debug Settings", self.patcher_setting_debug],
|
||||
["Security Settings", self.patcher_settings_security],
|
||||
["SMBIOS Settings", self.patcher_settings_smbios],
|
||||
["Boot Volume Settings", self.patcher_settings_boot],
|
||||
["Miscellaneous Settings", self.patcher_settings_misc],
|
||||
["Dump detected hardware", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).dump_hardware],
|
||||
[
|
||||
f"Enable TeraScale 2 Acceleration:\tCurrently {self.constants.terascale_2_patch}",
|
||||
CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).enable_terascale,
|
||||
],
|
||||
[f"Disable AMFI:\t\t\tCurrently {self.constants.disable_amfi}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).set_amfi],
|
||||
[
|
||||
f"Set SIP and SecureBootModel:\tSIP: {self.constants.sip_status} SBM: {self.constants.secure_status}",
|
||||
CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).change_sip,
|
||||
f"Allow Accel on Mojave/Catalina:\tCurrently {self.constants.moj_cat_accel}",
|
||||
CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).allow_moj_cat_patch,
|
||||
],
|
||||
[
|
||||
f"Allow OpenCore on native Models:\tCurrently {self.constants.allow_oc_everywhere}",
|
||||
CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).allow_native_models,
|
||||
],
|
||||
["Advanced Patch Settings, for developers only", self.advanced_patcher_settings],
|
||||
["Advanced Settings, for developers only", self.advanced_patcher_settings],
|
||||
]
|
||||
|
||||
for option in options:
|
||||
menu.add_menu_option(option[0], function=option[1])
|
||||
|
||||
response = menu.start()
|
||||
|
||||
def patcher_setting_debug(self):
|
||||
response = None
|
||||
while not (response and response == -1):
|
||||
title = ["Adjust Debug Settings"]
|
||||
menu = Utilities.TUIMenu(title, "Please select an option: ", auto_number=True, top_level=True)
|
||||
options = [
|
||||
[f"Enable Verbose Mode:\tCurrently {self.constants.verbose_debug}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).change_verbose],
|
||||
[f"Enable OpenCore DEBUG:\tCurrently {self.constants.opencore_debug}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).change_oc],
|
||||
[f"Enable Kext DEBUG:\t\tCurrently {self.constants.kext_debug}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).change_kext],
|
||||
] + (
|
||||
[
|
||||
[
|
||||
f"Set Latebloom args:\t\tDelay {self.constants.latebloom_delay}, Range {self.constants.latebloom_range}, Debug {self.constants.latebloom_debug}",
|
||||
CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).latebloom_settings,
|
||||
]
|
||||
]
|
||||
if ((self.constants.custom_model or self.computer.real_model) in ModelArray.PCIRaceCondition)
|
||||
else []
|
||||
)
|
||||
|
||||
for option in options:
|
||||
menu.add_menu_option(option[0], function=option[1])
|
||||
|
||||
response = menu.start()
|
||||
|
||||
def patcher_settings_security(self):
|
||||
response = None
|
||||
while not (response and response == -1):
|
||||
title = ["Adjust Security Settings"]
|
||||
menu = Utilities.TUIMenu(title, "Please select an option: ", auto_number=True, top_level=True)
|
||||
options = [
|
||||
# [
|
||||
# f"Set Apple Mobile File Integrity (AMFI):\tCurrently {self.constants.amfi_status}",
|
||||
# CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).set_amfi,
|
||||
# ],
|
||||
[
|
||||
f"Set System Intrgity Protection (SIP):\tCurrently {self.constants.sip_status}",
|
||||
CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).change_sip,
|
||||
],
|
||||
[
|
||||
f"Set Secure Boot Model (SBM):\t\tCurrently {self.constants.secure_status}",
|
||||
CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).change_sbm,
|
||||
],
|
||||
[f"Set Vault Mode:\t\t\t\tCurrently {self.constants.vault}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).change_vault],
|
||||
]
|
||||
|
||||
for option in options:
|
||||
menu.add_menu_option(option[0], function=option[1])
|
||||
|
||||
response = menu.start()
|
||||
|
||||
def patcher_settings_smbios(self):
|
||||
response = None
|
||||
while not (response and response == -1):
|
||||
title = ["Adjust SMBIOS Settings"]
|
||||
menu = Utilities.TUIMenu(title, "Please select an option: ", auto_number=True, top_level=True)
|
||||
options = [
|
||||
[f"Set SMBIOS Spoof Level:\tCurrently {self.constants.serial_settings}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).change_serial],
|
||||
[f"Set SMBIOS Spoof Model:\tCurrently {self.constants.override_smbios}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).set_smbios],
|
||||
[f"Set Custom name {self.constants.custom_cpu_model_value}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).custom_cpu],
|
||||
]
|
||||
|
||||
for option in options:
|
||||
menu.add_menu_option(option[0], function=option[1])
|
||||
|
||||
response = menu.start()
|
||||
|
||||
def patcher_settings_boot(self):
|
||||
response = None
|
||||
while not (response and response == -1):
|
||||
title = ["Adjust Bootable Volume Settings"]
|
||||
menu = Utilities.TUIMenu(title, "Please select an option: ", auto_number=True, top_level=True)
|
||||
options = [
|
||||
[f"Set FireWire Boot:\tCurrently {self.constants.firewire_boot}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).allow_firewire],
|
||||
[f"Set NVMe Boot:\tCurrently {self.constants.nvme_boot}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).allow_nvme],
|
||||
]
|
||||
|
||||
for option in options:
|
||||
menu.add_menu_option(option[0], function=option[1])
|
||||
|
||||
response = menu.start()
|
||||
|
||||
def patcher_settings_misc(self):
|
||||
response = None
|
||||
while not (response and response == -1):
|
||||
title = ["Adjust Miscellaneous Settings"]
|
||||
menu = Utilities.TUIMenu(title, "Please select an option: ", auto_number=True, top_level=True)
|
||||
options = [
|
||||
[f"Set ShowPicker Mode:\tCurrently {self.constants.showpicker}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).change_showpicker],
|
||||
[f"Set Wake on WLAN:\t\tCurrently {self.constants.enable_wake_on_wlan}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).allow_wowl],
|
||||
[f"Set Ivy iMac iGPU:\t\tCurrently {self.constants.allow_ivy_igpu}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).allow_ivy],
|
||||
[f"Set TeraScale 2 Accel:\tCurrently {self.constants.allow_ts2_accel}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).terascale_2_accel],
|
||||
[
|
||||
f"Disable Thunderbolt:\tCurrently {self.constants.disable_thunderbolt}",
|
||||
CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).disable_thunderbolt,
|
||||
],
|
||||
]
|
||||
|
||||
for option in options:
|
||||
@@ -142,17 +262,13 @@ system_profiler SPHardwareDataType | grep 'Model Identifier'
|
||||
title = ["Adjust Advanced Patcher Settings, for developers ONLY"]
|
||||
menu = Utilities.TUIMenu(title, "Please select an option: ", auto_number=True, top_level=True)
|
||||
options = [
|
||||
[f"Assume Metal GPU Always:\t\tCurrently {self.constants.imac_vendor}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).change_metal],
|
||||
[f"Set SMBIOS Mode:\t\t\tCurrently {self.constants.serial_settings}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).change_serial],
|
||||
[f"DRM Preferences:\t\t\tCurrently {self.constants.drm_support}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).drm_setting],
|
||||
[f"Set Metal GPU Status:\t\tCurrently {self.constants.imac_vendor}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).change_metal],
|
||||
[f"Set DRM Preferences:\t\tCurrently {self.constants.drm_support}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).drm_setting],
|
||||
[f"Set Generic Bootstrap:\t\tCurrently {self.constants.boot_efi}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).bootstrap_setting],
|
||||
[
|
||||
f"Disable CPU Friend:\t\t\tCurrently {self.constants.disallow_cpufriend}",
|
||||
CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).disable_cpufriend,
|
||||
],
|
||||
[f"Override SMBIOS Spoof:\t\tCurrently {self.constants.override_smbios}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).set_smbios],
|
||||
[f"Set Custom name {self.constants.custom_cpu_model_value}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).custom_cpu],
|
||||
["Set SeedUtil Status", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).set_seedutil],
|
||||
]
|
||||
|
||||
for option in options:
|
||||
@@ -182,16 +298,15 @@ system_profiler SPHardwareDataType | grep 'Model Identifier'
|
||||
Utilities.header(["Patching System Volume"])
|
||||
big_sur = """Patches Root volume to fix misc issues such as:
|
||||
|
||||
- Graphics Acceleration for non-Metal GPUs
|
||||
- Nvidia: Tesla - Fermi (8000-500 series)
|
||||
- Non-Metal Graphics Acceleration
|
||||
- Intel: Ironlake - Sandy Bridge
|
||||
- Nvidia: Tesla - Fermi (8000-500 series)
|
||||
- AMD: TeraScale 1 and 2 (2000-6000 series)
|
||||
- Audio support for iMac7,1 and iMac8,1
|
||||
|
||||
WARNING: Root Volume Patching is still in active development, please
|
||||
have all important user data backed up. Note when the system volume
|
||||
is patched, you can no longer have Delta updates or have FileVault
|
||||
enabled.
|
||||
is patched, you can no longer have Delta updates.
|
||||
|
||||
Supported Options:
|
||||
|
||||
@@ -201,18 +316,19 @@ B. Exit
|
||||
"""
|
||||
monterey = """Patches Root volume to fix misc issues such as:
|
||||
|
||||
- Graphics Acceleration
|
||||
- Metal Graphics Acceleration
|
||||
- Intel: Ivy Bridge (4000 series iGPUs)
|
||||
- Basic Framebuffer and brightness Control (No acceleration)
|
||||
- Nvidia: Tesla - Fermi (8000-500 series)
|
||||
- Nvidia: Kepler (600-700)
|
||||
- Non-Metal Graphics Accelertation
|
||||
- Intel: Ironlake - Sandy Bridge
|
||||
- Nvidia: Tesla - Fermi (8000-500 series)
|
||||
- AMD: TeraScale 1 and 2 (2000-6000 series)
|
||||
- Audio support for iMac7,1 and iMac8,1
|
||||
- Wifi support for BCM94328, BCM94322 and Atheros cards
|
||||
|
||||
WARNING: Root Volume Patching is still in active development, please
|
||||
have all important user data backed up. Note when the system volume
|
||||
is patched, you can no longer have Delta updates or have FileVault
|
||||
enabled.
|
||||
is patched, you can no longer have Delta updates.
|
||||
|
||||
Supported Options:
|
||||
|
||||
@@ -220,6 +336,24 @@ Supported Options:
|
||||
2. Unpatch System Volume (Experimental)
|
||||
B. Exit
|
||||
"""
|
||||
mojave_catalina = """Patches Root volume to fix misc issues such as:
|
||||
|
||||
- Non-Metal Graphics Acceleration
|
||||
- Intel: Ironlake - Sandy Bridge
|
||||
- Nvidia: Tesla - Fermi (8000-500 series)
|
||||
- AMD: TeraScale 1 and 2 (2000-6000 series)
|
||||
- Audio support for iMac7,1 and iMac8,1
|
||||
|
||||
WARNING: Root Volume Patching is still in active development, please
|
||||
have all important user data backed up. Note when the system volume
|
||||
is patched, you can no longer have Delta updates.
|
||||
|
||||
Supported Options:
|
||||
|
||||
1. Patch System Volume
|
||||
2. Unpatch System Volume (Experimental)
|
||||
B. Exit
|
||||
"""
|
||||
|
||||
default = """
|
||||
This OS has no root patches available to apply, please ensure you're patching a booted
|
||||
@@ -234,6 +368,8 @@ B. Exit
|
||||
print(monterey)
|
||||
elif self.constants.detected_os == self.constants.big_sur:
|
||||
print(big_sur)
|
||||
elif self.constants.detected_os in [self.constants.mojave, self.constants.catalina] and self.constants.moj_cat_accel == True:
|
||||
print(mojave_catalina)
|
||||
else:
|
||||
print(default)
|
||||
no_patch = True
|
||||
@@ -257,7 +393,9 @@ B. Exit
|
||||
in_between = [
|
||||
"Your model is not supported by this patcher for running unsupported OSes!",
|
||||
"",
|
||||
'If you plan to create the USB for another machine, please select the "Change Model" option in the menu.',
|
||||
'If you plan to create the USB for another machine, please select the \n"Change Model" option in the menu.',
|
||||
"",
|
||||
'If you want to run OCLP on a native Mac, please toggle \n"Allow OpenCore on native Models" in settings',
|
||||
]
|
||||
elif not self.constants.custom_model and self.computer.real_model == "iMac7,1" and "SSE4.1" not in self.computer.cpu.flags:
|
||||
in_between = [
|
||||
|
||||
@@ -6,8 +6,9 @@ block_cipher = None
|
||||
|
||||
|
||||
a = Analysis(['OpenCore-Patcher.command'],
|
||||
pathex=['Resources'],
|
||||
binaries=[],
|
||||
datas=[('payloads', 'payloads'), ('Resources', 'Resources')],
|
||||
datas=[('payloads', 'payloads')],
|
||||
hiddenimports=[],
|
||||
hookspath=[],
|
||||
runtime_hooks=[],
|
||||
|
||||
17
README.md
17
README.md
@@ -3,7 +3,7 @@
|
||||
<h1>OpenCore Legacy Patcher</h1>
|
||||
</div>
|
||||
|
||||
A python program for building and booting [OpenCore](https://github.com/acidanthera/OpenCorePkg) on both legacy and modern Macs, see our in-depth [Guide](https://dortania.github.io/OpenCore-Legacy-Patcher/) for more information.
|
||||
A python program with an [Objective-C GUI](https://github.com/dortania/OCLP-GUI) for building and booting [OpenCore](https://github.com/acidanthera/OpenCorePkg) on both legacy and modern Macs, see our in-depth [Guide](https://dortania.github.io/OpenCore-Legacy-Patcher/) for more information.
|
||||
|
||||
Supported features:
|
||||
|
||||
@@ -20,7 +20,8 @@ Note: Only clean-installs and upgrades are supported, macOS Big Sur installs alr
|
||||
|
||||
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.
|
||||
|
||||
* For Mojave and Catalina support, we recommend the use of [dosdude1's patchers](http://dosdude1.com)
|
||||
* For macOS Mojave and Catalina support, we recommend the use of [dosdude1's patchers](http://dosdude1.com)
|
||||
* macOS Monterey usage is provided however support is limited, currently recommended for users to run Big Sur for best compatibility
|
||||
|
||||
## Support
|
||||
|
||||
@@ -28,7 +29,12 @@ To get aid with the patcher, we recommend joining the [OpenCore Patcher Paradise
|
||||
|
||||
* [OpenCore Legacy Patcher's Issue's tab](https://github.com/dortania/OpenCore-Legacy-Patcher/issues)
|
||||
|
||||
Nightly builds can be found here courteous of nightly.link: [Nightly OpenCore-Patcher.app](https://nightly.link/dortania/OpenCore-Legacy-Patcher/workflows/build-app/main/OpenCore-Patcher.app.zip)
|
||||
Nightly builds can be found here courteous of nightly.link:
|
||||
|
||||
* [Nightly OpenCore Patcher (GUI)](https://nightly.link/dortania/OpenCore-Legacy-Patcher/workflows/build-gui/main/OpenCore-Patcher-GUI.app.zip)
|
||||
* [Nightly OpenCore Patcher (TUI)](https://nightly.link/dortania/OpenCore-Legacy-Patcher/workflows/build-app/main/OpenCore-Patcher-TUI.app.zip)
|
||||
* [Offline Variant](https://nightly.link/dortania/OpenCore-Legacy-Patcher/workflows/build-app-offline/main/OpenCore-Patcher-TUI-Offline.app.zip) (No network connection needed on target Mac for Root Patching)
|
||||
* [Nightly OpenCore Patcher (CLI)](https://nightly.link/dortania/OpenCore-Legacy-Patcher/workflows/build-gui/main/OCLP-CLI.zip)
|
||||
|
||||
## Credits
|
||||
|
||||
@@ -50,7 +56,10 @@ Nightly builds can be found here courteous of nightly.link: [Nightly OpenCore-Pa
|
||||
* [Innie](https://github.com/cdf/Innie) and [NightShiftEnabler](https://github.com/cdf/NightShiftEnabler)
|
||||
* [Syncretic](https://forums.macrumors.com/members/syncretic.1173816/)
|
||||
* [AAAMouSSE](https://forums.macrumors.com/threads/mp3-1-others-sse-4-2-emulation-to-enable-amd-metal-driver.2206682/) and [telemetrap](https://forums.macrumors.com/threads/mp3-1-others-sse-4-2-emulation-to-enable-amd-metal-driver.2206682/post-28447707)
|
||||
* [dosdude1](https://github.com/dosdude1) and [BarryKN](https://github.com/BarryKN)
|
||||
* [dosdude1](https://github.com/dosdude1)
|
||||
* Main author of GUI
|
||||
* Development of previous patchers, laying out much of what needs to be patched
|
||||
* [BarryKN](https://github.com/BarryKN)
|
||||
* Development of previous patchers, laying out much of what needs to be patched
|
||||
* [mario_bros_tech](https://github.com/mariobrostech) and the rest of the Unsupported Mac Discord
|
||||
* Catalyst that started OpenCore Legacy Patcher
|
||||
|
||||
@@ -14,15 +14,7 @@ import ast
|
||||
from pathlib import Path
|
||||
from datetime import date
|
||||
|
||||
from Resources import Constants, ModelArray, Utilities, device_probe
|
||||
|
||||
|
||||
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")
|
||||
from Resources import Constants, ModelArray, Utilities, device_probe, SMBIOSData
|
||||
|
||||
|
||||
def rmtree_handler(func, path, exc_info):
|
||||
@@ -40,63 +32,75 @@ class BuildOpenCore:
|
||||
|
||||
self.gfx0_path = None
|
||||
|
||||
def smbios_set(self):
|
||||
def smbios_set(self, model):
|
||||
print("- Setting macOS Monterey Supported SMBIOS")
|
||||
if self.model in ModelArray.MacBookAir61:
|
||||
print("- Spoofing to MacBookAir7,1")
|
||||
if model in ModelArray.MacBookAir_11:
|
||||
return "MacBookAir7,1"
|
||||
elif self.model in ModelArray.MacBookAir62:
|
||||
print("- Spoofing to MacBookAir7,2")
|
||||
elif model in ModelArray.MacBookAir_13:
|
||||
return "MacBookAir7,2"
|
||||
elif self.model in ModelArray.MacBook81:
|
||||
print("- Spoofing to MacBook9,1")
|
||||
elif model in ModelArray.MacBook_12:
|
||||
return "MacBook9,1"
|
||||
elif self.model in ModelArray.MacBookPro111:
|
||||
print("- Spoofing to MacBookPro12,1")
|
||||
elif model in ModelArray.MacBookPro_13:
|
||||
return "MacBookPro12,1"
|
||||
elif self.model in ModelArray.MacBookPro112:
|
||||
print("- Spoofing to MacBookPro11,4")
|
||||
elif model in ModelArray.MacBookPro_15_iGPU:
|
||||
return "MacBookPro11,4"
|
||||
elif self.model in ModelArray.MacBookPro113:
|
||||
print("- Spoofing to MacBookPro11,5")
|
||||
elif model in ModelArray.MacBookPro_15_dGPU:
|
||||
return "MacBookPro11,5"
|
||||
elif self.model in ModelArray.Macmini71:
|
||||
print("- Spoofing to Macmini7,1")
|
||||
elif model in ModelArray.Macmini:
|
||||
return "Macmini7,1"
|
||||
elif self.model in ModelArray.iMacPro11:
|
||||
print("- Spoofing to iMacPro1,1")
|
||||
elif model in ModelArray.iMac_iGPUless:
|
||||
return "iMacPro1,1"
|
||||
elif self.model in ModelArray.iMac151:
|
||||
elif model in ModelArray.iMac_dGPU:
|
||||
# Check for upgraded GPUs on iMacs
|
||||
if self.constants.drm_support is True:
|
||||
print("- Spoofing to iMacPro1,1")
|
||||
return "iMacPro1,1"
|
||||
else:
|
||||
print("- Spoofing to iMac17,1")
|
||||
return "iMac17,1"
|
||||
elif self.model in ModelArray.iMac144:
|
||||
print("- Spoofing to iMac16,1")
|
||||
elif model in ModelArray.iMac_iGPU:
|
||||
return "iMac16,1"
|
||||
elif self.model in ModelArray.MacPro71:
|
||||
print("- Spoofing to MacPro7,1")
|
||||
return "MacPro7,1"
|
||||
elif model in ModelArray.MacPro:
|
||||
return "iMacPro1,1"
|
||||
else:
|
||||
return self.model
|
||||
return model
|
||||
|
||||
def fw_feature_detect(self, model):
|
||||
# Values based off OpenCorePkg's Firmwarefeatures and FirmwarefeaturesMask
|
||||
# Additionally, APFS bit(19) flipped
|
||||
# https://github.com/acidanthera/OpenCorePkg/blob/0.6.9/Include/Apple/IndustryStandard/AppleFeatures.h#L136
|
||||
if model == "iMac7,1":
|
||||
fw_feature = b"\x07\x14\x08\xc0\x00\x00\x00\x00"
|
||||
fw_mask = b"\xff\x1f\x08\xc0\x00\x00\x00\x00"
|
||||
elif model in ["MacPro4,1", "Xserve3,1"]:
|
||||
fw_feature = b"7\xf5\t\xe0\x00\x00\x00\x00"
|
||||
fw_mask = b"7\xff\x0b\xc0\x00\x00\x00\x00"
|
||||
def patch_firmware_feature(self):
|
||||
# Adjust FirmwareFeature to support everything macOS requires
|
||||
# APFS Bit (19/20): 10.13+ (OSInstall)
|
||||
# Large BaseSystem Bit (35): 12.0 B7+ (patchd)
|
||||
# https://github.com/acidanthera/OpenCorePkg/tree/2f76673546ac3e32d2e2d528095fddcd66ad6a23/Include/Apple/IndustryStandard/AppleFeatures.h
|
||||
if not self.constants.custom_model:
|
||||
firmwarefeature = Utilities.get_rom("firmware-features")
|
||||
if not firmwarefeature:
|
||||
print("- Failed to find FirmwareFeatures, falling back on defaults")
|
||||
firmwarefeature = int(SMBIOSData.FirmwareFeatures[self.model], 16)
|
||||
else:
|
||||
fw_feature = b"\x03\x14\x08\xc0\x00\x00\x00\x00"
|
||||
fw_mask = b"\xff\x3f\x08\xc0\x00\x00\x00\x00"
|
||||
return fw_feature, fw_mask
|
||||
firmwarefeature = int(SMBIOSData.FirmwareFeatures[self.model], 16)
|
||||
firmwarefeature = Utilities.enable_apfs(firmwarefeature)
|
||||
firmwarefeature = Utilities.enable_apfs_extended(firmwarefeature)
|
||||
firmwarefeature = Utilities.enable_large_basesystem(firmwarefeature)
|
||||
return firmwarefeature
|
||||
|
||||
def disk_type(self):
|
||||
drive_host_info = plistlib.loads(subprocess.run(f"diskutil info -plist {self.constants.disk}".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
|
||||
# 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, self.constants.opencore_release_folder)
|
||||
elif ssd_type is True:
|
||||
print("- Adding SSD icon")
|
||||
shutil.copy(self.constants.icon_path_ssd, self.constants.opencore_release_folder)
|
||||
elif drive_host_info["BusProtocol"] == "USB":
|
||||
print("- Adding External USB Drive icon")
|
||||
shutil.copy(self.constants.icon_path_external, self.constants.opencore_release_folder)
|
||||
else:
|
||||
print("- Adding Internal Drive icon")
|
||||
shutil.copy(self.constants.icon_path_internal, self.constants.opencore_release_folder)
|
||||
|
||||
def build_efi(self):
|
||||
Utilities.cls()
|
||||
@@ -117,8 +121,7 @@ class BuildOpenCore:
|
||||
print("Deleting old copy of OpenCore folder")
|
||||
shutil.rmtree(self.constants.opencore_release_folder, onerror=rmtree_handler, ignore_errors=True)
|
||||
|
||||
print()
|
||||
print(f"- Adding OpenCore v{self.constants.opencore_version} {self.constants.opencore_build}")
|
||||
print(f"\n- 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)
|
||||
|
||||
@@ -144,14 +147,9 @@ class BuildOpenCore:
|
||||
# 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: self.constants.allow_oc_everywhere is False),
|
||||
("RestrictEvents.kext", self.constants.restrictevents_version, self.constants.restrictevents_path, lambda: self.model in ModelArray.MacPro71),
|
||||
("RestrictEvents.kext", self.constants.restrictevents_version, self.constants.restrictevents_path, lambda: self.model in ModelArray.MacPro),
|
||||
# Modded RestrictEvents with displaypolicyd blocked to fix dGPU switching
|
||||
("RestrictEvents.kext", self.constants.restrictevents_mbp_version, self.constants.restrictevents_mbp_path, lambda: self.model in ["MacBookPro6,1", "MacBookPro6,2", "MacBookPro9,1"]),
|
||||
(
|
||||
"NightShiftEnabler.kext",
|
||||
self.constants.nightshift_version,
|
||||
self.constants.nightshift_path,
|
||||
lambda: self.model in ModelArray.NightShift and self.constants.allow_oc_everywhere is False and self.constants.serial_settings == "Minimal",
|
||||
),
|
||||
("SMC-Spoof.kext", self.constants.smcspoof_version, self.constants.smcspoof_path, lambda: self.constants.allow_oc_everywhere is False),
|
||||
# CPU patches
|
||||
("AppleMCEReporterDisabler.kext", self.constants.mce_version, self.constants.mce_path, lambda: self.model in ModelArray.DualSocket),
|
||||
@@ -161,26 +159,34 @@ class BuildOpenCore:
|
||||
"CPUFriend.kext",
|
||||
self.constants.cpufriend_version,
|
||||
self.constants.cpufriend_path,
|
||||
lambda: self.model not in ["iMac7,1", "Xserve2,1"] and self.constants.allow_oc_everywhere is False and self.constants.disallow_cpufriend is False,
|
||||
lambda: self.model not in ["iMac7,1", "Xserve2,1", "Dortania1,1"] and self.constants.allow_oc_everywhere is False and self.constants.disallow_cpufriend is False,
|
||||
),
|
||||
# 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),
|
||||
("AppleALC.kext", self.constants.applealc_version, self.constants.applealc_path, lambda: self.model in ModelArray.LegacyAudio or self.model in ModelArray.MacPro),
|
||||
# IDE patch
|
||||
("AppleIntelPIIXATA.kext", self.constants.piixata_version, self.constants.piixata_path, lambda: self.model in ModelArray.IDEPatch),
|
||||
# Misc
|
||||
("SidecarFixup.kext", self.constants.sidecarfixup_version, self.constants.sidecarfixup_path, lambda: self.model in ModelArray.SidecarPatch),
|
||||
("FeatureUnlock.kext", self.constants.featureunlock_version, self.constants.featureunlock_path, lambda: self.model in ModelArray.FeatureUnlockSupport),
|
||||
("DebugEnhancer.kext", self.constants.debugenhancer_version, self.constants.debugenhancer_path, lambda: self.constants.kext_debug is True),
|
||||
("latebloom.kext", self.constants.latebloom_version, self.constants.latebloom_path, lambda: self.model in ModelArray.PCIRaceCondition),
|
||||
("AppleUSBTrackpad.kext", self.constants.apple_trackpad, self.constants.apple_trackpad_path, lambda: self.model in ["MacBook4,1", "MacBook5,2"]),
|
||||
]:
|
||||
self.enable_kext(name, version, path, check)
|
||||
|
||||
if self.constants.allow_oc_everywhere is False:
|
||||
self.get_item_by_kv(self.config["Kernel"]["Patch"], "Identifier", "com.apple.driver.AppleSMC")["Enabled"] = True
|
||||
|
||||
if not self.constants.custom_model and (self.constants.allow_oc_everywhere is True or self.model in ModelArray.MacPro71):
|
||||
if self.get_kext_by_bundle_path("latebloom.kext")["Enabled"] is True:
|
||||
print(f"- Setting latebloom delay of {self.constants.latebloom_delay}ms, range {self.constants.latebloom_range}ms, debug {bool(self.constants.latebloom_debug)}")
|
||||
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"][
|
||||
"boot-args"
|
||||
] += f" latebloom={self.constants.latebloom_delay} lb_range={self.constants.latebloom_range} lb_debug={self.constants.latebloom_debug}"
|
||||
|
||||
if not self.constants.custom_model and (self.constants.allow_oc_everywhere is True or self.model in ModelArray.MacPro):
|
||||
# Use Innie's same logic:
|
||||
# https://github.com/cdf/Innie/blob/v1.3.0/Innie/Innie.cpp#L90-L97
|
||||
for i, controller in enumerate(self.computer.storage):
|
||||
@@ -201,7 +207,7 @@ class BuildOpenCore:
|
||||
self.config["#Revision"][f"Hardware-NVMe-{i}"] = f"{Utilities.friendly_hex(controller.vendor_id)}:{Utilities.friendly_hex(controller.device_id)}"
|
||||
|
||||
# Disable Bit 0 (L0s), enable Bit 1 (L1)
|
||||
nvme_aspm = (controller.aspm & (~3)) | 2
|
||||
nvme_aspm = (controller.aspm & (~0b11)) | 0b10
|
||||
|
||||
if controller.pci_path:
|
||||
print(f"- Found NVMe ({i}) at {controller.pci_path}")
|
||||
@@ -220,7 +226,7 @@ class BuildOpenCore:
|
||||
|
||||
def wifi_fake_id(self):
|
||||
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
|
||||
self.get_kext_by_bundle_path("AirportBrcmFixup.kext/Contents/PlugIns/AirPortBrcmNIC_Injector.kext")["Enabled"] = True
|
||||
if not self.constants.custom_model and self.computer.wifi and self.computer.wifi.pci_path:
|
||||
arpt_path = self.computer.wifi.pci_path
|
||||
print(f"- Found ARPT device at {arpt_path}")
|
||||
@@ -239,8 +245,13 @@ class BuildOpenCore:
|
||||
# iMac11,x-12,x also apply
|
||||
arpt_path = "PciRoot(0x0)/Pci(0x1C,0x1)/Pci(0x0,0x0)"
|
||||
print(f"- Using known DevicePath {arpt_path}")
|
||||
print(f"- Applying fake ID for WiFi, setting Country Code: {self.computer.wifi.country_code}")
|
||||
self.config["DeviceProperties"]["Add"][arpt_path] = {"device-id": binascii.unhexlify("ba430000"), "compatible": "pci14e4,43ba", "brcmfx-country": self.computer.wifi.country_code}
|
||||
# self.config["DeviceProperties"]["Add"][arpt_path] = {"device-id": binascii.unhexlify("ba430000"), "compatible": "pci14e4,43ba"}
|
||||
if not self.constants.custom_model and self.computer.wifi and self.constants.validate is False and self.computer.wifi.country_code:
|
||||
print(f"- Applying fake ID for WiFi, setting Country Code: {self.computer.wifi.country_code}")
|
||||
self.config["DeviceProperties"]["Add"][arpt_path] = {"brcmfx-country": self.computer.wifi.country_code}
|
||||
if self.constants.enable_wake_on_wlan is True:
|
||||
print("- Enabling Wake on WLAN support")
|
||||
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += f" -brcmfxwowl"
|
||||
|
||||
# WiFi patches
|
||||
# TODO: -a is not supported in Lion and older, need to add proper fix
|
||||
@@ -251,53 +262,61 @@ class BuildOpenCore:
|
||||
else:
|
||||
print("- Unable to run Wireless hardware detection")
|
||||
|
||||
if self.constants.wifi_build is True:
|
||||
print("- Skipping Wifi patches on request")
|
||||
elif not self.constants.custom_model and self.computer.wifi:
|
||||
if not self.constants.custom_model and self.computer.wifi:
|
||||
if isinstance(self.computer.wifi, device_probe.Broadcom):
|
||||
# This works around OCLP spoofing the Wifi card and therefore unable to actually detect the correct device
|
||||
if self.computer.wifi.chipset == device_probe.Broadcom.Chipsets.AirportBrcmNIC:
|
||||
if self.computer.wifi.chipset == device_probe.Broadcom.Chipsets.AirportBrcmNIC and self.constants.validate is False and self.computer.wifi.country_code:
|
||||
self.enable_kext("AirportBrcmFixup.kext", self.constants.airportbcrmfixup_version, self.constants.airportbcrmfixup_path)
|
||||
print(f"- Setting Wireless Card's Country Code: {self.computer.wifi.country_code}")
|
||||
if not self.constants.custom_model and self.computer.wifi and self.computer.wifi.pci_path:
|
||||
if self.computer.wifi.pci_path:
|
||||
arpt_path = self.computer.wifi.pci_path
|
||||
print(f"- Found ARPT device at {arpt_path}")
|
||||
self.config["DeviceProperties"]["Add"][arpt_path] = {"brcmfx-country": self.computer.wifi.country_code}
|
||||
else:
|
||||
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += f" brcmfx-country={self.computer.wifi.country_code}"
|
||||
if self.constants.enable_wake_on_wlan is True:
|
||||
print("- Enabling Wake on WLAN support")
|
||||
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += f" -brcmfxwowl"
|
||||
elif self.computer.wifi.chipset == device_probe.Broadcom.Chipsets.AirPortBrcm4360:
|
||||
wifi_fake_id(self)
|
||||
elif self.computer.wifi.chipset == device_probe.Broadcom.Chipsets.AirPortBrcm4331:
|
||||
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
|
||||
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/AirPortBrcm4331.kext")["Enabled"] = True
|
||||
elif self.computer.wifi.chipset == device_probe.Broadcom.Chipsets.AirPortBrcm43224:
|
||||
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 isinstance(self.computer.wifi, device_probe.Atheros) and self.computer.wifi.chipset == device_probe.Atheros.Chipsets.AirPortAtheros40:
|
||||
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
|
||||
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/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
|
||||
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/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
|
||||
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/AirPortAtheros40.kext")["Enabled"] = True
|
||||
else:
|
||||
self.enable_kext("AirportBrcmFixup.kext", self.constants.airportbcrmfixup_version, self.constants.airportbcrmfixup_path)
|
||||
print(f"- Setting Wireless Card's Country Code: {self.computer.wifi.country_code}")
|
||||
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += f" brcmfx-country={self.computer.wifi.country_code}"
|
||||
# print(f"- Setting Wireless Card's Country Code: {self.computer.wifi.country_code}")
|
||||
# self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += f" brcmfx-country={self.computer.wifi.country_code}"
|
||||
if self.constants.enable_wake_on_wlan is True:
|
||||
print("- Enabling Wake on WLAN support")
|
||||
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += f" -brcmfxwowl"
|
||||
|
||||
# CPUFriend
|
||||
pp_map_path = Path(self.constants.platform_plugin_plist_path) / Path(f"{self.model}/Info.plist")
|
||||
if self.model not in ["iMac7,1", "Xserve2,1"] and self.constants.allow_oc_everywhere is False:
|
||||
if self.model not in ["iMac7,1", "Xserve2,1", "Dortania1,1"] and self.constants.allow_oc_everywhere is False:
|
||||
Path(self.constants.pp_kext_folder).mkdir()
|
||||
Path(self.constants.pp_contents_folder).mkdir()
|
||||
shutil.copy(pp_map_path, self.constants.pp_contents_folder)
|
||||
@@ -324,7 +343,12 @@ class BuildOpenCore:
|
||||
# USB Map
|
||||
usb_map_path = Path(self.constants.plist_folder_path) / Path("AppleUSBMaps/Info.plist")
|
||||
# iMac7,1 kernel panics with USB map installed, remove for time being until properly debugged
|
||||
if usb_map_path.exists() and self.constants.allow_oc_everywhere is False and self.model not in ["iMac7,1", "Xserve2,1"]:
|
||||
if (
|
||||
usb_map_path.exists()
|
||||
and self.constants.allow_oc_everywhere is False
|
||||
and self.model not in ["Xserve2,1", "Dortania1,1"]
|
||||
and (self.model in ModelArray.Missing_USB_Map or self.constants.serial_settings in ["Moderate", "Advanced"])
|
||||
):
|
||||
print("- Adding USB-Map.kext")
|
||||
Path(self.constants.map_kext_folder).mkdir()
|
||||
Path(self.constants.map_contents_folder).mkdir()
|
||||
@@ -380,13 +404,17 @@ class BuildOpenCore:
|
||||
self.config["DeviceProperties"]["Add"][self.gfx0_path] = {"agdpmod": "vit9696"}
|
||||
|
||||
if self.model in ["iMac13,1", "iMac13,2", "iMac13,3"]:
|
||||
if self.computer.dgpu:
|
||||
print("- Fixing sleep support in macOS 12")
|
||||
self.config["DeviceProperties"]["Add"]["PciRoot(0x0)/Pci(0x2,0x0)"] = {
|
||||
"name": binascii.unhexlify("23646973706C6179"),
|
||||
"IOName": "#display",
|
||||
"class-code": binascii.unhexlify("FFFFFFFF"),
|
||||
}
|
||||
if not self.constants.custom_model and self.computer.dgpu:
|
||||
if self.constants.allow_ivy_igpu is False:
|
||||
print("- Disabling iGPU to fix sleep support in macOS 12")
|
||||
self.config["DeviceProperties"]["Add"][self.gfx0_path] = {"agdpmod": "vit9696", "shikigva": 256}
|
||||
self.config["DeviceProperties"]["Add"]["PciRoot(0x0)/Pci(0x2,0x0)"] = {
|
||||
"name": binascii.unhexlify("23646973706C6179"),
|
||||
"IOName": "#display",
|
||||
"class-code": binascii.unhexlify("FFFFFFFF"),
|
||||
}
|
||||
else:
|
||||
print("- Enabling iGPU upon request")
|
||||
|
||||
# Audio Patch
|
||||
if self.model in ModelArray.LegacyAudio:
|
||||
@@ -429,7 +457,6 @@ class BuildOpenCore:
|
||||
self.gfx0_path = "PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)"
|
||||
|
||||
def nvidia_patch(self, backlight_path):
|
||||
self.constants.custom_mxm_gpu = True
|
||||
if self.model in ["iMac11,1", "iMac11,2", "iMac11,3", "iMac10,1"]:
|
||||
print("- Adding Nvidia Brightness Control and DRM patches")
|
||||
self.config["DeviceProperties"]["Add"][backlight_path] = {
|
||||
@@ -470,7 +497,6 @@ class BuildOpenCore:
|
||||
self.config["UEFI"]["Quirks"]["ReloadOptionRoms"] = True
|
||||
|
||||
def amd_patch(self, backlight_path):
|
||||
self.constants.custom_mxm_gpu = True
|
||||
print("- Adding AMD DRM patches")
|
||||
self.config["DeviceProperties"]["Add"][backlight_path] = {"shikigva": 80, "unfairgva": 1}
|
||||
if self.constants.custom_model and self.model == "iMac11,2":
|
||||
@@ -510,17 +536,17 @@ class BuildOpenCore:
|
||||
elif self.computer.dgpu.arch == device_probe.NVIDIA.Archs.Kepler:
|
||||
backlight_path_detection(self)
|
||||
nvidia_patch(self, self.gfx0_path)
|
||||
if self.model in ModelArray.MacPro71:
|
||||
if self.model in ModelArray.MacPro:
|
||||
if not self.constants.custom_model:
|
||||
for i, device in enumerate(self.computer.gpus):
|
||||
print(f"- Found dGPU ({i + 1}): {Utilities.friendly_hex(device.vendor_id)}:{Utilities.friendly_hex(device.device_id)}")
|
||||
self.config["#Revision"][f"Hardware-MacPro-dGPU-{i + 1}"] = f"{Utilities.friendly_hex(device.vendor_id)}:{Utilities.friendly_hex(device.device_id)}"
|
||||
|
||||
if device.pci_path:
|
||||
if device.pci_path and device.acpi_path:
|
||||
print(f"- Found dGPU ({i + 1}) at {device.pci_path}")
|
||||
if isinstance(device, device_probe.AMD):
|
||||
print("- Adding Mac Pro, Xserve DRM patches")
|
||||
self.config["DeviceProperties"]["Add"][device.pci_path] = {"shikigva": 128, "unfairgva": 1, "rebuild-device-tree": 1}
|
||||
self.config["DeviceProperties"]["Add"][device.pci_path] = {"shikigva": 128, "unfairgva": 1, "rebuild-device-tree": 1, "agdpmod": "pikera"}
|
||||
elif isinstance(device, device_probe.NVIDIA):
|
||||
print("- Enabling Nvidia Output Patch")
|
||||
self.config["DeviceProperties"]["Add"][device.pci_path] = {"rebuild-device-tree": 1}
|
||||
@@ -533,7 +559,9 @@ class BuildOpenCore:
|
||||
print("- Adding Mac Pro, Xserve DRM patches")
|
||||
if "shikigva=128 unfairgva=1" not in self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"]:
|
||||
print("- Falling back to boot-args")
|
||||
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " shikigva=128 unfairgva=1" + (" -wegtree" if "-wegtree" not in self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] else "")
|
||||
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " shikigva=128 unfairgva=1 agdpmod=pikera" + (
|
||||
" -wegtree" if "-wegtree" not in self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] else ""
|
||||
)
|
||||
elif isinstance(device, device_probe.NVIDIA):
|
||||
print("- Enabling Nvidia Output Patch")
|
||||
if "-wegtree" not in self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"]:
|
||||
@@ -549,7 +577,35 @@ class BuildOpenCore:
|
||||
print("- Adding Mac Pro, Xserve DRM patches")
|
||||
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " shikigva=128 unfairgva=1 -wegtree"
|
||||
|
||||
if self.constants.disable_thunderbolt is True and self.model in ["MacBookPro11,1", "MacBookPro11,2", "MacBookPro11,3", "MacBookPro11,4", "MacBookPro11,5"]:
|
||||
print("- Disabling 2013-2014 laptop Thunderbolt Controller")
|
||||
if self.model in ["MacBookPro11,3", "MacBookPro11,5"]:
|
||||
# 15" dGPU models: IOACPIPlane:/_SB/PCI0@0/PEG1@10001/UPSB@0/DSB0@0/NHI0@0
|
||||
tb_device_path = "PciRoot(0x0)/Pci(0x1,0x1)/Pci(0x0,0x0)/Pci(0x0,0x0)/Pci(0x0,0x0)"
|
||||
else:
|
||||
# 13" and 15" iGPU 2013-2014 models: IOACPIPlane:/_SB/PCI0@0/P0P2@10000/UPSB@0/DSB0@0/NHI0@0
|
||||
tb_device_path = "PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)/Pci(0x0,0x0)/Pci(0x0,0x0)"
|
||||
|
||||
self.config["DeviceProperties"]["Add"][tb_device_path] = {"class-code": binascii.unhexlify("FFFFFFFF"), "device-id": binascii.unhexlify("FFFF0000")}
|
||||
|
||||
# Bluetooth Detection
|
||||
if not self.constants.custom_model and self.computer.bluetooth_chipset:
|
||||
if self.computer.bluetooth_chipset in ["BRCM2070 Hub", "BRCM2046 Hub"]:
|
||||
print("- Fixing Legacy Bluetooth for macOS Monterey")
|
||||
self.enable_kext("BlueToolFixup.kext", self.constants.bluetool_version, self.constants.bluetool_path)
|
||||
self.enable_kext("Bluetooth-Spoof.kext", self.constants.btspoof_version, self.constants.btspoof_path)
|
||||
elif self.computer.bluetooth_chipset == "BRCM20702 Hub" and self.model in ModelArray.Bluetooth_BRCM20702_v1:
|
||||
print("- Fixing Legacy Bluetooth for macOS Monterey")
|
||||
self.enable_kext("BlueToolFixup.kext", self.constants.bluetool_version, self.constants.bluetool_path)
|
||||
elif self.model in ModelArray.Bluetooth_BRCM2070 or self.model in ModelArray.Bluetooth_BRCM2046 or self.model in ModelArray.Bluetooth_BRCM20702_v1:
|
||||
print("- Fixing Legacy Bluetooth for macOS Monterey")
|
||||
self.enable_kext("BlueToolFixup.kext", self.constants.bluetool_version, self.constants.bluetool_path)
|
||||
if self.model in ModelArray.Bluetooth_BRCM2070 or self.model in ModelArray.Bluetooth_BRCM2046:
|
||||
self.enable_kext("Bluetooth-Spoof.kext", self.constants.btspoof_version, self.constants.btspoof_path)
|
||||
|
||||
# Add XhciDxe if firmware doesn't have XHCI controller support and XCHI controller detected
|
||||
# TODO: Fix XhciDxe to work on pre UEFI 2.0 Macs
|
||||
# Ref: https://github.com/acidanthera/bugtracker/issues/1663
|
||||
# if self.model not in ModelArray.XhciSupport and not self.constants.custom_model:
|
||||
# devices = plistlib.loads(subprocess.run("ioreg -c IOPCIDevice -r -d2 -a".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode())
|
||||
# try:
|
||||
@@ -558,7 +614,7 @@ class BuildOpenCore:
|
||||
# device_id = Utilities.hexswap(binascii.hexlify(devices[0]["device-id"]).decode()[:4])
|
||||
# print("- Found XHCI Controller, adding Boot Support")
|
||||
# shutil.copy(self.constants.xhci_driver_path, self.constants.drivers_path)
|
||||
# self.config["UEFI"]["Drivers"] += ["XhciDxe.efi"]
|
||||
# self.get_efi_binary_by_path("XhciDxe.efi", "UEFI", "Drivers")["Enabled"] = True
|
||||
# except ValueError:
|
||||
# print("- No XHCI Controller Found (V)")
|
||||
# except IndexError:
|
||||
@@ -567,18 +623,20 @@ class BuildOpenCore:
|
||||
if self.constants.nvme_boot is True:
|
||||
print("- Enabling NVMe boot support")
|
||||
shutil.copy(self.constants.nvme_driver_path, self.constants.drivers_path)
|
||||
self.config["UEFI"]["Drivers"] += ["NvmExpressDxe.efi"]
|
||||
self.get_efi_binary_by_path("NvmExpressDxe.efi", "UEFI", "Drivers")["Enabled"] = True
|
||||
|
||||
# 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"]
|
||||
self.get_efi_binary_by_path("OpenCanopy.efi", "UEFI", "Drivers")["Enabled"] = True
|
||||
self.get_efi_binary_by_path("OpenRuntime.efi", "UEFI", "Drivers")["Enabled"] = True
|
||||
self.get_efi_binary_by_path("OpenLinuxBoot.efi", "UEFI", "Drivers")["Enabled"] = True
|
||||
# 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"]
|
||||
self.get_efi_binary_by_path("ExFatDxeLegacy.efi", "UEFI", "Drivers")["Enabled"] = True
|
||||
|
||||
# Add UGA to GOP layer
|
||||
if self.model in ModelArray.UGAtoGOP:
|
||||
@@ -597,6 +655,8 @@ class BuildOpenCore:
|
||||
if self.constants.kext_debug is True:
|
||||
print("- Enabling DEBUG Kexts")
|
||||
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " -liludbgall"
|
||||
# Disabled due to macOS Monterey crashing shortly after kernel init
|
||||
# Use DebugEnhancer.kext instead
|
||||
# self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " msgbuf=1048576"
|
||||
if self.constants.opencore_debug is True:
|
||||
print("- Enabling DEBUG OpenCore")
|
||||
@@ -611,14 +671,21 @@ class BuildOpenCore:
|
||||
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
|
||||
self.get_efi_binary_by_path("OpenShell.efi", "Misc", "Tools")["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"]
|
||||
if self.constants.disable_amfi is True:
|
||||
print("- Disabling AMFI")
|
||||
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " amfi_get_out_of_my_way=1"
|
||||
# if self.constants.amfi_status is False:
|
||||
# print("- Disabling AMFI")
|
||||
# self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " amfi_get_out_of_my_way=1"
|
||||
if self.constants.disable_cs_lv is True:
|
||||
print("- Disabling Library Validation")
|
||||
self.get_item_by_kv(self.config["Kernel"]["Patch"], "Comment", "Disable Library Validation Enforcement")["Enabled"] = True
|
||||
self.config["NVRAM"]["Add"]["4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102"]["OCLP-Settings"] += " -allow_amfi"
|
||||
# CSLVFixup simply patches out __RESTRICT and __restrict out of the Music.app Binary
|
||||
# Ref: https://pewpewthespells.com/blog/blocking_code_injection_on_ios_and_os_x.html
|
||||
self.enable_kext("CSLVFixup.kext", self.constants.cslvfixup_version, self.constants.cslvfixup_path)
|
||||
if self.constants.secure_status is False:
|
||||
print("- Disabling SecureBootModel")
|
||||
self.config["Misc"]["Security"]["SecureBootModel"] = "Disabled"
|
||||
@@ -639,13 +706,30 @@ class BuildOpenCore:
|
||||
if self.model == self.constants.override_smbios:
|
||||
print("- Adding -no_compat_check")
|
||||
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " -no_compat_check"
|
||||
if self.constants.disk != "":
|
||||
self.disk_type()
|
||||
if self.constants.validate is False:
|
||||
print("- Adding bootmgfw.efi BlessOverride")
|
||||
self.config["Misc"]["BlessOverride"] += ["\\EFI\\Microsoft\\Boot\\bootmgfw.efi"]
|
||||
if self.model in ModelArray.dGPU_switch:
|
||||
print("- Allowing GMUX switching in Windows")
|
||||
self.config["Booter"]["Quirks"]["SignalAppleOS"] = True
|
||||
if self.constants.allow_fv_root is True:
|
||||
# apfs.kext has an undocumented boot-arg that allows FileVault usage on broken APFS seals (-arv_allow_fv)
|
||||
# This is however hidden behind kern.development, thus we patch _apfs_filevault_allowed to always return true
|
||||
# Note this function was added in 11.3 (20E232, 20.4), older builds do not support this (ie. 11.2.3)
|
||||
print("- Allowing FileVault on Root Patched systems")
|
||||
self.get_item_by_kv(self.config["Kernel"]["Patch"], "Identifier", "com.apple.filesystems.apfs")["Enabled"] = True
|
||||
# Lets us check in SysPatch.py if config supports FileVault
|
||||
self.config["NVRAM"]["Add"]["4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102"]["OCLP-Settings"] += " -allow_fv"
|
||||
|
||||
def set_smbios(self):
|
||||
spoofed_model = self.model
|
||||
if self.constants.override_smbios == "Default":
|
||||
spoofed_model = self.smbios_set()
|
||||
spoofed_model = self.smbios_set(self.model)
|
||||
else:
|
||||
spoofed_model = self.constants.override_smbios
|
||||
print(f"- Using Model ID: {spoofed_model}")
|
||||
try:
|
||||
spoofed_board = self.constants.board_id[spoofed_model]
|
||||
print(f"- Using Board ID: {spoofed_board}")
|
||||
@@ -660,12 +744,14 @@ class BuildOpenCore:
|
||||
def minimal_serial_patch(self):
|
||||
if self.constants.custom_cpu_model == 0 or self.constants.custom_cpu_model == 1:
|
||||
self.config["PlatformInfo"]["SMBIOS"]["ProcessorType"] = 1537
|
||||
if self.model in ModelArray.NoAPFSsupport:
|
||||
fw_feature, fw_mask = self.fw_feature_detect(self.model)
|
||||
self.config["PlatformInfo"]["PlatformNVRAM"]["FirmwareFeatures"] = fw_feature
|
||||
self.config["PlatformInfo"]["SMBIOS"]["FirmwareFeatures"] = fw_feature
|
||||
self.config["PlatformInfo"]["PlatformNVRAM"]["FirmwareFeaturesMask"] = fw_mask
|
||||
self.config["PlatformInfo"]["SMBIOS"]["FirmwareFeaturesMask"] = fw_mask
|
||||
fw_feature = self.patch_firmware_feature()
|
||||
fw_feature = hex(fw_feature).lstrip("0x").rstrip("L").strip()
|
||||
print(f"- Setting Firmware Feature: {fw_feature}")
|
||||
fw_feature = Utilities.string_to_hex(fw_feature)
|
||||
self.config["PlatformInfo"]["PlatformNVRAM"]["FirmwareFeatures"] = fw_feature
|
||||
self.config["PlatformInfo"]["SMBIOS"]["FirmwareFeatures"] = fw_feature
|
||||
self.config["PlatformInfo"]["PlatformNVRAM"]["FirmwareFeaturesMask"] = fw_feature
|
||||
self.config["PlatformInfo"]["SMBIOS"]["FirmwareFeaturesMask"] = fw_feature
|
||||
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["run-efi-updater"] = "No"
|
||||
self.config["PlatformInfo"]["PlatformNVRAM"]["BID"] = self.spoofed_board
|
||||
self.config["PlatformInfo"]["SMBIOS"]["BoardProduct"] = self.spoofed_board
|
||||
@@ -712,14 +798,12 @@ class BuildOpenCore:
|
||||
self.spoofed_model = self.model
|
||||
minimal_serial_patch(self)
|
||||
|
||||
if self.constants.download_ram is False:
|
||||
self.config["PlatformInfo"].pop("Memory")
|
||||
else:
|
||||
print("- Inserting 1.5TB of RAM into your Mac")
|
||||
self.config["PlatformInfo"]["CustomMemory"] = True
|
||||
|
||||
# USB Map and CPUFriend Patching
|
||||
if self.constants.allow_oc_everywhere is False and self.model not in ["iMac7,1", "Xserve2,1"]:
|
||||
if (
|
||||
self.constants.allow_oc_everywhere is False
|
||||
and self.model not in ["Xserve2,1", "Dortania1,1"]
|
||||
and (self.model in ModelArray.Missing_USB_Map or self.constants.serial_settings in ["Moderate", "Advanced"])
|
||||
):
|
||||
new_map_ls = Path(self.constants.map_contents_folder) / Path("Info.plist")
|
||||
map_config = plistlib.load(Path(new_map_ls).open("rb"))
|
||||
# Strip unused USB maps
|
||||
@@ -739,7 +823,7 @@ class BuildOpenCore:
|
||||
except KeyError:
|
||||
continue
|
||||
plistlib.dump(map_config, Path(new_map_ls).open("wb"), sort_keys=True)
|
||||
if self.constants.allow_oc_everywhere is False and self.model not in ["iMac7,1", "Xserve2,1"] and self.constants.disallow_cpufriend is False:
|
||||
if self.constants.allow_oc_everywhere is False and self.model not in ["iMac7,1", "Xserve2,1", "Dortania1,1"] and self.constants.disallow_cpufriend is False:
|
||||
# Adjust CPU Friend Data to correct SMBIOS
|
||||
new_cpu_ls = Path(self.constants.pp_contents_folder) / Path("Info.plist")
|
||||
cpu_config = plistlib.load(Path(new_cpu_ls).open("rb"))
|
||||
@@ -784,12 +868,12 @@ class BuildOpenCore:
|
||||
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}!")
|
||||
def get_efi_binary_by_path(self, bundle_path, entry_location, efi_type):
|
||||
efi_binary = self.get_item_by_kv(self.config[entry_location][efi_type], "Path", bundle_path)
|
||||
if not efi_binary:
|
||||
print(f"- Could not find {efi_type}: {bundle_path}!")
|
||||
raise IndexError
|
||||
return tool
|
||||
return efi_binary
|
||||
|
||||
def enable_kext(self, kext_name, kext_version, kext_path, check=False):
|
||||
kext = self.get_kext_by_bundle_path(kext_name)
|
||||
@@ -805,6 +889,7 @@ class BuildOpenCore:
|
||||
def cleanup(self):
|
||||
print("- Cleaning up files")
|
||||
# Remove unused entries
|
||||
# TODO: Consolidate into a single for loop
|
||||
for entry in list(self.config["ACPI"]["Add"]):
|
||||
if not entry["Enabled"]:
|
||||
self.config["ACPI"]["Add"].remove(entry)
|
||||
@@ -817,6 +902,12 @@ class BuildOpenCore:
|
||||
for entry in list(self.config["Kernel"]["Patch"]):
|
||||
if not entry["Enabled"]:
|
||||
self.config["Kernel"]["Patch"].remove(entry)
|
||||
for entry in list(self.config["Misc"]["Tools"]):
|
||||
if not entry["Enabled"]:
|
||||
self.config["Misc"]["Tools"].remove(entry)
|
||||
for entry in list(self.config["UEFI"]["Drivers"]):
|
||||
if not entry["Enabled"]:
|
||||
self.config["UEFI"]["Drivers"].remove(entry)
|
||||
|
||||
plistlib.dump(self.config, Path(self.constants.plist_path).open("wb"), sort_keys=True)
|
||||
for kext in self.constants.kexts_path.rglob("*.zip"):
|
||||
@@ -904,7 +995,7 @@ Please build OpenCore first!"""
|
||||
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:])
|
||||
menu.add_menu_option(f"{disk}: {all_disks[disk]['name']} ({Utilities.human_fmt(all_disks[disk]['size'])})", key=disk[4:])
|
||||
|
||||
response = menu.start()
|
||||
|
||||
@@ -924,7 +1015,7 @@ Please build OpenCore first!"""
|
||||
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'])})"
|
||||
text = f"{partition}: {selected_disk['partitions'][partition]['name']} ({Utilities.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:
|
||||
@@ -982,7 +1073,7 @@ Please build OpenCore first!"""
|
||||
print("is removed from the partition")
|
||||
print("We highly recommend users partition 200MB off their drive with Disk Utility")
|
||||
print(" Name:\t\t OPENCORE")
|
||||
print(" Format:\t FAT32")
|
||||
print(" Format:\t\t FAT32")
|
||||
print(" Size:\t\t 200MB")
|
||||
choice = input("\nWould you like to still install OpenCore to this drive?(y/n): ")
|
||||
if not choice in ["y", "Y", "Yes", "yes"]:
|
||||
|
||||
@@ -14,37 +14,43 @@ class MenuOptions:
|
||||
def change_verbose(self):
|
||||
Utilities.cls()
|
||||
Utilities.header(["Set Verbose mode"])
|
||||
change_menu = input("Enable Verbose mode(y/n): ")
|
||||
change_menu = input("Enable Verbose mode(y/n/q): ")
|
||||
if change_menu in {"y", "Y", "yes", "Yes"}:
|
||||
self.constants.verbose_debug = True
|
||||
elif change_menu in {"n", "N", "no", "No"}:
|
||||
self.constants.verbose_debug = False
|
||||
elif change_menu in {"q", "Q", "Quit", "quit"}:
|
||||
print("Returning to previous menu")
|
||||
else:
|
||||
print("Invalid option")
|
||||
self.change_verbose()
|
||||
|
||||
def change_oc(self):
|
||||
Utilities.cls()
|
||||
Utilities.header(["Set OpenCore DEBUG mode"])
|
||||
change_menu = input("Enable OpenCore DEBUG mode(y/n): ")
|
||||
change_menu = input("Enable OpenCore DEBUG mode(y/n/q): ")
|
||||
if change_menu in {"y", "Y", "yes", "Yes"}:
|
||||
self.constants.opencore_debug = True
|
||||
self.constants.opencore_build = "DEBUG"
|
||||
elif change_menu in {"n", "N", "no", "No"}:
|
||||
self.constants.opencore_debug = False
|
||||
self.constants.opencore_build = "RELEASE"
|
||||
elif change_menu in {"q", "Q", "Quit", "quit"}:
|
||||
print("Returning to previous menu")
|
||||
else:
|
||||
print("Invalid option")
|
||||
self.change_oc()
|
||||
|
||||
def change_kext(self):
|
||||
Utilities.cls()
|
||||
Utilities.header(["Set Kext DEBUG mode"])
|
||||
change_menu = input("Enable Kext DEBUG mode(y/n): ")
|
||||
change_menu = input("Enable Kext DEBUG mode(y/n/q): ")
|
||||
if change_menu in {"y", "Y", "yes", "Yes"}:
|
||||
self.constants.kext_debug = True
|
||||
elif change_menu in {"n", "N", "no", "No"}:
|
||||
self.constants.kext_debug = False
|
||||
elif change_menu in {"q", "Q", "Quit", "quit"}:
|
||||
print("Returning to previous menu")
|
||||
else:
|
||||
print("Invalid option")
|
||||
self.change_kext()
|
||||
|
||||
def change_metal(self):
|
||||
Utilities.cls()
|
||||
@@ -58,6 +64,7 @@ Valid Options:
|
||||
1. None(stock GPU)
|
||||
2. Nvidia GPU
|
||||
3. AMD GPU
|
||||
Q. Return to previous menu
|
||||
|
||||
Note: Patcher will detect whether hardware has been upgraded regardless, this
|
||||
option is for those patching on a different machine or OCLP cannot detect.
|
||||
@@ -73,12 +80,14 @@ option is for those patching on a different machine or OCLP cannot detect.
|
||||
elif change_menu == "3":
|
||||
self.constants.metal_build = True
|
||||
self.constants.imac_vendor = "AMD"
|
||||
elif change_menu in {"q", "Q", "Quit", "quit"}:
|
||||
print("Returning to previous menu")
|
||||
else:
|
||||
print("Invalid option")
|
||||
self.change_metal()
|
||||
|
||||
def change_serial(self):
|
||||
Utilities.cls()
|
||||
Utilities.header(["Set SMBIOS Mode"])
|
||||
Utilities.header(["Set SMBIOS Spoof Level"])
|
||||
print(
|
||||
"""This section is for setting how OpenCore generates the SMBIOS
|
||||
Recommended for adanced users who want control how serials are handled
|
||||
@@ -88,19 +97,22 @@ Valid options:
|
||||
1. Minimal:\tUse original serials and minimally update SMBIOS
|
||||
2. Moderate:\tReplace entire SMBIOS but keep original serials
|
||||
3. Advanced:\tReplace entire SMBIOS and generate new serials
|
||||
Q. Return to previous menu
|
||||
|
||||
Note: For new users we recommend leaving as default(1. Minimal)
|
||||
"""
|
||||
)
|
||||
change_menu = input("Set SMBIOS Mode(ie. 1): ")
|
||||
change_menu = input("Set SMBIOS Spoof Level(ie. 1): ")
|
||||
if change_menu == "1":
|
||||
self.constants.serial_settings = "Minimal"
|
||||
elif change_menu == "2":
|
||||
self.constants.serial_settings = "Moderate"
|
||||
elif change_menu == "3":
|
||||
self.constants.serial_settings = "Advanced"
|
||||
elif change_menu in {"q", "Q", "Quit", "quit"}:
|
||||
print("Returning to previous menu")
|
||||
else:
|
||||
print("Invalid option")
|
||||
self.change_serial()
|
||||
|
||||
def change_showpicker(self):
|
||||
Utilities.cls()
|
||||
@@ -111,13 +123,15 @@ 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): ")
|
||||
change_menu = input("Show OpenCore Picker by default(y/n/q): ")
|
||||
if change_menu in {"y", "Y", "yes", "Yes"}:
|
||||
self.constants.showpicker = True
|
||||
elif change_menu in {"n", "N", "no", "No"}:
|
||||
self.constants.showpicker = False
|
||||
elif change_menu in {"q", "Q", "Quit", "quit"}:
|
||||
print("Returning to previous menu")
|
||||
else:
|
||||
print("Invalid option")
|
||||
self.change_showpicker()
|
||||
|
||||
def change_vault(self):
|
||||
Utilities.cls()
|
||||
@@ -131,63 +145,86 @@ Note: For security reasons, OpenShell will be disabled when Vault is set.
|
||||
|
||||
"""
|
||||
)
|
||||
change_menu = input("Enable Vault(y/n): ")
|
||||
change_menu = input("Enable Vault(y/n/q): ")
|
||||
if change_menu in {"y", "Y", "yes", "Yes"}:
|
||||
self.constants.vault = True
|
||||
elif change_menu in {"n", "N", "no", "No"}:
|
||||
self.constants.vault = False
|
||||
elif change_menu in {"q", "Q", "Quit", "quit"}:
|
||||
print("Returning to previous menu")
|
||||
else:
|
||||
print("Invalid option")
|
||||
self.change_vault()
|
||||
|
||||
def change_sip(self):
|
||||
Utilities.cls()
|
||||
Utilities.header(["Set SIP and SecureBootModel"])
|
||||
Utilities.header(["Set System Integrity protection"])
|
||||
print(
|
||||
"""SIP and SecureBootModel are used to ensure proper OTA functionality,
|
||||
however to patch the root volume both of these must be disabled.
|
||||
"""SIP is used to ensure proper secuirty measures are set,
|
||||
however to patch the root volume this must be disabled.
|
||||
Only disable is absolutely necessary. SIP value = 0xFEF
|
||||
|
||||
Valid options:
|
||||
|
||||
1. Enable Both
|
||||
2. Disable SIP only
|
||||
3. Disable SecureBootModel Only
|
||||
4. Disable Both
|
||||
1. Enable SIP
|
||||
2. Disable SIP
|
||||
Q. Return to previous menu
|
||||
|
||||
"""
|
||||
)
|
||||
change_menu = input("Set SIP and SecureBootModel(ie. 1): ")
|
||||
change_menu = input("Set SIP: ")
|
||||
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
|
||||
elif change_menu in {"q", "Q", "Quit", "quit"}:
|
||||
print("Returning to previous menu")
|
||||
else:
|
||||
print("Invalid option")
|
||||
self.change_sip()
|
||||
|
||||
def change_sbm(self):
|
||||
Utilities.cls()
|
||||
Utilities.header(["Set SecureBootModel"])
|
||||
print(
|
||||
"""SecureBootModel is used to ensure best firmware security,
|
||||
however to patch the root volume this must be disabled.
|
||||
Only disable is absolutely necessary. SIP value = 0xFEF
|
||||
|
||||
Valid options:
|
||||
|
||||
1. Enable SecureBootModel
|
||||
2. Disable SecureBootModel
|
||||
Q. Return to previous menu
|
||||
|
||||
"""
|
||||
)
|
||||
change_menu = input("Set SecureBootModel: ")
|
||||
if change_menu == "1":
|
||||
self.constants.secure_status = True
|
||||
elif change_menu == "2":
|
||||
self.constants.secure_status = False
|
||||
elif change_menu in {"q", "Q", "Quit", "quit"}:
|
||||
print("Returning to previous menu")
|
||||
else:
|
||||
self.change_sbm()
|
||||
|
||||
def set_amfi(self):
|
||||
Utilities.cls()
|
||||
Utilities.header(["Disable AMFI"])
|
||||
Utilities.header(["Set AMFI"])
|
||||
print(
|
||||
"""Required for Root Patching non-Metal GPUs
|
||||
in macOS Big Sur. Without this, will receive kernel panic once
|
||||
Patcher finishes installing legacy acceleration patches.
|
||||
"""
|
||||
)
|
||||
change_menu = input("Disable AMFI(y/n): ")
|
||||
change_menu = input("Disable AMFI(y/n/q): ")
|
||||
if change_menu in {"y", "Y", "yes", "Yes"}:
|
||||
self.constants.disable_amfi = True
|
||||
self.constants.amfi_status = False
|
||||
elif change_menu in {"n", "N", "no", "No"}:
|
||||
self.constants.disable_amfi = False
|
||||
self.constants.amfi_status = True
|
||||
elif change_menu in {"q", "Q", "Quit", "quit"}:
|
||||
print("Returning to previous menu")
|
||||
else:
|
||||
print("Invalid option")
|
||||
self.set_amfi()
|
||||
|
||||
def bootstrap_setting(self):
|
||||
Utilities.cls()
|
||||
@@ -200,7 +237,7 @@ Valid options:
|
||||
|
||||
1. System/Library/CoreServices/boot.efi (default)
|
||||
2. EFI/BOOT/BOOTx64.efi
|
||||
3. Exit
|
||||
Q. Return to previous menu
|
||||
|
||||
Note: S*/L*/C*/boot.efi method is only installed to the EFI partition only
|
||||
and not to macOS itself.
|
||||
@@ -215,8 +252,10 @@ see the EFI Boot entry in the boot picker.
|
||||
self.constants.boot_efi = False
|
||||
elif change_menu == "2":
|
||||
self.constants.boot_efi = True
|
||||
elif change_menu in {"q", "Q", "Quit", "quit"}:
|
||||
print("Returning to previous menu")
|
||||
else:
|
||||
print("Invalid option")
|
||||
self.bootstrap_setting()
|
||||
|
||||
def drm_setting(self):
|
||||
Utilities.cls()
|
||||
@@ -234,13 +273,15 @@ other programs relying on such features.
|
||||
Recommend only disabling if absolutely required.
|
||||
"""
|
||||
)
|
||||
change_menu = input("Enable Nvidia's Software DRM rendering(y/n): ")
|
||||
change_menu = input("Enable Nvidia's Software DRM rendering(y/n/q): ")
|
||||
if change_menu in {"y", "Y", "yes", "Yes"}:
|
||||
self.constants.drm_support = True
|
||||
elif change_menu in {"n", "N", "no", "No"}:
|
||||
self.constants.drm_support = False
|
||||
elif change_menu in {"q", "Q", "Quit", "quit"}:
|
||||
print("Returning to previous menu")
|
||||
else:
|
||||
print("Invalid option")
|
||||
self.drm_setting()
|
||||
|
||||
def allow_native_models(self):
|
||||
Utilities.cls()
|
||||
@@ -252,15 +293,17 @@ power usage.
|
||||
|
||||
"""
|
||||
)
|
||||
change_menu = input("Allow OpenCore on all Models(y/n): ")
|
||||
change_menu = input("Allow OpenCore on all Models(y/n/q): ")
|
||||
if change_menu in {"y", "Y", "yes", "Yes"}:
|
||||
self.constants.allow_oc_everywhere = True
|
||||
self.constants.serial_settings = "None"
|
||||
elif change_menu in {"n", "N", "no", "No"}:
|
||||
self.constants.allow_oc_everywhere = False
|
||||
self.constants.serial_settings = "Minimal"
|
||||
elif change_menu in {"q", "Q", "Quit", "quit"}:
|
||||
print("Returning to previous menu")
|
||||
else:
|
||||
print("Invalid option")
|
||||
self.allow_native_models()
|
||||
|
||||
def custom_cpu(self):
|
||||
Utilities.cls()
|
||||
@@ -272,6 +315,7 @@ Custom names will report as follows:
|
||||
1: Original Name: 2.5 Ghz Dual-Core Intel Core i5
|
||||
2. CPU name: Intel(R) Core(TM) i5-3210M CPU @ 2.50Ghz
|
||||
3. Custom Name: 2.5Ghz Cotton Candy (example)
|
||||
Q. Return to previous menu
|
||||
"""
|
||||
)
|
||||
if self.constants.custom_cpu_model_value == "":
|
||||
@@ -291,31 +335,10 @@ Custom names will report as follows:
|
||||
elif change_menu == "3":
|
||||
self.constants.custom_cpu_model = 1
|
||||
self.constants.custom_cpu_model_value = input("Enter new CPU Name: ")
|
||||
elif change_menu in {"q", "Q", "Quit", "quit"}:
|
||||
print("Returning to previous menu")
|
||||
else:
|
||||
print("Invalid option")
|
||||
|
||||
def custom_color_thing(self):
|
||||
Utilities.cls()
|
||||
Utilities.header(["Set custom CPU Model Name"])
|
||||
print(
|
||||
"""Change reported CPU Model name in About This Mac
|
||||
Custom names will report as follows:
|
||||
|
||||
1: Custom Color
|
||||
2. Reset
|
||||
"""
|
||||
)
|
||||
change_menu = input("Set custom CPU Name(1,2,3): ")
|
||||
if change_menu == "1":
|
||||
print("")
|
||||
# temp_tk_root = tk.Tk()
|
||||
# temp_tk_root.wm_withdraw()
|
||||
# self.constants.custom_color = colorchooser.askcolor(title="Choose color")
|
||||
# temp_tk_root.destroy()
|
||||
elif change_menu == "2":
|
||||
self.constants.custom_color = ""
|
||||
else:
|
||||
print("Invalid option")
|
||||
self.custom_cpu()
|
||||
|
||||
def disable_cpufriend(self):
|
||||
Utilities.cls()
|
||||
@@ -327,53 +350,19 @@ Mac's power profile for CPUs and GPUs, which can harm the
|
||||
hardware
|
||||
"""
|
||||
)
|
||||
change_menu = input("Disable CPU Friend?(y/n): ")
|
||||
if change_menu == "y":
|
||||
change_menu = input("Disable CPU Friend?(y/n/q): ")
|
||||
if change_menu in {"y", "Y", "yes", "Yes"}:
|
||||
self.constants.disallow_cpufriend = True
|
||||
elif change_menu == "n":
|
||||
elif change_menu in {"n", "N", "no", "No"}:
|
||||
self.constants.disallow_cpufriend = False
|
||||
elif change_menu in {"q", "Q", "Quit", "quit"}:
|
||||
print("Returning to previous menu")
|
||||
else:
|
||||
print("Invalid option")
|
||||
|
||||
def set_seedutil(self):
|
||||
Utilities.cls()
|
||||
Utilities.header(["Set SeedUtil Status"])
|
||||
print(
|
||||
"""Used for setting OS Update Preferences
|
||||
|
||||
Valid options:
|
||||
1. Public Release Seed (Default)
|
||||
2. Public Beta Seed
|
||||
3. Developer Beta Seed
|
||||
4. Check SeedUtil's current status
|
||||
"""
|
||||
)
|
||||
|
||||
change_menu = input("Set update status(Press [ENTER] to exit): ")
|
||||
if change_menu == "1":
|
||||
subprocess.run(["sudo", "/System/Library/PrivateFrameworks/Seeding.framework/Versions/A/Resources/seedutil", "unenroll"], stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
elif change_menu == "2":
|
||||
subprocess.run(["sudo", "/System/Library/PrivateFrameworks/Seeding.framework/Versions/A/Resources/seedutil", "unenroll"], stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
subprocess.run(
|
||||
["sudo", "/System/Library/PrivateFrameworks/Seeding.framework/Versions/A/Resources/seedutil", "enroll", "PublicSeed"], stdout=subprocess.PIPE
|
||||
).stdout.decode().strip().encode()
|
||||
elif change_menu == "3":
|
||||
subprocess.run(["sudo", "/System/Library/PrivateFrameworks/Seeding.framework/Versions/A/Resources/seedutil", "unenroll"], stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
subprocess.run(
|
||||
["sudo", "/System/Library/PrivateFrameworks/Seeding.framework/Versions/A/Resources/seedutil", "enroll", "DeveloperSeed"], stdout=subprocess.PIPE
|
||||
).stdout.decode().strip().encode()
|
||||
elif change_menu == "4":
|
||||
result = subprocess.run(["sudo", "/System/Library/PrivateFrameworks/Seeding.framework/Versions/A/Resources/seedutil", "current"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
result = [i.partition(":")[2] for i in result.stdout.decode().split("\n") if "Currently enrolled in" in i][0]
|
||||
print(f"SeedUtil Current Status: {result}")
|
||||
input("\nPress [ENTER] to continue")
|
||||
self.set_seedutil()
|
||||
else:
|
||||
print("Returning to main menu")
|
||||
self.disable_cpufriend()
|
||||
|
||||
def set_smbios(self):
|
||||
Utilities.cls()
|
||||
Utilities.header(["Override SMBIOS Spoof"])
|
||||
Utilities.header(["Set SMBIOS Spoof Model"])
|
||||
print(
|
||||
"""Change model OpenCore spoofs Mac too
|
||||
|
||||
@@ -381,10 +370,11 @@ Valid options:
|
||||
1. Default set by OpenCore (Default)
|
||||
2. User Override
|
||||
3. Disable all spoofing (unsupported configuration)
|
||||
Q. Return to previous menu
|
||||
"""
|
||||
)
|
||||
|
||||
change_menu = input("Set SMBIOS status: ")
|
||||
change_menu = input("Set SMBIOS Spoof Model: ")
|
||||
if change_menu == "1":
|
||||
print("Setting SMBIOS spoof to default mode")
|
||||
self.constants.override_smbios = "Default"
|
||||
@@ -399,8 +389,10 @@ Valid options:
|
||||
elif change_menu == "3":
|
||||
print("Disabling SMBIOS spoof")
|
||||
self.constants.override_smbios = self.model
|
||||
elif change_menu in {"q", "Q", "Quit", "quit"}:
|
||||
print("Returning to previous menu")
|
||||
else:
|
||||
print("Returning to main menu")
|
||||
self.set_smbios()
|
||||
|
||||
def allow_firewire(self):
|
||||
Utilities.cls()
|
||||
@@ -419,13 +411,15 @@ Note: MacBook5,x-7,1 don't support FireWire boot
|
||||
"""
|
||||
)
|
||||
|
||||
change_menu = input("Enable FireWire Boot support?(y/n): ")
|
||||
if change_menu == "y":
|
||||
change_menu = input("Enable FireWire Boot support?(y/n/q): ")
|
||||
if change_menu in {"y", "Y", "yes", "Yes"}:
|
||||
self.constants.firewire_boot = True
|
||||
elif change_menu == "n":
|
||||
elif change_menu in {"n", "N", "no", "No"}:
|
||||
self.constants.firewire_boot = False
|
||||
elif change_menu in {"q", "Q", "Quit", "quit"}:
|
||||
print("Returning to previous menu")
|
||||
else:
|
||||
print("Invalid option")
|
||||
self.allow_firewire()
|
||||
|
||||
def allow_nvme(self):
|
||||
Utilities.cls()
|
||||
@@ -444,36 +438,196 @@ OpenCore will enable NVMe support in it's picker
|
||||
"""
|
||||
)
|
||||
|
||||
change_menu = input("Enable NVMe Boot support?(y/n): ")
|
||||
if change_menu == "y":
|
||||
change_menu = input("Enable NVMe Boot support?(y/n/q): ")
|
||||
if change_menu in {"y", "Y", "yes", "Yes"}:
|
||||
self.constants.nvme_boot = True
|
||||
elif change_menu == "n":
|
||||
elif change_menu in {"n", "N", "no", "No"}:
|
||||
self.constants.nvme_boot = False
|
||||
elif change_menu in {"q", "Q", "Quit", "quit"}:
|
||||
print("Returning to previous menu")
|
||||
else:
|
||||
print("Invalid option")
|
||||
self.allow_nvme()
|
||||
|
||||
def enable_terascale(self):
|
||||
def allow_wowl(self):
|
||||
Utilities.cls()
|
||||
Utilities.header(["Enable TeraScale 2 Acceleration"])
|
||||
Utilities.header(["Allow Wake on WLAN"])
|
||||
print(
|
||||
"""
|
||||
Currently TeraScale 2 graphics acceleration is in beta with
|
||||
some unfortunate bugs on login including strobing colours
|
||||
until the user forces Million Colours on the Display with
|
||||
SwitchResX or resXtreme
|
||||
Due to an unfortunate bug in macOS Big Sur+, Wake on WLAN is
|
||||
disabled by default for BCM943224, BCM94331 and BCM94360/2 chipsets.
|
||||
|
||||
Users sensitive to seizures should avoid using TeraScale 2
|
||||
patches or ask someone to handle inital setup to ensure
|
||||
no issues
|
||||
|
||||
Note: Acceleration only applies to macOS Big Sur
|
||||
This is due to Wake on WLAN creating network instability and in other cases
|
||||
halving network speeds. This issue is not replicable across machines however
|
||||
be prepared if enabling.
|
||||
"""
|
||||
)
|
||||
|
||||
change_menu = input("Enable TS2 Acceleration?(y/n): ")
|
||||
if change_menu == "y":
|
||||
self.constants.terascale_2_patch = True
|
||||
elif change_menu == "n":
|
||||
self.constants.terascale_2_patch = False
|
||||
change_menu = input("Allow Wake on WLAN?(y/n/q): ")
|
||||
if change_menu in {"y", "Y", "yes", "Yes"}:
|
||||
self.constants.enable_wake_on_wlan = True
|
||||
elif change_menu in {"n", "N", "no", "No"}:
|
||||
self.constants.enable_wake_on_wlan = False
|
||||
elif change_menu in {"q", "Q", "Quit", "quit"}:
|
||||
print("Returning to previous menu")
|
||||
else:
|
||||
print("Invalid option")
|
||||
self.allow_wowl()
|
||||
|
||||
def allow_ivy(self):
|
||||
Utilities.cls()
|
||||
Utilities.header(["Allow Ivy iMac iGPU"])
|
||||
print(
|
||||
"""
|
||||
For iMac13,x systems with a Nvidia dGPU, the iGPU is disabled by default to
|
||||
allow Delta Updates, FileVault, SIP and such on macOS Monterey. However due to
|
||||
this, DRM and QuickSync support may be broken.
|
||||
|
||||
Users can choose to override this option but be aware SIP must be
|
||||
disabled to run root patches to fix DRM and QuickSync.
|
||||
|
||||
Note: This does not apply for Big Sur, the iGPU can be renabled without
|
||||
consequence
|
||||
Note 2: This setting only affects iMac13,x with dGPUs
|
||||
"""
|
||||
)
|
||||
|
||||
change_menu = input("Allow Ivy iMac iGPU?(y/n/q): ")
|
||||
if change_menu in {"y", "Y", "yes", "Yes"}:
|
||||
self.constants.allow_ivy_igpu = True
|
||||
elif change_menu in {"n", "N", "no", "No"}:
|
||||
self.constants.allow_ivy_igpu = False
|
||||
elif change_menu in {"q", "Q", "Quit", "quit"}:
|
||||
print("Returning to previous menu")
|
||||
else:
|
||||
self.allow_ivy()
|
||||
|
||||
def latebloom_settings(self):
|
||||
Utilities.cls()
|
||||
Utilities.header(["Set latebloom properties"])
|
||||
print(
|
||||
f"""
|
||||
Set latebloom properties, useful for debugging boot stalls on
|
||||
pre-Sandy Bridge Macs.
|
||||
|
||||
Valid options:
|
||||
|
||||
1. Set delay (currently: {self.constants.latebloom_delay}ms)
|
||||
2. Set range (currently: {self.constants.latebloom_range}ms)
|
||||
3. Set debug (currently: {bool(self.constants.latebloom_debug)})
|
||||
Q. Return to previous menu
|
||||
"""
|
||||
)
|
||||
|
||||
change_menu = input("Select latebloom property(1/2/3): ")
|
||||
if change_menu == "1":
|
||||
try:
|
||||
self.constants.latebloom_delay = int(input("Set delay: "))
|
||||
except ValueError:
|
||||
input("Invalid value, press [ENTER] to continue")
|
||||
self.latebloom_settings()
|
||||
elif change_menu == "2":
|
||||
try:
|
||||
self.constants.latebloom_range = int(input("Set range: "))
|
||||
except ValueError:
|
||||
input("Invalid value, press [ENTER] to continue")
|
||||
self.latebloom_settings()
|
||||
elif change_menu == "3":
|
||||
try:
|
||||
print("Currently supports either 0(False) or 1(True)")
|
||||
latebloom_debug = int(input("Set debug(0/1): "))
|
||||
if latebloom_debug not in [0, 1]:
|
||||
input("Invalid value, press [ENTER] to continue")
|
||||
else:
|
||||
self.constants.latebloom_debug = latebloom_debug
|
||||
except ValueError:
|
||||
input("Invalid value, press [ENTER] to continue")
|
||||
self.latebloom_settings()
|
||||
elif change_menu in {"q", "Q", "Quit", "quit"}:
|
||||
print("Returning to previous menu")
|
||||
else:
|
||||
self.latebloom_settings()
|
||||
|
||||
def allow_moj_cat_patch(self):
|
||||
Utilities.cls()
|
||||
Utilities.header(["Allow Root Patching on Mojave/Catalina"])
|
||||
print(
|
||||
"""
|
||||
This is an experimental option that allows the usage of legacy acceleration
|
||||
patches in Mojave and Catalina.
|
||||
|
||||
The main goal of this is to allow developers to better test patch sets as well
|
||||
as allow acceleration on TeraScale 2 machines. Not all features may be available
|
||||
(ie. GPU switching may not work, etc)
|
||||
|
||||
Note: for the average user, we recommend using dosdude1's legacy patcher:
|
||||
|
||||
- http://dosdude1.com/software.html
|
||||
"""
|
||||
)
|
||||
|
||||
change_menu = input("Allow Root Patching on Mojave/Catalina?(y/n/q): ")
|
||||
if change_menu in {"y", "Y", "yes", "Yes"}:
|
||||
self.constants.moj_cat_accel = True
|
||||
elif change_menu in {"n", "N", "no", "No"}:
|
||||
self.constants.moj_cat_accel = False
|
||||
elif change_menu in {"q", "Q", "Quit", "quit"}:
|
||||
print("Returning to previous menu")
|
||||
else:
|
||||
self.allow_moj_cat_patch()
|
||||
|
||||
def disable_thunderbolt(self):
|
||||
Utilities.cls()
|
||||
Utilities.header(["Disable Thunderbolt on 2013-14 MacBook Pros"])
|
||||
print(
|
||||
"""
|
||||
Some 2013-14 MacBook Pro's have issues with the built-in thunderbolt,
|
||||
resulting in kernel panics and random shutdowns.
|
||||
|
||||
To alliviate, you can disable the thunderbolt controller on MacBookPro11,x
|
||||
machines with this option.
|
||||
|
||||
Note: This option only works on MacBookPro11,x, file an issue if you know of
|
||||
other devices that benefit from this fix.
|
||||
"""
|
||||
)
|
||||
|
||||
change_menu = input("Disable Thunderbolt?(y/n/q): ")
|
||||
if change_menu in {"y", "Y", "yes", "Yes"}:
|
||||
self.constants.disable_thunderbolt = True
|
||||
elif change_menu in {"n", "N", "no", "No"}:
|
||||
self.constants.disable_thunderbolt = False
|
||||
elif change_menu in {"q", "Q", "Quit", "quit"}:
|
||||
print("Returning to previous menu")
|
||||
else:
|
||||
self.disable_thunderbolt()
|
||||
|
||||
def terascale_2_accel(self):
|
||||
Utilities.cls()
|
||||
Utilities.header(["Set TeraScale 2 Acceleration"])
|
||||
print(
|
||||
"""
|
||||
By default this patcher will install TeraScale 2 acceleration, however
|
||||
for some laptops this may be undesired due to how degraded their dGPU
|
||||
is.
|
||||
|
||||
Disabling TeraScale 2 acceleration will instead install basic framebuffer
|
||||
support allowing for basic brightness control and let the HD3000 iGPU
|
||||
handle acceleration tasks.
|
||||
"""
|
||||
)
|
||||
|
||||
change_menu = input("Allow TeraScale 2 Acceleration?(y/n/q): ")
|
||||
if change_menu in {"y", "Y", "yes", "Yes"}:
|
||||
self.constants.allow_ts2_accel = True
|
||||
elif change_menu in {"n", "N", "no", "No"}:
|
||||
self.constants.allow_ts2_accel = False
|
||||
elif change_menu in {"q", "Q", "Quit", "quit"}:
|
||||
print("Returning to previous menu")
|
||||
else:
|
||||
self.terascale_2_accel()
|
||||
|
||||
def dump_hardware(self):
|
||||
Utilities.cls()
|
||||
Utilities.header(["Dumping detected hardware"])
|
||||
print("")
|
||||
print(self.constants.computer)
|
||||
input("\nPress [ENTER] to exit: ")
|
||||
|
||||
@@ -12,81 +12,138 @@ from Resources import device_probe
|
||||
|
||||
class Constants:
|
||||
def __init__(self):
|
||||
self.patcher_version = "0.2.1"
|
||||
self.opencore_commit = "4e0ff2d - 05-23-2021"
|
||||
self.opencore_version = "0.7.0"
|
||||
self.lilu_version = "1.5.4"
|
||||
self.whatevergreen_version = "1.5.1"
|
||||
self.airportbcrmfixup_version = "2.1.3"
|
||||
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.95"
|
||||
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.2"
|
||||
self.restrictevents_version = "1.0.3"
|
||||
self.restrictevents_mbp_version = "1.0.3"
|
||||
self.piixata_version = "1.0.0"
|
||||
self.backlight_version = "1.0.1"
|
||||
self.backlight_injector_version = "1.0.0"
|
||||
self.cpufriend_version = "1.2.4"
|
||||
self.nightshift_version = "1.1.0"
|
||||
self.smcspoof_version = "1.0.0"
|
||||
self.nvmefix_version = "1.0.9"
|
||||
self.sidecarfixup_version = "1.0.2"
|
||||
self.debugenhancer_version = "1.0.3"
|
||||
self.innie_version = "1.3.0"
|
||||
self.fw_kext = "1.0.0"
|
||||
self.patcher_support_pkg_version = "0.0.10" # PatcherSupportPkg
|
||||
# Patcher Versioning
|
||||
self.patcher_version = "0.2.5" # OpenCore-Legacy-Patcher
|
||||
self.patcher_support_pkg_version = "0.1.3" # PatcherSupportPkg
|
||||
|
||||
# OpenCore Versioning
|
||||
# https://github.com/acidanthera/OpenCorePkg
|
||||
self.opencore_commit = "ff4b099 - 09-06-2021"
|
||||
self.opencore_version = "0.7.3"
|
||||
|
||||
# Kext Versioning
|
||||
## Acidanthera
|
||||
## https://github.com/acidanthera
|
||||
self.lilu_version = "1.5.6" # Lilu
|
||||
self.whatevergreen_version = "1.5.3" # WhateverGreen
|
||||
self.airportbcrmfixup_version = "2.1.3" # AirPortBrcmFixup
|
||||
self.nvmefix_version = "1.0.9" # NVMeFix
|
||||
self.applealc_version = "1.6.3" # AppleALC
|
||||
self.restrictevents_version = "1.0.3" # RestrictEvents
|
||||
self.restrictevents_mbp_version = "1.0.3" # RestrictEvents blocking displaypolicyd (see RestrictEvents-MBP91.patch)
|
||||
self.featureunlock_version = "1.0.3" # FeatureUnlock
|
||||
self.debugenhancer_version = "1.0.4" # DebugEnhancer
|
||||
self.cpufriend_version = "1.2.4" # CPUFriend
|
||||
self.bluetool_version = "2.6.1" # BlueToolFixup
|
||||
self.cslvfixup_version = "2.6.1" # CSLVFixup
|
||||
|
||||
## Apple
|
||||
## https://www.apple.com
|
||||
self.marvel_version = "1.0.1" # MarvelYukonEthernet
|
||||
self.nforce_version = "1.0.1" # nForceEthernet
|
||||
self.piixata_version = "1.0.1" # AppleIntelPIIXATA
|
||||
self.fw_kext = "1.0.1" # IOFireWireFamily
|
||||
self.apple_trackpad = "1.0.1" # AppleUSBTrackpad
|
||||
|
||||
## Apple - Dortania Modified
|
||||
self.bcm570_version = "1.0.2" # CatalinaBCM5701Ethernet
|
||||
self.corecaptureelcap_version = "1.0.1" # corecaptureElCap
|
||||
self.io80211elcap_version = "2.0.0" # IO80211ElCap
|
||||
self.io80211high_sierra_version = "1.0.1" # IO80211HighSierra
|
||||
self.io80211mojave_version = "1.0.1" # IO80211Mojave
|
||||
|
||||
## Dortania
|
||||
## https://github.com/dortania
|
||||
self.backlight_injector_version = "1.0.0" # BacklightInjector
|
||||
self.smcspoof_version = "1.0.0" # SMC-Spoof
|
||||
self.mce_version = "1.0.0" # AppleMCEReporterDisabler
|
||||
self.btspoof_version = "1.0.0" # Bluetooth-Spoof
|
||||
|
||||
## Syncretic
|
||||
## https://forums.macrumors.com/members/syncretic.1173816/
|
||||
## https://github.com/reenigneorcim/latebloom
|
||||
self.latebloom_version = "0.22" # Latebloom
|
||||
self.mousse_version = "0.95" # MouSSE
|
||||
self.telemetrap_version = "1.0.0" # telemetrap
|
||||
|
||||
## cdf
|
||||
## https://github.com/cdf/Innie
|
||||
self.innie_version = "1.3.0" # Innie
|
||||
|
||||
# Get resource path
|
||||
self.current_path = Path(__file__).parent.parent.resolve()
|
||||
self.payload_path = self.current_path / Path("payloads")
|
||||
|
||||
# Hardware
|
||||
self.computer: device_probe.Computer = None # type: ignore
|
||||
|
||||
self.custom_model: Optional[str] = None
|
||||
self.custom_mxm_gpu: bool = False
|
||||
|
||||
# Patcher Settings
|
||||
self.allow_oc_everywhere = False # Set whether Patcher can be run on unsupported Macs
|
||||
self.gui_mode = False # Determine whether running in a GUI or TUI
|
||||
self.disk = "" # Set installation ESP
|
||||
self.patch_disk = "" # Set Root Volume to patch
|
||||
self.validate = False # Enable validation testing for CI
|
||||
self.recovery_status = False # Detect if booted into RecoveryOS
|
||||
|
||||
## Hardware
|
||||
self.computer: device_probe.Computer = None # type: ignore
|
||||
self.custom_model: Optional[str] = None
|
||||
|
||||
## OpenCore Settings
|
||||
self.opencore_debug = False
|
||||
self.opencore_build = "RELEASE"
|
||||
self.kext_debug = False
|
||||
self.verbose_debug = False
|
||||
self.showpicker = True # Show or Hide OpenCore's Boot Picker
|
||||
self.boot_efi = False # Use EFI/BOOT/BOOTx64.efi bootstrap
|
||||
|
||||
## Kext Settings
|
||||
self.kext_debug = False # Enables Lilu debug and DebugEnhancer
|
||||
|
||||
## NVRAM Settings
|
||||
self.verbose_debug = False # -v
|
||||
|
||||
## SMBIOS Settings
|
||||
self.custom_cpu_model = 2 # Patch type value
|
||||
self.custom_cpu_model_value = "" # New CPU name within About This Mac
|
||||
self.serial_settings = "Minimal" # Set SMBIOS level used
|
||||
self.override_smbios = "Default" # Set SMBIOS model used
|
||||
|
||||
## Latebloom Settings
|
||||
self.latebloom_status = False # Latebloom Enabled
|
||||
self.latebloom_delay = 0 # Delay between each PCIe Probe
|
||||
self.latebloom_range = 0 # Range each delay can differ
|
||||
self.latebloom_debug = 0 # Debug Setting
|
||||
|
||||
## Security Settings
|
||||
self.apecid_support = False # ApECID
|
||||
self.amfi_status = True # Apple Mobile File Integrity
|
||||
self.sip_status = True # System Integrity Protection
|
||||
self.secure_status = False # Secure Boot Model
|
||||
self.vault = False # EFI Vault
|
||||
self.disable_cs_lv = False # Disable Library validation
|
||||
|
||||
## OS Settings
|
||||
self.os_support = 12.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 = False
|
||||
self.detected_os = 0
|
||||
self.boot_efi = False
|
||||
self.drm_support = False
|
||||
self.allow_oc_everywhere = False
|
||||
self.custom_cpu_model = 2
|
||||
self.custom_cpu_model_value = ""
|
||||
self.custom_color = ""
|
||||
self.download_ram = False
|
||||
self.disallow_cpufriend = False
|
||||
self.recovery_status = False
|
||||
self.override_smbios = "Default"
|
||||
self.apecid_support = False
|
||||
self.firewire_boot = False
|
||||
self.nvme_boot = False
|
||||
self.disable_amfi = False
|
||||
self.terascale_2_patch = False
|
||||
self.detected_os = 0 # Major Kernel Version
|
||||
self.detected_os_minor = 0 # Minor Kernel Version
|
||||
self.detected_os_build = "" # OS Build
|
||||
self.allow_fv_root = False # Allow FileVault on broken sealed snapshots
|
||||
|
||||
## Boot Volume Settings
|
||||
self.firewire_boot = False # Allow macOS FireWire Boot
|
||||
self.nvme_boot = False # Allow UEFI NVMe Boot
|
||||
|
||||
## Graphics Settings
|
||||
self.metal_build = False # Set MXM Build support
|
||||
self.imac_vendor = "None" # Set MXM GPU vendor
|
||||
self.drm_support = False # Set iMac14,x DRM support
|
||||
self.allow_ivy_igpu = False # Set iMac13,x iGPU support
|
||||
self.moj_cat_accel = False # Set Mojave/Catalina Acceleration support
|
||||
self.allow_ts2_accel = True # Set TeraScale 2 Acceleration support
|
||||
|
||||
## Miscellaneous
|
||||
self.disallow_cpufriend = False # Disable CPUFriend
|
||||
self.enable_wake_on_wlan = False # Allow Wake on WLAN for modern Broadcom
|
||||
self.disable_thunderbolt = False # Disable Thunderbolt Controller
|
||||
|
||||
# OS Versions
|
||||
## Based off Major Kernel Version
|
||||
self.tiger = 8
|
||||
self.leopard = 9
|
||||
self.snow_leopard = 10
|
||||
@@ -109,9 +166,12 @@ class Constants:
|
||||
self.pci_broadcom = "14E4"
|
||||
self.pci_atheros = "168C"
|
||||
self.pci_apple = "106B"
|
||||
self.pci_aquantia = "1D6A"
|
||||
self.pci_marvell = "11AB"
|
||||
self.pci_syskonnect = "1148"
|
||||
|
||||
# Class Codes
|
||||
# https://pci-ids.ucw.cz/read/PD
|
||||
## https://pci-ids.ucw.cz/read/PD
|
||||
self.classcode_sata = "01060100"
|
||||
self.classcode_nvme = "02080100"
|
||||
self.classcode_nvme_generic = "02800100"
|
||||
@@ -119,6 +179,7 @@ class Constants:
|
||||
self.classcode_gpu = "00000300"
|
||||
self.classcode_gpu_variant = "00800300"
|
||||
self.classcode_xhci = "30030C00"
|
||||
self.classcode_ethernet = "00000200"
|
||||
|
||||
# Nvidia GPU Architecture
|
||||
self.arch_tesla = "NV50"
|
||||
@@ -128,6 +189,13 @@ class Constants:
|
||||
# External Files
|
||||
self.url_patcher_support_pkg = "https://github.com/dortania/PatcherSupportPkg/releases/download/"
|
||||
|
||||
self.legacy_accel_support = [
|
||||
self.mojave,
|
||||
self.catalina,
|
||||
self.big_sur,
|
||||
self.monterey,
|
||||
]
|
||||
|
||||
# Payload Location
|
||||
# OpenCore
|
||||
@property
|
||||
@@ -238,10 +306,6 @@ class Constants:
|
||||
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 backlight_injector_path(self):
|
||||
return self.payload_kexts_path / Path(f"Misc/BacklightInjector-v{self.backlight_injector_version}.zip")
|
||||
@@ -250,30 +314,46 @@ class Constants:
|
||||
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 btspoof_path(self):
|
||||
return self.payload_kexts_path / Path(f"Misc/Bluetooth-Spoof-v{self.btspoof_version}.zip")
|
||||
|
||||
@property
|
||||
def nvmefix_path(self):
|
||||
return self.payload_kexts_path / Path(f"Acidanthera/NVMeFix-v{self.nvmefix_version}.zip")
|
||||
|
||||
@property
|
||||
def sidecarfixup_path(self):
|
||||
return self.payload_kexts_path / Path(f"Acidanthera/SidecarFixup-v{self.sidecarfixup_version}.zip")
|
||||
def featureunlock_path(self):
|
||||
return self.payload_kexts_path / Path(f"Acidanthera/FeatureUnlock-v{self.featureunlock_version}.zip")
|
||||
|
||||
@property
|
||||
def debugenhancer_path(self):
|
||||
return self.payload_kexts_path / Path(f"Acidanthera/DebugEnhancer-v{self.debugenhancer_version}.zip")
|
||||
|
||||
@property
|
||||
def bluetool_path(self):
|
||||
return self.payload_kexts_path / Path(f"Acidanthera/BlueToolFixup-v{self.bluetool_version}.zip")
|
||||
|
||||
@property
|
||||
def cslvfixup_path(self):
|
||||
return self.payload_kexts_path / Path(f"Acidanthera/CSLVFixup-v{self.cslvfixup_version}.zip")
|
||||
|
||||
@property
|
||||
def innie_path(self):
|
||||
return self.payload_kexts_path / Path(f"Misc/Innie-v{self.innie_version}.zip")
|
||||
|
||||
@property
|
||||
def latebloom_path(self):
|
||||
return self.payload_kexts_path / Path(f"Misc/latebloom-v{self.latebloom_version}.zip")
|
||||
|
||||
@property
|
||||
def apple_trackpad_path(self):
|
||||
return self.payload_kexts_path / Path(f"Misc/AppleUSBTrackpad-v{self.apple_trackpad}.zip")
|
||||
|
||||
@property
|
||||
def plist_folder_path(self):
|
||||
return self.payload_kexts_path / Path("Plists")
|
||||
@@ -301,7 +381,7 @@ class Constants:
|
||||
|
||||
@property
|
||||
def opencore_release_folder(self):
|
||||
return self.build_path / Path(f"OpenCore-{self.opencore_build}")
|
||||
return self.build_path / Path(f"OpenCore-Build")
|
||||
|
||||
@property
|
||||
def opencore_zip_copied(self):
|
||||
@@ -384,6 +464,10 @@ class Constants:
|
||||
def vault_path(self):
|
||||
return self.payload_path / Path("Tools/CreateVault/sign.command")
|
||||
|
||||
@property
|
||||
def ocvalidate_path(self):
|
||||
return self.payload_path / Path("Tools/ocvalidate")
|
||||
|
||||
# Icons
|
||||
@property
|
||||
def app_icon_path(self):
|
||||
@@ -423,6 +507,18 @@ class Constants:
|
||||
def payload_apple_kexts_path(self):
|
||||
return self.payload_apple_root_path / Path("Extensions")
|
||||
|
||||
@property
|
||||
def payload_apple_coreservices_path(self):
|
||||
return self.payload_apple_root_path / Path("CoreServices")
|
||||
|
||||
@property
|
||||
def payload_apple_usr_path(self):
|
||||
return self.payload_apple_root_path / Path("usr")
|
||||
|
||||
@property
|
||||
def payload_apple_libexec_path(self):
|
||||
return self.payload_apple_usr_path / Path("libexec")
|
||||
|
||||
@property
|
||||
def payload_apple_frameworks_path(self):
|
||||
return self.payload_apple_root_path / Path("Frameworks")
|
||||
@@ -459,6 +555,10 @@ class Constants:
|
||||
def payload_apple_private_frameworks_path_accel_ts2(self):
|
||||
return self.payload_apple_private_frameworks_path / Path("Graphics-Acceleration-TeraScale-2")
|
||||
|
||||
@property
|
||||
def payload_apple_private_frameworks_path_accel_ivy(self):
|
||||
return self.payload_apple_private_frameworks_path / Path("Graphics-Acceleration-Ivy-Bridge")
|
||||
|
||||
@property
|
||||
def payload_apple_private_frameworks_path_brightness(self):
|
||||
return self.payload_apple_private_frameworks_path / Path("Brightness-Control")
|
||||
@@ -476,7 +576,7 @@ class Constants:
|
||||
|
||||
@property
|
||||
def legacy_nvidia_path(self):
|
||||
return self.legacy_graphics / Path("Nvidia-Tesla-Fermi")
|
||||
return self.legacy_graphics / Path("Nvidia-Tesla")
|
||||
|
||||
@property
|
||||
def legacy_nvidia_kepler_path(self):
|
||||
@@ -510,19 +610,30 @@ class Constants:
|
||||
def legacy_brightness(self):
|
||||
return self.payload_apple_kexts_path / Path("Brightness-Control")
|
||||
|
||||
@property
|
||||
def legacy_wifi_coreservices(self):
|
||||
return self.payload_apple_coreservices_path / Path("Legacy-Wifi")
|
||||
|
||||
@property
|
||||
def legacy_wifi_libexec(self):
|
||||
return self.payload_apple_libexec_path / Path("Legacy-Wifi")
|
||||
|
||||
csr_values = {
|
||||
"CSR_ALLOW_UNTRUSTED_KEXTS": False, # 0x1 - Allows Unsigned Kexts - Introduced in El Capitan # noqa: E241
|
||||
"CSR_ALLOW_UNRESTRICTED_FS": False, # 0x2 - File System Access - Introduced in El Capitan # noqa: E241
|
||||
"CSR_ALLOW_TASK_FOR_PID": False, # 0x4 - Unrestricted Debugging - Introduced in El Capitan # noqa: E241
|
||||
"CSR_ALLOW_KERNEL_DEBUGGER": False, # 0x8 - Allow Kernel Debugger - Introduced in El Capitan # noqa: E241
|
||||
"CSR_ALLOW_APPLE_INTERNAL": False, # 0x10 - Set AppleInternal Features - Introduced in El Capitan # noqa: E241
|
||||
"CSR_ALLOW_UNRESTRICTED_DTRACE": False, # 0x20 - Unrestricted DTrace usage - Introduced in El Capitan # noqa: E241
|
||||
"CSR_ALLOW_UNRESTRICTED_NVRAM": False, # 0x40 - Unrestricted NVRAM write - Introduced in El Capitan # noqa: E241
|
||||
"CSR_ALLOW_DEVICE_CONFIGURATION": False, # 0x80 - Allow Device Configuration(?) - Introduced in El Capitan # noqa: E241
|
||||
"CSR_ALLOW_ANY_RECOVERY_OS": False, # 0x100 - Disable BaseSystem Verification - Introduced in Sierra # noqa: E241
|
||||
"CSR_ALLOW_UNAPPROVED_KEXTS": False, # 0x200 - Allow Unapproved Kexts - Introduced in High Sierra # noqa: E241
|
||||
# Source: macOS 11.4 (XNU's csr.h)
|
||||
# https://opensource.apple.com/source/xnu/xnu-7195.121.3/bsd/sys/csr.h.auto.html
|
||||
"CSR_ALLOW_UNTRUSTED_KEXTS": False, # 0x1 - Allows Unsigned Kexts - Introduced in El Capitan # noqa: E241
|
||||
"CSR_ALLOW_UNRESTRICTED_FS": False, # 0x2 - File System Access - Introduced in El Capitan # noqa: E241
|
||||
"CSR_ALLOW_TASK_FOR_PID": False, # 0x4 - Unrestricted task_for_pid() - Introduced in El Capitan # noqa: E241
|
||||
"CSR_ALLOW_KERNEL_DEBUGGER": False, # 0x8 - Allow Kernel Debugger - Introduced in El Capitan # noqa: E241
|
||||
"CSR_ALLOW_APPLE_INTERNAL": False, # 0x10 - Set AppleInternal Features - Introduced in El Capitan # noqa: E241
|
||||
# "CSR_ALLOW_DESTRUCTIVE_DTRACE": False, # 0x20 - Allow destructive DTrace - Deprecated # noqa: E241
|
||||
"CSR_ALLOW_UNRESTRICTED_DTRACE": False, # 0x20 - Unrestricted DTrace usage - Introduced in El Capitan # noqa: E241
|
||||
"CSR_ALLOW_UNRESTRICTED_NVRAM": False, # 0x40 - Unrestricted NVRAM write - Introduced in El Capitan # noqa: E241
|
||||
"CSR_ALLOW_DEVICE_CONFIGURATION": False, # 0x80 - Allow custom DeviceTree (iOS) - Introduced in El Capitan # noqa: E241
|
||||
"CSR_ALLOW_ANY_RECOVERY_OS": False, # 0x100 - Skip BaseSystem Verification - Introduced in Sierra # noqa: E241
|
||||
"CSR_ALLOW_UNAPPROVED_KEXTS": False, # 0x200 - Allow Unnotarized Kexts - Introduced in High Sierra # noqa: E241
|
||||
"CSR_ALLOW_EXECUTABLE_POLICY_OVERRIDE": False, # 0x400 - Override Executable Policy - Introduced in Mojave # noqa: E241
|
||||
"CSR_ALLOW_UNAUTHENTICATED_ROOT": False, # 0x800 - Allow Root Volume Mounting - Introduced in Big Sur # noqa: E241
|
||||
"CSR_ALLOW_UNAUTHENTICATED_ROOT": False, # 0x800 - Allow Root Volume Mounting - Introduced in Big Sur # noqa: E241
|
||||
}
|
||||
|
||||
root_patch_sip_mojave = [
|
||||
@@ -543,22 +654,32 @@ class Constants:
|
||||
]
|
||||
|
||||
sbm_values = [
|
||||
"j137",
|
||||
"j680",
|
||||
"j132",
|
||||
"j174",
|
||||
"j140k",
|
||||
"j780",
|
||||
"j213",
|
||||
"j140a",
|
||||
"j152f",
|
||||
"j160",
|
||||
"j230k",
|
||||
"j214k",
|
||||
"j223",
|
||||
"j215",
|
||||
"j185",
|
||||
"j185f",
|
||||
"j137ap", # iMacPro1,1
|
||||
"j680ap", # MacBookPro15,1
|
||||
"j132ap", # MacBookPro15,2
|
||||
"j174ap", # Macmini8,1
|
||||
"j140kap", # MacBookAir8,1
|
||||
"j780ap", # MacBookPro15,3
|
||||
"j213ap", # MacBookPro15,4
|
||||
"j140aap", # MacBookAir8,2
|
||||
"j152fap", # MacBookPro16,1
|
||||
"j160ap", # MacPro7,1
|
||||
"j230kap", # MacBookAir9,1
|
||||
"j214kap", # MacBookPro16,2
|
||||
"j223ap", # MacBookPro16,3
|
||||
"j215ap", # MacBookPro16,4
|
||||
"j185ap", # iMac20,1
|
||||
"j185fap", # iMac20,2
|
||||
# "x86legacy", # non-T2 Macs/VMs, Monterey's boot.efi enforces this on all Macs
|
||||
]
|
||||
|
||||
sandy_board_id = [
|
||||
"Mac-E43C1C25D4880AD6", # MacBookPro12,1
|
||||
"Mac-06F11F11946D27C5", # MacBookPro11,5
|
||||
"Mac-9F18E312C5C2BF0B", # MacBookAir7,1
|
||||
"Mac-937CB26E2E02BB01", # MacBookAir7,2
|
||||
"Mac-35C5E08120C7EEAF", # Macmini7,1
|
||||
"Mac-7BA5B2D9E42DDD94", # iMacPro1,1
|
||||
]
|
||||
|
||||
board_id = {
|
||||
@@ -666,6 +787,8 @@ class Constants:
|
||||
"iMac16,1": "Mac-A369DDC4E67F1C45",
|
||||
"iMac16,2": "Mac-FFE5EF870D7BA81A",
|
||||
"iMac17,1": "Mac-DB15BD556843C820",
|
||||
# iMac17,1": "Mac-65CE76090165799A",
|
||||
# iMac17,1": "Mac-B809C3757DA9BB8D",
|
||||
"iMac18,1": "Mac-4B682C642B45593E",
|
||||
"iMac18,2": "Mac-77F17D7DA9285301",
|
||||
"iMac18,3": "Mac-BE088AF8C5EB4FA2",
|
||||
@@ -685,3 +808,12 @@ class Constants:
|
||||
"Xserve2,1": "Mac-F42289C8",
|
||||
"Xserve3,1": "Mac-F223BEC8",
|
||||
}
|
||||
|
||||
target_type = {
|
||||
"ADP3,2": "J273",
|
||||
"MacBookAir10,1": "J313",
|
||||
"MacBookPro17,1": "J293",
|
||||
"Macmini9,1": "J274",
|
||||
"iMac21,1": "J256",
|
||||
"iMac21,2": "J257",
|
||||
}
|
||||
|
||||
@@ -271,10 +271,15 @@ ModernGPU = [
|
||||
"MacBookPro9,2", # Intel 4000
|
||||
"MacBookPro10,1", # Intel 4000 + Nvidia 650M
|
||||
"MacBookPro10,2", # Intel 4000
|
||||
"MacBookPro11,3", # Intel 5000 + Nvidia Kepler
|
||||
"Macmini6,1", # Intel 4000
|
||||
"Macmini6,2", # Intel 4000
|
||||
"iMac13,1", # Intel 4000
|
||||
"iMac13,2", # Intel 4000 + Nvidia Kepler
|
||||
"iMac13,3", # Intel 4000
|
||||
"iMac14,1", # Intel 5000 + Nvidia Kepler
|
||||
"iMac14,2", # Intel 5000 + Nvidia Kepler
|
||||
"iMac14,3", # Intel 5000 + Nvidia Kepler
|
||||
]
|
||||
|
||||
LegacyGPU = [
|
||||
@@ -444,14 +449,36 @@ XhciSupport = [
|
||||
"Dortania1,1",
|
||||
]
|
||||
|
||||
SidecarPatch = [
|
||||
FeatureUnlockSupport = [
|
||||
"MacBook4,1",
|
||||
"MacBook5,1",
|
||||
"MacBook5,2",
|
||||
"MacBook6,1",
|
||||
"MacBook7,1",
|
||||
"MacBook8,1",
|
||||
"MacBookAir2,1",
|
||||
"MacBookAir3,1",
|
||||
"MacBookAir3,2",
|
||||
"MacBookAir4,1",
|
||||
"MacBookAir4,2",
|
||||
"MacBookAir5,1",
|
||||
"MacBookAir5,2",
|
||||
"MacBookAir6,1",
|
||||
"MacBookAir6,2",
|
||||
"MacBookAir7,1",
|
||||
"MacBookAir7,2",
|
||||
"MacBookPro4,1",
|
||||
"MacBookPro5,1",
|
||||
"MacBookPro5,2",
|
||||
"MacBookPro5,3",
|
||||
"MacBookPro5,4",
|
||||
"MacBookPro5,5",
|
||||
"MacBookPro6,1",
|
||||
"MacBookPro6,2",
|
||||
"MacBookPro7,1",
|
||||
"MacBookPro8,1",
|
||||
"MacBookPro8,2",
|
||||
"MacBookPro8,3",
|
||||
"MacBookPro9,1",
|
||||
"MacBookPro9,2",
|
||||
"MacBookPro10,1",
|
||||
@@ -468,10 +495,24 @@ SidecarPatch = [
|
||||
"MacBookPro14,1",
|
||||
"MacBookPro14,2",
|
||||
"MacBookPro14,3",
|
||||
"Macmini3,1",
|
||||
"Macmini4,1",
|
||||
"Macmini5,1",
|
||||
"Macmini5,2",
|
||||
"Macmini5,3",
|
||||
"Macmini6,1",
|
||||
"Macmini6,2",
|
||||
"Macmini7,1",
|
||||
"Macmini8,1",
|
||||
"iMac7,1",
|
||||
"iMac8,1",
|
||||
"iMac9,1",
|
||||
"iMac10,1",
|
||||
"iMac11,1",
|
||||
"iMac11,2",
|
||||
"iMac11,3",
|
||||
"iMac12,1",
|
||||
"iMac12,2",
|
||||
"iMac13,1",
|
||||
"iMac13,2",
|
||||
"iMac13,3",
|
||||
@@ -483,6 +524,10 @@ SidecarPatch = [
|
||||
"iMac16,2",
|
||||
"iMac17,1",
|
||||
"iMac18,1",
|
||||
"iMac18,2",
|
||||
"iMac18,3",
|
||||
"MacPro3,1",
|
||||
"MacPro4,1",
|
||||
"MacPro5,1",
|
||||
"MacPro6,1",
|
||||
"Dortania1,1",
|
||||
@@ -518,12 +563,10 @@ IntelNvidiaDRM = [
|
||||
"iMac14,3",
|
||||
]
|
||||
|
||||
HiDPIpicker = ["MacBook8,1", "MacBookPro10,1", "MacBookPro10,2", "MacBookPro11,1", "MacBookPro11,2", "MacBookPro11,3", "iMac15,1", "Dortania1,1"]
|
||||
|
||||
IDEPatch = ["MacBook4,1", "MacBookPro4,1", "iMac7,1", "iMac8,1", "MacPro3,1", "Xserve2,1", "Dortania1,1"]
|
||||
|
||||
# 11" Air
|
||||
MacBookAir61 = [
|
||||
MacBookAir_11 = [
|
||||
"MacBookAir3,1",
|
||||
"MacBookAir4,1",
|
||||
"MacBookAir5,1",
|
||||
@@ -531,7 +574,7 @@ MacBookAir61 = [
|
||||
]
|
||||
|
||||
# Classic MacBook and 13" Air
|
||||
MacBookAir62 = [
|
||||
MacBookAir_13 = [
|
||||
"MacBook4,1",
|
||||
"MacBook5,1",
|
||||
"MacBook5,2",
|
||||
@@ -545,13 +588,13 @@ MacBookAir62 = [
|
||||
]
|
||||
|
||||
# Retina MacBook
|
||||
MacBook81 = [
|
||||
MacBook_12 = [
|
||||
"MacBook8,1",
|
||||
]
|
||||
|
||||
# MacBook Pro 13"
|
||||
|
||||
MacBookPro111 = [
|
||||
MacBookPro_13 = [
|
||||
"MacBookPro5,5",
|
||||
"MacBookPro7,1",
|
||||
"MacBookPro8,1",
|
||||
@@ -562,11 +605,11 @@ MacBookPro111 = [
|
||||
|
||||
# MacBook Pro 15" (iGPU)
|
||||
|
||||
MacBookPro112 = ["MacBookPro11,2"]
|
||||
MacBookPro_15_iGPU = ["MacBookPro11,2"]
|
||||
|
||||
# MacBook Pro 15" and 17" (dGPU)
|
||||
|
||||
MacBookPro113 = [
|
||||
MacBookPro_15_dGPU = [
|
||||
"MacBookPro4,1",
|
||||
"MacBookPro5,1",
|
||||
"MacBookPro5,2",
|
||||
@@ -583,9 +626,9 @@ MacBookPro113 = [
|
||||
|
||||
# Mac Mini
|
||||
|
||||
Macmini71 = ["Macmini3,1", "Macmini4,1", "Macmini5,1", "Macmini5,2", "Macmini5,3", "Macmini6,1", "Macmini6,2"]
|
||||
Macmini = ["Macmini3,1", "Macmini4,1", "Macmini5,1", "Macmini5,2", "Macmini5,3", "Macmini6,1", "Macmini6,2"]
|
||||
# iMacPro = dGPU only iMacs
|
||||
iMacPro11 = [
|
||||
iMac_iGPUless = [
|
||||
"iMac7,1",
|
||||
"iMac8,1",
|
||||
"iMac9,1",
|
||||
@@ -598,157 +641,17 @@ iMacPro11 = [
|
||||
]
|
||||
|
||||
# iMac = AMD and Nvidia GPU with iGPU
|
||||
iMac151 = [
|
||||
iMac_dGPU = [
|
||||
"iMac13,2",
|
||||
"iMac14,2",
|
||||
"iMac14,3",
|
||||
"iMac15,1",
|
||||
]
|
||||
# iMac = Intel iGPU
|
||||
iMac144 = ["iMac13,1", "iMac14,1", "iMac14,4"]
|
||||
iMac_iGPU = ["iMac13,1", "iMac13,3", "iMac14,1", "iMac14,4"]
|
||||
|
||||
# Mac Pro and Xserve
|
||||
MacPro71 = ["MacPro3,1", "MacPro4,1", "MacPro5,1", "Xserve2,1", "Xserve3,1", "Dortania1,1"]
|
||||
|
||||
XXerve = [
|
||||
"Xserve3,1",
|
||||
]
|
||||
|
||||
iXac = [
|
||||
"iMac7,1",
|
||||
"iMac8,1",
|
||||
"iMac9,1",
|
||||
"iMac10,1",
|
||||
"iMac11,1",
|
||||
"iMac11,2",
|
||||
"iMac11,3",
|
||||
"iMac12,1",
|
||||
"iMac12,2",
|
||||
"iMac13,1",
|
||||
"iMac13,2",
|
||||
"iMac13,3",
|
||||
"iMac14,1",
|
||||
"iMac14,2",
|
||||
"iMac14,3",
|
||||
]
|
||||
|
||||
XacBookNormal = [
|
||||
"MacBook4,1",
|
||||
"MacBook5,1",
|
||||
"MacBook5,2",
|
||||
"MacBook6,1",
|
||||
"MacBook7,1",
|
||||
]
|
||||
|
||||
XacBookAir = [
|
||||
"MacBookAir2,1",
|
||||
"MacBookAir3,1",
|
||||
"MacBookAir3,2",
|
||||
"MacBookAir4,1",
|
||||
"MacBookAir4,2",
|
||||
"MacBookAir5,1",
|
||||
"MacBookAir5,2",
|
||||
]
|
||||
|
||||
XacBookPro = [
|
||||
"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",
|
||||
]
|
||||
|
||||
XacPro = [
|
||||
"MacPro3,1",
|
||||
"MacPro4,1",
|
||||
"MacPro5,1",
|
||||
]
|
||||
|
||||
Xacmini = [
|
||||
"Macmini3,1",
|
||||
"Macmini4,1",
|
||||
"Macmini5,1",
|
||||
"Macmini5,2",
|
||||
"Macmini5,3",
|
||||
"Macmini6,1",
|
||||
"Macmini6,2",
|
||||
]
|
||||
|
||||
ControllerTypes = [
|
||||
"",
|
||||
"-EHCI",
|
||||
"-EHC1",
|
||||
"-EHC2",
|
||||
"-XHC1",
|
||||
"-OHC1",
|
||||
"-OHC2",
|
||||
"-UHC1",
|
||||
"-UHC2",
|
||||
"-UHC3",
|
||||
"-UHC4",
|
||||
"-InternalHub-EHC1",
|
||||
"-InternalHub-EHC1-InternalHub",
|
||||
"-InternalHub-EHC2",
|
||||
"-InternalHub",
|
||||
]
|
||||
|
||||
upgradableMXMGPUs = ["iMac10,1", "iMac11,1", "iMac11,2", "iMac11,3", "iMac12,1", "iMac12,2", "Xserve3,1", "Dortania1,1"]
|
||||
|
||||
NightShift = [
|
||||
"MacBook4,1",
|
||||
"MacBook5,1",
|
||||
"MacBook5,2",
|
||||
"MacBook6,1",
|
||||
"MacBook7,1",
|
||||
"MacBookAir2,1",
|
||||
"MacBookAir3,1",
|
||||
"MacBookAir3,2",
|
||||
"MacBookAir4,1",
|
||||
"MacBookAir4,2",
|
||||
"MacBookPro4,1",
|
||||
"MacBookPro5,1",
|
||||
"MacBookPro5,2",
|
||||
"MacBookPro5,3",
|
||||
"MacBookPro5,4",
|
||||
"MacBookPro5,5",
|
||||
"MacBookPro6,1",
|
||||
"MacBookPro6,2",
|
||||
"MacBookPro7,1",
|
||||
"MacBookPro8,1",
|
||||
"MacBookPro8,2",
|
||||
"MacBookPro8,3",
|
||||
"Macmini3,1",
|
||||
"Macmini4,1",
|
||||
"Macmini5,1",
|
||||
"Macmini5,2",
|
||||
"Macmini5,3",
|
||||
"iMac7,1",
|
||||
"iMac8,1",
|
||||
"iMac9,1",
|
||||
"iMac10,1",
|
||||
"iMac11,1",
|
||||
"iMac11,2",
|
||||
"iMac11,3",
|
||||
"iMac12,1",
|
||||
"iMac12,2",
|
||||
"MacPro3,1",
|
||||
"MacPro4,1",
|
||||
"MacPro5,1",
|
||||
"Xserve2,1",
|
||||
"Xserve3,1",
|
||||
"Dortania1,1",
|
||||
]
|
||||
MacPro = ["MacPro3,1", "MacPro4,1", "MacPro5,1", "Xserve2,1", "Xserve3,1", "Dortania1,1"]
|
||||
|
||||
UGAtoGOP = [
|
||||
"MacBook4,1",
|
||||
@@ -828,26 +731,6 @@ NoAPFSsupport = [
|
||||
"Dortania1,1",
|
||||
]
|
||||
|
||||
NoRootPatch11 = [
|
||||
"MacBookAir5,1",
|
||||
"MacBookAir5,2",
|
||||
"MacBookPro9,1",
|
||||
"MacBookPro9,2",
|
||||
"MacBookPro10,1",
|
||||
"MacBookPro10,2",
|
||||
"Macmini6,1",
|
||||
"Macmini6,2",
|
||||
"iMac13,1",
|
||||
"iMac13,2",
|
||||
"iMac13,3",
|
||||
"iMac14,1",
|
||||
"iMac14,2",
|
||||
"iMac14,3",
|
||||
"MacPro4,1",
|
||||
"MacPro5,1",
|
||||
"Xserve3,1",
|
||||
]
|
||||
|
||||
NoExFat = [
|
||||
"MacBook4,1",
|
||||
"MacBook5,1",
|
||||
@@ -878,17 +761,6 @@ NoExFat = [
|
||||
"Dortania1,1",
|
||||
]
|
||||
|
||||
SandyIGPU = [
|
||||
"MacBookAir4,1",
|
||||
"MacBookAir4,2",
|
||||
"MacBookPro8,1",
|
||||
"MacBookPro8,2",
|
||||
"MacBookPro8,3",
|
||||
"Macmini5,1",
|
||||
"Macmini5,2",
|
||||
"Macmini5,3",
|
||||
]
|
||||
|
||||
windows_audio = [
|
||||
"MacBookAir4,1",
|
||||
"MacBookAir4,2",
|
||||
@@ -913,7 +785,7 @@ windows_audio = [
|
||||
"iMac13,3",
|
||||
]
|
||||
|
||||
NoAGPMSupport = ["MacBook4,1", "MacBookPro4,1", "iMac7,1", "iMac8,1", "MacPro3,1", "Xserve2,1"]
|
||||
NoAGPMSupport = ["MacBook4,1", "MacBookPro4,1", "iMac7,1", "iMac8,1", "MacPro3,1", "Xserve2,1", "Dortania1,1"]
|
||||
|
||||
AGDPSupport = [
|
||||
"MacBookPro9,1",
|
||||
@@ -937,13 +809,6 @@ AGDPSupport = [
|
||||
# "MacPro6,1",
|
||||
]
|
||||
|
||||
AMCSupport = [
|
||||
"MacBookPro8,2",
|
||||
"MacBookPro8,3",
|
||||
# "MacBookPro9,1",
|
||||
# "MacBookPro10,1"
|
||||
]
|
||||
|
||||
NoFireWireSupport = [
|
||||
"MacBook5,1",
|
||||
"MacBook6,1",
|
||||
@@ -954,4 +819,231 @@ NoFireWireSupport = [
|
||||
"MacBookAir3,2",
|
||||
]
|
||||
|
||||
RecoveryIgnore = ["Update", "VM", "Recovery", "Preboot"]
|
||||
PCIRaceCondition = [
|
||||
"MacBook4,1",
|
||||
"MacBook5,1",
|
||||
"MacBook5,2",
|
||||
"MacBook6,1",
|
||||
"MacBook7,1",
|
||||
"MacBookAir2,1",
|
||||
"MacBookAir3,1",
|
||||
"MacBookAir3,2",
|
||||
"MacBookPro4,1",
|
||||
"MacBookPro5,1",
|
||||
"MacBookPro5,2",
|
||||
"MacBookPro5,3",
|
||||
"MacBookPro5,4",
|
||||
"MacBookPro5,5",
|
||||
"MacBookPro6,1",
|
||||
"MacBookPro6,2",
|
||||
"MacBookPro7,1",
|
||||
"Macmini3,1",
|
||||
"Macmini4,1",
|
||||
"iMac7,1",
|
||||
"iMac8,1",
|
||||
"iMac9,1",
|
||||
"iMac10,1",
|
||||
"iMac11,1",
|
||||
"iMac11,2",
|
||||
"iMac11,3",
|
||||
"MacPro3,1",
|
||||
"MacPro4,1",
|
||||
"MacPro5,1",
|
||||
"Dortania1,1",
|
||||
]
|
||||
|
||||
# Thunderbolt 1 Macs
|
||||
Thunderbolt_1 = [
|
||||
"MacBookAir4,1",
|
||||
"MacBookAir4,2",
|
||||
"MacBookAir5,1",
|
||||
"MacBookAir5,2",
|
||||
"MacBookAir6,1",
|
||||
"MacBookAir6,2",
|
||||
"MacBookPro8,1",
|
||||
"MacBookPro8,2",
|
||||
"MacBookPro8,3",
|
||||
"MacBookPro9,1",
|
||||
"MacBookPro9,2",
|
||||
"MacBookPro10,1",
|
||||
"MacBookPro10,2",
|
||||
"Macmini5,1",
|
||||
"Macmini5,2",
|
||||
"Macmini5,3",
|
||||
"Macmini6,1",
|
||||
"Macmini6,2",
|
||||
"iMac12,1",
|
||||
"iMac12,2",
|
||||
"iMac13,1",
|
||||
"iMac13,2",
|
||||
"iMac13,3",
|
||||
"iMac14,1",
|
||||
"iMac14,2",
|
||||
"iMac14,3",
|
||||
"iMac14,4",
|
||||
"Dortania1,1",
|
||||
]
|
||||
|
||||
# Thunderbolt 2 Macs
|
||||
Thunderbolt_2 = [
|
||||
"MacBookAir7,1",
|
||||
"MacBookAir7,2",
|
||||
"MacBookPro11,1",
|
||||
"MacBookPro11,2",
|
||||
"MacBookPro11,3",
|
||||
"MacBookPro11,4",
|
||||
"MacBookPro11,5",
|
||||
"MacBookPro12,1",
|
||||
"Macmini7,1",
|
||||
"iMac15,1",
|
||||
"iMac16,1",
|
||||
"iMac17,1",
|
||||
"iMac16,2",
|
||||
"MacPro6,1",
|
||||
]
|
||||
|
||||
# Thunderbolt 3 Macs
|
||||
Thunderbolt_3 = [
|
||||
"MacBookAir8,1",
|
||||
"MacBookAir8,2",
|
||||
"MacBookAir9,1",
|
||||
"MacBookPro13,1",
|
||||
"MacBookPro13,2",
|
||||
"MacBookPro13,3",
|
||||
"MacBookPro14,1",
|
||||
"MacBookPro14,2",
|
||||
"MacBookPro14,3",
|
||||
"MacBookPro15,1",
|
||||
"MacBookPro15,2",
|
||||
"MacBookPro15,3",
|
||||
"MacBookPro15,4",
|
||||
"MacBookPro16,1",
|
||||
"MacBookPro16,2",
|
||||
"MacBookPro16,3",
|
||||
"MacBookPro16,4",
|
||||
"Macmini8,1",
|
||||
"iMac18,1",
|
||||
"iMac18,2",
|
||||
"iMac18,3",
|
||||
"iMac19,1",
|
||||
"iMac19,2",
|
||||
"iMac20,1",
|
||||
"iMac20,2",
|
||||
"MacPro7,1",
|
||||
]
|
||||
|
||||
Missing_USB_Map = [
|
||||
"MacBook4,1",
|
||||
"MacBook5,1",
|
||||
"MacBook5,2",
|
||||
"MacBook6,1",
|
||||
"MacBook7,1",
|
||||
"MacBookAir2,1",
|
||||
"MacBookAir3,1",
|
||||
"MacBookAir3,2",
|
||||
"MacBookAir4,1",
|
||||
"MacBookAir4,2",
|
||||
"MacBookPro4,1",
|
||||
"MacBookPro5,1",
|
||||
"MacBookPro5,2",
|
||||
"MacBookPro5,3",
|
||||
"MacBookPro5,4",
|
||||
"MacBookPro5,5",
|
||||
"MacBookPro6,1",
|
||||
"MacBookPro6,2",
|
||||
"MacBookPro7,1",
|
||||
"MacBookPro8,1",
|
||||
"MacBookPro8,2",
|
||||
"MacBookPro8,3",
|
||||
"Macmini3,1",
|
||||
"Macmini4,1",
|
||||
"Macmini5,1",
|
||||
"Macmini5,2",
|
||||
"Macmini5,3",
|
||||
"iMac7,1",
|
||||
"iMac8,1",
|
||||
"iMac9,1",
|
||||
"iMac10,1",
|
||||
"iMac11,1",
|
||||
"iMac11,2",
|
||||
"iMac11,3",
|
||||
"iMac12,1",
|
||||
"iMac12,2",
|
||||
"MacPro3,1",
|
||||
"MacPro4,1",
|
||||
"XServe2,1",
|
||||
"XServe3,1",
|
||||
]
|
||||
|
||||
dGPU_switch = [
|
||||
# Allows iGPU and dGPU switching in Windows
|
||||
"MacBookPro8,2",
|
||||
"MacBookPro8,3",
|
||||
"MacBookPro9,1",
|
||||
"MacBookPro10,1",
|
||||
"MacBookPro11,3",
|
||||
"MacBookPro11,5",
|
||||
"MacBookPro13,3",
|
||||
"MacBookPro14,3",
|
||||
"MacBookPro15,1",
|
||||
"MacBookPro15,3",
|
||||
"MacBookPro16,1",
|
||||
"MacBookPro16,4",
|
||||
]
|
||||
|
||||
Bluetooth_BRCM2046 = [
|
||||
"MacBook4,1",
|
||||
"MacBook5,1",
|
||||
"MacBook5,2",
|
||||
"MacBookAir2,1",
|
||||
"MacBookAir3,1",
|
||||
"MacBookAir3,2",
|
||||
"MacBookPro4,1",
|
||||
"MacBookPro5,1",
|
||||
"MacBookPro5,2",
|
||||
"MacBookPro5,3",
|
||||
"MacBookPro5,4",
|
||||
"MacBookPro5,5",
|
||||
"MacBookPro7,1",
|
||||
"Macmini3,1",
|
||||
"iMac8,1",
|
||||
"iMac9,1",
|
||||
"iMac10,1",
|
||||
"iMac11,1",
|
||||
"iMac11,2",
|
||||
"iMac11,3",
|
||||
"iMac12,1",
|
||||
"iMac12,2",
|
||||
"MacPro4,1",
|
||||
"MacPro5,1",
|
||||
]
|
||||
|
||||
Bluetooth_BRCM2070 = [
|
||||
"MacBook6,1",
|
||||
"MacBook7,1",
|
||||
"MacBookAir4,1",
|
||||
"MacBookAir4,2",
|
||||
"MacBookPro6,1",
|
||||
"MacBookPro6,2",
|
||||
"MacBookPro8,1",
|
||||
"MacBookPro8,2",
|
||||
"MacBookPro8,3",
|
||||
"Macmini4,1",
|
||||
"Macmini5,1",
|
||||
"Macmini5,2",
|
||||
"Macmini5,3",
|
||||
]
|
||||
|
||||
Bluetooth_BRCM20702_v1 = [
|
||||
"MacBookAir5,1",
|
||||
"MacBookAir5,2",
|
||||
"MacBookPro9,1",
|
||||
"MacBookPro9,2",
|
||||
"MacBookPro10,1",
|
||||
"MacBookPro10,2",
|
||||
"Macmini6,1",
|
||||
"Macmini6,2",
|
||||
"iMac13,1",
|
||||
"iMac13,2",
|
||||
"iMac13,3",
|
||||
]
|
||||
|
||||
343
Resources/ModelExample.py
Normal file
343
Resources/ModelExample.py
Normal file
@@ -0,0 +1,343 @@
|
||||
# Example Hardware probe of multiple models
|
||||
# To be used when running validation tests
|
||||
from Resources import device_probe
|
||||
|
||||
class MacBook:
|
||||
|
||||
MacBook71 = device_probe.Computer(
|
||||
real_model="MacBook7,1",
|
||||
real_board_id="Mac-F22C89C8",
|
||||
reported_model="MacBook7,1",
|
||||
reported_board_id="Mac-F22C89C8",
|
||||
gpus=[
|
||||
device_probe.NVIDIA(vendor_id=4318, device_id=2208, class_code=196608, name="IGPU", model="NVIDIA GeForce 320M", pci_path="PciRoot(0x0)/Pci(0x2,0x0)"),
|
||||
],
|
||||
igpu=device_probe.NVIDIA(vendor_id=4318, device_id=2208, class_code=196608, name="IGPU", model="NVIDIA GeForce 320M", pci_path="PciRoot(0x0)/Pci(0x2,0x0)"),
|
||||
dgpu=None,
|
||||
storage=[
|
||||
device_probe.SATAController(vendor_id=4318, device_id=3464, class_code=67073, name="SATA", model=None, pci_path="PciRoot(0x0)/Pci(0xa,0x0)"),
|
||||
],
|
||||
wifi=device_probe.Broadcom(vendor_id=5348, device_id=17235, class_code=163840, name="ARPT", model=None, pci_path="PciRoot(0x0)/Pci(0x15,0x0)/Pci(0x0,0x0)"),
|
||||
cpu=device_probe.CPU(
|
||||
name="Intel(R) Core(TM)2 Duo CPU P8600 @ 2.40GHz",
|
||||
flags=["FPU", "VME", "DE", "PSE", "TSC", "MSR", "PAE", "MCE", "CX8", "APIC", "SEP", "MTRR", "PGE", "MCA", "CMOV", "PAT", "PSE36", "CLFSH", "DS", "ACPI", "MMX", "FXSR", "SSE", "SSE2", "SS", "HTT", "TM", "PBE", "SSE3", "DTES64", "MON", "DSCPL", "VMX", "SMX", "EST", "TM2", "SSSE3", "CX16", "TPR", "PDCM", "SSE4.1"],
|
||||
),
|
||||
oclp_version=None,
|
||||
opencore_version=None,
|
||||
)
|
||||
|
||||
class MacBookPro:
|
||||
|
||||
MacBookPro92_Stock = device_probe.Computer(
|
||||
real_model="MacBookPro9,2",
|
||||
real_board_id="Mac-6F01561E16C75D06",
|
||||
reported_model="MacBookPro9,2",
|
||||
reported_board_id="Mac-6F01561E16C75D06",
|
||||
gpus=[
|
||||
device_probe.Intel(vendor_id=32902, device_id=358, class_code=196608, name="IGPU", model="Intel HD Graphics 4000", pci_path="PciRoot(0x0)/Pci(0x2,0x0)")
|
||||
],
|
||||
igpu=device_probe.Intel(vendor_id=32902, device_id=358, class_code=196608, name="IGPU", model="Intel HD Graphics 4000", pci_path="PciRoot(0x0)/Pci(0x2,0x0)"),
|
||||
dgpu=None,
|
||||
storage=[device_probe.SATAController(vendor_id=32902, device_id=7683, class_code=67073, name="SATA", model=None, pci_path="PciRoot(0x0)/Pci(0x1f,0x2)")],
|
||||
wifi=device_probe.Broadcom(vendor_id=5348, device_id=17201, class_code=163840, name="ARPT", model=None, pci_path="PciRoot(0x0)/Pci(0x1c,0x1)/Pci(0x0,0x0)"),
|
||||
cpu=device_probe.CPU(
|
||||
name='Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz',
|
||||
flags=['FPU', 'VME', 'DE', 'PSE', 'TSC', 'MSR', 'PAE', 'MCE', 'CX8', 'APIC', 'SEP', 'MTRR', 'PGE', 'MCA', 'CMOV', 'PAT', 'PSE36', 'CLFSH', 'DS', 'ACPI', 'MMX', 'FXSR', 'SSE', 'SSE2', 'SS', 'HTT', 'TM', 'PBE', 'SSE3', 'PCLMULQDQ', 'DTES64', 'MON', 'DSCPL', 'VMX', 'EST', 'TM2', 'SSSE3', 'CX16', 'TPR', 'PDCM', 'SSE4.1', 'SSE4.2', 'x2APIC', 'POPCNT', 'AES', 'PCID', 'XSAVE', 'OSXSAVE', 'TSCTMR', 'AVX1.0', 'RDRAND', 'F16C']
|
||||
),
|
||||
oclp_version=None,
|
||||
opencore_version=None,
|
||||
)
|
||||
|
||||
MacBookPro171_Stock = device_probe.Computer(
|
||||
# Run under Rosetta
|
||||
real_model="MacBookPro17,1",
|
||||
real_board_id="J293",
|
||||
reported_model="MacBookPro17,1",
|
||||
reported_board_id="J293",
|
||||
gpus=[device_probe.AMD(vendor_id=4098, device_id=26640, class_code=196608, name="display", model="Unknown Unknown", pci_path="")],
|
||||
igpu=None,
|
||||
dgpu=None,
|
||||
storage=[],
|
||||
wifi=device_probe.Broadcom(vendor_id=5348, device_id=17445, class_code=163840, name="wlan", model=None, pci_path=""),
|
||||
cpu=device_probe.CPU(
|
||||
name="Apple M1",
|
||||
flags=["FPU", "VME", "DE", "PSE", "TSC", "MSR", "PAE", "MCE", "CX8", "APIC", "SEP", "MTRR", "PGE", "MCA", "CMOV", "PAT", "PSE36", "CLFSH", "DS", "ACPI", "MMX", "FXSR", "SSE", "SSE2", "SS", "HTT", "TM", "PBE", "SSE3", "PCLMULQDQ", "DTSE64", "MON", "DSCPL", "VMX", "EST", "TM2", "SSSE3", "CX16", "TPR", "PDCM", "SSE4.1", "SSE4.2", "AES", "SEGLIM64"],
|
||||
),
|
||||
oclp_version=None,
|
||||
opencore_version=None,
|
||||
)
|
||||
|
||||
class Macmini:
|
||||
|
||||
Macmini81_Stock = device_probe.Computer(
|
||||
real_model="Macmini8,1",
|
||||
real_board_id="Mac-7BA5B2DFE22DDD8C",
|
||||
reported_model="Macmini8,1",
|
||||
reported_board_id="Mac-7BA5B2DFE22DDD8C",
|
||||
gpus=[device_probe.Intel(vendor_id=32902, device_id=16027, class_code=196608, name="IGPU", model="Intel UHD Graphics 630", pci_path="PciRoot(0x0)/Pci(0x2,0x0)")],
|
||||
igpu=device_probe.Intel(vendor_id=32902, device_id=16027, class_code=196608, name="IGPU", model="Intel UHD Graphics 630", pci_path="PciRoot(0x0)/Pci(0x2,0x0)"),
|
||||
dgpu=None,
|
||||
storage=[],
|
||||
wifi=device_probe.Broadcom(vendor_id=5348, device_id=17508, class_code=163840, name="ARPT", model=None, pci_path="PciRoot(0x0)/Pci(0x1c,0x0)/Pci(0x0,0x0)"),
|
||||
cpu=device_probe.CPU(
|
||||
name="Intel(R) Core(TM) i7-8700B CPU @ 3.20GHz",
|
||||
flags=["FPU", "VME", "DE", "PSE", "TSC", "MSR", "PAE", "MCE", "CX8", "APIC", "SEP", "MTRR", "PGE", "MCA", "CMOV", "PAT", "PSE36", "CLFSH", "DS", "ACPI", "MMX", "FXSR", "SSE", "SSE2", "SS", "HTT", "TM", "PBE", "SSE3", "PCLMULQDQ", "DTES64", "MON", "DSCPL", "VMX", "SMX", "EST", "TM2", "SSSE3", "FMA", "CX16", "TPR", "PDCM", "SSE4.1", "SSE4.2", "x2APIC", "MOVBE", "POPCNT", "AES", "PCID", "XSAVE", "OSXSAVE", "SEGLIM64", "TSCTMR", "AVX1.0", "RDRAND", "F16C"]
|
||||
),
|
||||
oclp_version=None,
|
||||
opencore_version=None
|
||||
)
|
||||
|
||||
Macmini91_Stock = device_probe.Computer(
|
||||
# Run under Rosetta
|
||||
real_model="Macmini9,1",
|
||||
real_board_id="J274",
|
||||
reported_model="Macmini9,1",
|
||||
reported_board_id="J274",
|
||||
gpus=[
|
||||
device_probe.AMD(vendor_id=4098, device_id=26640, class_code=196608, name="display", model="Unknown Unknown", pci_path="", )
|
||||
],
|
||||
igpu=None,
|
||||
dgpu=None,
|
||||
storage=[],
|
||||
wifi=device_probe.Broadcom(vendor_id=5348, device_id=17445, class_code=163840, name="wlan", model=None, pci_path=""),
|
||||
cpu=device_probe.CPU(
|
||||
name="Apple M1",
|
||||
flags=["FPU", "VME", "DE", "PSE", "TSC", "MSR", "PAE", "MCE", "CX8", "APIC", "SEP", "MTRR", "PGE", "MCA", "CMOV", "PAT", "PSE36", "CLFSH", "DS", "ACPI", "MMX", "FXSR", "SSE", "SSE2", "SS", "HTT", "TM", "PBE", "SSE3", "PCLMULQDQ", "DTSE64", "MON", "DSCPL", "VMX", "EST", "TM2", "SSSE3", "CX16", "TPR", "PDCM", "SSE4.1", "SSE4.2", "AES", "SEGLIM64"]
|
||||
),
|
||||
oclp_version=None,
|
||||
opencore_version=None
|
||||
)
|
||||
|
||||
class iMac:
|
||||
|
||||
iMac81_Stock = device_probe.Computer(
|
||||
# Stock Model
|
||||
real_model="iMac8,1",
|
||||
real_board_id="Mac-F226BEC8",
|
||||
reported_model="iMac8,1",
|
||||
reported_board_id="Mac-F226BEC8",
|
||||
gpus=[
|
||||
device_probe.AMD(vendor_id=4098, device_id=38088, class_code=196608, name="GFX0", model="ATI Radeon HD 2400", pci_path="PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)")
|
||||
],
|
||||
igpu=None,
|
||||
dgpu=device_probe.AMD(vendor_id=4098, device_id=38088, class_code=196608, name="GFX0", model="ATI Radeon HD 2400", pci_path="PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)"),
|
||||
storage=[
|
||||
device_probe.SATAController(vendor_id=32902, device_id=10281, class_code=67073, name="SATA", model=None, pci_path="PciRoot(0x0)/Pci(0x1f,0x2)")
|
||||
],
|
||||
wifi=device_probe.Broadcom(vendor_id=5348, device_id=17192, class_code=163840, name="ARPT", model=None, pci_path="PciRoot(0x0)/Pci(0x1c,0x4)/Pci(0x0,0x0)"),
|
||||
cpu=device_probe.CPU(
|
||||
name="Intel(R) Core(TM)2 Duo CPU E8135 @ 2.40GHz",
|
||||
flags=["FPU", "VME", "DE", "PSE", "TSC", "MSR", "PAE", "MCE", "CX8", "APIC", "SEP", "MTRR", "PGE", "MCA", "CMOV", "PAT", "PSE36", "CLFSH", "DS", "ACPI", "MMX", "FXSR", "SSE", "SSE2", "SS", "HTT", "TM", "PBE", "SSE3", "DTES64", "MON", "DSCPL", "VMX", "EST", "TM2", "SSSE3", "CX16", "TPR", "PDCM", "SSE4.1"]
|
||||
),
|
||||
oclp_version=None,
|
||||
opencore_version=None,
|
||||
)
|
||||
|
||||
iMac112_Stock = device_probe.Computer(
|
||||
# Stock Model
|
||||
real_model="iMac11,2",
|
||||
real_board_id="Mac-F2238AC8",
|
||||
reported_model="iMac11,2",
|
||||
reported_board_id="Mac-F2238AC8",
|
||||
gpus=[
|
||||
device_probe.AMD(vendor_id=4098, device_id=38024, class_code=196608, name="GFX0", model="ATI Radeon HD 4670", pci_path="PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)")
|
||||
],
|
||||
igpu=None,
|
||||
dgpu=device_probe.AMD(vendor_id=4098, device_id=38024, class_code=196608, name="GFX0", model="ATI Radeon HD 4670", pci_path="PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)"),
|
||||
storage=[
|
||||
device_probe.SATAController(vendor_id=32902, device_id=15138, class_code=67073, name="SATA", model=None, pci_path="PciRoot(0x0)/Pci(0x1f,0x2)")
|
||||
],
|
||||
wifi=device_probe.Atheros(vendor_id=5772, device_id=42, class_code=163840, name="ARPT", model=None, pci_path="PciRoot(0x0)/Pci(0x1c,0x1)/Pci(0x0,0x0)"),
|
||||
cpu=device_probe.CPU(
|
||||
name="Intel(R) Core(TM) i3 CPU 540 @ 3.07GHz",
|
||||
flags=["FPU", "VME", "DE", "PSE", "TSC", "MSR", "PAE", "MCE", "CX8", "APIC", "SEP", "MTRR", "PGE", "MCA", "CMOV", "PAT", "PSE36", "CLFSH", "DS", "ACPI", "MMX", "FXSR", "SSE", "SSE2", "SS", "HTT", "TM", "PBE", "SSE3", "DTES64", "MON", "DSCPL", "VMX", "EST", "TM2", "SSSE3", "CX16", "TPR", "PDCM", "SSE4.1", "SSE4.2", "POPCNT", "PCID"]
|
||||
),
|
||||
oclp_version=None,
|
||||
opencore_version=None,
|
||||
)
|
||||
|
||||
iMac122_Upgraded = device_probe.Computer(
|
||||
real_model="iMac12,2",
|
||||
real_board_id="Mac-942B59F58194171B",
|
||||
reported_model="iMac12,2",
|
||||
reported_board_id="Mac-942B59F58194171B",
|
||||
gpus=[
|
||||
device_probe.Intel(vendor_id=32902, device_id=258, class_code=196608, name="HD Graphics 3000", model=None, pci_path="PciRoot(0x0)/Pci(0x2,0x0)"),
|
||||
device_probe.AMD(vendor_id=4098, device_id=26600, class_code=196608, name="GFX0", model="Radeon Pro WX4130", pci_path="PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)"),
|
||||
],
|
||||
igpu=device_probe.Intel(vendor_id=32902, device_id=258, class_code=196608, name="HD Graphics 3000", model=None, pci_path="PciRoot(0x0)/Pci(0x2,0x0)"),
|
||||
dgpu=device_probe.AMD(vendor_id=4098, device_id=26600, class_code=196608, name="GFX0", model="Radeon Pro WX4130", pci_path="PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)"),
|
||||
storage=[
|
||||
device_probe.SATAController(vendor_id=32902, device_id=7170, class_code=67073, name="SATA", model=None, pci_path="PciRoot(0x0)/Pci(0x1f,0x2)")
|
||||
],
|
||||
wifi=device_probe.Broadcom(vendor_id=5348, device_id=17338, class_code=163840, name="ARPT", model=None, pci_path="PciRoot(0x0)/Pci(0x1c,0x1)/Pci(0x0,0x0)"),
|
||||
cpu=device_probe.CPU(
|
||||
name="Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz",
|
||||
flags=["FPU", "VME", "DE", "PSE", "TSC", "MSR", "PAE", "MCE", "CX8", "APIC", "SEP", "MTRR", "PGE", "MCA", "CMOV", "PAT", "PSE36", "CLFSH", "DS", "ACPI", "MMX", "FXSR", "SSE", "SSE2", "SS", "HTT", "TM", "PBE", "SSE3", "PCLMULQDQ", "DTES64", "MON", "DSCPL", "VMX", "SMX", "EST", "TM2", "SSSE3", "CX16", "TPR", "PDCM", "SSE4.1", "SSE4.2", "xAPIC", "POPCNT", "AES", "PCID", "XSAVE", "OSXSAVE", "TSCTMR", "AVX1.0"]
|
||||
),
|
||||
oclp_version=None,
|
||||
opencore_version=None,
|
||||
)
|
||||
|
||||
class MacPro:
|
||||
|
||||
MacPro31_Stock = device_probe.Computer(
|
||||
# Stock Model, stock TS1 GPU and no Wifi card
|
||||
real_model="MacPro3,1",
|
||||
real_board_id="Mac-F42C88C8",
|
||||
reported_model="MacPro3,1",
|
||||
reported_board_id="Mac-F42C88C8",
|
||||
gpus=[
|
||||
device_probe.AMD(vendor_id=4098, device_id=38272, class_code=196608, name="GFX0", model="ATI Radeon HD 2600", pci_path="PciRoot(0x0)/Pci(0x5,0x0)/Pci(0x0,0x0)")
|
||||
],
|
||||
igpu=None,
|
||||
dgpu=device_probe.AMD(vendor_id=4098, device_id=38272, class_code=196608, name="GFX0", model="ATI Radeon HD 2600", pci_path="PciRoot(0x0)/Pci(0x5,0x0)/Pci(0x0,0x0)"),
|
||||
storage=[
|
||||
device_probe.SATAController(vendor_id=32902, device_id=9857, class_code=67073, name="SATA", model=None, pci_path="PciRoot(0x0)/Pci(0x1f,0x2)")
|
||||
],
|
||||
wifi=None,
|
||||
cpu=device_probe.CPU(
|
||||
name="Intel(R) Xeon(R) CPU X5482 @ 3.20GHz",
|
||||
flags=["FPU", "VME", "DE", "PSE", "TSC", "MSR", "PAE", "MCE", "CX8", "APIC", "SEP", "MTRR", "PGE", "MCA", "CMOV", "PAT", "PSE36", "CLFSH", "DS", "ACPI", "MMX", "FXSR", "SSE", "SSE2", "SS", "HTT", "TM", "PBE", "SSE3", "DTES64", "MON", "DSCPL", "VMX", "EST", "TM2", "SSSE3", "CX16", "TPR", "PDCM", "SSE4.1"],
|
||||
),
|
||||
oclp_version=None,
|
||||
opencore_version=None,
|
||||
)
|
||||
|
||||
MacPro31_Upgrade = device_probe.Computer(
|
||||
# Upgraded Model, TS2 GPU and El-Capitan era Wifi card
|
||||
real_model="MacPro3,1",
|
||||
real_board_id="Mac-F42C88C8",
|
||||
reported_model="MacPro3,1",
|
||||
reported_board_id="Mac-F42C88C8",
|
||||
gpus=[
|
||||
device_probe.AMD(vendor_id=4098, device_id=26808, class_code=196608, name="GFX0", model="ATI Radeon HD 5770", pci_path="PciRoot(0x0)/Pci(0x5,0x0)/Pci(0x0,0x0)")
|
||||
],
|
||||
igpu=None,
|
||||
dgpu=device_probe.AMD(vendor_id=4098, device_id=26808, class_code=196608, name="GFX0", model="ATI Radeon HD 5770", pci_path="PciRoot(0x0)/Pci(0x5,0x0)/Pci(0x0,0x0)"),
|
||||
storage=[
|
||||
device_probe.SATAController(vendor_id=32902, device_id=9857, class_code=67073, name="SATA", model=None, pci_path="PciRoot(0x0)/Pci(0x1f,0x2)")
|
||||
],
|
||||
wifi=device_probe.Broadcom(
|
||||
vendor_id=5348, device_id=17192, class_code=163840, name="ARPT", model=None, pci_path="PciRoot(0x0)/Pci(0x1c,0x3)/Pci(0x0,0x0)"
|
||||
),
|
||||
cpu=device_probe.CPU(
|
||||
name="Intel(R) Xeon(R) CPU X5482 @ 3.20GHz",
|
||||
flags=["FPU", "VME", "DE", "PSE", "TSC", "MSR", "PAE", "MCE", "CX8", "APIC", "SEP", "MTRR", "PGE", "MCA", "CMOV", "PAT", "PSE36", "CLFSH", "DS", "ACPI", "MMX", "FXSR", "SSE", "SSE2", "SS", "HTT", "TM", "PBE", "SSE3", "DTES64", "MON", "DSCPL", "VMX", "EST", "TM2", "SSSE3", "CX16", "TPR", "PDCM", "SSE4.1"],
|
||||
),
|
||||
oclp_version=None,
|
||||
opencore_version=None,
|
||||
)
|
||||
|
||||
MacPro31_Modern_AMD = device_probe.Computer(
|
||||
# Upgraded Model, Polaris GPU and BCM94360CD
|
||||
real_model="MacPro3,1",
|
||||
real_board_id="Mac-F42C88C8",
|
||||
reported_model="MacPro3,1",
|
||||
reported_board_id="Mac-F42C88C8",
|
||||
gpus=[
|
||||
device_probe.AMD(vendor_id=4098, device_id=26591, class_code=196608, name="GFX0", model="Radeon RX 470/570", pci_path="PciRoot(0x0)/Pci(0x5,0x0)/Pci(0x0,0x0)")
|
||||
],
|
||||
igpu=None,
|
||||
dgpu=device_probe.AMD(vendor_id=4098, device_id=26591, class_code=196608, name="GFX0", model="Radeon RX 470/570", pci_path="PciRoot(0x0)/Pci(0x5,0x0)/Pci(0x0,0x0)"),
|
||||
storage=[
|
||||
device_probe.SATAController(vendor_id=32902, device_id=9857, class_code=67073, name="SATA", model=None, pci_path="PciRoot(0x0)/Pci(0x1f,0x2)")
|
||||
],
|
||||
wifi=device_probe.Broadcom(
|
||||
vendor_id=5348, device_id=17312, class_code=163840, name="ARPT", model=None, pci_path="PciRoot(0x0)/Pci(0x1c,0x3)/Pci(0x0,0x0)"
|
||||
),
|
||||
cpu=device_probe.CPU(
|
||||
name="Intel(R) Xeon(R) CPU X5482 @ 3.20GHz",
|
||||
flags=["FPU", "VME", "DE", "PSE", "TSC", "MSR", "PAE", "MCE", "CX8", "APIC", "SEP", "MTRR", "PGE", "MCA", "CMOV", "PAT", "PSE36", "CLFSH", "DS", "ACPI", "MMX", "FXSR", "SSE", "SSE2", "SS", "HTT", "TM", "PBE", "SSE3", "DTES64", "MON", "DSCPL", "VMX", "EST", "TM2", "SSSE3", "CX16", "TPR", "PDCM", "SSE4.1"],
|
||||
),
|
||||
oclp_version=None,
|
||||
opencore_version=None,
|
||||
)
|
||||
|
||||
MacPro31_Modern_Kepler = device_probe.Computer(
|
||||
# Upgraded Model, Kepler GPU and BCM94360CD
|
||||
real_model="MacPro3,1",
|
||||
real_board_id="Mac-F42C88C8",
|
||||
reported_model="MacPro3,1",
|
||||
reported_board_id="Mac-F42C88C8",
|
||||
gpus=[device_probe.NVIDIA(vendor_id=4318, device_id=4737, class_code=196608, name="GFX0", model="NVIDIA GeForce GT 710", pci_path="PciRoot(0x0)/Pci(0x5,0x0)/Pci(0x0,0x0)")],
|
||||
igpu=None,
|
||||
dgpu=device_probe.NVIDIA(vendor_id=4318, device_id=4737, class_code=196608, name="GFX0", model="NVIDIA GeForce GT 710", pci_path="PciRoot(0x0)/Pci(0x5,0x0)/Pci(0x0,0x0)"),
|
||||
storage=[
|
||||
device_probe.SATAController(vendor_id=32902, device_id=9857, class_code=67073, name="SATA", model=None, pci_path="PciRoot(0x0)/Pci(0x1f,0x2)")
|
||||
],
|
||||
wifi=device_probe.Broadcom(
|
||||
vendor_id=5348, device_id=17312, class_code=163840, name="ARPT", model=None, pci_path="PciRoot(0x0)/Pci(0x1c,0x3)/Pci(0x0,0x0)"
|
||||
),
|
||||
cpu=device_probe.CPU(
|
||||
name="Intel(R) Xeon(R) CPU X5482 @ 3.20GHz",
|
||||
flags=["FPU", "VME", "DE", "PSE", "TSC", "MSR", "PAE", "MCE", "CX8", "APIC", "SEP", "MTRR", "PGE", "MCA", "CMOV", "PAT", "PSE36", "CLFSH", "DS", "ACPI", "MMX", "FXSR", "SSE", "SSE2", "SS", "HTT", "TM", "PBE", "SSE3", "DTES64", "MON", "DSCPL", "VMX", "EST", "TM2", "SSSE3", "CX16", "TPR", "PDCM", "SSE4.1"],
|
||||
),
|
||||
oclp_version=None,
|
||||
opencore_version=None,
|
||||
)
|
||||
|
||||
MacPro41_Upgrade = device_probe.Computer(
|
||||
# Upgraded model with AMD HD7950, Atheros PCIe card
|
||||
real_model="MacPro4,1",
|
||||
real_board_id="Mac-F221BEC8",
|
||||
reported_model="MacPro4,1",
|
||||
reported_board_id="Mac-F221BEC8",
|
||||
gpus=[device_probe.AMD(vendor_id=4098, device_id=26522, class_code=196608, name="PXS1", model="AMD Radeon HD 7950", pci_path="PciRoot(0x0)/Pci(0x3,0x0)/Pci(0x0,0x0)")],
|
||||
igpu=None,
|
||||
dgpu=None,
|
||||
storage=[device_probe.SATAController(vendor_id=32902, device_id=14882, class_code=67073, name="SATA", model=None, pci_path="PciRoot(0x0)/Pci(0x1f,0x2)")],
|
||||
wifi=device_probe.Atheros(vendor_id=5772, device_id=48, class_code=163840, name="PXS4", model=None, pci_path="PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)/Pci(0x4,0x0)/Pci(0x0,0x0)"),
|
||||
cpu=device_probe.CPU(
|
||||
name="Intel(R) Xeon(R) CPU W3520 @ 2.67GHz",
|
||||
flags=["FPU", "VME", "DE", "PSE", "TSC", "MSR", "PAE", "MCE", "CX8", "APIC", "SEP", "MTRR", "PGE", "MCA", "CMOV", "PAT", "PSE36", "CLFSH", "DS", "ACPI", "MMX", "FXSR", "SSE", "SSE2", "SS", "HTT", "TM", "PBE", "SSE3", "DTES64", "MON", "DSCPL", "VMX", "EST", "TM2", "SSSE3", "CX16", "TPR", "PDCM", "SSE4.1", "SSE4.2", "POPCNT"]
|
||||
),
|
||||
oclp_version=None,
|
||||
opencore_version=None
|
||||
)
|
||||
|
||||
MacPro41_Modern_AMD = device_probe.Computer(
|
||||
# Upgraded model with AMD RX470, BCM94360CD, Intel 660p
|
||||
# Booted through OpenCore
|
||||
real_model="MacPro4,1",
|
||||
real_board_id="Mac-F221BEC8",
|
||||
reported_model="MacPro4,1",
|
||||
reported_board_id="Mac-27AD2F918AE68F61",
|
||||
gpus=[device_probe.AMD(vendor_id=4098, device_id=26591, class_code=196608, name="GFX0", model="Radeon RX 470/570", pci_path="PciRoot(0x0)/Pci(0x3,0x0)/Pci(0x0,0x0)")],
|
||||
igpu=None,
|
||||
dgpu=device_probe.AMD(vendor_id=4098, device_id=26591, class_code=196608, name="GFX0", model="Radeon RX 470/570", pci_path="PciRoot(0x0)/Pci(0x3,0x0)/Pci(0x0,0x0)"),
|
||||
storage=[
|
||||
device_probe.SATAController(vendor_id=32902, device_id=14882, class_code=67073, name="SATA", model=None, pci_path="PciRoot(0x0)/Pci(0x1f,0x2)"),
|
||||
device_probe.NVMeController(vendor_id=32902, device_id=61864, class_code=67586, name="PXS3", model=None, pci_path="PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)/Pci(0x2,0x0)/Pci(0x0,0x0)", aspm=2)
|
||||
],
|
||||
wifi=device_probe.Broadcom(vendor_id=5348, device_id=17312, class_code=163840, name="ARPT", model=None, pci_path="PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)/Pci(0x4,0x0)/Pci(0x0,0x0)"),
|
||||
cpu=device_probe.CPU(
|
||||
name="Intel(R) Xeon(R) CPU W3520 @ 2.67GHz",
|
||||
flags=["FPU", "VME", "DE", "PSE", "TSC", "MSR", "PAE", "MCE", "CX8", "APIC", "SEP", "MTRR", "PGE", "MCA", "CMOV", "PAT", "PSE36", "CLFSH", "DS", "ACPI", "MMX", "FXSR", "SSE", "SSE2", "SS", "HTT", "TM", "PBE", "SSE3", "DTES64", "MON", "DSCPL", "VMX", "EST", "TM2", "SSSE3", "CX16", "TPR", "PDCM", "SSE4.1", "SSE4.2", "POPCNT"]
|
||||
),
|
||||
oclp_version="0.2.5",
|
||||
opencore_version="REL-071-2021-07-02"
|
||||
)
|
||||
|
||||
MacPro41_51__Flashed_Modern_AMD = device_probe.Computer(
|
||||
# 4,1 flashed to 5,1, RX5700XT, BCM94360CD, WD SN750 NVMe
|
||||
real_model="MacPro5,1",
|
||||
real_board_id="Mac-F221BEC8",
|
||||
reported_model="MacPro5,1",
|
||||
reported_board_id="Mac-F221BEC8",
|
||||
gpus=[device_probe.AMD(vendor_id=4098, device_id=29471, class_code=196608, name="GFX0", model="AMD Radeon RX 5700 XT", pci_path="PciRoot(0x0)/Pci(0x3,0x0)/Pci(0x0,0x0)/Pci(0x0,0x0)/Pci(0x0,0x0)")],
|
||||
igpu=None,
|
||||
dgpu=device_probe.AMD(vendor_id=4098, device_id=29471, class_code=196608, name="GFX0", model="AMD Radeon RX 5700 XT", pci_path="PciRoot(0x0)/Pci(0x3,0x0)/Pci(0x0,0x0)/Pci(0x0,0x0)/Pci(0x0,0x0)"),
|
||||
storage=[
|
||||
device_probe.SATAController(vendor_id=32902, device_id=14882, class_code=67073, name="SATA", model=None, pci_path="PciRoot(0x0)/Pci(0x1f,0x2)"),
|
||||
device_probe.NVMeController(vendor_id=5559, device_id=20482, class_code=67586, name="PXS3", model=None, pci_path="PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)/Pci(0x2,0x0)/Pci(0x0,0x0)", aspm=2)
|
||||
],
|
||||
|
||||
wifi=device_probe.Broadcom(vendor_id=5348, device_id=17312, class_code=163840, name="PXS4", model=None, pci_path="PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)/Pci(0x4,0x0)/Pci(0x0,0x0)"),
|
||||
cpu=device_probe.CPU(
|
||||
name="Intel(R) Xeon(R) CPU X5670 @ 2.93GHz",
|
||||
flags=["FPU", "VME", "DE", "PSE", "TSC", "MSR", "PAE", "MCE", "CX8", "APIC", "SEP", "MTRR", "PGE", "MCA", "CMOV", "PAT", "PSE36", "CLFSH", "DS", "ACPI", "MMX", "FXSR", "SSE", "SSE2", "SS", "HTT", "TM", "PBE", "SSE3", "PCLMULQDQ", "DTES64", "MON", "DSCPL", "VMX", "SMX", "EST", "TM2", "SSSE3", "CX16", "TPR", "PDCM", "SSE4.1", "SSE4.2", "POPCNT", "AES", "PCID"]
|
||||
),
|
||||
oclp_version="0.2.5",
|
||||
opencore_version="REL-071-2021-07-02"
|
||||
)
|
||||
@@ -746,6 +746,108 @@ class intel_ids:
|
||||
0x0166,
|
||||
]
|
||||
|
||||
haswell_ids = [
|
||||
# AppleIntelHD5000Graphics IDs
|
||||
# AppleIntelFramebufferAzul IDs
|
||||
0x0D26,
|
||||
0x0A26,
|
||||
0x0A2E,
|
||||
0x0D22,
|
||||
0x0412,
|
||||
]
|
||||
|
||||
broadwell_ids = [
|
||||
# AppleIntelBDWGraphicsFramebuffer IDs
|
||||
0x0BD1,
|
||||
0x0BD2,
|
||||
0x0BD3,
|
||||
0x1606,
|
||||
0x160E,
|
||||
0x1616,
|
||||
0x161E,
|
||||
0x1626,
|
||||
0x1622,
|
||||
0x1612,
|
||||
0x162B,
|
||||
]
|
||||
|
||||
skylake_ids = [
|
||||
# AppleIntelSKLGraphicsFramebuffer IDs
|
||||
0x1916,
|
||||
0x191E,
|
||||
0x1926,
|
||||
0x1927,
|
||||
0x1912,
|
||||
0x1932,
|
||||
0x1902,
|
||||
0x1917,
|
||||
0x193B,
|
||||
0x191B,
|
||||
]
|
||||
|
||||
kaby_lake_ids = [
|
||||
# AppleIntelKBLGraphicsFramebuffer IDs
|
||||
0x5912,
|
||||
0x5916,
|
||||
0x591B,
|
||||
0x591C,
|
||||
0x591E,
|
||||
0x5926,
|
||||
0x5927,
|
||||
0x5923,
|
||||
]
|
||||
|
||||
coffee_lake_ids = [
|
||||
# AppleIntelCFLGraphicsFramebuffer IDs
|
||||
0x3E9B,
|
||||
0x3EA5,
|
||||
0x3EA6,
|
||||
0x3E92,
|
||||
0x3E91,
|
||||
0x3E98,
|
||||
]
|
||||
|
||||
ice_lake_ids = [
|
||||
# AppleIntelICLLPGraphicsFramebuffer IDs
|
||||
0xFF05,
|
||||
0x8A70,
|
||||
0x8A71,
|
||||
0x8A51,
|
||||
0x8A5C,
|
||||
0x8A5D,
|
||||
0x8A52,
|
||||
0x8A53,
|
||||
0x8A5A,
|
||||
0x8A5B,
|
||||
]
|
||||
|
||||
AppleIntel8254XEthernet = [
|
||||
# AppleIntel8254XEthernet IDs
|
||||
0x1096,
|
||||
0x100F,
|
||||
0x105E,
|
||||
]
|
||||
|
||||
AppleIntelI210Ethernet = [
|
||||
# AppleIntelI210Ethernet IDs
|
||||
0x1533, # I210
|
||||
0x15F2, # I225
|
||||
0x15F3, # I225
|
||||
0x3100, # I225
|
||||
0x3101, # I225
|
||||
0x5502, # I225
|
||||
0x0D9F, # I225
|
||||
0x15F8, # I225
|
||||
0x15F7, # I225
|
||||
0x15FD, # I225
|
||||
]
|
||||
|
||||
Intel82574L = [
|
||||
# Intel82574L IDs
|
||||
0x104B,
|
||||
0x10F6,
|
||||
]
|
||||
|
||||
|
||||
class broadcom_ids:
|
||||
AirPortBrcmNIC = [
|
||||
@@ -782,6 +884,82 @@ class broadcom_ids:
|
||||
0x432D, # BCM4322 - never used by Apple
|
||||
]
|
||||
|
||||
AppleBCM5701Ethernet = [
|
||||
# AppleBCM5701Ethernet IDs
|
||||
0x1684,
|
||||
0x16B0,
|
||||
0x16B4,
|
||||
0x1682,
|
||||
0x1686,
|
||||
]
|
||||
|
||||
|
||||
class aquantia_ids:
|
||||
AppleEthernetAquantiaAqtion = [
|
||||
# AppleEthernetAquantiaAqtion IDs
|
||||
0x0001, # AQC107
|
||||
0xD107, # AQC107
|
||||
0x07B1, # AQC107
|
||||
0x80B1, # AQC107
|
||||
0x87B1, # AQC107
|
||||
0x88B1, # AQC107
|
||||
0x89B1, # AQC107
|
||||
0x91B1, # AQC107
|
||||
0x92B1, # AQC107
|
||||
0x00C0, # AQC113
|
||||
0x04C0, # AQC113
|
||||
]
|
||||
|
||||
|
||||
class marvell_ids:
|
||||
MarvelYukonEthernet = [
|
||||
# AppleYukon2.kext IDs
|
||||
# AppleYukon2 supports 2 vendors (Marvell and SysKonnect)
|
||||
0x9E00,
|
||||
0x2100,
|
||||
0x9E00,
|
||||
0x2200,
|
||||
0x9E00,
|
||||
0x8100,
|
||||
0x9E00,
|
||||
0x8200,
|
||||
0x9E00,
|
||||
0x9100,
|
||||
0x9E00,
|
||||
0x9200,
|
||||
0x9000,
|
||||
0x2100,
|
||||
0x9000,
|
||||
0x2200,
|
||||
0x9000,
|
||||
0x8100,
|
||||
0x9000,
|
||||
0x8200,
|
||||
0x9000,
|
||||
0x9100,
|
||||
0x9000,
|
||||
0x9200,
|
||||
0x9E00,
|
||||
0x2200,
|
||||
0x9E00,
|
||||
0x2200,
|
||||
]
|
||||
|
||||
|
||||
class syskonnect_ids:
|
||||
MarvelYukonEthernet = [
|
||||
# AppleYukon2.kext IDs
|
||||
# AppleYukon2 supports 2 vendors (Marvell and SysKonnect)
|
||||
0x4365,
|
||||
0x4360,
|
||||
0x435A,
|
||||
0x4354,
|
||||
0x4362,
|
||||
0x4363,
|
||||
0x00BA,
|
||||
0x436A,
|
||||
]
|
||||
|
||||
|
||||
class atheros_ids:
|
||||
AtherosWifi = [
|
||||
|
||||
110
Resources/SMBIOSData.py
Normal file
110
Resources/SMBIOSData.py
Normal file
@@ -0,0 +1,110 @@
|
||||
FirmwareFeatures = {
|
||||
"iMac7,1": "0xC0001407",
|
||||
"iMac8,1": "0xC0001403",
|
||||
"iMac9,1": "0xC0001403",
|
||||
"iMac10,1": "0xE00DE137",
|
||||
"iMac11,1": "0xE00DE137",
|
||||
"iMac11,2": "0xC00C9423",
|
||||
"iMac11,3": "0xE00DE137",
|
||||
"iMac12,1": "0xE00DE137",
|
||||
"iMac12,2": "0xE00DE137",
|
||||
"iMac13,1": "0xE00DE137",
|
||||
"iMac13,2": "0xE00DE137",
|
||||
"iMac13,3": "0xE00DE137",
|
||||
"iMac14,1": "0xFB0FF577",
|
||||
"iMac14,2": "0xE00FE137",
|
||||
"iMac14,3": "0xE00FE137",
|
||||
"iMac14,4": "0xF00FE137",
|
||||
"iMac15,1": "0xF80FE137",
|
||||
"iMac16,1": "0xFC0FE137",
|
||||
"iMac16,2": "0xFC0FE137",
|
||||
"iMac17,1": "0xFC0FE137",
|
||||
"iMac18,1": "0xFD0FF576",
|
||||
"iMac18,2": "0xFD0FF576",
|
||||
"iMac18,3": "0xFD0FF576",
|
||||
"iMac19,1": "0xFD8FF576",
|
||||
"iMac19,2": "0xFD8FF576",
|
||||
"iMac20,1": "0xFD8FF576",
|
||||
"iMac20,2": "0xFD8FF576",
|
||||
"iMacPro1,1": "0xFD8FF53E",
|
||||
"MacBook3,1": "0xC0001407",
|
||||
"MacBook4,1": "0xC0001403",
|
||||
"MacBook5,1": "0xC0001403",
|
||||
"MacBook5,2": "0xC0001403",
|
||||
"MacBook6,1": "0xFC0FE13F",
|
||||
"MacBook7,1": "0xFC0FE13F",
|
||||
"MacBook8,1": "0xFC0FE13F",
|
||||
"MacBook9,1": "0xFC0FE13F",
|
||||
"MacBook10,1": "0xFC0FE13F",
|
||||
"MacBookAir1,1": "0xC0001403",
|
||||
"MacBookAir2,1": "0xC0001403",
|
||||
"MacBookAir3,1": "0xD00DE137",
|
||||
"MacBookAir3,2": "0xD00DE137",
|
||||
"MacBookAir4,1": "0xD00DE137",
|
||||
"MacBookAir4,2": "0xD00DE137",
|
||||
"MacBookAir5,1": "0xE00DE137",
|
||||
"MacBookAir5,2": "0xE00DE137",
|
||||
"MacBookAir6,1": "0xE00FE137",
|
||||
"MacBookAir6,2": "0xE00FE137",
|
||||
"MacBookAir7,1": "0xFF0FF576",
|
||||
"MacBookAir7,2": "0xFF0FF576",
|
||||
"MacBookAir8,1": "0xFD8FF42E",
|
||||
"MacBookAir8,2": "0xFD8FF42E",
|
||||
"MacBookAir9,1": "0xFFAFF06E",
|
||||
"MacBookPro3,1": "0xC0001407",
|
||||
"MacBookPro4,1": "0xC0001403",
|
||||
"MacBookPro5,1": "0xC0001403",
|
||||
"MacBookPro5,2": "0xC0001403",
|
||||
"MacBookPro5,3": "0xC0001403",
|
||||
"MacBookPro5,4": "0xC0001403",
|
||||
"MacBookPro5,5": "0xC0001403",
|
||||
"MacBookPro6,1": "0xC00DE137",
|
||||
"MacBookPro6,2": "0xC00DE137",
|
||||
"MacBookPro7,1": "0xC00DE137",
|
||||
"MacBookPro8,1": "0xC00DE137",
|
||||
"MacBookPro8,2": "0xC00DE137",
|
||||
"MacBookPro8,3": "0xC00DE137",
|
||||
"MacBookPro9,1": "0xC00DE137",
|
||||
"MacBookPro9,2": "0xC10DF577",
|
||||
"MacBookPro10,1": "0xE00DE137",
|
||||
"MacBookPro10,2": "0xE00DE137",
|
||||
"MacBookPro11,1": "0xEB0FF577",
|
||||
"MacBookPro11,2": "0xEB0FF577",
|
||||
"MacBookPro11,3": "0xEB0FF577",
|
||||
"MacBookPro11,4": "0xEB0FF577",
|
||||
"MacBookPro11,5": "0xEB0FF577",
|
||||
"MacBookPro12,1": "0xFD0FF576",
|
||||
"MacBookPro13,1": "0xFC0FE137",
|
||||
"MacBookPro13,2": "0xFC0FE137",
|
||||
"MacBookPro13,3": "0xFC0FE137",
|
||||
"MacBookPro14,1": "0xFF0FF57E",
|
||||
"MacBookPro14,2": "0xFF0FF57E",
|
||||
"MacBookPro14,3": "0xFF0FF57E",
|
||||
"MacBookPro15,1": "0xFD8FF426",
|
||||
"MacBookPro15,2": "0xFD8FF426",
|
||||
"MacBookPro15,3": "0xFD8FF426",
|
||||
"MacBookPro15,4": "0xFD8FF426",
|
||||
"MacBookPro16,1": "0xFDAFF066",
|
||||
"MacBookPro16,2": "0xFFAFF06E",
|
||||
"MacBookPro16,3": "0xFDAFF066",
|
||||
"MacBookPro16,4": "0xFDAFF066",
|
||||
"Macmini3,1": "0xC0001403",
|
||||
"Macmini4,1": "0xC00C9423",
|
||||
"Macmini5,1": "0xD00DE137",
|
||||
"Macmini5,2": "0xD00DE137",
|
||||
"Macmini5,3": "0xD00DE137",
|
||||
"Macmini6,1": "0xE00DE137",
|
||||
"Macmini6,2": "0xE00DE137",
|
||||
"Macmini7,1": "0xE00DE137",
|
||||
"Macmini8,1": "0xFD8FF466",
|
||||
"MacPro1,1": "0x80000015",
|
||||
"MacPro2,1": "0xC0000015",
|
||||
"MacPro3,1": "0xC0001403",
|
||||
"MacPro4,1": "0xE001F537",
|
||||
"MacPro5,1": "0xE80FE137",
|
||||
"MacPro6,1": "0xE90FF576",
|
||||
"MacPro7,1": "0xFDAFF066",
|
||||
"Xserve2,1": "0xC0001403",
|
||||
"Xserve3,1": "0xE001F537",
|
||||
"Dortania1,1": "0xFDAFF066",
|
||||
}
|
||||
@@ -5,9 +5,7 @@
|
||||
# - Temporary 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/)
|
||||
|
||||
import hashlib
|
||||
import os
|
||||
import requests
|
||||
import shutil
|
||||
import subprocess
|
||||
import zipfile
|
||||
@@ -20,36 +18,48 @@ class PatchSysVolume:
|
||||
def __init__(self, model, versions):
|
||||
self.model = model
|
||||
self.constants: Constants.Constants = versions
|
||||
self.computer = self.constants.computer
|
||||
self.root_mount_path = None
|
||||
self.sip_enabled = True
|
||||
self.sbm_enabled = True
|
||||
self.amfi_enabled = True
|
||||
self.fv_enabled = True
|
||||
self.dosdude_patched = True
|
||||
self.nvidia_legacy = False
|
||||
self.kepler_gpu = False
|
||||
self.amd_ts1 = False
|
||||
self.amd_ts2 = False
|
||||
self.iron_gpu = False
|
||||
self.sandy_gpu = False
|
||||
self.ivy_gpu = False
|
||||
self.nvidia_legacy = False
|
||||
self.brightness_legacy = False
|
||||
self.legacy_audio = False
|
||||
self.added_kexts = False
|
||||
self.legacy_wifi = False
|
||||
self.added_legacy_kexts = False
|
||||
self.amfi_must_disable = False
|
||||
self.check_board_id = False
|
||||
self.bad_board_id = False
|
||||
self.no_patch = True
|
||||
self.validate = False
|
||||
self.supports_metal = False
|
||||
|
||||
# if (Path.home() / "Desktop/OCLP-Test/").exists:
|
||||
# self.mount_location = Path.home() / "Desktop/OCLP-Test"
|
||||
# self.validate = True
|
||||
if self.constants.detected_os > self.constants.catalina:
|
||||
# Big Sur and newer use APFS snapshots
|
||||
self.mount_location = "/System/Volumes/Update/mnt1"
|
||||
else:
|
||||
self.mount_location = "/"
|
||||
self.mount_location = ""
|
||||
self.mount_coreservices = f"{self.mount_location}/System/Library/CoreServices"
|
||||
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"
|
||||
self.mount_libexec = f"{self.mount_location}/usr/libexec"
|
||||
|
||||
def elevated(self, *args, **kwargs) -> subprocess.CompletedProcess:
|
||||
if os.getuid() == 0:
|
||||
if os.getuid() == 0 or self.constants.gui_mode is True:
|
||||
return subprocess.run(*args, **kwargs)
|
||||
else:
|
||||
return subprocess.run(["sudo"] + [args[0][0]] + args[0][1:], **kwargs)
|
||||
@@ -57,10 +67,15 @@ class PatchSysVolume:
|
||||
def find_mount_root_vol(self, patch):
|
||||
self.root_mount_path = Utilities.get_disk_path()
|
||||
if self.root_mount_path.startswith("disk"):
|
||||
if self.constants.detected_os == self.constants.catalina and self.validate is False:
|
||||
print("- Mounting Catalina Root Volume as writable")
|
||||
self.elevated(["mount", "-uw", f"{self.mount_location}/"], stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
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:
|
||||
if self.constants.detected_os < self.constants.big_sur or (self.constants.detected_os == self.constants.big_sur and Utilities.check_seal() is True):
|
||||
self.backup_volume()
|
||||
self.patch_root_vol()
|
||||
return True
|
||||
else:
|
||||
@@ -70,12 +85,11 @@ class PatchSysVolume:
|
||||
if self.constants.detected_os > self.constants.catalina:
|
||||
print("- Mounting APFS Snapshot as writable")
|
||||
self.elevated(["mount", "-o", "nobrowse", "-t", "apfs", f"/dev/{self.root_mount_path}", self.mount_location], stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
elif self.constants.detected_os == self.constants.catalina:
|
||||
print("- Mounting Root Volume as writable")
|
||||
self.elevated(["mount", "-uw", "/"], stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
if Path(self.mount_extensions).exists():
|
||||
print("- Successfully mounted the Root Volume")
|
||||
if patch is True:
|
||||
if self.constants.detected_os < self.constants.big_sur or (self.constants.detected_os == self.constants.big_sur and Utilities.check_seal() is True):
|
||||
self.backup_volume()
|
||||
self.patch_root_vol()
|
||||
return True
|
||||
else:
|
||||
@@ -91,9 +105,111 @@ class PatchSysVolume:
|
||||
if self.constants.gui_mode is False:
|
||||
input("- Press [ENTER] to exit: ")
|
||||
|
||||
def backup_volume(self):
|
||||
for location in SysPatchArray.BackupLocations:
|
||||
Utilities.cls()
|
||||
print("Backing up root volume before patching (This may take some time)")
|
||||
print(f"- Attempting to backup {location}")
|
||||
location_zip = f"{location}-Backup.zip"
|
||||
location_zip_path = Path(self.mount_location) / Path(location_zip)
|
||||
|
||||
if location_zip_path.exists():
|
||||
print(f"- Found existing {location_zip}, skipping")
|
||||
else:
|
||||
print(f"- Backing up {location}")
|
||||
# cp -r ./Extensions ./Extensions-Backup
|
||||
# ditto -c -k --sequesterRsrc --keepParent ./Extensions-Backup ./Extensions-Backup.zip
|
||||
# rm -r ./Extensions-Backup
|
||||
|
||||
print("- Creating Backup folder")
|
||||
Utilities.process_status(
|
||||
self.elevated(
|
||||
["cp", "-r", f"{self.mount_location}/{location}", f"{self.mount_location}/{location}-Backup"],
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.STDOUT,
|
||||
)
|
||||
)
|
||||
print("- Zipping Backup folder")
|
||||
Utilities.process_status(
|
||||
self.elevated(
|
||||
["ditto", "-c", "-k", "--sequesterRsrc", "--keepParent", f"{self.mount_location}/{location}-Backup", f"{self.mount_location}/{location_zip}"],
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.STDOUT,
|
||||
)
|
||||
)
|
||||
|
||||
print("- Removing Backup folder")
|
||||
Utilities.process_status(
|
||||
self.elevated(
|
||||
["rm", "-r", f"{self.mount_location}/{location}-Backup"],
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.STDOUT,
|
||||
)
|
||||
)
|
||||
|
||||
def manual_root_patch_revert(self):
|
||||
print("- Attempting to revert patches")
|
||||
if (Path(self.mount_location) / Path("/System/Library/Extensions-Backup.zip")).exists():
|
||||
print("- Verified manual unpatching is available")
|
||||
|
||||
for location in SysPatchArray.BackupLocations:
|
||||
Utilities.cls()
|
||||
print("Reverting root volume patches (This may take some time)")
|
||||
|
||||
print(f"- Attempting to unpatch {location}")
|
||||
location_zip = f"/{location}-Backup.zip"
|
||||
location_zip_path = Path(self.mount_location) / Path(location_zip)
|
||||
location_old_path = Path(self.mount_location) / Path(location)
|
||||
|
||||
if "PrivateFrameworks" in location:
|
||||
copy_path = Path(self.mount_location) / Path("/System/Library/PrivateFrameworks")
|
||||
elif "Frameworks" in location:
|
||||
copy_path = Path(self.mount_location) / Path("/System/Library/Frameworks")
|
||||
else:
|
||||
copy_path = Path(self.mount_location) / Path("/System/Library")
|
||||
|
||||
if location_zip_path.exists():
|
||||
print(f"- Found {location_zip}")
|
||||
|
||||
print(f"- Unzipping {location_zip}")
|
||||
Utilities.process_status(self.elevated(["unzip", location_zip_path, "-d", copy_path], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||
|
||||
if location_old_path.exists():
|
||||
print(f"- Renaming {location}")
|
||||
Utilities.process_status(self.elevated(["mv", location_old_path, f"{location_old_path}-Patched"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||
|
||||
print(f"- Renaming {location}-Backup")
|
||||
Utilities.process_status(self.elevated(["mv", f"{location_old_path}-Backup", location_old_path], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||
|
||||
print(f"- Removing {location_old_path}-Patched")
|
||||
Utilities.process_status(self.elevated(["rm", "-r", f"{location_old_path}-Patched"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||
|
||||
# ditto will create a '__MACOSX' folder
|
||||
# print("- Removing __MACOSX folder")
|
||||
# Utilities.process_status(self.elevated(["rm", "-r", f"{copy_path}/__MACOSX"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||
|
||||
else:
|
||||
print(f"- Failed to find {location_zip}, unable to unpatch")
|
||||
if self.validate is False:
|
||||
self.rebuild_snapshot()
|
||||
else:
|
||||
print("- Could not find Extensions.zip, cannot manually unpatch root volume")
|
||||
|
||||
def unpatch_root_vol(self):
|
||||
print("- Reverting to last signed APFS snapshot")
|
||||
self.elevated(["bless", "--mount", self.mount_location, "--bootefi", "--last-sealed-snapshot"], stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
if self.constants.detected_os > self.constants.catalina:
|
||||
print("- Reverting to last signed APFS snapshot")
|
||||
result = self.elevated(["bless", "--mount", self.mount_location, "--bootefi", "--last-sealed-snapshot"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
if result.returncode != 0:
|
||||
print("- Unable to revert root volume patches")
|
||||
print("Reason for unpatch Failure:")
|
||||
print(result.stdout.decode())
|
||||
print("- Failed to revert snapshot via bless, falling back on manual restoration")
|
||||
self.manual_root_patch_revert()
|
||||
else:
|
||||
print("- Unpatching complete")
|
||||
print("\nPlease reboot the machine for patches to take effect")
|
||||
else:
|
||||
self.manual_root_patch_revert()
|
||||
|
||||
def rebuild_snapshot(self):
|
||||
if self.constants.gui_mode is False:
|
||||
@@ -102,9 +218,11 @@ class PatchSysVolume:
|
||||
if self.constants.detected_os > self.constants.catalina:
|
||||
result = self.elevated(["kmutil", "install", "--volume-root", self.mount_location, "--update-all"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
else:
|
||||
result = self.elevated(["kextcache", "-i", "/"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
result = self.elevated(["kextcache", "-i", f"{self.mount_location}/"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
|
||||
if result.returncode != 0:
|
||||
# kextcache always returns 0, even if it fails
|
||||
# Check the output for 'KernelCache ID' to see if the cache was successfully rebuilt
|
||||
if result.returncode != 0 or (self.constants.detected_os < self.constants.catalina and "KernelCache ID" not in result.stdout.decode()):
|
||||
self.success_status = False
|
||||
print("- Unable to build new kernel cache")
|
||||
print("\nPlease report this to Github")
|
||||
@@ -117,16 +235,32 @@ class PatchSysVolume:
|
||||
else:
|
||||
self.success_status = True
|
||||
print("- Successfully built new kernel cache")
|
||||
if self.constants.gui_mode is False and self.constants.detected_os > self.constants.catalina:
|
||||
input("Press [ENTER] to continue with snapshotting")
|
||||
if self.constants.gui_mode is False:
|
||||
if self.constants.detected_os > self.constants.catalina:
|
||||
input("Press [ENTER] to continue with snapshotting")
|
||||
else:
|
||||
input("Press [ENTER] to continue with kernel and dyld cache merging")
|
||||
if self.constants.detected_os > self.constants.catalina:
|
||||
print("- Creating new APFS snapshot")
|
||||
self.elevated(["bless", "--folder", f"{self.mount_location}/System/Library/CoreServices", "--bootefi", "--create-snapshot"], stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
self.unmount_drive()
|
||||
else:
|
||||
if self.constants.detected_os == self.constants.catalina:
|
||||
print("- Merging kernel cache")
|
||||
Utilities.process_status(self.elevated(["kcditto"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||
print("- Merging dyld cache")
|
||||
Utilities.process_status(self.elevated(["update_dyld_shared_cache", "-root", f"{self.mount_location}/"]))
|
||||
print("- Patching complete")
|
||||
print("\nPlease reboot the machine for patches to take effect")
|
||||
if self.amd_ts2 is True and self.constants.allow_ts2_accel is True:
|
||||
print(
|
||||
"""\nPlease note that with ATI TeraScale 2 GPUs, you may experience colour strobing
|
||||
on reboot. Please use SwitchResX or ResXtreme to force 1 million colours on your
|
||||
monitor to fix this. If you are epileptic, please ask for someone to aid you or
|
||||
set million colour before rebooting"""
|
||||
)
|
||||
if self.constants.gui_mode is False:
|
||||
input("Press [ENTER] to continue")
|
||||
input("\nPress [ENTER] to continue")
|
||||
|
||||
def unmount_drive(self):
|
||||
print("- Unmounting Root Volume (Don't worry if this fails)")
|
||||
@@ -137,7 +271,7 @@ class PatchSysVolume:
|
||||
delete_path = Path(self.mount_extensions) / Path(delete_current_kext)
|
||||
if Path(delete_path).exists():
|
||||
print(f"- Deleting {delete_current_kext}")
|
||||
self.elevated(["sudo", "rm", "-R", delete_path], stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
Utilities.process_status(self.elevated(["rm", "-R", delete_path], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||
else:
|
||||
print(f"- Couldn't find {delete_current_kext}, skipping")
|
||||
|
||||
@@ -146,153 +280,249 @@ class PatchSysVolume:
|
||||
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}")
|
||||
self.elevated(["rm", "-R", existing_path], stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
Utilities.process_status(self.elevated(["rm", "-R", existing_path], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||
print(f"- Adding {add_current_kext}")
|
||||
self.elevated(["cp", "-R", f"{vendor_location}/{add_current_kext}", self.mount_extensions], stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
self.elevated(["chmod", "-Rf", "755", f"{self.mount_extensions}/{add_current_kext}"], stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
self.elevated(["chown", "-Rf", "root:wheel", f"{self.mount_extensions}/{add_current_kext}"], stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
Utilities.process_status(self.elevated(["cp", "-R", f"{vendor_location}/{add_current_kext}", self.mount_extensions], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||
Utilities.process_status(self.elevated(["chmod", "-Rf", "755", f"{self.mount_extensions}/{add_current_kext}"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||
Utilities.process_status(self.elevated(["chown", "-Rf", "root:wheel", f"{self.mount_extensions}/{add_current_kext}"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||
|
||||
def add_brightness_patch(self):
|
||||
self.delete_old_binaries(SysPatchArray.DeleteBrightness)
|
||||
self.add_new_binaries(SysPatchArray.AddBrightness, self.constants.legacy_brightness)
|
||||
self.elevated(["rsync", "-r", "-i", f"{self.constants.payload_apple_private_frameworks_path_brightness}/", self.mount_private_frameworks], stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
self.elevated(["chmod", "-Rf", "755", f"{self.mount_private_frameworks}/DisplayServices.framework"], stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
self.elevated(["chown", "-Rf", "root:wheel", f"{self.mount_private_frameworks}/DisplayServices.framework"], stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
self.elevated(["rsync", "-r", "-i", "-a", f"{self.constants.payload_apple_private_frameworks_path_brightness}/", self.mount_private_frameworks], stdout=subprocess.PIPE)
|
||||
Utilities.process_status(self.elevated(["chmod", "-Rf", "755", f"{self.mount_private_frameworks}/DisplayServices.framework"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||
Utilities.process_status(self.elevated(["chown", "-Rf", "root:wheel", f"{self.mount_private_frameworks}/DisplayServices.framework"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||
|
||||
def add_audio_patch(self):
|
||||
self.delete_old_binaries(SysPatchArray.DeleteVolumeControl)
|
||||
self.add_new_binaries(SysPatchArray.AddVolumeControl, self.constants.audio_path)
|
||||
|
||||
def gpu_accel_legacy_nvidia_big_sur(self):
|
||||
self.delete_old_binaries(SysPatchArray.DeleteNvidiaAccel11)
|
||||
self.add_new_binaries(SysPatchArray.AddGeneralAccel, self.constants.legacy_general_path)
|
||||
self.add_new_binaries(SysPatchArray.AddNvidiaAccel11, self.constants.legacy_nvidia_path)
|
||||
def add_wifi_patch(self):
|
||||
print("- Merging Wireless CoreSerices patches")
|
||||
self.elevated(["rsync", "-r", "-i", "-a", f"{self.constants.legacy_wifi_coreservices}/", self.mount_coreservices], stdout=subprocess.PIPE)
|
||||
Utilities.process_status(self.elevated(["chmod", "-Rf", "755", f"{self.mount_coreservices}/WiFiAgent.app"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||
Utilities.process_status(self.elevated(["chown", "-Rf", "root:wheel", f"{self.mount_coreservices}/WiFiAgent.app"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||
print("- Merging Wireless usr/libexec patches")
|
||||
self.elevated(["rsync", "-r", "-i", "-a", f"{self.constants.legacy_wifi_libexec}/", self.mount_libexec], stdout=subprocess.PIPE)
|
||||
Utilities.process_status(self.elevated(["chmod", "755", f"{self.mount_libexec}/airportd"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||
Utilities.process_status(self.elevated(["chown", "root:wheel", f"{self.mount_libexec}/airportd"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||
|
||||
def gpu_framebuffer_legacy_nvidia(self):
|
||||
self.add_new_binaries(SysPatchArray.AddNvidiaBrightness, self.constants.legacy_nvidia_path)
|
||||
def gpu_accel_legacy(self):
|
||||
if self.constants.detected_os == self.constants.mojave:
|
||||
print("- Installing General Acceleration Kext patches for Mojave")
|
||||
self.add_new_binaries(SysPatchArray.AddGeneralAccelMojave, self.constants.legacy_general_path)
|
||||
elif self.constants.detected_os == self.constants.catalina:
|
||||
print("- Installing General Acceleration Kext patches for Catalina")
|
||||
self.add_new_binaries(SysPatchArray.AddGeneralAccelCatalina, self.constants.legacy_general_path)
|
||||
elif self.constants.detected_os in [self.constants.big_sur, self.constants.monterey]:
|
||||
print("- Installing General Acceleration Kext patches for Big Sur/Monterey")
|
||||
self.add_new_binaries(SysPatchArray.AddGeneralAccel, self.constants.legacy_general_path)
|
||||
|
||||
def gpu_accel_legacy_ts1_big_sur(self):
|
||||
self.delete_old_binaries(SysPatchArray.DeleteAMDAccel11)
|
||||
self.add_new_binaries(SysPatchArray.AddGeneralAccel, self.constants.legacy_general_path)
|
||||
self.add_new_binaries(SysPatchArray.AddAMDAccel11, self.constants.legacy_amd_path)
|
||||
# Nvidia
|
||||
def gpu_accel_legacy_nvidia_master(self):
|
||||
if self.constants.detected_os in [self.constants.mojave, self.constants.catalina]:
|
||||
print("- Installing Nvidia Acceleration Kext patches for Mojave/Catalina")
|
||||
self.gpu_accel_legacy()
|
||||
self.add_new_binaries(SysPatchArray.AddNvidiaAccelLegacy, self.constants.legacy_nvidia_path)
|
||||
elif self.constants.detected_os in [self.constants.big_sur, self.constants.monterey]:
|
||||
print("- Installing Nvidia Acceleration Kext patches for Big Sur/Monterey")
|
||||
self.delete_old_binaries(SysPatchArray.DeleteNvidiaAccel11)
|
||||
self.gpu_accel_legacy()
|
||||
self.add_new_binaries(SysPatchArray.AddNvidiaAccel11, self.constants.legacy_nvidia_path)
|
||||
else:
|
||||
print("- Installing basic Nvidia Framebuffer Kext patches for generic OS")
|
||||
self.add_new_binaries(SysPatchArray.AddNvidiaBrightness, self.constants.legacy_nvidia_path)
|
||||
|
||||
def gpu_accel_legacy_ts2_big_sur(self):
|
||||
self.delete_old_binaries(SysPatchArray.DeleteAMDAccel11)
|
||||
self.delete_old_binaries(SysPatchArray.DeleteAMDAccel11TS2)
|
||||
self.add_new_binaries(SysPatchArray.AddGeneralAccel, self.constants.legacy_general_path)
|
||||
self.add_new_binaries(SysPatchArray.AddAMDAccel11, self.constants.legacy_amd_path)
|
||||
# AMD/ATI
|
||||
def gpu_accel_legacy_ts1_master(self):
|
||||
if self.constants.detected_os in [self.constants.mojave, self.constants.catalina]:
|
||||
print("- Installing TeraScale 1 Acceleration Kext patches for Mojave/Catalina")
|
||||
self.gpu_accel_legacy()
|
||||
self.add_new_binaries(SysPatchArray.AddAMDAccelLegacy, self.constants.legacy_amd_path)
|
||||
elif self.constants.detected_os in [self.constants.big_sur, self.constants.monterey]:
|
||||
print("- Installing TeraScale 1 Acceleration Kext patches for Big Sur/Monterey")
|
||||
self.delete_old_binaries(SysPatchArray.DeleteAMDAccel11)
|
||||
self.gpu_accel_legacy()
|
||||
self.add_new_binaries(SysPatchArray.AddAMDAccel11, self.constants.legacy_amd_path)
|
||||
else:
|
||||
print("- Installing basic TeraScale 1 Framebuffer Kext patches for generic OS")
|
||||
self.add_new_binaries(SysPatchArray.AddAMDBrightness, self.constants.legacy_amd_path)
|
||||
|
||||
def gpu_framebuffer_legacy_amd(self):
|
||||
self.add_new_binaries(SysPatchArray.AddAMDBrightness, self.constants.legacy_amd_path)
|
||||
def gpu_accel_legacy_ts2_master(self):
|
||||
if self.constants.detected_os in [self.constants.mojave, self.constants.catalina] and self.constants.allow_ts2_accel is True:
|
||||
print("- Installing TeraScale 2 Acceleration Kext patches for Mojave/Catalina")
|
||||
self.gpu_accel_legacy()
|
||||
self.add_new_binaries(SysPatchArray.AddAMDAccelLegacy, self.constants.legacy_amd_path)
|
||||
elif self.constants.detected_os in [self.constants.big_sur, self.constants.monterey] and self.constants.allow_ts2_accel is True:
|
||||
# TODO: Enable for Monterey when acceleration patches proress
|
||||
print("- Installing TeraScale 2 Acceleration Kext patches for Big Sur")
|
||||
self.delete_old_binaries(SysPatchArray.DeleteAMDAccel11)
|
||||
self.delete_old_binaries(SysPatchArray.DeleteAMDAccel11TS2)
|
||||
self.gpu_accel_legacy()
|
||||
self.add_new_binaries(SysPatchArray.AddAMDAccel11, self.constants.legacy_amd_path)
|
||||
else:
|
||||
print("- Installing basic TeraScale 2 Framebuffer Kext patches for generic OS")
|
||||
self.add_new_binaries(SysPatchArray.AddAMDBrightness, self.constants.legacy_amd_path)
|
||||
|
||||
def gpu_accel_legacy_ironlake_big_sur(self):
|
||||
self.delete_old_binaries(SysPatchArray.DeleteNvidiaAccel11)
|
||||
self.add_new_binaries(SysPatchArray.AddGeneralAccel, self.constants.legacy_general_path)
|
||||
self.add_new_binaries(SysPatchArray.AddIntelGen1Accel, self.constants.legacy_intel_gen1_path)
|
||||
# Intel
|
||||
def gpu_accel_legacy_ironlake_master(self):
|
||||
if self.constants.detected_os in [self.constants.mojave, self.constants.catalina]:
|
||||
print("- Installing Ironlake Acceleration Kext patches for Mojave/Catalina")
|
||||
self.gpu_accel_legacy()
|
||||
self.add_new_binaries(SysPatchArray.AddIntelGen1Accel, self.constants.legacy_intel_gen1_path)
|
||||
elif self.constants.detected_os in [self.constants.big_sur, self.constants.monterey]:
|
||||
print("- Installing Ironlake Acceleration Kext patches for Big Sur/Monterey")
|
||||
self.delete_old_binaries(SysPatchArray.DeleteNvidiaAccel11)
|
||||
self.gpu_accel_legacy()
|
||||
self.add_new_binaries(SysPatchArray.AddIntelGen1Accel, self.constants.legacy_intel_gen1_path)
|
||||
else:
|
||||
print("- Installing basic Ironlake Framebuffer Kext patches for generic OS")
|
||||
self.add_new_binaries(SysPatchArray.AddIntelGen1Accel, self.constants.legacy_intel_gen1_path)
|
||||
|
||||
def gpu_framebuffer_legacy_ironlake(self):
|
||||
self.add_new_binaries(SysPatchArray.AddIntelGen1Accel, self.constants.legacy_intel_gen1_path)
|
||||
def gpu_accel_legacy_sandybridge_master(self):
|
||||
if self.constants.detected_os in [self.constants.mojave, self.constants.catalina]:
|
||||
print("- Installing Sandy Bridge Acceleration Kext patches for Mojave/Catalina")
|
||||
self.gpu_accel_legacy()
|
||||
self.add_new_binaries(SysPatchArray.AddIntelGen2Accel, self.constants.legacy_intel_gen2_path)
|
||||
elif self.constants.detected_os in [self.constants.big_sur, self.constants.monterey]:
|
||||
print("- Installing Sandy Bridge Acceleration Kext patches for Big Sur/Monterey")
|
||||
self.delete_old_binaries(SysPatchArray.DeleteNvidiaAccel11)
|
||||
self.gpu_accel_legacy()
|
||||
self.add_new_binaries(SysPatchArray.AddIntelGen2Accel, self.constants.legacy_intel_gen2_path)
|
||||
else:
|
||||
print("- Installing basic Sandy Bridge Framebuffer Kext patches for generic OS")
|
||||
self.add_new_binaries(SysPatchArray.AddIntelGen2Accel, self.constants.legacy_intel_gen2_path)
|
||||
|
||||
def gpu_accel_legacy_sandybridge_big_sur(self):
|
||||
self.delete_old_binaries(SysPatchArray.DeleteNvidiaAccel11)
|
||||
self.add_new_binaries(SysPatchArray.AddGeneralAccel, self.constants.legacy_general_path)
|
||||
self.add_new_binaries(SysPatchArray.AddIntelGen2Accel, self.constants.legacy_intel_gen2_path)
|
||||
def gpu_framebuffer_ivybridge_master(self):
|
||||
if self.constants.detected_os == self.constants.monterey:
|
||||
print("- Installing IvyBridge Acceleration Kext patches for Monterey")
|
||||
self.add_new_binaries(SysPatchArray.AddIntelGen3Accel, self.constants.legacy_intel_gen3_path)
|
||||
if self.validate is False:
|
||||
print("- Fixing Acceleration in CoreMedia")
|
||||
Utilities.process_status(subprocess.run(["defaults", "write", "com.apple.coremedia", "hardwareVideoDecoder", "-string", "enable"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||
print("- Merging Ivy Bridge Frameworks")
|
||||
self.elevated(["rsync", "-r", "-i", "-a", f"{self.constants.payload_apple_frameworks_path_accel_ivy}/", self.mount_frameworks], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
print("- Merging Ivy Bridge PrivateFrameworks")
|
||||
self.elevated(["rsync", "-r", "-i", "-a", f"{self.constants.payload_apple_private_frameworks_path_accel_ivy}/", self.mount_private_frameworks], stdout=subprocess.PIPE)
|
||||
else:
|
||||
print("- Installing basic Ivy Bridge Kext patches for generic OS")
|
||||
self.add_new_binaries(SysPatchArray.AddIntelGen3Accel, self.constants.legacy_intel_gen3_path)
|
||||
|
||||
def gpu_framebuffer_legacy_sandybridge(self):
|
||||
self.add_new_binaries(SysPatchArray.AddIntelGen2Accel, self.constants.legacy_intel_gen1_path)
|
||||
|
||||
def gpu_framebuffer_ivybridge_big_sur(self):
|
||||
self.add_new_binaries(SysPatchArray.AddIntelGen3Accel, self.constants.legacy_intel_gen3_path)
|
||||
print("- Fixing Acceleration in CoreMedia")
|
||||
subprocess.run(["defaults", "write", "com.apple.coremedia", "hardwareVideoDecoder", "-string", "disable"], stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
print("- Merging Ivy Bridge Frameworks")
|
||||
self.elevated(["rsync", "-r", "-i", f"{self.constants.payload_apple_frameworks_path_accel_ivy}/", self.mount_frameworks], stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
def gpu_franevuffer_kepler_master(self):
|
||||
if self.constants.detected_os == self.constants.monterey:
|
||||
print("- Installing Kepler Acceleration Kext patches for Monterey")
|
||||
self.add_new_binaries(SysPatchArray.AddNvidiaKeplerAccel11, self.constants.legacy_nvidia_kepler_path)
|
||||
else:
|
||||
print("- Installing Kepler Kext patches for generic OS")
|
||||
self.add_new_binaries(SysPatchArray.AddNvidiaKeplerAccel11, self.constants.legacy_nvidia_kepler_path)
|
||||
|
||||
def gpu_accel_legacy_extended(self):
|
||||
print("- Merging general legacy Frameworks")
|
||||
self.elevated(["rsync", "-r", "-i", f"{self.constants.payload_apple_frameworks_path_accel}/", self.mount_frameworks], stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
if Path(self.mount_lauchd / Path("HiddHack.plist")).exists():
|
||||
print("- Removing legacy HiddHack")
|
||||
self.elevated(["rm", f"{self.mount_lauchd}/HiddHack.plist"], stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
print("- Adding IOHID-Fixup.plist")
|
||||
self.elevated(["rsync", "-r", "-i", f"{self.constants.payload_apple_lauchd_path_accel}/", self.mount_lauchd], stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
self.elevated(["chmod", "755", f"{self.mount_lauchd}/IOHID-Fixup.plist"], stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
self.elevated(["chown", "root:wheel", f"{self.mount_lauchd}/IOHID-Fixup.plist"], stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
self.elevated(["rsync", "-r", "-i", "-a", f"{self.constants.payload_apple_frameworks_path_accel}/", self.mount_frameworks], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
if self.constants.detected_os > self.constants.big_sur:
|
||||
print("- Merging Monterey WebKit patch")
|
||||
self.elevated(["rsync", "-r", "-i", "-a", f"{self.constants.payload_apple_frameworks_path_accel_ivy}/", self.mount_frameworks], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
|
||||
print("- Merging general legacy PrivateFrameworks")
|
||||
self.elevated(["rsync", "-r", "-i", f"{self.constants.payload_apple_private_frameworks_path_accel}/", self.mount_private_frameworks], stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
self.elevated(["rsync", "-r", "-i", "-a", f"{self.constants.payload_apple_private_frameworks_path_accel}/", self.mount_private_frameworks], stdout=subprocess.PIPE)
|
||||
if self.constants.detected_os > self.constants.catalina:
|
||||
print("- Adding IOHID-Fixup.plist")
|
||||
Utilities.process_status(
|
||||
self.elevated(["rsync", "-r", "-i", "-a", f"{self.constants.payload_apple_lauchd_path_accel}/", self.mount_lauchd], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
)
|
||||
Utilities.process_status(self.elevated(["chmod", "755", f"{self.mount_lauchd}/IOHID-Fixup.plist"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||
Utilities.process_status(self.elevated(["chown", "root:wheel", f"{self.mount_lauchd}/IOHID-Fixup.plist"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||
else:
|
||||
print("- Disabling Library Validation")
|
||||
Utilities.process_status(
|
||||
self.elevated(
|
||||
["defaults", "write", "/Library/Preferences/com.apple.security.libraryvalidation.plist", "DisableLibraryValidation", "-bool", "true"],
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.STDOUT,
|
||||
)
|
||||
)
|
||||
|
||||
def gpu_accel_legacy_extended_ts2(self):
|
||||
print("- Merging TeraScale 2 legacy Frameworks")
|
||||
self.elevated(["rsync", "-r", "-i", f"{self.constants.payload_apple_frameworks_path_accel_ts2}/", self.mount_frameworks], stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
self.elevated(["rsync", "-r", "-i", "-a", f"{self.constants.payload_apple_frameworks_path_accel_ts2}/", self.mount_frameworks], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
|
||||
print("- Merging TeraScale 2 PrivateFrameworks")
|
||||
self.elevated(["rsync", "-r", "-i", f"{self.constants.payload_apple_private_frameworks_path_accel_ts2}/", self.mount_private_frameworks], stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
print("- Fixing Acceleration in CMIO")
|
||||
subprocess.run(["defaults", "write", "com.apple.cmio", "CMIO_Unit_Input_ASC.DoNotUseOpenCL", "-bool", "true"], stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
self.elevated(["rsync", "-r", "-i", "-a", f"{self.constants.payload_apple_private_frameworks_path_accel_ts2}/", self.mount_private_frameworks], stdout=subprocess.PIPE)
|
||||
if self.validate is False:
|
||||
print("- Fixing Acceleration in CMIO")
|
||||
Utilities.process_status(subprocess.run(["defaults", "write", "com.apple.cmio", "CMIO_Unit_Input_ASC.DoNotUseOpenCL", "-bool", "true"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||
|
||||
def patch_root_vol(self):
|
||||
print(f"- Running patches for {self.model}")
|
||||
# Graphics patches
|
||||
if self.nvidia_legacy is True:
|
||||
print("- Installing legacy Nvidia Patches")
|
||||
if self.constants.detected_os == self.constants.big_sur:
|
||||
print("- Detected Big Sur, installing Acceleration patches")
|
||||
self.gpu_accel_legacy_nvidia_big_sur()
|
||||
self.added_kexts = True
|
||||
if self.constants.detected_os in self.constants.legacy_accel_support:
|
||||
print("- Detected supported OS, installing Acceleration Patches")
|
||||
self.added_legacy_kexts = True
|
||||
else:
|
||||
print("- Detected unsupported OS, installing Basic Framebuffer")
|
||||
self.gpu_framebuffer_legacy_nvidia()
|
||||
self.gpu_accel_legacy_nvidia_master()
|
||||
|
||||
if self.amd_ts1 is True:
|
||||
elif self.kepler_gpu is True:
|
||||
print("- Installing Kepler Patches")
|
||||
if self.constants.detected_os == self.constants.monterey:
|
||||
print("- Detected supported OS, installing Acceleration Patches")
|
||||
else:
|
||||
print("- Detected unsupported OS, installing Basic Framebuffer")
|
||||
self.gpu_franevuffer_kepler_master()
|
||||
|
||||
elif self.amd_ts1 is True:
|
||||
print("- Installing legacy TeraScale 1 Patches")
|
||||
if self.constants.detected_os == self.constants.big_sur:
|
||||
print("- Detected Big Sur, installing Acceleration patches")
|
||||
self.gpu_accel_legacy_ts1_big_sur()
|
||||
self.added_kexts = True
|
||||
if self.constants.detected_os in self.constants.legacy_accel_support:
|
||||
print("- Detected supported OS, installing Acceleration Patches")
|
||||
self.added_legacy_kexts = True
|
||||
else:
|
||||
print("- Detected unsupported OS, installing Basic Framebuffer")
|
||||
self.gpu_framebuffer_legacy_amd()
|
||||
self.gpu_accel_legacy_ts1_master()
|
||||
|
||||
if self.amd_ts2 is True:
|
||||
elif self.amd_ts2 is True:
|
||||
print("- Installing legacy TeraScale 2 Patches")
|
||||
if self.constants.detected_os == self.constants.big_sur:
|
||||
print("- Detected Big Sur, installing Acceleration patches")
|
||||
self.gpu_accel_legacy_ts2_big_sur()
|
||||
self.added_kexts = True
|
||||
if self.constants.detected_os in self.constants.legacy_accel_support:
|
||||
print("- Detected supported OS, installing Acceleration Patches")
|
||||
self.added_legacy_kexts = True
|
||||
else:
|
||||
print("- Detected unsupported OS, installing Basic Framebuffer")
|
||||
self.gpu_framebuffer_legacy_amd()
|
||||
self.gpu_accel_legacy_ts2_master()
|
||||
|
||||
if self.iron_gpu is True:
|
||||
print("- Installing legacy Ironlake Patches")
|
||||
if self.constants.detected_os == self.constants.big_sur:
|
||||
print("- Detected Big Sur, installing Acceleration patches")
|
||||
self.gpu_accel_legacy_ironlake_big_sur()
|
||||
self.added_kexts = True
|
||||
if self.constants.detected_os in self.constants.legacy_accel_support:
|
||||
print("- Detected supported OS, installing Acceleration Patches")
|
||||
self.added_legacy_kexts = True
|
||||
else:
|
||||
print("- Detected unsupported OS, installing Basic Framebuffer")
|
||||
self.gpu_framebuffer_legacy_ironlake()
|
||||
self.gpu_accel_legacy_ironlake_master()
|
||||
|
||||
if self.sandy_gpu is True:
|
||||
elif self.sandy_gpu is True:
|
||||
print("- Installing legacy Sandy Bridge Patches")
|
||||
if self.constants.detected_os == self.constants.big_sur:
|
||||
print("- Detected Big Sur, installing Acceleration patches")
|
||||
self.gpu_accel_legacy_sandybridge_big_sur()
|
||||
self.added_kexts = True
|
||||
if self.constants.detected_os in self.constants.legacy_accel_support:
|
||||
print("- Detected supported OS, installing Acceleration Patches")
|
||||
self.added_legacy_kexts = True
|
||||
else:
|
||||
print("- Detected unsupported OS, installing Basic Framebuffer")
|
||||
self.gpu_framebuffer_legacy_sandybridge()
|
||||
self.gpu_accel_legacy_sandybridge_master()
|
||||
|
||||
if self.ivy_gpu is True:
|
||||
elif self.ivy_gpu is True:
|
||||
print("- Installing Ivy Bridge Patches")
|
||||
self.gpu_framebuffer_ivybridge_big_sur()
|
||||
if self.constants.detected_os == self.constants.monterey:
|
||||
print("- Detected supported OS, installing Acceleration Patches")
|
||||
else:
|
||||
print("- Detected unsupported OS, installing Basic Framebuffer")
|
||||
self.gpu_framebuffer_ivybridge_master()
|
||||
|
||||
if self.amd_ts2 is True:
|
||||
if self.amd_ts2 is True and self.constants.detected_os in self.constants.legacy_accel_support and self.constants.allow_ts2_accel is True:
|
||||
# TeraScale 2 patches must be installed after Intel HD3000
|
||||
self.add_new_binaries(SysPatchArray.AddAMDAccel11TS2, self.constants.legacy_amd_path_ts2)
|
||||
|
||||
if self.added_kexts is True:
|
||||
if self.added_legacy_kexts is True and self.constants.detected_os in self.constants.legacy_accel_support:
|
||||
self.gpu_accel_legacy_extended()
|
||||
if self.amd_ts2 is True:
|
||||
if self.amd_ts2 is True and self.constants.allow_ts2_accel is True:
|
||||
self.gpu_accel_legacy_extended_ts2()
|
||||
|
||||
# Misc patches
|
||||
@@ -304,7 +534,12 @@ class PatchSysVolume:
|
||||
print("- Fixing Volume Control Support")
|
||||
self.add_audio_patch()
|
||||
|
||||
self.rebuild_snapshot()
|
||||
if self.legacy_wifi is True:
|
||||
print("- Installing legacy Wireless support")
|
||||
self.add_wifi_patch()
|
||||
|
||||
if self.validate is False:
|
||||
self.rebuild_snapshot()
|
||||
|
||||
def check_files(self):
|
||||
if Path(self.constants.payload_apple_root_path).exists():
|
||||
@@ -329,6 +564,8 @@ class PatchSysVolume:
|
||||
os_ver = "10.15-Catalina"
|
||||
elif self.constants.detected_os == self.constants.mojave:
|
||||
os_ver = "10.14-Mojave"
|
||||
else:
|
||||
raise Exception(f"Unsupported OS: {self.constants.detected_os}")
|
||||
link = f"{self.constants.url_patcher_support_pkg}{self.constants.patcher_support_pkg_version}/{os_ver}.zip"
|
||||
|
||||
if Path(self.constants.payload_apple_root_path).exists():
|
||||
@@ -338,13 +575,19 @@ class PatchSysVolume:
|
||||
print("- Removing old Apple Binaries zip")
|
||||
Path(self.constants.payload_apple_root_path_zip).unlink()
|
||||
|
||||
Utilities.download_file(link, self.constants.payload_apple_root_path_zip)
|
||||
local_zip = Path(self.constants.payload_path) / f"{os_ver}.zip"
|
||||
if Path(local_zip).exists():
|
||||
print(f"- Found local {os_ver} zip, skipping download")
|
||||
print(f"- Duplicating into Apple.zip")
|
||||
shutil.copy(local_zip, self.constants.payload_apple_root_path_zip)
|
||||
else:
|
||||
Utilities.download_file(link, self.constants.payload_apple_root_path_zip)
|
||||
|
||||
if self.constants.payload_apple_root_path_zip.exists():
|
||||
print("- Download completed")
|
||||
print("- Unzipping download...")
|
||||
try:
|
||||
subprocess.run(["unzip", self.constants.payload_apple_root_path_zip], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, cwd=self.constants.payload_path).stdout.decode()
|
||||
Utilities.process_status(subprocess.run(["unzip", self.constants.payload_apple_root_path_zip], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, cwd=self.constants.payload_path))
|
||||
print("- Renaming folder")
|
||||
os.rename(self.constants.payload_path / Path(os_ver), self.constants.payload_apple_root_path)
|
||||
Path(self.constants.payload_apple_root_path_zip).unlink()
|
||||
@@ -359,42 +602,62 @@ class PatchSysVolume:
|
||||
print("- Download failed, please verify the below link works:")
|
||||
print(link)
|
||||
input("Press [ENTER] to continue")
|
||||
|
||||
def detect_gpus(self):
|
||||
dgpu = self.constants.computer.dgpu
|
||||
igpu = self.constants.computer.igpu
|
||||
if dgpu:
|
||||
print(f"- Found GFX0: {Utilities.friendly_hex(dgpu.vendor_id)}:{Utilities.friendly_hex(dgpu.device_id)}")
|
||||
if dgpu.arch in [device_probe.NVIDIA.Archs.Tesla, device_probe.NVIDIA.Archs.Fermi]:
|
||||
if self.constants.detected_os > self.constants.catalina:
|
||||
self.nvidia_legacy = True
|
||||
self.amfi_must_disable = True
|
||||
elif dgpu.arch == device_probe.AMD.Archs.TeraScale_1:
|
||||
if self.constants.detected_os > self.constants.catalina:
|
||||
self.amd_ts1 = True
|
||||
self.amfi_must_disable = True
|
||||
# TODO: Enable TS2 support
|
||||
elif dgpu.arch == device_probe.AMD.Archs.TeraScale_2:
|
||||
# Requires manual permission from user to avoid medical issues
|
||||
if self.constants.detected_os > self.constants.catalina and self.constants.terascale_2_patch is True:
|
||||
self.amd_ts2 = True
|
||||
self.amfi_must_disable = True
|
||||
if igpu and igpu.class_code != 0xFFFFFF:
|
||||
print(f"- Found IGPU: {Utilities.friendly_hex(igpu.vendor_id)}:{Utilities.friendly_hex(igpu.device_id)}")
|
||||
if igpu.arch == device_probe.Intel.Archs.Iron_Lake:
|
||||
if self.constants.detected_os > self.constants.catalina:
|
||||
self.iron_gpu = True
|
||||
self.amfi_must_disable = True
|
||||
elif igpu.arch == device_probe.Intel.Archs.Sandy_Bridge:
|
||||
if self.constants.detected_os > self.constants.catalina:
|
||||
self.sandy_gpu = True
|
||||
self.amfi_must_disable = True
|
||||
elif igpu.arch == device_probe.Intel.Archs.Ivy_Bridge:
|
||||
if self.constants.detected_os > self.constants.big_sur:
|
||||
self.ivy_gpu = True
|
||||
elif isinstance(igpu, device_probe.NVIDIA):
|
||||
if self.constants.detected_os > self.constants.catalina:
|
||||
self.nvidia_legacy = True
|
||||
self.amfi_must_disable = True
|
||||
gpus = self.constants.computer.gpus
|
||||
if self.constants.moj_cat_accel is True:
|
||||
non_metal_os = self.constants.high_sierra
|
||||
else:
|
||||
non_metal_os = self.constants.catalina
|
||||
i = 0
|
||||
for gpu in gpus:
|
||||
if gpu.class_code and gpu.class_code != 0xFFFFFFFF:
|
||||
print(f"- Found GPU ({i}): {Utilities.friendly_hex(gpu.vendor_id)}:{Utilities.friendly_hex(gpu.device_id)}")
|
||||
if gpu.arch in [device_probe.NVIDIA.Archs.Tesla, device_probe.NVIDIA.Archs.Fermi]:
|
||||
if self.constants.detected_os > non_metal_os:
|
||||
self.nvidia_legacy = True
|
||||
self.amfi_must_disable = True
|
||||
elif gpu.arch == device_probe.NVIDIA.Archs.Kepler:
|
||||
if self.constants.detected_os > self.constants.big_sur:
|
||||
# Kepler drivers were dropped with Beta 7
|
||||
# 12.0 Beta 5: 21.0.0 - 21A5304g
|
||||
# 12.0 Beta 6: 21.1.0 - 21A5506j
|
||||
# 12.0 Beta 7: 21.1.0 - 21A5522h
|
||||
if self.constants.detected_os == self.constants.monterey and self.constants.detected_os_minor > 0:
|
||||
if "21A5506j" not in self.constants.detected_os_build:
|
||||
self.kepler_gpu = True
|
||||
self.supports_metal = True
|
||||
elif gpu.arch == device_probe.AMD.Archs.TeraScale_1:
|
||||
if self.constants.detected_os > non_metal_os:
|
||||
self.amd_ts1 = True
|
||||
self.amfi_must_disable = True
|
||||
elif gpu.arch == device_probe.AMD.Archs.TeraScale_2:
|
||||
if self.constants.detected_os > non_metal_os:
|
||||
self.amd_ts2 = True
|
||||
self.amfi_must_disable = True
|
||||
elif gpu.arch == device_probe.Intel.Archs.Iron_Lake:
|
||||
if self.constants.detected_os > non_metal_os:
|
||||
self.iron_gpu = True
|
||||
self.amfi_must_disable = True
|
||||
elif gpu.arch == device_probe.Intel.Archs.Sandy_Bridge:
|
||||
if self.constants.detected_os > non_metal_os:
|
||||
self.sandy_gpu = True
|
||||
self.amfi_must_disable = True
|
||||
self.check_board_id = True
|
||||
elif gpu.arch == device_probe.Intel.Archs.Ivy_Bridge:
|
||||
if self.constants.detected_os > self.constants.big_sur:
|
||||
self.ivy_gpu = True
|
||||
self.supports_metal = True
|
||||
i += 1
|
||||
if self.supports_metal is True:
|
||||
# Avoid patching Metal and non-Metal GPUs if both present, prioritize Metal GPU
|
||||
# Main concerns are for iMac12,x with Sandy iGPU and Kepler dGPU
|
||||
self.nvidia_legacy = False
|
||||
self.amd_ts1 = False
|
||||
self.amd_ts2 = False
|
||||
self.iron_gpu = False
|
||||
self.sandy_gpu = False
|
||||
|
||||
|
||||
def detect_patch_set(self):
|
||||
self.detect_gpus()
|
||||
@@ -406,10 +669,19 @@ class PatchSysVolume:
|
||||
if self.constants.detected_os > self.constants.catalina:
|
||||
self.legacy_audio = True
|
||||
|
||||
if (
|
||||
isinstance(self.constants.computer.wifi, device_probe.Broadcom)
|
||||
and self.constants.computer.wifi.chipset in [device_probe.Broadcom.Chipsets.AirPortBrcm4331, device_probe.Broadcom.Chipsets.AirPortBrcm43224]
|
||||
) or (isinstance(self.constants.computer.wifi, device_probe.Atheros) and self.constants.computer.wifi.chipset == device_probe.Atheros.Chipsets.AirPortAtheros40):
|
||||
if self.constants.detected_os > self.constants.big_sur:
|
||||
self.legacy_wifi = True
|
||||
|
||||
Utilities.cls()
|
||||
print("The following patches will be applied:")
|
||||
if self.nvidia_legacy is True:
|
||||
print("- Add Legacy Nvidia Tesla Graphics Patch")
|
||||
elif self.kepler_gpu is True:
|
||||
print("- Add Legacy Nvidia Kepler Graphics Patch")
|
||||
elif self.amd_ts1 is True:
|
||||
print("- Add Legacy ATI TeraScale 1 Graphics Patch")
|
||||
elif self.amd_ts2 is True:
|
||||
@@ -424,10 +696,13 @@ class PatchSysVolume:
|
||||
print("- Add Legacy Brightness Control")
|
||||
if self.legacy_audio is True:
|
||||
print("- Add legacy Audio Control")
|
||||
if self.legacy_wifi is True:
|
||||
print("- Add legacy WiFi Control")
|
||||
|
||||
self.no_patch = not any(
|
||||
[
|
||||
self.nvidia_legacy,
|
||||
self.kepler_gpu,
|
||||
self.amd_ts1,
|
||||
self.amd_ts2,
|
||||
self.iron_gpu,
|
||||
@@ -435,18 +710,25 @@ class PatchSysVolume:
|
||||
self.ivy_gpu,
|
||||
self.brightness_legacy,
|
||||
self.legacy_audio,
|
||||
self.legacy_wifi,
|
||||
]
|
||||
)
|
||||
|
||||
def verify_patch_allowed(self):
|
||||
self.sip_enabled, self.sbm_enabled, self.amfi_enabled, self.fv_enabled = Utilities.patching_status()
|
||||
sip = self.constants.root_patch_sip_big_sur if self.constants.detected_os > self.constants.catalina else self.constants.root_patch_sip_mojave
|
||||
if sip == self.constants.root_patch_sip_mojave:
|
||||
sip_value = "For Hackintoshes, please set csr-active-config to '03060000' (0x603)\nFor non-OpenCore Macs, please run 'csrutil disable' in RecoveryOS"
|
||||
else:
|
||||
sip_value = (
|
||||
"For Hackintoshes, please set csr-active-config to '030E0000' (0xE03)\nFor non-OpenCore Macs, please run 'csrutil disable' and \n'csrutil authenticated-root disable' in RecoveryOS"
|
||||
)
|
||||
self.sip_enabled, self.sbm_enabled, self.amfi_enabled, self.fv_enabled, self.dosdude_patched = Utilities.patching_status(sip, self.constants.detected_os)
|
||||
if self.sip_enabled is True:
|
||||
print("\nCannot patch! Please disable System Integrity Protection (SIP).")
|
||||
print("Disable SIP in Patcher Settings and Rebuild OpenCore\n")
|
||||
print("Ensure the following bits are set for csr-active-config:")
|
||||
print("\n".join(self.constants.root_patch_sip_big_sur if self.constants.detected_os > self.constants.catalina else self.constants.root_patch_sip_mojave))
|
||||
print("For Hackintoshes, please set csr-active-config to '030A0000' (0xA03)")
|
||||
print("For non-OpenCore Macs, please run 'csrutil disable' and \n'csrutil authenticated-root disable' in RecoveryOS")
|
||||
print("\n".join(sip))
|
||||
print(sip_value)
|
||||
|
||||
if self.sbm_enabled is True:
|
||||
print("\nCannot patch! Please disable Apple Secure Boot.")
|
||||
@@ -455,13 +737,27 @@ class PatchSysVolume:
|
||||
|
||||
if self.fv_enabled is True:
|
||||
print("\nCannot patch! Please disable FileVault.")
|
||||
print("Go to System Preferences -> Security and disable FileVault")
|
||||
print("For OCLP Macs, please rebuild your config with 0.2.5 or newer")
|
||||
print("For others, Go to System Preferences -> Security and disable FileVault")
|
||||
|
||||
if self.amfi_enabled is True and self.amfi_must_disable is True:
|
||||
print("\nCannot patch! Please disable AMFI.")
|
||||
print("For Hackintoshes, please add amfi_get_out_of_my_way=1 to boot-args")
|
||||
|
||||
if any([self.sip_enabled, self.sbm_enabled, self.fv_enabled, self.amfi_enabled if self.amfi_must_disable else False]):
|
||||
if self.check_board_id is True and self.computer.reported_board_id not in self.constants.sandy_board_id:
|
||||
print("\nCannot patch! Board ID not supported by AppleIntelSNBGraphicsFB")
|
||||
print(f"Detected Board ID: {self.computer.reported_board_id}")
|
||||
print("Please ensure your Board ID is listed below:")
|
||||
print("\n".join(self.constants.sandy_board_id))
|
||||
self.bad_board_id = True
|
||||
|
||||
if self.dosdude_patched is True:
|
||||
print("\nCannot patch! Detected machine has already been patched by another patcher")
|
||||
print("Please ensure your install is either clean or patched with OpenCore Legacy Patcher")
|
||||
|
||||
if any(
|
||||
[self.sip_enabled, self.sbm_enabled, self.fv_enabled, self.dosdude_patched, self.amfi_enabled if self.amfi_must_disable else False, self.bad_board_id if self.check_board_id else False]
|
||||
):
|
||||
return False
|
||||
else:
|
||||
return True
|
||||
@@ -471,13 +767,16 @@ class PatchSysVolume:
|
||||
print("- Starting Patch Process")
|
||||
print(f"- Determinging Required Patch set for Darwin {self.constants.detected_os}")
|
||||
self.detect_patch_set()
|
||||
if self.no_patch is False and self.constants.gui_mode is False:
|
||||
change_menu = input("Would you like to continue with Root Volume Patching?(y/n): ")
|
||||
else:
|
||||
if self.no_patch is True:
|
||||
change_menu = None
|
||||
print("- No Root Patches required for your machine!")
|
||||
if self.constants.gui_mode is False:
|
||||
input("\nPress [ENTER] to return to the main menu: ")
|
||||
elif self.constants.gui_mode is False:
|
||||
change_menu = input("Would you like to continue with Root Volume Patching?(y/n): ")
|
||||
else:
|
||||
change_menu = "y"
|
||||
print("Continuing root patching")
|
||||
if change_menu in ["y", "Y"]:
|
||||
print("- Continuing with Patching")
|
||||
print("- Verifying whether Root Patching possible")
|
||||
|
||||
@@ -91,7 +91,6 @@ AddNvidiaKeplerAccel11 = [
|
||||
"NVDAGK100Hal.kext",
|
||||
"NVDAResman.kext",
|
||||
"NVDAStartup.kext",
|
||||
"NVSMU.kext",
|
||||
]
|
||||
|
||||
AddAMDAccel11 = [
|
||||
@@ -140,6 +139,7 @@ AddAMDBrightness = [
|
||||
|
||||
AddAMDAccel11TS2 = [
|
||||
"IOSurface.kext",
|
||||
"IOAcceleratorFamily2.kext",
|
||||
]
|
||||
|
||||
AddIntelGen1Accel = [
|
||||
@@ -190,3 +190,72 @@ DeleteVolumeControl = [
|
||||
"ApplePVPanic.kext",
|
||||
"AppleVirtIOStorage.kext",
|
||||
]
|
||||
|
||||
AddNvidiaAccelLegacy = [
|
||||
# "GeForceGA.bundle",
|
||||
"GeForceTesla.kext",
|
||||
"GeForceTeslaGLDriver.bundle",
|
||||
"GeForceTeslaVADriver.bundle",
|
||||
"NVDANV50HalTesla.kext",
|
||||
"NVDAResmanTesla.kext",
|
||||
]
|
||||
|
||||
AddAMDAccelLegacy = [
|
||||
"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",
|
||||
"AMDRadeonX4000HWServices.kext",
|
||||
"AMDRadeonX4000.kext",
|
||||
"AMDRadeonX4000GLDriver.bundle",
|
||||
"AMDShared.bundle",
|
||||
"AMDSupport.kext",
|
||||
"ATIRadeonX2000.kext",
|
||||
"ATIRadeonX2000GA.plugin",
|
||||
"ATIRadeonX2000GLDriver.bundle",
|
||||
"ATIRadeonX2000VADriver.bundle",
|
||||
]
|
||||
|
||||
AddGeneralAccelCatalina = [
|
||||
"AppleGraphicsControl.kext",
|
||||
"AppleGraphicsPowerManagement.kext",
|
||||
"AppleMCCSControl.kext",
|
||||
"IOGraphicsFamily.kext",
|
||||
"IONDRVSupport.kext",
|
||||
"IOSurface.kext",
|
||||
]
|
||||
|
||||
AddGeneralAccelMojave = [
|
||||
"IONDRVSupport.kext",
|
||||
"AppleGraphicsControl.kext",
|
||||
"AppleGraphicsPowerManagement.kext",
|
||||
"AppleMCCSControl.kext",
|
||||
"IOAccelerator2D.plugin",
|
||||
"IOAcceleratorFamily2.kext",
|
||||
"IOGraphicsFamily.kext",
|
||||
]
|
||||
|
||||
BackupLocations = [
|
||||
"System/Library/Extensions",
|
||||
"System/Library/Frameworks/CoreDisplay.framework",
|
||||
"System/Library/Frameworks/IOSurface.framework",
|
||||
"System/Library/Frameworks/OpenGL.framework",
|
||||
"System/Library/Frameworks/WebKit.framework",
|
||||
"System/Library/LaunchDaemons",
|
||||
"System/Library/PrivateFrameworks/DisplayServices.framework",
|
||||
"System/Library/PrivateFrameworks/GPUSupport.framework",
|
||||
"System/Library/PrivateFrameworks/SkyLight.framework",
|
||||
"System/Library/PrivateFrameworks/IOAccelerator.framework",
|
||||
"System/Library/PrivateFrameworks/AppleGVA.framework",
|
||||
"System/Library/PrivateFrameworks/AppleGVACore.framework",
|
||||
]
|
||||
|
||||
@@ -1,16 +1,26 @@
|
||||
# Copyright (C) 2020-2021, Dhinak G
|
||||
from __future__ import print_function
|
||||
|
||||
import os
|
||||
import hashlib
|
||||
import math
|
||||
from pathlib import Path
|
||||
import os
|
||||
import plistlib
|
||||
import subprocess
|
||||
import requests
|
||||
import hashlib
|
||||
import requests
|
||||
from pathlib import Path
|
||||
import re
|
||||
import os
|
||||
import binascii
|
||||
|
||||
from Resources import Constants
|
||||
try:
|
||||
import requests
|
||||
except ImportError:
|
||||
subprocess.run(["pip3", "install", "requests"], stdout=subprocess.PIPE)
|
||||
try:
|
||||
import requests
|
||||
except ImportError:
|
||||
raise Exception("Missing requests library!\nPlease run the following before starting OCLP:\npip3 install requests")
|
||||
|
||||
from Resources import Constants, ioreg, device_probe
|
||||
|
||||
|
||||
def hexswap(input_hex: str):
|
||||
@@ -20,6 +30,29 @@ def hexswap(input_hex: str):
|
||||
return hex_str.upper()
|
||||
|
||||
|
||||
def string_to_hex(input_string):
|
||||
if not (len(input_string) % 2) == 0:
|
||||
input_string = "0" + input_string
|
||||
input_string = hexswap(input_string)
|
||||
input_string = binascii.unhexlify(input_string)
|
||||
return input_string
|
||||
|
||||
|
||||
def process_status(process_result):
|
||||
if process_result.returncode != 0:
|
||||
print(f"Process failed with exit code {process_result.returncode}")
|
||||
print(f"Please file an issue on our Github")
|
||||
raise Exception(f"Process result: \n{process_result.stdout.decode()}")
|
||||
|
||||
|
||||
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 header(lines):
|
||||
lines = [i for i in lines if i is not None]
|
||||
total_length = len(max(lines, key=len)) + 4
|
||||
@@ -49,7 +82,40 @@ def get_disk_path():
|
||||
return root_mount_path
|
||||
|
||||
|
||||
def csr_decode(csr_active_config):
|
||||
def check_seal():
|
||||
# 'Snapshot Sealed' property is only listed on booted snapshots
|
||||
sealed = subprocess.run(["diskutil", "apfs", "list"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
if "Snapshot Sealed: Yes" in sealed.stdout.decode():
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
||||
|
||||
def latebloom_detection(model):
|
||||
if model in ["MacPro4,1", "MacPro5,1", "iMac7,1", "iMac8,1"]:
|
||||
# These machines are more likely to experience boot hangs, increase delays to accomodate
|
||||
lb_delay = "250"
|
||||
else:
|
||||
lb_delay = "100"
|
||||
lb_range = "1"
|
||||
lb_debug = "1"
|
||||
boot_args = get_nvram("boot-args", decode=False)
|
||||
# boot_args = "latebloom=200 lb_range=40 lb_debug=0 keepsyms=1 debug=0x100 -lilubetaall"
|
||||
if boot_args:
|
||||
# TODO: This crashes if latebloom=xxx is the very first entry in boot-args
|
||||
if "latebloom=" in boot_args:
|
||||
lb_delay = re.search(r"(?:[, ])latebloom=(\d+)", boot_args)
|
||||
lb_delay = lb_delay[1]
|
||||
if "lb_range=" in boot_args:
|
||||
lb_range = re.search(r"(?:[, ])lb_range=(\d+)", boot_args)
|
||||
lb_range = lb_range[1]
|
||||
if "lb_debug=" in boot_args:
|
||||
lb_debug = re.search(r"(?:[, ])lb_debug=(\d+)", boot_args)
|
||||
lb_debug = lb_debug[1]
|
||||
return int(lb_delay), int(lb_range), int(lb_debug)
|
||||
|
||||
|
||||
def csr_decode(csr_active_config, os_sip):
|
||||
if csr_active_config is None:
|
||||
csr_active_config = b"\x00\x00\x00\x00"
|
||||
sip_int = int.from_bytes(csr_active_config, byteorder="little")
|
||||
@@ -60,7 +126,7 @@ def csr_decode(csr_active_config):
|
||||
i = i + 1
|
||||
|
||||
# Can be adjusted to whatever OS needs patching
|
||||
sip_needs_change = all(Constants.Constants.csr_values[i] for i in Constants.Constants.root_patch_sip_big_sur)
|
||||
sip_needs_change = all(Constants.Constants.csr_values[i] for i in os_sip)
|
||||
if sip_needs_change is True:
|
||||
return False
|
||||
else:
|
||||
@@ -71,29 +137,95 @@ def friendly_hex(integer: int):
|
||||
return "{:02X}".format(integer)
|
||||
|
||||
|
||||
def patching_status():
|
||||
# Detection for Root Patching
|
||||
sip_enabled = True # System Integrity Protection
|
||||
sbm_enabled = True # Secure Boot Status (SecureBootModel)
|
||||
amfi_enabled = True # Apple Mobile File Integrity
|
||||
fv_enabled = True # FileVault
|
||||
|
||||
def amfi_status():
|
||||
amfi_1 = "amfi_get_out_of_my_way=0x1"
|
||||
amfi_2 = "amfi_get_out_of_my_way=1"
|
||||
|
||||
if get_nvram("boot-args", decode=False) and amfi_1 in get_nvram("boot-args", decode=False) or amfi_2 in get_nvram("boot-args", decode=False):
|
||||
if get_nvram("OCLP-Settings", "4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102", decode=False):
|
||||
if "-allow_amfi" in get_nvram("OCLP-Settings", "4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102", decode=True):
|
||||
return False
|
||||
else:
|
||||
return True
|
||||
elif get_nvram("boot-args", decode=False):
|
||||
if amfi_1 in get_nvram("boot-args", decode=False) or amfi_2 in get_nvram("boot-args", decode=False):
|
||||
return False
|
||||
else:
|
||||
return True
|
||||
|
||||
|
||||
def check_oclp_boot():
|
||||
if get_nvram("OCLP-Version", "4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102", decode=True):
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
||||
|
||||
def check_monterey_wifi():
|
||||
IO80211ElCap = "com.apple.iokit.IO80211ElCap"
|
||||
CoreCaptureElCap = "com.apple.driver.corecaptureElCap"
|
||||
loaded_kexts: str = subprocess.run("kextcache".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.decode()
|
||||
if IO80211ElCap in loaded_kexts and CoreCaptureElCap in loaded_kexts:
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
||||
|
||||
def check_metal_support(device_probe, computer):
|
||||
dgpu = computer.dgpu
|
||||
igpu = computer.igpu
|
||||
if (
|
||||
(dgpu and dgpu.arch in [device_probe.NVIDIA.Archs.Tesla, device_probe.NVIDIA.Archs.Fermi, device_probe.AMD.Archs.TeraScale_1, device_probe.AMD.Archs.TeraScale_2])
|
||||
or (igpu and igpu.arch in [device_probe.Intel.Archs.Iron_Lake, device_probe.Intel.Archs.Sandy_Bridge])
|
||||
or isinstance(igpu, device_probe.NVIDIA)
|
||||
):
|
||||
return False
|
||||
else:
|
||||
return True
|
||||
|
||||
|
||||
def check_filevault_skip():
|
||||
# Check whether we can skip FileVault check with Root Patching
|
||||
if get_nvram("OCLP-Settings", "4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102", decode=False) and "-allow_fv" in get_nvram("OCLP-Settings", "4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102", decode=True):
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
||||
|
||||
def patching_status(os_sip, os):
|
||||
# Detection for Root Patching
|
||||
sip_enabled = True # System Integrity Protection
|
||||
sbm_enabled = True # Secure Boot Status (SecureBootModel)
|
||||
amfi_enabled = True # Apple Mobile File Integrity
|
||||
fv_enabled = True # FileVault
|
||||
dosdude_patched = True
|
||||
|
||||
gen6_kext = "/System/Library/Extension/AppleIntelHDGraphics.kext"
|
||||
gen7_kext = "/System/Library/Extension/AppleIntelHD3000Graphics.kext"
|
||||
|
||||
if os > Constants.Constants().catalina:
|
||||
amfi_enabled = amfi_status()
|
||||
else:
|
||||
# Catalina and older supports individually disabling Library Validation
|
||||
amfi_enabled = False
|
||||
|
||||
if get_nvram("HardwareModel", "94B73556-2197-4702-82A8-3E1337DAFBFB", decode=False) not in Constants.Constants.sbm_values:
|
||||
sbm_enabled = False
|
||||
|
||||
if get_nvram("csr-active-config", decode=False) and csr_decode(get_nvram("csr-active-config", decode=False)) is False:
|
||||
if get_nvram("csr-active-config", decode=False) and csr_decode(get_nvram("csr-active-config", decode=False), os_sip) is False:
|
||||
sip_enabled = False
|
||||
|
||||
fv_status: str = subprocess.run("fdesetup status".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.decode()
|
||||
if fv_status.startswith("FileVault is Off"):
|
||||
if os > Constants.Constants().catalina and not check_filevault_skip():
|
||||
# Assume non-OCLP Macs do not have our APFS seal patch
|
||||
fv_status: str = subprocess.run("fdesetup status".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.decode()
|
||||
if "FileVault is Off" in fv_status:
|
||||
fv_enabled = False
|
||||
else:
|
||||
fv_enabled = False
|
||||
|
||||
return sip_enabled, sbm_enabled, amfi_enabled, fv_enabled
|
||||
if not (Path(gen6_kext).exists() and Path(gen7_kext).exists()):
|
||||
dosdude_patched = False
|
||||
|
||||
return sip_enabled, sbm_enabled, amfi_enabled, fv_enabled, dosdude_patched
|
||||
|
||||
|
||||
clear = True
|
||||
@@ -121,12 +253,38 @@ def get_nvram(variable: str, uuid: str = None, *, decode: bool = False):
|
||||
uuid += ":"
|
||||
else:
|
||||
uuid = ""
|
||||
result = subprocess.run(f"nvram -x {uuid}{variable}".split(), stdout=subprocess.PIPE, stderr=subprocess.PIPE).stdout.strip()
|
||||
try:
|
||||
value = plistlib.loads(result)[f"{uuid}{variable}"]
|
||||
except plistlib.InvalidFileException:
|
||||
|
||||
nvram = ioreg.IORegistryEntryFromPath(ioreg.kIOMasterPortDefault, "IODeviceTree:/options".encode())
|
||||
|
||||
value = ioreg.IORegistryEntryCreateCFProperty(nvram, f"{uuid}{variable}", ioreg.kCFAllocatorDefault, ioreg.kNilOptions)
|
||||
|
||||
ioreg.IOObjectRelease(nvram)
|
||||
|
||||
if not value:
|
||||
return None
|
||||
if decode:
|
||||
|
||||
value = ioreg.corefoundation_to_native(value)
|
||||
|
||||
if decode and isinstance(value, bytes):
|
||||
value = value.strip(b"\0").decode()
|
||||
return value
|
||||
|
||||
|
||||
def get_rom(variable: str, *, decode: bool = False):
|
||||
# TODO: Properly fix for El Capitan, which does not print the XML representation even though we say to
|
||||
|
||||
rom = ioreg.IORegistryEntryFromPath(ioreg.kIOMasterPortDefault, "IODeviceTree:/rom".encode())
|
||||
|
||||
value = ioreg.IORegistryEntryCreateCFProperty(rom, variable, ioreg.kCFAllocatorDefault, ioreg.kNilOptions)
|
||||
|
||||
ioreg.IOObjectRelease(rom)
|
||||
|
||||
if not value:
|
||||
return None
|
||||
|
||||
value = ioreg.corefoundation_to_native(value)
|
||||
|
||||
if decode and isinstance(value, bytes):
|
||||
value = value.strip(b"\0").decode()
|
||||
return value
|
||||
|
||||
@@ -144,7 +302,7 @@ def download_file(link, location):
|
||||
file.write(chunk)
|
||||
count += len(chunk)
|
||||
cls()
|
||||
print(f"- Downloading package")
|
||||
print("- Downloading package")
|
||||
print(f"- {count / 1024 / 1024}MB Downloaded")
|
||||
checksum = hashlib.sha256()
|
||||
with location.open("rb") as file:
|
||||
@@ -152,7 +310,20 @@ def download_file(link, location):
|
||||
while chunk:
|
||||
checksum.update(chunk)
|
||||
chunk = file.read(1024 * 1024 * 16)
|
||||
print(f"- Checksum: {checksum.hexdigest()}")
|
||||
return checksum
|
||||
|
||||
|
||||
def enable_apfs(fw_feature):
|
||||
fw_feature |= 2 ** 19 # Enable FW_FEATURE_SUPPORTS_APFS
|
||||
return fw_feature
|
||||
|
||||
def enable_apfs_extended(fw_feature):
|
||||
fw_feature |= 2 ** 20 # Enable FW_FEATURE_SUPPORTS_APFS_EXTRA
|
||||
return fw_feature
|
||||
|
||||
def enable_large_basesystem(fw_feature):
|
||||
fw_feature |= 2 ** 35 # Enable FW_FEATURE_SUPPORTS_LARGE_BASESYSTEM
|
||||
return fw_feature
|
||||
|
||||
|
||||
# def menu(title, prompt, menu_options, add_quit=True, auto_number=False, in_between=[], top_level=False):
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
# Hardware probing
|
||||
# Copyright (C) 2020-2021, Dhinak G, Mykola Grymalyuk
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import binascii
|
||||
import enum
|
||||
import itertools
|
||||
import plistlib
|
||||
import subprocess
|
||||
from dataclasses import dataclass, field
|
||||
from typing import Any, ClassVar, Optional, Type
|
||||
from typing import Any, ClassVar, Optional, Type, Union
|
||||
|
||||
from Resources import PCIIDArray, Utilities, ioreg
|
||||
|
||||
@@ -26,6 +30,7 @@ class PCIDevice:
|
||||
# ioregistryentry: Optional[ioreg.IORegistryEntry] = None
|
||||
name: Optional[str] = None # Name of IORegistryEntry
|
||||
model: Optional[str] = None # model property
|
||||
acpi_path: Optional[str] = None
|
||||
pci_path: Optional[str] = None
|
||||
|
||||
# def __getstate__(self):
|
||||
@@ -34,15 +39,18 @@ class PCIDevice:
|
||||
# return state
|
||||
|
||||
@classmethod
|
||||
def from_ioregistry(cls, entry: ioreg.IORegistryEntry, anti_spoof=False):
|
||||
if anti_spoof and "IOName" in entry.properties:
|
||||
vendor_id, device_id = (int(i, 16) for i in entry.properties["IOName"][3:].split(","))
|
||||
def from_ioregistry(cls, entry: ioreg.io_registry_entry_t, anti_spoof=False):
|
||||
properties: dict = ioreg.corefoundation_to_native(ioreg.IORegistryEntryCreateCFProperties(entry, None, ioreg.kCFAllocatorDefault, ioreg.kNilOptions)[1]) # type: ignore
|
||||
if anti_spoof and "IOName" in properties:
|
||||
vendor_id, device_id = (int(i, 16) for i in properties["IOName"][3:].split(","))
|
||||
else:
|
||||
vendor_id, device_id = [int.from_bytes(entry.properties[i][:4], byteorder="little") for i in ["vendor-id", "device-id"]]
|
||||
vendor_id, device_id = [int.from_bytes(properties[i][:4], byteorder="little") for i in ["vendor-id", "device-id"]]
|
||||
|
||||
device = cls(vendor_id, device_id, int.from_bytes(entry.properties["class-code"][:6], byteorder="little"), name=entry.name)
|
||||
if "model" in entry.properties:
|
||||
device.model = entry.properties["model"].strip(b"\0").decode()
|
||||
device = cls(vendor_id, device_id, int.from_bytes(properties["class-code"][:6], byteorder="little"), name=ioreg.io_name_t_to_str(ioreg.IORegistryEntryGetName(entry, None)[1]))
|
||||
if "model" in properties:
|
||||
device.model = properties["model"].strip(b"\0").decode()
|
||||
if "acpi_path" in properties:
|
||||
device.acpi_path = properties["acpi-path"].strip(b"\0").decode()
|
||||
device.populate_pci_path(entry)
|
||||
return device
|
||||
|
||||
@@ -67,23 +75,27 @@ class PCIDevice:
|
||||
# # Eventually
|
||||
# raise NotImplementedError
|
||||
|
||||
def populate_pci_path(self, entry: ioreg.IORegistryEntry):
|
||||
def populate_pci_path(self, original_entry: ioreg.io_registry_entry_t):
|
||||
# Based off gfxutil logic, seems to work.
|
||||
paths = []
|
||||
entry = original_entry
|
||||
while entry:
|
||||
if entry.entry_class == "IOPCIDevice":
|
||||
location = [hex(int(i, 16)) for i in entry.location.split(",") + ["0"]]
|
||||
if ioreg.IOObjectConformsTo(entry, "IOPCIDevice".encode()):
|
||||
location = [hex(int(i, 16)) for i in ioreg.io_name_t_to_str(ioreg.IORegistryEntryGetLocationInPlane(entry, "IOService".encode(), None)[1]).split(",") + ["0"]]
|
||||
paths.append(f"Pci({location[0]},{location[1]})")
|
||||
elif entry.entry_class == "IOACPIPlatformDevice":
|
||||
paths.append(f"PciRoot({hex(int(entry.properties.get('_UID', 0)))})")
|
||||
elif ioreg.IOObjectConformsTo(entry, "IOACPIPlatformDevice".encode()):
|
||||
paths.append(f"PciRoot({hex(int(ioreg.corefoundation_to_native(ioreg.IORegistryEntryCreateCFProperty(entry, '_UID', ioreg.kCFAllocatorDefault, ioreg.kNilOptions)) or 0))})") # type: ignore
|
||||
break
|
||||
elif entry.entry_class in ["IOPCI2PCIBridge", "IOPCIBridge", "AppleACPIPCI"]:
|
||||
elif ioreg.IOObjectConformsTo(entry, "IOPCIBridge".encode()):
|
||||
pass
|
||||
else:
|
||||
# There's something in between that's not PCI! Abort
|
||||
paths = []
|
||||
break
|
||||
entry = entry.parent
|
||||
parent = ioreg.IORegistryEntryGetParentEntry(entry, "IOService".encode(), None)[1]
|
||||
if entry != original_entry:
|
||||
ioreg.IOObjectRelease(entry)
|
||||
entry = parent
|
||||
self.pci_path = "/".join(reversed(paths))
|
||||
|
||||
|
||||
@@ -105,10 +117,25 @@ class WirelessCard(PCIDevice):
|
||||
chipset: enum.Enum = field(init=False)
|
||||
|
||||
def __post_init__(self):
|
||||
system_profiler = plistlib.loads(subprocess.run("system_profiler -xml SPAirPortDataType".split(), stdout=subprocess.PIPE).stdout)
|
||||
self.country_code = system_profiler[0]["_items"][0]["spairport_airport_interfaces"][0]["spairport_wireless_country_code"]
|
||||
self.detect_chipset()
|
||||
|
||||
@classmethod
|
||||
def from_ioregistry(cls, entry: ioreg.io_registry_entry_t, anti_spoof=True):
|
||||
device = super().from_ioregistry(entry, anti_spoof=anti_spoof)
|
||||
|
||||
matching_dict = {
|
||||
"IOParentMatch": ioreg.corefoundation_to_native(ioreg.IORegistryEntryIDMatching(ioreg.IORegistryEntryGetRegistryEntryID(entry, None)[1])),
|
||||
"IOProviderClass": "IO80211Interface",
|
||||
}
|
||||
|
||||
interface = next(ioreg.ioiterator_to_list(ioreg.IOServiceGetMatchingServices(ioreg.kIOMasterPortDefault, matching_dict, None)[1]), None)
|
||||
if interface:
|
||||
device.country_code = ioreg.corefoundation_to_native(ioreg.IORegistryEntryCreateCFProperty(interface, "IO80211CountryCode", ioreg.kCFAllocatorDefault, ioreg.kNilOptions)) # type: ignore # If not present, will be None anyways
|
||||
else:
|
||||
device.country_code = None # type: ignore
|
||||
|
||||
return device
|
||||
|
||||
def detect_chipset(self):
|
||||
raise NotImplementedError
|
||||
|
||||
@@ -118,7 +145,7 @@ class NVMeController(PCIDevice):
|
||||
CLASS_CODE: ClassVar[int] = 0x010802
|
||||
|
||||
aspm: Optional[int] = None
|
||||
parent_aspm: Optional[int] = None
|
||||
# parent_aspm: Optional[int] = None
|
||||
|
||||
|
||||
@dataclass
|
||||
@@ -193,6 +220,12 @@ class Intel(GPU):
|
||||
Iron_Lake = "Iron Lake"
|
||||
Sandy_Bridge = "Sandy Bridge"
|
||||
Ivy_Bridge = "Ivy Bridge"
|
||||
Haswell = "Haswell"
|
||||
Broadwell = "Broadwell"
|
||||
Skylake = "Skylake"
|
||||
Kaby_Lake = "Kaby Lake"
|
||||
Coffee_Lake = "Coffee Lake"
|
||||
Ice_Lake = "Ice Lake"
|
||||
Unknown = "Unknown"
|
||||
|
||||
arch: Archs = field(init=False)
|
||||
@@ -204,6 +237,18 @@ class Intel(GPU):
|
||||
self.arch = Intel.Archs.Sandy_Bridge
|
||||
elif self.device_id in PCIIDArray.intel_ids.ivy_ids:
|
||||
self.arch = Intel.Archs.Ivy_Bridge
|
||||
elif self.device_id in PCIIDArray.intel_ids.haswell_ids:
|
||||
self.arch = Intel.Archs.Haswell
|
||||
elif self.device_id in PCIIDArray.intel_ids.broadwell_ids:
|
||||
self.arch = Intel.Archs.Broadwell
|
||||
elif self.device_id in PCIIDArray.intel_ids.skylake_ids:
|
||||
self.arch = Intel.Archs.Skylake
|
||||
elif self.device_id in PCIIDArray.intel_ids.kaby_lake_ids:
|
||||
self.arch = Intel.Archs.Kaby_Lake
|
||||
elif self.device_id in PCIIDArray.intel_ids.coffee_lake_ids:
|
||||
self.arch = Intel.Archs.Coffee_Lake
|
||||
elif self.device_id in PCIIDArray.intel_ids.ice_lake_ids:
|
||||
self.arch = Intel.Archs.Ice_Lake
|
||||
else:
|
||||
self.arch = Intel.Archs.Unknown
|
||||
|
||||
@@ -267,12 +312,12 @@ class Computer:
|
||||
wifi: Optional[WirelessCard] = None
|
||||
cpu: Optional[CPU] = None
|
||||
oclp_version: Optional[str] = None
|
||||
ioregistry: Optional[ioreg.IOReg] = None
|
||||
opencore_version: Optional[str] = None
|
||||
bluetooth_chipset: Optional[str] = None
|
||||
|
||||
@staticmethod
|
||||
def probe():
|
||||
computer = Computer()
|
||||
computer.ioregistry = ioreg.IOReg()
|
||||
computer.gpu_probe()
|
||||
computer.dgpu_probe()
|
||||
computer.igpu_probe()
|
||||
@@ -280,19 +325,25 @@ class Computer:
|
||||
computer.storage_probe()
|
||||
computer.smbios_probe()
|
||||
computer.cpu_probe()
|
||||
computer.bluetooth_probe()
|
||||
return computer
|
||||
|
||||
def gpu_probe(self):
|
||||
# Chain together two iterators: one for class code 00000300, the other for class code 00800300
|
||||
devices = itertools.chain(self.ioregistry.find(property=("class-code", binascii.a2b_hex("00000300"))), self.ioregistry.find(property=("class-code", binascii.a2b_hex("00800300"))))
|
||||
devices = ioreg.ioiterator_to_list(
|
||||
ioreg.IOServiceGetMatchingServices(
|
||||
ioreg.kIOMasterPortDefault, {"IOProviderClass": "IOPCIDevice", "IOPropertyMatch": [{"class-code": binascii.a2b_hex("00000300")}, {"class-code": binascii.a2b_hex("00800300")}]}, None
|
||||
)[1]
|
||||
)
|
||||
|
||||
for device in devices:
|
||||
vendor: Type[GPU] = PCIDevice.from_ioregistry(device).vendor_detect(inherits=GPU) # type: ignore
|
||||
if vendor:
|
||||
self.gpus.append(vendor.from_ioregistry(device)) # type: ignore
|
||||
ioreg.IOObjectRelease(device)
|
||||
|
||||
def dgpu_probe(self):
|
||||
device = next(self.ioregistry.find(name="GFX0"), None)
|
||||
device = next(ioreg.ioiterator_to_list(ioreg.IOServiceGetMatchingServices(ioreg.kIOMasterPortDefault, ioreg.IOServiceNameMatching("GFX0".encode()), None)[1]), None)
|
||||
if not device:
|
||||
# No devices
|
||||
return
|
||||
@@ -300,9 +351,10 @@ class Computer:
|
||||
vendor: Type[GPU] = PCIDevice.from_ioregistry(device).vendor_detect(inherits=GPU) # type: ignore
|
||||
if vendor:
|
||||
self.dgpu = vendor.from_ioregistry(device) # type: ignore
|
||||
ioreg.IOObjectRelease(device)
|
||||
|
||||
def igpu_probe(self):
|
||||
device = next(self.ioregistry.find(name="IGPU"), None)
|
||||
device = next(ioreg.ioiterator_to_list(ioreg.IOServiceGetMatchingServices(ioreg.kIOMasterPortDefault, ioreg.IOServiceNameMatching("IGPU".encode()), None)[1]), None)
|
||||
if not device:
|
||||
# No devices
|
||||
return
|
||||
@@ -310,63 +362,68 @@ class Computer:
|
||||
vendor: Type[GPU] = PCIDevice.from_ioregistry(device).vendor_detect(inherits=GPU) # type: ignore
|
||||
if vendor:
|
||||
self.igpu = vendor.from_ioregistry(device) # type: ignore
|
||||
ioreg.IOObjectRelease(device)
|
||||
|
||||
def wifi_probe(self):
|
||||
# result = subprocess.run("ioreg -r -c IOPCIDevice -a -d2".split(), stdout=subprocess.PIPE).stdout.strip()
|
||||
devices = self.ioregistry.find(property=("class-code", binascii.a2b_hex(Utilities.hexswap(hex(WirelessCard.CLASS_CODE)[2:].zfill(8)))))
|
||||
# if not result:
|
||||
# # No devices
|
||||
# print("A")
|
||||
# return
|
||||
|
||||
# devices = plistlib.loads(result)
|
||||
# devices = [i for i in devices if i["class-code"] == binascii.a2b_hex("00800200")]
|
||||
|
||||
# if not devices:
|
||||
# # No devices
|
||||
# print("B")
|
||||
# return
|
||||
devices = ioreg.ioiterator_to_list(
|
||||
ioreg.IOServiceGetMatchingServices(
|
||||
ioreg.kIOMasterPortDefault,
|
||||
{"IOProviderClass": "IOPCIDevice", "IOPropertyMatch": {"class-code": binascii.a2b_hex(Utilities.hexswap(hex(WirelessCard.CLASS_CODE)[2:].zfill(8)))}},
|
||||
None,
|
||||
)[1]
|
||||
)
|
||||
|
||||
for device in devices:
|
||||
vendor: Type[WirelessCard] = PCIDevice.from_ioregistry(device, anti_spoof=True).vendor_detect(inherits=WirelessCard) # type: ignore
|
||||
if vendor:
|
||||
self.wifi = vendor.from_ioregistry(device, anti_spoof=True) # type: ignore
|
||||
break
|
||||
ioreg.IOObjectRelease(device)
|
||||
|
||||
def storage_probe(self):
|
||||
sata_controllers = self.ioregistry.find(entry_class="IOPCIDevice", property=("class-code", binascii.a2b_hex(Utilities.hexswap(hex(SATAController.CLASS_CODE)[2:].zfill(8)))))
|
||||
nvme_controllers = itertools.chain.from_iterable(
|
||||
[
|
||||
# self.ioregistry.find(entry_class="IOPCIDevice", property=("class-code", binascii.a2b_hex(Utilities.hexswap(hex(NVMeController.CLASS_CODE)[2:].zfill(8))))),
|
||||
self.ioregistry.find(entry_class="IOPCIDevice", children={"entry_class": "IONVMeController"}),
|
||||
]
|
||||
sata_controllers = ioreg.ioiterator_to_list(
|
||||
ioreg.IOServiceGetMatchingServices(
|
||||
ioreg.kIOMasterPortDefault,
|
||||
{"IOProviderClass": "IOPCIDevice", "IOPropertyMatch": [{"class-code": binascii.a2b_hex(Utilities.hexswap(hex(SATAController.CLASS_CODE)[2:].zfill(8)))}]},
|
||||
None,
|
||||
)[1]
|
||||
)
|
||||
nvme_controllers = ioreg.ioiterator_to_list(
|
||||
ioreg.IOServiceGetMatchingServices(
|
||||
ioreg.kIOMasterPortDefault, {"IOProviderClass": "IONVMeController", "IOParentMatch": {"IOProviderClass": "IOPCIDevice"}, "IOPropertyMatch": {"IOClass": "IONVMeController"}}, None
|
||||
)[1]
|
||||
)
|
||||
for device in sata_controllers:
|
||||
self.storage.append(SATAController.from_ioregistry(device))
|
||||
ioreg.IOObjectRelease(device)
|
||||
for device in nvme_controllers:
|
||||
aspm = device.properties.get("pci-aspm-default", 0)
|
||||
parent = ioreg.IORegistryEntryGetParentEntry(device, "IOService".encode(), None)[1]
|
||||
ioreg.IOObjectRelease(device)
|
||||
|
||||
aspm: Union[int, bytes] = ioreg.corefoundation_to_native(ioreg.IORegistryEntryCreateCFProperty(parent, "pci-aspm-default", ioreg.kCFAllocatorDefault, ioreg.kNilOptions)) or 0 # type: ignore
|
||||
if isinstance(aspm, bytes):
|
||||
aspm = int.from_bytes(aspm, byteorder="little")
|
||||
|
||||
if device.parent.parent.entry_class == "IOPCIDevice":
|
||||
parent_aspm = device.parent.parent.properties.get("pci-aspm-default", 0)
|
||||
if isinstance(parent_aspm, bytes):
|
||||
parent_aspm = int.from_bytes(parent_aspm, byteorder="little")
|
||||
else:
|
||||
parent_aspm = None
|
||||
|
||||
controller = NVMeController.from_ioregistry(device)
|
||||
controller = NVMeController.from_ioregistry(parent)
|
||||
controller.aspm = aspm
|
||||
controller.parent_aspm = parent_aspm
|
||||
|
||||
if controller.vendor_id != 0x106B:
|
||||
self.storage.append(controller)
|
||||
|
||||
ioreg.IOObjectRelease(parent)
|
||||
|
||||
def smbios_probe(self):
|
||||
# Reported model
|
||||
entry = next(self.ioregistry.find(name="Root")).children[0]
|
||||
self.reported_model = entry.properties["model"].strip(b"\0").decode()
|
||||
self.reported_board_id = entry.properties.get("board-id", entry.properties.get("target-type", b"")).strip(b"\0").decode()
|
||||
entry = next(ioreg.ioiterator_to_list(ioreg.IOServiceGetMatchingServices(ioreg.kIOMasterPortDefault, ioreg.IOServiceMatching("IOPlatformExpertDevice".encode()), None)[1]))
|
||||
self.reported_model = ioreg.corefoundation_to_native(ioreg.IORegistryEntryCreateCFProperty(entry, "model", ioreg.kCFAllocatorDefault, ioreg.kNilOptions)).strip(b"\0").decode() # type: ignore
|
||||
translated = subprocess.run("sysctl -in sysctl.proc_translated".split(), stdout=subprocess.PIPE).stdout.decode()
|
||||
if translated:
|
||||
board = "target-type"
|
||||
else:
|
||||
board = "board-id"
|
||||
self.reported_board_id = ioreg.corefoundation_to_native(ioreg.IORegistryEntryCreateCFProperty(entry, board, ioreg.kCFAllocatorDefault, ioreg.kNilOptions)).strip(b"\0").decode() # type: ignore
|
||||
ioreg.IOObjectRelease(entry)
|
||||
|
||||
# Real model
|
||||
# TODO: We previously had logic for OC users using iMacPro1,1 with incorrect ExposeSensitiveData. Add logic?
|
||||
@@ -375,9 +432,21 @@ class Computer:
|
||||
|
||||
# OCLP version
|
||||
self.oclp_version = Utilities.get_nvram("OCLP-Version", "4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102", decode=True)
|
||||
self.opencore_version = Utilities.get_nvram("opencore-version", "4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102", decode=True)
|
||||
|
||||
def cpu_probe(self):
|
||||
self.cpu = CPU(
|
||||
subprocess.run("sysctl machdep.cpu.brand_string".split(), stdout=subprocess.PIPE).stdout.decode().partition(": ")[2].strip(),
|
||||
subprocess.run("sysctl machdep.cpu.features".split(), stdout=subprocess.PIPE).stdout.decode().partition(": ")[2].strip().split(" "),
|
||||
)
|
||||
|
||||
def bluetooth_probe(self):
|
||||
usb_data: str = subprocess.run("system_profiler SPUSBDataType".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.decode()
|
||||
if "BRCM2070 Hub" in usb_data:
|
||||
self.bluetooth_chipset = "BRCM2070 Hub"
|
||||
elif "BRCM2046 Hub" in usb_data:
|
||||
self.bluetooth_chipset = "BRCM2046 Hub"
|
||||
elif "BRCM20702 Hub" in usb_data:
|
||||
self.bluetooth_chipset = "BRCM20702 Hub"
|
||||
elif "Bluetooth":
|
||||
self.bluetooth_chipset = "Generic"
|
||||
|
||||
@@ -1,83 +1,253 @@
|
||||
# Handle misc CLI menu options
|
||||
# Copyright (C) 2020-2021, Dhinak G
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from dataclasses import dataclass
|
||||
import plistlib
|
||||
from typing import NewType, Union
|
||||
import subprocess
|
||||
from typing import Generator
|
||||
|
||||
try:
|
||||
import objc
|
||||
except ImportError:
|
||||
subprocess.run(["pip3", "install", "pyobjc"], stdout=subprocess.PIPE)
|
||||
try:
|
||||
import objc
|
||||
except ImportError:
|
||||
raise Exception("Missing PyObjc library!\nPlease run the following before starting OCLP:\npip3 install pyobjc")
|
||||
|
||||
from CoreFoundation import CFRelease, kCFAllocatorDefault # type: ignore # pylint: disable=no-name-in-module
|
||||
from Foundation import NSBundle # type: ignore # pylint: disable=no-name-in-module
|
||||
from PyObjCTools import Conversion
|
||||
|
||||
IOKit_bundle = NSBundle.bundleWithIdentifier_("com.apple.framework.IOKit")
|
||||
|
||||
# pylint: disable=invalid-name
|
||||
io_name_t_ref_out = b"[128c]" # io_name_t is char[128]
|
||||
const_io_name_t_ref_in = b"r*"
|
||||
CFStringRef = b"^{__CFString=}"
|
||||
CFDictionaryRef = b"^{__CFDictionary=}"
|
||||
CFAllocatorRef = b"^{__CFAllocator=}"
|
||||
# pylint: enable=invalid-name
|
||||
|
||||
# https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Articles/ocrtTypeEncodings.html
|
||||
functions = [
|
||||
("IORegistryEntryCreateCFProperties", b"IIo^@" + CFAllocatorRef + b"I"),
|
||||
("IOServiceMatching", CFDictionaryRef + b"r*"),
|
||||
("IOServiceGetMatchingServices", b"II" + CFDictionaryRef + b"o^I"),
|
||||
("IOIteratorNext", b"II"),
|
||||
("IORegistryEntryGetParentEntry", b"IIr*o^I"),
|
||||
("IOObjectRelease", b"II"),
|
||||
("IORegistryEntryGetName", b"IIo" + io_name_t_ref_out),
|
||||
("IOObjectGetClass", b"IIo" + io_name_t_ref_out),
|
||||
("IOObjectCopyClass", CFStringRef + b"I"),
|
||||
("IOObjectCopySuperclassForClass", CFStringRef + CFStringRef),
|
||||
("IORegistryEntryGetChildIterator", b"IIr*o^I"),
|
||||
("IORegistryCreateIterator", b"IIr*Io^I"),
|
||||
("IORegistryEntryCreateIterator", b"IIr*Io^I"),
|
||||
("IORegistryIteratorEnterEntry", b"II"),
|
||||
("IORegistryIteratorExitEntry", b"II"),
|
||||
("IORegistryEntryCreateCFProperty", b"@I" + CFStringRef + CFAllocatorRef + b"I"),
|
||||
("IORegistryEntryGetPath", b"IIr*oI"),
|
||||
("IORegistryEntryCopyPath", CFStringRef + b"Ir*"),
|
||||
("IOObjectConformsTo", b"II" + const_io_name_t_ref_in),
|
||||
("IORegistryEntryGetLocationInPlane", b"II" + const_io_name_t_ref_in + b"o" + io_name_t_ref_out),
|
||||
("IOServiceNameMatching", CFDictionaryRef + b"r*"),
|
||||
("IORegistryEntryGetRegistryEntryID", b"IIo^Q"),
|
||||
("IORegistryEntryIDMatching", CFDictionaryRef + b"Q"),
|
||||
("IORegistryEntryFromPath", b"II" + const_io_name_t_ref_in),
|
||||
]
|
||||
|
||||
variables = [("kIOMasterPortDefault", b"I")]
|
||||
|
||||
# pylint: disable=invalid-name
|
||||
pointer = type(None)
|
||||
|
||||
kern_return_t = NewType("kern_return_t", int)
|
||||
boolean_t = int
|
||||
|
||||
io_object_t = NewType("io_object_t", object)
|
||||
io_name_t = bytes
|
||||
io_string_t = bytes
|
||||
|
||||
# io_registry_entry_t = NewType("io_registry_entry_t", io_object_t)
|
||||
io_registry_entry_t = io_object_t
|
||||
io_iterator_t = NewType("io_iterator_t", io_object_t)
|
||||
|
||||
CFTypeRef = Union[int, float, bytes, dict, list]
|
||||
|
||||
IOOptionBits = int
|
||||
mach_port_t = int
|
||||
CFAllocatorType = type(kCFAllocatorDefault)
|
||||
|
||||
NULL = 0
|
||||
|
||||
kIOMasterPortDefault: mach_port_t
|
||||
kNilOptions: IOOptionBits = NULL
|
||||
|
||||
# IOKitLib.h
|
||||
kIORegistryIterateRecursively = 1
|
||||
kIORegistryIterateParents = 2
|
||||
|
||||
# pylint: enable=invalid-name
|
||||
|
||||
|
||||
@dataclass
|
||||
class IORegistryEntry:
|
||||
name: str
|
||||
entry_class: str
|
||||
properties: dict
|
||||
location: str
|
||||
children: list[IORegistryEntry]
|
||||
parent: IORegistryEntry
|
||||
# kern_return_t IORegistryEntryCreateCFProperties(io_registry_entry_t entry, CFMutableDictionaryRef * properties, CFAllocatorRef allocator, IOOptionBits options);
|
||||
def IORegistryEntryCreateCFProperties(entry: io_registry_entry_t, properties: pointer, allocator: CFAllocatorType, options: IOOptionBits) -> tuple[kern_return_t, dict]: # pylint: disable=invalid-name
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
class IOReg:
|
||||
def __init__(self):
|
||||
self.ioreg = plistlib.loads(subprocess.run("ioreg -a -l".split(), stdout=subprocess.PIPE).stdout.strip())
|
||||
self.tree = self.recurse(self.ioreg, None)
|
||||
# CFMutableDictionaryRef IOServiceMatching(const char * name);
|
||||
def IOServiceMatching(name: bytes) -> dict: # pylint: disable=invalid-name
|
||||
raise NotImplementedError
|
||||
|
||||
def recurse(self, entry, parent):
|
||||
converted = IORegistryEntry(
|
||||
entry["IORegistryEntryName"],
|
||||
entry["IOObjectClass"],
|
||||
{
|
||||
i: v
|
||||
for i, v in entry.items()
|
||||
if i
|
||||
not in [
|
||||
"IOServiceBusyState",
|
||||
"IOServiceBusyTime",
|
||||
"IOServiceState",
|
||||
"IORegistryEntryLocation",
|
||||
"IORegistryEntryName",
|
||||
"IORegistryEntryID",
|
||||
"IOObjectClass",
|
||||
"IORegistryEntryChildren",
|
||||
"IOObjectRetainCount",
|
||||
]
|
||||
},
|
||||
entry.get("IORegistryEntryLocation"),
|
||||
[],
|
||||
parent,
|
||||
)
|
||||
|
||||
for i in entry.get("IORegistryEntryChildren", []):
|
||||
converted.children.append(self.recurse(i, converted))
|
||||
# kern_return_t IOServiceGetMatchingServices(mach_port_t masterPort, CFDictionaryRef matching CF_RELEASES_ARGUMENT, io_iterator_t * existing);
|
||||
def IOServiceGetMatchingServices(masterPort: mach_port_t, matching: dict, existing: pointer) -> tuple[kern_return_t, io_iterator_t]: # pylint: disable=invalid-name
|
||||
raise NotImplementedError
|
||||
|
||||
return converted
|
||||
|
||||
def parse_conditions(self, entry: IORegistryEntry, **kwargs):
|
||||
conditions = []
|
||||
if "parent" in kwargs:
|
||||
conditions.append(self.parse_conditions(entry.parent, **kwargs["parent"]))
|
||||
if "children" in kwargs:
|
||||
conditions.append(any(self.parse_conditions(i, **kwargs["children"]) for i in entry.children))
|
||||
if "name" in kwargs:
|
||||
conditions.append(kwargs["name"] == entry.name)
|
||||
if "entry_class" in kwargs:
|
||||
conditions.append(kwargs["entry_class"] == entry.entry_class)
|
||||
if "key" in kwargs:
|
||||
conditions.append(kwargs["key"] in entry.properties)
|
||||
if "property" in kwargs:
|
||||
conditions.append(kwargs["property"][0] in entry.properties and entry.properties[kwargs["property"][0]] == kwargs["property"][1])
|
||||
# io_object_t IOIteratorNext(io_iterator_t iterator);
|
||||
def IOIteratorNext(iterator: io_iterator_t) -> io_object_t: # pylint: disable=invalid-name
|
||||
raise NotImplementedError
|
||||
|
||||
return all(conditions)
|
||||
|
||||
def find(self, root: IORegistryEntry = None, **kwargs) -> Generator[IORegistryEntry, None, None]:
|
||||
if not root:
|
||||
root = self.tree
|
||||
# kern_return_t IORegistryEntryGetParentEntry(io_registry_entry_t entry, const io_name_t plane, io_registry_entry_t * parent);
|
||||
def IORegistryEntryGetParentEntry(entry: io_registry_entry_t, plane: io_name_t, parent: pointer) -> tuple[kern_return_t, io_registry_entry_t]: # pylint: disable=invalid-name
|
||||
raise NotImplementedError
|
||||
|
||||
if not kwargs:
|
||||
return
|
||||
|
||||
if self.parse_conditions(root, **kwargs):
|
||||
yield root
|
||||
# kern_return_t IOObjectRelease(io_object_t object);
|
||||
def IOObjectRelease(object: io_object_t) -> kern_return_t: # pylint: disable=invalid-name
|
||||
raise NotImplementedError
|
||||
|
||||
for i in root.children:
|
||||
for j in self.find(i, **kwargs):
|
||||
yield j
|
||||
|
||||
# kern_return_t IORegistryEntryGetName(io_registry_entry_t entry, io_name_t name);
|
||||
def IORegistryEntryGetName(entry: io_registry_entry_t, name: pointer) -> tuple[kern_return_t, bytes]: # pylint: disable=invalid-name
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
# kern_return_t IOObjectGetClass(io_object_t object, io_name_t className);
|
||||
def IOObjectGetClass(object: io_object_t, className: pointer) -> tuple[kern_return_t, bytes]: # pylint: disable=invalid-name
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
# CFStringRef IOObjectCopyClass(io_object_t object);
|
||||
def IOObjectCopyClass(object: io_object_t) -> str: # pylint: disable=invalid-name
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
# CFStringRef IOObjectCopySuperclassForClass(CFStringRef classname)
|
||||
def IOObjectCopySuperclassForClass(classname: str) -> str: # pylint: disable=invalid-name
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
# kern_return_t IORegistryEntryGetChildIterator(io_registry_entry_t entry, const io_name_t plane, io_iterator_t * iterator);
|
||||
def IORegistryEntryGetChildIterator(entry: io_registry_entry_t, plane: io_name_t, iterator: pointer) -> tuple[kern_return_t, io_iterator_t]: # pylint: disable=invalid-name
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
# kern_return_t IORegistryCreateIterator(mach_port_t masterPort, const io_name_t plane, IOOptionBits options, io_iterator_t * iterator)
|
||||
def IORegistryCreateIterator(masterPort: mach_port_t, plane: io_name_t, options: IOOptionBits, iterator: pointer) -> tuple[kern_return_t, io_iterator_t]: # pylint: disable=invalid-name
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
# kern_return_t IORegistryEntryCreateIterator(io_registry_entry_t entry, const io_name_t plane, IOOptionBits options, io_iterator_t * iterator)
|
||||
def IORegistryEntryCreateIterator(entry: io_registry_entry_t, plane: io_name_t, options: IOOptionBits, iterator: pointer) -> tuple[kern_return_t, io_iterator_t]: # pylint: disable=invalid-name
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
# kern_return_t IORegistryIteratorEnterEntry(io_iterator_t iterator)
|
||||
def IORegistryIteratorEnterEntry(iterator: io_iterator_t) -> kern_return_t: # pylint: disable=invalid-name
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
# kern_return_t IORegistryIteratorExitEntry(io_iterator_t iterator)
|
||||
def IORegistryIteratorExitEntry(iterator: io_iterator_t) -> kern_return_t: # pylint: disable=invalid-name
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
# CFTypeRef IORegistryEntryCreateCFProperty(io_registry_entry_t entry, CFStringRef key, CFAllocatorRef allocator, IOOptionBits options);
|
||||
def IORegistryEntryCreateCFProperty(entry: io_registry_entry_t, key: str, allocator: CFAllocatorType, options: IOOptionBits) -> CFTypeRef: # pylint: disable=invalid-name
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
# kern_return_t IORegistryEntryGetPath(io_registry_entry_t entry, const io_name_t plane, io_string_t path);
|
||||
def IORegistryEntryGetPath(entry: io_registry_entry_t, plane: io_name_t, path: pointer) -> tuple[kern_return_t, io_string_t]: # pylint: disable=invalid-name
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
# CFStringRef IORegistryEntryCopyPath(io_registry_entry_t entry, const io_name_t plane)
|
||||
def IORegistryEntryCopyPath(entry: io_registry_entry_t, plane: bytes) -> str: # pylint: disable=invalid-name
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
# boolean_t IOObjectConformsTo(io_object_t object, const io_name_t className)
|
||||
def IOObjectConformsTo(object: io_object_t, className: bytes) -> boolean_t: # pylint: disable=invalid-name
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
# kern_return_t IORegistryEntryGetLocationInPlane(io_registry_entry_t entry, const io_name_t plane, io_name_t location)
|
||||
def IORegistryEntryGetLocationInPlane(entry: io_registry_entry_t, plane: io_name_t, location: pointer) -> tuple[kern_return_t, bytes]: # pylint: disable=invalid-name
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
# CFMutableDictionaryRef IOServiceNameMatching(const char * name);
|
||||
def IOServiceNameMatching(name: bytes) -> dict: # pylint: disable=invalid-name
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
# kern_return_t IORegistryEntryGetRegistryEntryID(io_registry_entry_t entry, uint64_t * entryID)
|
||||
def IORegistryEntryGetRegistryEntryID(entry: io_registry_entry_t, entryID: pointer) -> tuple[kern_return_t, int]: # pylint: disable=invalid-name
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
# CFMutableDictionaryRef IORegistryEntryIDMatching(uint64_t entryID);
|
||||
def IORegistryEntryIDMatching(entryID: int) -> dict: # pylint: disable=invalid-name
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
# io_registry_entry_t IORegistryEntryFromPath(mach_port_t mainPort, const io_string_t path)
|
||||
def IORegistryEntryFromPath(mainPort: mach_port_t, path: io_string_t) -> io_registry_entry_t: # pylint: disable=invalid-name
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
objc.loadBundleFunctions(IOKit_bundle, globals(), functions) # type: ignore # pylint: disable=no-member
|
||||
objc.loadBundleVariables(IOKit_bundle, globals(), variables) # type: ignore # pylint: disable=no-member
|
||||
|
||||
|
||||
def ioiterator_to_list(iterator: io_iterator_t):
|
||||
# items = []
|
||||
item = IOIteratorNext(iterator) # noqa: F821
|
||||
while item:
|
||||
# items.append(next)
|
||||
yield item
|
||||
item = IOIteratorNext(iterator) # noqa: F821
|
||||
IOObjectRelease(iterator) # noqa: F821
|
||||
# return items
|
||||
|
||||
|
||||
def corefoundation_to_native(collection):
|
||||
if collection is None: # nullptr
|
||||
return None
|
||||
native = Conversion.pythonCollectionFromPropertyList(collection)
|
||||
CFRelease(collection)
|
||||
return native
|
||||
|
||||
|
||||
def native_to_corefoundation(native):
|
||||
return Conversion.propertyListFromPythonCollection(native)
|
||||
|
||||
|
||||
def io_name_t_to_str(name):
|
||||
return name.partition(b"\0")[0].decode()
|
||||
|
||||
|
||||
def get_class_inheritance(io_object):
|
||||
classes = []
|
||||
cls = IOObjectCopyClass(io_object)
|
||||
while cls:
|
||||
# yield cls
|
||||
classes.append(cls)
|
||||
CFRelease(cls)
|
||||
cls = IOObjectCopySuperclassForClass(cls)
|
||||
return classes
|
||||
|
||||
14
create-offline-build.py
Normal file
14
create-offline-build.py
Normal file
@@ -0,0 +1,14 @@
|
||||
import subprocess
|
||||
from Resources import Constants
|
||||
|
||||
patcher_support_pkg_version = Constants.Constants().patcher_support_pkg_version
|
||||
binary_packages = ["10.14-Mojave", "10.15-Catalina", "11-Big-Sur", "12-Monterey"]
|
||||
|
||||
for binary_package in binary_packages:
|
||||
print(f"- Downloading {binary_package}...")
|
||||
download_cmd = f"curl -LO https://github.com/dortania/PatcherSupportPkg/releases/download/{patcher_support_pkg_version}/{binary_package}.zip"
|
||||
subprocess.run(download_cmd, shell=True)
|
||||
print("- Moving into payloads")
|
||||
move_cmd = f"mv {binary_package}.zip ./payloads/"
|
||||
subprocess.run(move_cmd, shell=True)
|
||||
print("- Download complete")
|
||||
@@ -7,13 +7,48 @@
|
||||
* [Photos and Maps Apps Heavily Distorted](#photos-and-maps-apps-heavily-distorted)
|
||||
* [Cannot press "Done" when editing a Sidebar Widget](#cannot-press-done-when-editing-a-sidebar-widget)
|
||||
* [Wake from sleep heavily distorted on AMD/ATI in macOS 11.3 and newer](#wake-from-sleep-heavily-distorted-on-amd-ati-in-macos-11-3-and-newer)
|
||||
* [Unable to achieve GPU Acceleration on 2011 15" and 17" MacBook Pros](#unable-to-achieve-gpu-acceleration-on-2011-15-and-17-macbook-pros)
|
||||
* [Unable to switch GPUs on 2011 15" and 17" MacBook Pros](#unable-to-switch-gpus-on-2011-15-and-17-macbook-pros)
|
||||
* [Erratic Colours on ATI TeraScale 2 GPUs (HD5000/HD6000)](#erratic-colours-on-ati-terascale-2-gpus-hd5000-hd6000)
|
||||
|
||||
The below page is for users experiencing issues with their overall usage of macOS Big Sur and the Legacy Graphics Acceleration patches. Note that the following GPUs currently do not have acceleration support in Big Sur:
|
||||
|
||||
* AMD/ATI TeraScale 2 - HD5/6000 series
|
||||
* Intel 3rd and 4th Gen - GMA series
|
||||
|
||||
For those unfamiliar with what is considered a non-Metal GPU, see below chart:
|
||||
|
||||
::: details macOS GPU Chart
|
||||
|
||||
| Graphics Vendor | Architecture | Series | Supports Metal |
|
||||
| :--- | :--- | :--- | :--- |
|
||||
| ATI | TeraScale 1 | HD2000 - HD4000 | <span style="color:red">No</span> |
|
||||
| ^^ | TeraScale 2 | HD5000 - HD6000 | ^^ |
|
||||
| AMD | GCN (and newer) | HD7000+ | <span style="color:green">Yes</span> |
|
||||
| Nvidia | Tesla | 8000GT - GT300 | <span style="color:red">No</span> |
|
||||
| ^^ | Fermi | GT400 - GT500 | ^^ |
|
||||
| ^^ | Kepler | GT600 - GT700 | <span style="color:green">Yes</span> |
|
||||
| Intel | GMA | GMA900 - GMA3000 | <span style="color:red">No</span> |
|
||||
| ^^ | Iron Lake | HD series | ^^ |
|
||||
| ^^ | Sandy Bridge | HD3000 | ^^ |
|
||||
| ^^ | Ivy Bridge (and newer) | HD4000 | <span style="color:green">Yes</span> |
|
||||
|
||||
:::
|
||||
|
||||
Additionally we currently do not have macOS Monterey acceleration patches for non-Metal Macs. We recommend users either upgrade their Macs with a Metal GPU or remain on Big Sur until further development
|
||||
|
||||
::: details Why there's no non-Metal patches for Monterey
|
||||
|
||||
With macOS Monterey, please understand our current legacy acceleration patch sets are no longer functional. As of right now, only basic framebuffer and brightness control may be achieved, however proper animations and hardware acceleration is not available.
|
||||
|
||||
This is due to numerous changes with Skylight and other macOS frameworks relying more and more on Metal functions and thus making it even more difficult to re-add legacy OpenGL support.
|
||||
|
||||
> When can we expect acceleration support
|
||||
|
||||
For the time being, please understand we cannot predict when there will be patch sets ready. Note that it took over 300 days from Big Sur's unveiling to achieve public acceleration for non-Metal GPUs. And with TeraScale 2 acceleration, this took almost 3 years to achieve public acceleration.
|
||||
|
||||
So please be patient as developers are hard at work, however please expect no acceleration support in Monterey until next year at the minimum if not even later.
|
||||
|
||||
:::
|
||||
|
||||
## Downloading older non-Metal Apps
|
||||
|
||||
Many Apple apps now have direct reliance on Metal for proper functioning, however legacy builds of these apps still do work in Big Sur. See below for archive of many apps such as Pages, iMovie, GarageBand.
|
||||
@@ -30,6 +65,10 @@ Currently Zoom relies partially on Metal and so needs a small binary patch. Dosd
|
||||
|
||||
## Unable to grant special permissions to apps (ie. Camera Access to Zoom)
|
||||
|
||||
With version 0.2.5, this issue should be full resolved
|
||||
|
||||
::: details 0.2.4 and older Work-Around
|
||||
|
||||
Due to the usage of `amfi_get_out_of_my_way=1`, macOS will fail to prompt users for special permissions upon application start as well as omit the entires in System Preferences. To work around this, we recommend users install [tccplus](https://github.com/jslegendre/tccplus) to manage permissions.
|
||||
|
||||
Example usage with Discord and microphone permissions:
|
||||
@@ -41,6 +80,20 @@ chmod +x tccplus
|
||||
./tccplus add Microphone com.hnc.Discord
|
||||
```
|
||||
|
||||
For those who may experience issues with `tccplus`, you can manually patch `com.apple.TCC` to add permissions:
|
||||
|
||||
```sh
|
||||
# get app id (Zoom.us used in example):
|
||||
$ osascript -e 'id of app "zoom.us"'
|
||||
# output: us.zoom.xos
|
||||
|
||||
$ sudo sqlite3 ~/Library/Application\ Support/com.apple.TCC/TCC.db "INSERT or REPLACE INTO access VALUES('kTCCServiceMicrophone','us.zoom.xos',0,2,0,1,NULL,NULL,NULL,'UNUSED',NULL,0,1541440109);"
|
||||
|
||||
$ sudo sqlite3 ~/Library/Application\ Support/com.apple.TCC/TCC.db "INSERT or REPLACE INTO access VALUES('kTCCServiceCamera','us.zoom.xos',0,2,0,1,NULL,NULL,NULL,'UNUSED',NULL,0,1541440109);"
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
## Keyboard Backlight broken
|
||||
|
||||
Due to forcing `hidd` into spinning up with the fallback mode enabled, this can break the OS's recognition of backlight keyboards. Thankfully the drivers themselves still do operate so applications such as [LabTick](https://www.macupdate.com/app/mac/22151/lab-tick) are able to set the brightness manually.
|
||||
@@ -55,15 +108,17 @@ To work around this, simply press Tab to hover over and press spacebar to simula
|
||||
|
||||
## Wake from sleep heavily distorted on AMD/ATI in macOS 11.3 and newer
|
||||
|
||||
Unfortunately a very well known issue the community is investigating, current known solution is to simply downgrade to 11.2.3 or older until a proper fix can be found.
|
||||
Unfortunately a very well known issue the community is investigating, current known solution is to simply downgrade to 11.2.3 or older until a proper fix can be found. Additionally logging out and logging in can resolve the issue without requiring a reboot
|
||||
|
||||
* Note, this issue should be exclusive to TeraScale 1 GPUs (ie. HD2000-4000). TeraScale 2 GPUs should not exhibit this issue
|
||||
|
||||
In the event Apple removes 11.2.3 from their catalogue, we've provided a mirror below:
|
||||
|
||||
* [Install macOS 11.2.3 20D91](https://archive.org/details/install-mac-os-11.2.3-20-d-91)
|
||||
|
||||
## Unable to achieve GPU Acceleration on 2011 15" and 17" MacBook Pros
|
||||
## Unable to switch GPUs on 2011 15" and 17" MacBook Pros
|
||||
|
||||
Currently OpenCore Legacy Patcher doesn't have support for the TeraScale 2 series dGPUs found in the 15" and 17" models. Currently the best way to achieve graphics acceleration is to simply disable the dGPU and force the iGPU always.
|
||||
Currently OpenCore Legacy Patcher, GPU switching between the iGPU and dGPU is broken. The simplest way to set a specific GPU is to disable the dGPU when you wish to remain on the more power efficient iGPU.
|
||||
|
||||
The best way to achieve this is to boot Recovery (or Single User Mode if the dGPU refuses to function at all) and run the following command:
|
||||
|
||||
@@ -71,4 +126,13 @@ The best way to achieve this is to boot Recovery (or Single User Mode if the dGP
|
||||
nvram FA4CE28D-B62F-4C99-9CC3-6815686E30F9:gpu-power-prefs=%01%00%00%00
|
||||
```
|
||||
|
||||
This will disable the dGPU and allow graphics acceleration in Big Sur. Note that external display outputs are directly routed to the dGPU and therefore can no longer be used. Solutions such as a [DisplayLink Adapters](https://www.displaylink.com/products/usb-adapters) can work around this limitation.
|
||||
This will disable the dGPU and allow the iGPU to function in Big Sur. Note that external display outputs are directly routed to the dGPU and therefore can no longer be used. Solutions such as a [DisplayLink Adapters](https://www.displaylink.com/products/usb-adapters) can work around this limitation in theory. However, currently the proprietary DisplayLink driver refuses to function on legacy-patched systems, either resulting in a windowserver crash loop or no output at all.
|
||||
|
||||
## Erratic Colours on ATI TeraScale 2 GPUs (HD5000/HD6000)
|
||||
|
||||
Due to an odd bug with ATI's TeraScale 2 GPUs, many users will experience erratic/strobing colours once finished installing and rebooting into the accelerated patches. The issue stems from an incorrect assumption in the GPU drivers where it will enforce the Billion Colour space on your display. To fix, simply force your Display into a lower color depth such as a Million Colours.
|
||||
|
||||
Applications that can set color depth are:
|
||||
|
||||
* [SwitchResX](https://www.madrau.com)
|
||||
* [ResXtreme](https://macdownload.informer.com/resxtreme/)
|
||||
@@ -7,14 +7,14 @@ With OpenCore Legacy Patcher we recommend users go through the below table to un
|
||||
| Features | [OpenCore Legacy Patcher](https://github.com/dortania/OpenCore-Legacy-Patcher/) | [Patched Sur](https://github.com/BenSova/Patched-Sur) |
|
||||
| :--- | :--- | :--- |
|
||||
| Over The Air Updates | <span style="color:#30BCD5">Native System Preferences, additionally supports Deltas (~2GB) for Metal GPUs</span> | <span style="color:red">Inside Patcher Sur app (~12GB), only available when InstallAssistants release.</span> InstallAssistants generally available same day as System Preference updates, however developer betas will lag behind by 1 day compared to OTAs |
|
||||
| FileVault | <span style="color:#30BCD5">Supported on Metal GPUs</span> | <span style="color:red">Not supported</span> |
|
||||
| FileVault | <span style="color:#30BCD5">Fully supported on all machines</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 during the patching process and first boot afterwards, otherwise enabled</span> |
|
||||
| APFS Snapshots | <span style="color:#30BCD5">Fully enabled</span> | <span style="color:red">Disabled</span> |
|
||||
| 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> |
|
||||
| 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> |
|
||||
| Non-Metal GPU Acceleration | <span style="color:#30BCD5">In active development</span>, see Acceleration Progress Tracker: [Link](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108) | <span style="color:red">Currently not researching</span> |
|
||||
| El Capitan-era Wifi cards | <span style="color:#30BCD5">Supported</span> | <span style="colorred">Not supported</span> |
|
||||
| WPA Wireless Support | <span style="color:#30BCD5">Supported</span> | <span style="color:red">Minority may experience issues on early 2013 and older Models</span> |
|
||||
| Personal Hotspot Support | <span style="color:#30BCD5">Native</span> | <span style="color:red">Often requires extra steps to achieve on early 2013 and older Models</span> |
|
||||
|
||||
@@ -12,7 +12,7 @@ This doc is centered around downloading and writing the macOS installer to a USB
|
||||
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
|
||||
[ ! -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:
|
||||
|
||||
@@ -9,14 +9,13 @@ This patcher is made of multiple external applications from different people and
|
||||
* [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)
|
||||
* [FeatureUnlock](https://github.com/acidanthera/FeatureUnlock/blob/master/LICENSE.txt)
|
||||
* [Innie](https://github.com/cdf/Innie/blob/master/LICENSE.txt)
|
||||
* GPL 2.0
|
||||
* [NVMeFix](https://github.com/acidanthera/NVMeFix/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
|
||||
* [SidecarFixup](https://github.com/khronokernel/SidecarFixup) - Khronokernel
|
||||
* Apple Binaries - Apple Inc.
|
||||
|
||||
Remaining files within OpenCore Legacy Patcher are copyrighted 2020-2021 Mykola Grymalyuk & Dhinak G. For integration into other projects, please request written permission.
|
||||
|
||||
@@ -23,6 +23,9 @@ Regarding OS support, see below:
|
||||
| HostOS | macOS 10.9 - macOS 11 | Refers to OSes where running OpenCore-Patcher.app are supported | Supports 10.7+ if [Python 3.9 or higher](https://www.python.org/downloads/) is manually installed, simply run the `OpenCore-Patcher.command` located in the repo |
|
||||
| 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. |
|
||||
|
||||
* macOS Monterey support is currently in beta and is not recommended for everyday users. The below page is meant to represent macOS Big Sur support and may not correctly reflect Monterey's support on each model
|
||||
* Recommend looking at the [macOS Monterey Support page](./MONTEREY-DROP.md) for a better idea of Monterey's current status
|
||||
|
||||
### MacBook
|
||||
|
||||
| SMBIOS | Year | Supported | Comment |
|
||||
@@ -35,6 +38,7 @@ Regarding OS support, see below:
|
||||
| MacBook5,2 | Early 2009 | ^^ | - GPU Acceleration in Public Beta, see current issues ([#108](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108))<br/>- Trackpad is recognized as mouse<br/>- Brightness control partially supported |
|
||||
| MacBook6,1 | Late 2009 | ^^ | - GPU Acceleration in Public Beta, see current issues ([#108](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108))<br/> |
|
||||
| MacBook7,1 | Mid-2010 | ^^ | ^^ |
|
||||
| MacBook8,1 | Mid-2015 | ^^ | <span style="color:green"> Everything is supported</span> |
|
||||
|
||||
### MacBook Air
|
||||
|
||||
@@ -48,6 +52,8 @@ Regarding OS support, see below:
|
||||
| MacBookAir4,2 | ^^ | ^^ | ^^ |
|
||||
| MacBookAir5,1 | Mid-2012 |^^ | <span style="color:green"> Everything is supported</span> |
|
||||
| MacBookAir5,2 | ^^ | ^^ | ^^ |
|
||||
| MacBookAir6,1 | Mid-2013, Early 2014 | ^^ | ^^ |
|
||||
| MacBookAir6,2 | ^^ | ^^ | ^^ |
|
||||
|
||||
### MacBook Pro
|
||||
|
||||
@@ -74,6 +80,9 @@ Regarding OS support, see below:
|
||||
| MacBookPro9,2 | ^^ | ^^ | ^^ |
|
||||
| MacBookPro10,1 | Mid-2012, Early 2013 | ^^ | ^^ |
|
||||
| MacBookPro10,2 | Late 2012, Early 2013 | ^^ | ^^ |
|
||||
| MacBookPro11,1 | Late 2013, Mid-2014 | ^^ | ^^ |
|
||||
| MacBookPro11,2 | ^^ | ^^ | ^^ |
|
||||
| MacBookPro11,3 | ^^ | ^^ | ^^ |
|
||||
|
||||
### Mac mini
|
||||
|
||||
@@ -113,6 +122,8 @@ Regarding OS support, see below:
|
||||
| iMac14,1 | Late 2013 | ^^ | ^^ |
|
||||
| iMac14,2 | ^^ | ^^ | ^^ |
|
||||
| iMac14,3 | ^^ | ^^ | ^^ |
|
||||
| iMac14,4 | Mid-2014 | ^^ | ^^ |
|
||||
| iMac15,1 | Late 2014, Mid-2015 | ^^ | [Display will output to 4k instead of 5k](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/359) |
|
||||
|
||||
* 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-2011 Graphics Card Upgrade Guide](https://forums.macrumors.com/threads/2011-imac-graphics-card-upgrade.1596614/?post=17425857#post-17425857)
|
||||
|
||||
|
||||
@@ -1,72 +1,57 @@
|
||||
# macOS Monterey Support
|
||||
|
||||
With OpenCore Legacy Patcher v0.1.7 and newer, we've implemented beta macOS Monterey support for users. Please note that Apple has dropped a lot of hardware with this release as well as broken many of our previous patch sets. This page will be used to inform users regarding current issues and will be updated as new patch sets are developed and added to our patcher.
|
||||
|
||||
## Newly dropped hardware
|
||||
|
||||
Current models with full, unhindered support in OpenCore Legacy Patcher are the following:
|
||||
With Monterey, Apple continues their their somewhat ruthless march of dropping Intel hardware. This release saw the removal, and thus addition into OpenCore Legacy Patcher, of the following models:
|
||||
|
||||
* iMac13,x and newer
|
||||
* iMac10,1-12,x included if Wireless Card and Bluetooth upgraded as well as Metal GPU
|
||||
* Macmini7,1 and newer
|
||||
* MacBook8,1 and newer
|
||||
* MacBookAir6,x and newer
|
||||
* MacBookPro11,x and newer
|
||||
* MacPro3,1 and newer
|
||||
* Requires Wireless Card and Bluetooth upgrade for 3,1-5,1 as well as Metal GPU
|
||||
* iMac14,4
|
||||
* iMac15,1
|
||||
* MacBook8,1
|
||||
* MacBookAir6,1
|
||||
* MacBookAir6,2
|
||||
* MacBookPro11,1
|
||||
* MacBookPro11,2
|
||||
* MacBookPro11,3
|
||||
|
||||
All of these models now have support in OpenCore Legacy Patcher. Note iMac15,1 does have [an unfortunate firmware bug preventing resolutions above 4k](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/359) with OpenCore Legacy Patcher
|
||||
|
||||
## Current Hardware Drawbacks:
|
||||
|
||||
Below is a list of hardware that currently has issues with Monterey:
|
||||
### macOS 12.0 Beta 4 issue on 2012 to early 2013 machines
|
||||
|
||||
* [Acceleration Support Dropped](#acceleration-support-dropped)
|
||||
* [Metal GPUs](#metal-gpus)
|
||||
* [Non-Metal GPUs](#non-metal-gpus)
|
||||
* [Bluetooth Support Dropped](#bluetooth-support-dropped)
|
||||
* [Wireless Support Dropped](#wireless-support-dropped)
|
||||
Currently in macOS 12.0 Beta 4, many Ivy Bridge Macs have experienced Bluetooth issues relating to their BCM20702 chipset. Currently the exact issue is unknown however is assumed to be a bug on Apple's end. Recommend downgrading to macOS 12.0 Beta 3 till resolved:
|
||||
|
||||
## Acceleration Support Dropped
|
||||
* [12.0 Beta 3 (21A5284e) InstallAssistant (Direct)](http://swcdn.apple.com/content/downloads/02/08/071-63739-A_G5RYVW5JHT/dfz5gp3s0jm9vl7m30oewq141zkpv8edr8/InstallAssistant.pkg)
|
||||
* [12.0 Beta 3 (21A5284e) InstallAssistant (archive.org)](https://archive.org/details/12.0-21a5284e-beta-3)
|
||||
|
||||
### Metal GPUs
|
||||
A temporary fix is to restart the BlueTool and bluetoothd process with each boot, note it may not work for all users:
|
||||
|
||||
* Intel HD4000 iGPUs lost support
|
||||
```sh
|
||||
sudo killall -9 BlueTool bluetoothd
|
||||
```
|
||||
|
||||
By default these machines require root volume patches to gain graphics acceleration in Monterey. OpenCore Legacy Patcher supports readding support however SIP and FileVault can no longer be enabled due to root patching:
|
||||
## Previously Broken Hardware
|
||||
|
||||
* Macmini6,x
|
||||
* MacBookAir5,x
|
||||
* MacBookPro9,x
|
||||
* MacBookPro10,x
|
||||
::: details Wireless Support Dropped (Resolved in 0.2.5 and newer)
|
||||
|
||||
Note: Currently HD 4000 support in Monterey is not perfect, following are broken:
|
||||
* Broadcom BCM94328, BCM94322 and Atheros Wireless Chipsets lost support
|
||||
|
||||
::: details HD 4000 Issues
|
||||
The following models lost Bluetooth support in macOS Monterey due to their legacy Wireless chipset:
|
||||
|
||||
* Photo Booth app crashing
|
||||
* Safari sites crash if request camera access
|
||||
* Full Screen recoding crashing with Screenshot app
|
||||
* AirPlay to Mac crashes
|
||||
* Full Screen apps crashes
|
||||
* Disable "Hide menubar in Full Screen" to avoid crash
|
||||
* iMac12,x and older
|
||||
* Macmini3,1 and older
|
||||
* MacBook5,x and older
|
||||
* MacBookAir2,1 and older
|
||||
* MacBookPro7,1 and older
|
||||
* MacPro5,1 and older
|
||||
|
||||
Note: BCM943224, BCM94331, BCM94360 and BCM943602 are still fully support by OpenCore Legacy Patcher
|
||||
|
||||
:::
|
||||
|
||||
### Non-Metal GPUs
|
||||
|
||||
* Non-Metal GPUs no longer have working acceleration patches:
|
||||
* Intel Ironlake and Sandy Bridge iGPUs
|
||||
* Nvidia Tesla and Fermi GPUs
|
||||
* AMD TeraScale 1 and 2 GPUs
|
||||
|
||||
The following machines cannot gain graphics acceleration at all in Monterey, only basic framebuffer and brightness control (iMac8,1/9,1 and MacBook5,2 excluded):
|
||||
|
||||
* iMac12,x and older
|
||||
* Macmini5,x and older
|
||||
* MacBook7,1 and older
|
||||
* MacBookAir4,x and older
|
||||
* MacBookPro8,x and older
|
||||
|
||||
Note: iMac10,1 through iMac12,x can be upgraded with Metal GPUs, [see here for more info](https://forums.macrumors.com/threads/2011-imac-graphics-card-upgrade.1596614/)
|
||||
|
||||
## Bluetooth Support Dropped
|
||||
::: details Bluetooth Support Dropped (Resolved in 0.2.5 and newer)
|
||||
|
||||
* BRCM2046 and BRCM2070 Bluetooth Chipsets lost support
|
||||
|
||||
@@ -79,7 +64,9 @@ The following models lost Bluetooth support in macOS Monterey due to their legac
|
||||
* MacBookPro8,1 and older
|
||||
* MacPro5,1 and older
|
||||
|
||||
::: details Dropped Firmwares
|
||||
Note: Native BRCM20702 and BRCM20703 are still fully support by OpenCore Legacy Patcher
|
||||
|
||||
::: details Dropped Firmwares
|
||||
|
||||
Here are the firmwares macOS Monterey Dropped (previously located within IOBluetoothUSBDFU.kext):
|
||||
|
||||
@@ -102,19 +89,34 @@ Here are the firmwares macOS Monterey Dropped (previously located within IOBluet
|
||||
|
||||
:::
|
||||
|
||||
Note: Native BRCM20702 and BRCM20703 are still fully support by OpenCore Legacy Patcher
|
||||
::: details Ivy Bridge iGPU Acceleration (Resolved in 0.1.7 and newer)
|
||||
|
||||
## Wireless Support Dropped
|
||||
* Intel HD4000 iGPUs lost support
|
||||
|
||||
* Broadcom BCM94328, BCM94322 and Atheros Wireless Chipsets lost support
|
||||
By default these machines require root volume patches to gain graphics acceleration in Monterey. OpenCore Legacy Patcher supports readding support however SIP can no longer be enabled due to root patching:
|
||||
|
||||
The following models lost Bluetooth support in macOS Monterey due to their legacy Wireless chipset:
|
||||
* Macmini6,x
|
||||
* MacBookAir5,x
|
||||
* MacBookPro9,x
|
||||
* MacBookPro10,x
|
||||
|
||||
:::
|
||||
|
||||
::: details Non-Metal Acceleration (Resolved in 0.2.5 and newer)
|
||||
|
||||
* Non-Metal GPUs no longer have working acceleration patches:
|
||||
* Intel Ironlake and Sandy Bridge iGPUs
|
||||
* Nvidia Tesla and Fermi GPUs
|
||||
* AMD TeraScale 1 and 2 GPUs
|
||||
|
||||
The following machines cannot gain graphics acceleration at all in Monterey, only basic framebuffer and brightness control (iMac8,1/9,1 and MacBook5,2 excluded):
|
||||
|
||||
* iMac12,x and older
|
||||
* Macmini3,1 and older
|
||||
* MacBook5,x and older
|
||||
* MacBookAir2,1 and older
|
||||
* MacBookPro7,1 and older
|
||||
* MacPro5,1 and older
|
||||
* Macmini5,x and older
|
||||
* MacBook7,1 and older
|
||||
* MacBookAir4,x and older
|
||||
* MacBookPro8,x and older
|
||||
|
||||
Note: BCM943224, BCM94331, BCM94360 and BCM943602 are still fully support by OpenCore Legacy Patcher
|
||||
Note: iMac10,1 through iMac12,x can be upgraded with Metal GPUs, [see here for more info](https://forums.macrumors.com/threads/2011-imac-graphics-card-upgrade.1596614/)
|
||||
|
||||
:::
|
||||
|
||||
@@ -34,6 +34,8 @@ For many users, SIP will be enabled by default on build. For Intel HD 4000 users
|
||||
|
||||
Note: Machines with non-Metal GPUs cannot enable SIP in Big Sur either due to patched root volume
|
||||
|
||||
Note 2: NVRAM may need to be reset to ensure SIP is correctly re-enabled
|
||||
|
||||
## Applying Post Install Volume Patches
|
||||
|
||||
**Note**: For users who need Post-Install Volume patches for legacy video acceleration support, you **must** disable the following settings in "Patcher Settings" when building and installing your new OpenCore:
|
||||
|
||||
BIN
docs/ResXtreme.zip
Normal file
BIN
docs/ResXtreme.zip
Normal file
Binary file not shown.
@@ -26,7 +26,7 @@ Term | Description
|
||||
**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.
|
||||
**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 unmodified otherwise ~12GB updates will occur.
|
||||
---
|
||||
Term | Description
|
||||
--- | ---
|
||||
|
||||
10
merge_gui.py
Normal file
10
merge_gui.py
Normal file
@@ -0,0 +1,10 @@
|
||||
# Updates build version in OCLP-GUI during CI builds
|
||||
# Copyright (C) 2021 Mykola Grymalyuk
|
||||
import plistlib
|
||||
from pathlib import Path
|
||||
from Resources import Constants
|
||||
|
||||
app_path = Path.cwd() / Path ("OpenCore Patcher.app/Contents/Info.plist")
|
||||
info = plistlib.load(Path(app_path).open("rb"))
|
||||
info["CFBundleShortVersionString"] = Constants.Constants().patcher_version
|
||||
plistlib.dump(info, Path(app_path).open("wb"), sort_keys=True)
|
||||
@@ -169,6 +169,8 @@
|
||||
<false/>
|
||||
<key>ResetLogoStatus</key>
|
||||
<false/>
|
||||
<key>SyncTableIds</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>Booter</key>
|
||||
@@ -232,7 +234,7 @@
|
||||
<array>
|
||||
<dict>
|
||||
<key>Arch</key>
|
||||
<string>x86_64</string>
|
||||
<string>Any</string>
|
||||
<key>Comment</key>
|
||||
<string>Patching Engine</string>
|
||||
<key>Enabled</key>
|
||||
@@ -240,7 +242,7 @@
|
||||
<key>MaxKernel</key>
|
||||
<string></string>
|
||||
<key>MinKernel</key>
|
||||
<string></string>
|
||||
<string>8.0.0</string>
|
||||
<key>BundlePath</key>
|
||||
<string>Lilu.kext</string>
|
||||
<key>ExecutablePath</key>
|
||||
@@ -276,7 +278,7 @@
|
||||
<key>MaxKernel</key>
|
||||
<string></string>
|
||||
<key>MinKernel</key>
|
||||
<string></string>
|
||||
<string>10.0.0</string>
|
||||
<key>BundlePath</key>
|
||||
<string>WhateverGreen.kext</string>
|
||||
<key>ExecutablePath</key>
|
||||
@@ -294,7 +296,7 @@
|
||||
<key>MaxKernel</key>
|
||||
<string></string>
|
||||
<key>MinKernel</key>
|
||||
<string></string>
|
||||
<string>12.0.0</string>
|
||||
<key>BundlePath</key>
|
||||
<string>RestrictEvents.kext</string>
|
||||
<key>ExecutablePath</key>
|
||||
@@ -312,7 +314,7 @@
|
||||
<key>MaxKernel</key>
|
||||
<string></string>
|
||||
<key>MinKernel</key>
|
||||
<string></string>
|
||||
<string>16.0.0</string>
|
||||
<key>BundlePath</key>
|
||||
<string>AAAMouSSE.kext</string>
|
||||
<key>ExecutablePath</key>
|
||||
@@ -348,7 +350,7 @@
|
||||
<key>MaxKernel</key>
|
||||
<string></string>
|
||||
<key>MinKernel</key>
|
||||
<string>20.0.0</string>
|
||||
<string>12.0.0</string>
|
||||
<key>BundlePath</key>
|
||||
<string>AirportBrcmFixup.kext</string>
|
||||
<key>ExecutablePath</key>
|
||||
@@ -418,7 +420,7 @@
|
||||
<key>Enabled</key>
|
||||
<false/>
|
||||
<key>MaxKernel</key>
|
||||
<string>20.99.99</string>
|
||||
<string></string>
|
||||
<key>MinKernel</key>
|
||||
<string>16.0.0</string>
|
||||
<key>BundlePath</key>
|
||||
@@ -436,7 +438,7 @@
|
||||
<key>Enabled</key>
|
||||
<false/>
|
||||
<key>MaxKernel</key>
|
||||
<string>20.99.99</string>
|
||||
<string></string>
|
||||
<key>MinKernel</key>
|
||||
<string>16.0.0</string>
|
||||
<key>BundlePath</key>
|
||||
@@ -454,7 +456,7 @@
|
||||
<key>Enabled</key>
|
||||
<false/>
|
||||
<key>MaxKernel</key>
|
||||
<string>20.99.99</string>
|
||||
<string></string>
|
||||
<key>MinKernel</key>
|
||||
<string>16.0.0</string>
|
||||
<key>BundlePath</key>
|
||||
@@ -468,33 +470,15 @@
|
||||
<key>Arch</key>
|
||||
<string>x86_64</string>
|
||||
<key>Comment</key>
|
||||
<string>Atheros Wifi Patch</string>
|
||||
<string>Monterey Atheros Wifi Patch</string>
|
||||
<key>Enabled</key>
|
||||
<false/>
|
||||
<key>MaxKernel</key>
|
||||
<string>20.99.99</string>
|
||||
<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/>
|
||||
<key>MaxKernel</key>
|
||||
<string>20.99.99</string>
|
||||
<key>MinKernel</key>
|
||||
<string>18.0.0</string>
|
||||
<key>BundlePath</key>
|
||||
<string>IO80211HighSierra.kext/Contents/PlugIns/AirPortAtheros40.kext</string>
|
||||
<string>IO80211ElCap.kext/Contents/PlugIns/AirPortAtheros40.kext</string>
|
||||
<key>ExecutablePath</key>
|
||||
<string>Contents/MacOS/AirPortAtheros40</string>
|
||||
<key>PlistPath</key>
|
||||
@@ -504,33 +488,15 @@
|
||||
<key>Arch</key>
|
||||
<string>x86_64</string>
|
||||
<key>Comment</key>
|
||||
<string>Broadcom Wifi Patch</string>
|
||||
<string>Monterey BCM94322 Wifi Patch</string>
|
||||
<key>Enabled</key>
|
||||
<false/>
|
||||
<key>MaxKernel</key>
|
||||
<string>20.99.99</string>
|
||||
<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>Arch</key>
|
||||
<string>x86_64</string>
|
||||
<key>Comment</key>
|
||||
<string>Broadcom Wifi Patch</string>
|
||||
<key>Enabled</key>
|
||||
<false/>
|
||||
<key>MaxKernel</key>
|
||||
<string>20.99.99</string>
|
||||
<key>MinKernel</key>
|
||||
<string>19.0.0</string>
|
||||
<key>BundlePath</key>
|
||||
<string>IO80211Mojave.kext/Contents/PlugIns/AirPortBrcm4331.kext</string>
|
||||
<string>IO80211ElCap.kext/Contents/PlugIns/AirPortBrcm4331.kext</string>
|
||||
<key>ExecutablePath</key>
|
||||
<string>Contents/MacOS/AirPortBrcm4331</string>
|
||||
<key>PlistPath</key>
|
||||
@@ -590,42 +556,6 @@
|
||||
<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>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>
|
||||
@@ -636,7 +566,7 @@
|
||||
<key>MaxKernel</key>
|
||||
<string></string>
|
||||
<key>MinKernel</key>
|
||||
<string></string>
|
||||
<string>15.0.0</string>
|
||||
<key>BundlePath</key>
|
||||
<string>CPUFriend.kext</string>
|
||||
<key>ExecutablePath</key>
|
||||
@@ -654,7 +584,7 @@
|
||||
<key>MaxKernel</key>
|
||||
<string></string>
|
||||
<key>MinKernel</key>
|
||||
<string></string>
|
||||
<string>15.0.0</string>
|
||||
<key>BundlePath</key>
|
||||
<string>CPUFriendDataProvider.kext</string>
|
||||
<key>ExecutablePath</key>
|
||||
@@ -680,6 +610,24 @@
|
||||
<key>PlistPath</key>
|
||||
<string>Contents/Info.plist</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Arch</key>
|
||||
<string>x86_64</string>
|
||||
<key>Comment</key>
|
||||
<string>Bluetooth Patch for BRCM2046 and BRCM2070</string>
|
||||
<key>Enabled</key>
|
||||
<false/>
|
||||
<key>MaxKernel</key>
|
||||
<string></string>
|
||||
<key>MinKernel</key>
|
||||
<string>21.0.0</string>
|
||||
<key>BundlePath</key>
|
||||
<string>Bluetooth-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>
|
||||
@@ -762,7 +710,7 @@
|
||||
<key>MaxKernel</key>
|
||||
<string></string>
|
||||
<key>MinKernel</key>
|
||||
<string></string>
|
||||
<string>12.0.0</string>
|
||||
<key>BundlePath</key>
|
||||
<string>CpuTscSync.kext</string>
|
||||
<key>ExecutablePath</key>
|
||||
@@ -780,7 +728,7 @@
|
||||
<key>MaxKernel</key>
|
||||
<string></string>
|
||||
<key>MinKernel</key>
|
||||
<string></string>
|
||||
<string>14.0.0</string>
|
||||
<key>BundlePath</key>
|
||||
<string>HibernationFixup.kext</string>
|
||||
<key>ExecutablePath</key>
|
||||
@@ -798,7 +746,7 @@
|
||||
<key>MaxKernel</key>
|
||||
<string></string>
|
||||
<key>MinKernel</key>
|
||||
<string></string>
|
||||
<string>18.0.0</string>
|
||||
<key>BundlePath</key>
|
||||
<string>NVMeFix.kext</string>
|
||||
<key>ExecutablePath</key>
|
||||
@@ -810,17 +758,17 @@
|
||||
<key>Arch</key>
|
||||
<string>x86_64</string>
|
||||
<key>Comment</key>
|
||||
<string>SidecarFixup</string>
|
||||
<string>FeatureUnlock</string>
|
||||
<key>Enabled</key>
|
||||
<false/>
|
||||
<key>MaxKernel</key>
|
||||
<string></string>
|
||||
<key>MinKernel</key>
|
||||
<string>19.0.0</string>
|
||||
<string>16.0.0</string>
|
||||
<key>BundlePath</key>
|
||||
<string>SidecarFixup.kext</string>
|
||||
<string>FeatureUnlock.kext</string>
|
||||
<key>ExecutablePath</key>
|
||||
<string>Contents/MacOS/SidecarFixup</string>
|
||||
<string>Contents/MacOS/FeatureUnlock</string>
|
||||
<key>PlistPath</key>
|
||||
<string>Contents/Info.plist</string>
|
||||
</dict>
|
||||
@@ -938,7 +886,7 @@
|
||||
<key>BundlePath</key>
|
||||
<string>DebugEnhancer.kext</string>
|
||||
<key>Comment</key>
|
||||
<string></string>
|
||||
<string>Enhance DEBUG output in system logs</string>
|
||||
<key>Enabled</key>
|
||||
<false/>
|
||||
<key>ExecutablePath</key>
|
||||
@@ -946,7 +894,79 @@
|
||||
<key>MaxKernel</key>
|
||||
<string></string>
|
||||
<key>MinKernel</key>
|
||||
<string>12.0.0</string>
|
||||
<key>PlistPath</key>
|
||||
<string>Contents/Info.plist</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Arch</key>
|
||||
<string>x86_64</string>
|
||||
<key>BundlePath</key>
|
||||
<string>latebloom.kext</string>
|
||||
<key>Comment</key>
|
||||
<string>Work-around PCI race condition</string>
|
||||
<key>Enabled</key>
|
||||
<false/>
|
||||
<key>ExecutablePath</key>
|
||||
<string>Contents/MacOS/latebloom</string>
|
||||
<key>MaxKernel</key>
|
||||
<string></string>
|
||||
<key>MinKernel</key>
|
||||
<string>20.4.0</string>
|
||||
<key>PlistPath</key>
|
||||
<string>Contents/Info.plist</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Arch</key>
|
||||
<string>x86_64</string>
|
||||
<key>BundlePath</key>
|
||||
<string>AppleUSBTrackpad.kext</string>
|
||||
<key>Comment</key>
|
||||
<string>Fix legacy MacBook Trackpad</string>
|
||||
<key>Enabled</key>
|
||||
<false/>
|
||||
<key>ExecutablePath</key>
|
||||
<string>Contents/MacOS/AppleUSBTrackpad</string>
|
||||
<key>MaxKernel</key>
|
||||
<string></string>
|
||||
<key>MinKernel</key>
|
||||
<string>16.0.0</string>
|
||||
<key>PlistPath</key>
|
||||
<string>Contents/Info.plist</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Arch</key>
|
||||
<string>x86_64</string>
|
||||
<key>BundlePath</key>
|
||||
<string>BlueToolFixup.kext</string>
|
||||
<key>Comment</key>
|
||||
<string>Fix Monterey Bluetooth</string>
|
||||
<key>Enabled</key>
|
||||
<false/>
|
||||
<key>ExecutablePath</key>
|
||||
<string>Contents/MacOS/BlueToolFixup</string>
|
||||
<key>MaxKernel</key>
|
||||
<string></string>
|
||||
<key>MinKernel</key>
|
||||
<string>21.0.0</string>
|
||||
<key>PlistPath</key>
|
||||
<string>Contents/Info.plist</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Arch</key>
|
||||
<string>x86_64</string>
|
||||
<key>BundlePath</key>
|
||||
<string>CSLVFixup.kext</string>
|
||||
<key>Comment</key>
|
||||
<string>Fix Music.app</string>
|
||||
<key>Enabled</key>
|
||||
<false/>
|
||||
<key>ExecutablePath</key>
|
||||
<string>Contents/MacOS/CSLVFixup</string>
|
||||
<key>MaxKernel</key>
|
||||
<string>20.99.99</string>
|
||||
<key>MinKernel</key>
|
||||
<string>20.0.0</string>
|
||||
<key>PlistPath</key>
|
||||
<string>Contents/Info.plist</string>
|
||||
</dict>
|
||||
@@ -1030,6 +1050,66 @@
|
||||
<key>Skip</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Arch</key>
|
||||
<string>x86_64</string>
|
||||
<key>Base</key>
|
||||
<string>_apfs_filevault_allowed</string>
|
||||
<key>Comment</key>
|
||||
<string>Force FileVault on Broken Seal</string>
|
||||
<key>Count</key>
|
||||
<integer>0</integer>
|
||||
<key>Enabled</key>
|
||||
<false/>
|
||||
<key>Find</key>
|
||||
<data></data>
|
||||
<key>Identifier</key>
|
||||
<string>com.apple.filesystems.apfs</string>
|
||||
<key>Limit</key>
|
||||
<integer>0</integer>
|
||||
<key>Mask</key>
|
||||
<data></data>
|
||||
<key>MaxKernel</key>
|
||||
<string></string>
|
||||
<key>MinKernel</key>
|
||||
<string>20.4.0</string>
|
||||
<key>Replace</key>
|
||||
<data>uAEAAADD</data>
|
||||
<key>ReplaceMask</key>
|
||||
<data></data>
|
||||
<key>Skip</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Arch</key>
|
||||
<string>x86_64</string>
|
||||
<key>Base</key>
|
||||
<string>_cs_require_lv</string>
|
||||
<key>Comment</key>
|
||||
<string>Disable Library Validation Enforcement</string>
|
||||
<key>Count</key>
|
||||
<integer>0</integer>
|
||||
<key>Enabled</key>
|
||||
<false/>
|
||||
<key>Find</key>
|
||||
<data></data>
|
||||
<key>Identifier</key>
|
||||
<string>kernel</string>
|
||||
<key>Limit</key>
|
||||
<integer>0</integer>
|
||||
<key>Mask</key>
|
||||
<data></data>
|
||||
<key>MaxKernel</key>
|
||||
<string></string>
|
||||
<key>MinKernel</key>
|
||||
<string>20.0.0</string>
|
||||
<key>Replace</key>
|
||||
<data>uAAAAADD</data>
|
||||
<key>ReplaceMask</key>
|
||||
<data></data>
|
||||
<key>Skip</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
</array>
|
||||
<key>Quirks</key>
|
||||
<dict>
|
||||
@@ -1076,10 +1156,12 @@
|
||||
</dict>
|
||||
<key>Scheme</key>
|
||||
<dict>
|
||||
<key>CustomKernel</key>
|
||||
<false/>
|
||||
<key>FuzzyMatch</key>
|
||||
<true/>
|
||||
<key>KernelArch</key>
|
||||
<string>x86_64</string>
|
||||
<string>Auto</string>
|
||||
<key>KernelCache</key>
|
||||
<string>Auto</string>
|
||||
</dict>
|
||||
@@ -1228,11 +1310,13 @@
|
||||
<dict>
|
||||
<key>OCLP-Version</key>
|
||||
<string></string>
|
||||
<key>OCLP-Settings</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
<key>7C436110-AB2A-4BBB-A880-FE41995C9F82</key>
|
||||
<dict>
|
||||
<key>boot-args</key>
|
||||
<string>keepsyms=1 debug=0x100 -lilubetaall</string>
|
||||
<string>keepsyms=1 debug=0x100</string>
|
||||
<key>csr-active-config</key>
|
||||
<data>AAAAAA==</data>
|
||||
</dict>
|
||||
@@ -1248,6 +1332,7 @@
|
||||
<key>4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102</key>
|
||||
<array>
|
||||
<string>OCLP-Version</string>
|
||||
<string>OCLP-Settings</string>
|
||||
<string>revcpu</string>
|
||||
<string>revcpuname</string>
|
||||
</array>
|
||||
@@ -1307,7 +1392,7 @@
|
||||
<key>Generic</key>
|
||||
<dict>
|
||||
<key>AdviseFeatures</key>
|
||||
<false/>
|
||||
<true/>
|
||||
<key>SystemMemoryStatus</key>
|
||||
<string>Auto</string>
|
||||
<key>MaxBIOSVersion</key>
|
||||
@@ -1327,242 +1412,6 @@
|
||||
<key>SystemUUID</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
<key>Memory</key>
|
||||
<dict>
|
||||
<key>DataWidth</key>
|
||||
<integer>64</integer>
|
||||
<key>ErrorCorrection</key>
|
||||
<integer>3</integer>
|
||||
<key>FormFactor</key>
|
||||
<integer>9</integer>
|
||||
<key>MaxCapacity</key>
|
||||
<integer>137438953472</integer>
|
||||
<key>TotalWidth</key>
|
||||
<integer>64</integer>
|
||||
<key>Type</key>
|
||||
<integer>26</integer>
|
||||
<key>TypeDetail</key>
|
||||
<integer>128</integer>
|
||||
<key>Devices</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>AssetTag</key>
|
||||
<string></string>
|
||||
<key>BankLocator</key>
|
||||
<string></string>
|
||||
<key>DeviceLocator</key>
|
||||
<string>Slot 1</string>
|
||||
<key>Manufacturer</key>
|
||||
<string>Acidanthera\GoldenGate</string>
|
||||
<key>PartNumber</key>
|
||||
<string>M00001-4GB</string>
|
||||
<key>SerialNumber</key>
|
||||
<string>AAA000000001</string>
|
||||
<key>Size</key>
|
||||
<integer>131072</integer>
|
||||
<key>Speed</key>
|
||||
<integer>5733</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>AssetTag</key>
|
||||
<string></string>
|
||||
<key>BankLocator</key>
|
||||
<string></string>
|
||||
<key>DeviceLocator</key>
|
||||
<string>Slot 2</string>
|
||||
<key>Manufacturer</key>
|
||||
<string>Acidanthera</string>
|
||||
<key>PartNumber</key>
|
||||
<string>M00001-4GB</string>
|
||||
<key>SerialNumber</key>
|
||||
<string>AAA00000000X</string>
|
||||
<key>Size</key>
|
||||
<integer>131072</integer>
|
||||
<key>Speed</key>
|
||||
<integer>5733</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>AssetTag</key>
|
||||
<string></string>
|
||||
<key>BankLocator</key>
|
||||
<string></string>
|
||||
<key>DeviceLocator</key>
|
||||
<string>Slot 3</string>
|
||||
<key>Manufacturer</key>
|
||||
<string>Acidanthera</string>
|
||||
<key>PartNumber</key>
|
||||
<string>M00001-4GB</string>
|
||||
<key>SerialNumber</key>
|
||||
<string>AAA000000002</string>
|
||||
<key>Size</key>
|
||||
<integer>131072</integer>
|
||||
<key>Speed</key>
|
||||
<integer>5733</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>AssetTag</key>
|
||||
<string></string>
|
||||
<key>BankLocator</key>
|
||||
<string></string>
|
||||
<key>DeviceLocator</key>
|
||||
<string>Slot 4</string>
|
||||
<key>Manufacturer</key>
|
||||
<string>Acidanthera</string>
|
||||
<key>PartNumber</key>
|
||||
<string>M00001-4GB</string>
|
||||
<key>SerialNumber</key>
|
||||
<string>AAA00000000X</string>
|
||||
<key>Size</key>
|
||||
<integer>131072</integer>
|
||||
<key>Speed</key>
|
||||
<integer>5733</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>AssetTag</key>
|
||||
<string></string>
|
||||
<key>BankLocator</key>
|
||||
<string></string>
|
||||
<key>DeviceLocator</key>
|
||||
<string>Slot 5</string>
|
||||
<key>Manufacturer</key>
|
||||
<string>Acidanthera</string>
|
||||
<key>PartNumber</key>
|
||||
<string>M00001-4GB</string>
|
||||
<key>SerialNumber</key>
|
||||
<string>AAA000000002</string>
|
||||
<key>Size</key>
|
||||
<integer>131072</integer>
|
||||
<key>Speed</key>
|
||||
<integer>5733</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>AssetTag</key>
|
||||
<string></string>
|
||||
<key>BankLocator</key>
|
||||
<string></string>
|
||||
<key>DeviceLocator</key>
|
||||
<string>Slot 6</string>
|
||||
<key>Manufacturer</key>
|
||||
<string>Acidanthera</string>
|
||||
<key>PartNumber</key>
|
||||
<string>M00001-4GB</string>
|
||||
<key>SerialNumber</key>
|
||||
<string>AAA00000000X</string>
|
||||
<key>Size</key>
|
||||
<integer>131072</integer>
|
||||
<key>Speed</key>
|
||||
<integer>5733</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>AssetTag</key>
|
||||
<string></string>
|
||||
<key>BankLocator</key>
|
||||
<string></string>
|
||||
<key>DeviceLocator</key>
|
||||
<string>Slot 7</string>
|
||||
<key>Manufacturer</key>
|
||||
<string>Acidanthera</string>
|
||||
<key>PartNumber</key>
|
||||
<string>M00001-4GB</string>
|
||||
<key>SerialNumber</key>
|
||||
<string>AAA000000001</string>
|
||||
<key>Size</key>
|
||||
<integer>131072</integer>
|
||||
<key>Speed</key>
|
||||
<integer>5733</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>AssetTag</key>
|
||||
<string></string>
|
||||
<key>BankLocator</key>
|
||||
<string></string>
|
||||
<key>DeviceLocator</key>
|
||||
<string>Slot 8</string>
|
||||
<key>Manufacturer</key>
|
||||
<string>Acidanthera</string>
|
||||
<key>PartNumber</key>
|
||||
<string>M00001-4GB</string>
|
||||
<key>SerialNumber</key>
|
||||
<string>AAA00000000X</string>
|
||||
<key>Size</key>
|
||||
<integer>131072</integer>
|
||||
<key>Speed</key>
|
||||
<integer>5733</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>AssetTag</key>
|
||||
<string></string>
|
||||
<key>BankLocator</key>
|
||||
<string></string>
|
||||
<key>DeviceLocator</key>
|
||||
<string>Slot 9</string>
|
||||
<key>Manufacturer</key>
|
||||
<string>Acidanthera</string>
|
||||
<key>PartNumber</key>
|
||||
<string>M00001-4GB</string>
|
||||
<key>SerialNumber</key>
|
||||
<string>AAA00000000X</string>
|
||||
<key>Size</key>
|
||||
<integer>131072</integer>
|
||||
<key>Speed</key>
|
||||
<integer>5733</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>AssetTag</key>
|
||||
<string></string>
|
||||
<key>BankLocator</key>
|
||||
<string></string>
|
||||
<key>DeviceLocator</key>
|
||||
<string>Slot 10</string>
|
||||
<key>Manufacturer</key>
|
||||
<string>Acidanthera</string>
|
||||
<key>PartNumber</key>
|
||||
<string>M00001-4GB</string>
|
||||
<key>SerialNumber</key>
|
||||
<string>AAA00000000X</string>
|
||||
<key>Size</key>
|
||||
<integer>131072</integer>
|
||||
<key>Speed</key>
|
||||
<integer>5733</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>AssetTag</key>
|
||||
<string></string>
|
||||
<key>BankLocator</key>
|
||||
<string></string>
|
||||
<key>DeviceLocator</key>
|
||||
<string>Slot 11</string>
|
||||
<key>Manufacturer</key>
|
||||
<string>Acidanthera</string>
|
||||
<key>PartNumber</key>
|
||||
<string>M00001-4GB</string>
|
||||
<key>SerialNumber</key>
|
||||
<string>AAA00000000X</string>
|
||||
<key>Size</key>
|
||||
<integer>131072</integer>
|
||||
<key>Speed</key>
|
||||
<integer>5733</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>AssetTag</key>
|
||||
<string></string>
|
||||
<key>BankLocator</key>
|
||||
<string></string>
|
||||
<key>DeviceLocator</key>
|
||||
<string>Slot 12</string>
|
||||
<key>Manufacturer</key>
|
||||
<string>Acidanthera</string>
|
||||
<key>PartNumber</key>
|
||||
<string>M00001-4GB</string>
|
||||
<key>SerialNumber</key>
|
||||
<string>AAA00000000X</string>
|
||||
<key>Size</key>
|
||||
<integer>131072</integer>
|
||||
<key>Speed</key>
|
||||
<integer>5733</integer>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<key>PlatformNVRAM</key>
|
||||
<dict>
|
||||
<key>BID</key>
|
||||
@@ -1661,9 +1510,9 @@
|
||||
<key>JumpstartHotPlug</key>
|
||||
<false/>
|
||||
<key>MinDate</key>
|
||||
<integer>0</integer>
|
||||
<integer>20180621</integer>
|
||||
<key>MinVersion</key>
|
||||
<integer>0</integer>
|
||||
<integer>748077008000000</integer>
|
||||
</dict>
|
||||
<key>AppleInput</key>
|
||||
<dict>
|
||||
@@ -1675,6 +1524,8 @@
|
||||
<integer>0</integer>
|
||||
<key>KeySubsequentDelay</key>
|
||||
<integer>5</integer>
|
||||
<key>GraphicsInputMirroring</key>
|
||||
<false/>
|
||||
<key>PointerSpeedDiv</key>
|
||||
<integer>1</integer>
|
||||
<key>PointerSpeedMul</key>
|
||||
@@ -1704,7 +1555,56 @@
|
||||
<key>ConnectDrivers</key>
|
||||
<true/>
|
||||
<key>Drivers</key>
|
||||
<array/>
|
||||
<array>
|
||||
<dict>
|
||||
<key>Path</key>
|
||||
<string>OpenRuntime.efi</string>
|
||||
<key>Enabled</key>
|
||||
<false/>
|
||||
<key>Arguments</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Path</key>
|
||||
<string>OpenCanopy.efi</string>
|
||||
<key>Enabled</key>
|
||||
<false/>
|
||||
<key>Arguments</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Path</key>
|
||||
<string>NvmExpressDxe.efi</string>
|
||||
<key>Enabled</key>
|
||||
<false/>
|
||||
<key>Arguments</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Path</key>
|
||||
<string>ExFatDxeLegacy.efi</string>
|
||||
<key>Enabled</key>
|
||||
<false/>
|
||||
<key>Arguments</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Path</key>
|
||||
<string>XhciDxe.efi</string>
|
||||
<key>Enabled</key>
|
||||
<false/>
|
||||
<key>Arguments</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Path</key>
|
||||
<string>OpenLinuxBoot.efi</string>
|
||||
<key>Enabled</key>
|
||||
<false/>
|
||||
<key>Arguments</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>Input</key>
|
||||
<dict>
|
||||
<key>KeyFiltering</key>
|
||||
@@ -1802,6 +1702,8 @@
|
||||
<false/>
|
||||
<key>ExitBootServicesDelay</key>
|
||||
<integer>0</integer>
|
||||
<key>ForceOcWriteFlash</key>
|
||||
<false/>
|
||||
<key>ForgeUefiSupport</key>
|
||||
<false/>
|
||||
<key>IgnoreInvalidFlexRatio</key>
|
||||
|
||||
Binary file not shown.
BIN
payloads/Kexts/Acidanthera/AppleALC-v1.6.3.zip
Normal file
BIN
payloads/Kexts/Acidanthera/AppleALC-v1.6.3.zip
Normal file
Binary file not shown.
BIN
payloads/Kexts/Acidanthera/BlueToolFixup-v2.6.0.zip
Normal file
BIN
payloads/Kexts/Acidanthera/BlueToolFixup-v2.6.0.zip
Normal file
Binary file not shown.
BIN
payloads/Kexts/Acidanthera/BlueToolFixup-v2.6.1.zip
Normal file
BIN
payloads/Kexts/Acidanthera/BlueToolFixup-v2.6.1.zip
Normal file
Binary file not shown.
15
payloads/Kexts/Acidanthera/BlueToolFixup.patch
Normal file
15
payloads/Kexts/Acidanthera/BlueToolFixup.patch
Normal file
@@ -0,0 +1,15 @@
|
||||
diff --git a/BrcmPatchRAM/BlueToolFixup.cpp b/BrcmPatchRAM/BlueToolFixup.cpp
|
||||
index 0fa891a..b64b780 100644
|
||||
--- a/BrcmPatchRAM/BlueToolFixup.cpp
|
||||
+++ b/BrcmPatchRAM/BlueToolFixup.cpp
|
||||
@@ -37,8 +37,10 @@ bool BlueToolFixup::start(IOService *provider) {
|
||||
}
|
||||
setProperty("VersionInfo", kextVersion);
|
||||
setName("bluetooth");
|
||||
+ /*
|
||||
uint8_t bytes[] {0x00, 0x00, 0x00, 0x00};
|
||||
setProperty("transport-encoding", bytes, sizeof(bytes));
|
||||
+ */
|
||||
registerService();
|
||||
|
||||
return true;
|
||||
BIN
payloads/Kexts/Acidanthera/CSLVFixup-v2.6.1.zip
Normal file
BIN
payloads/Kexts/Acidanthera/CSLVFixup-v2.6.1.zip
Normal file
Binary file not shown.
Binary file not shown.
BIN
payloads/Kexts/Acidanthera/DebugEnhancer-v1.0.4.zip
Normal file
BIN
payloads/Kexts/Acidanthera/DebugEnhancer-v1.0.4.zip
Normal file
Binary file not shown.
BIN
payloads/Kexts/Acidanthera/FeatureUnlock-v1.0.3.zip
Normal file
BIN
payloads/Kexts/Acidanthera/FeatureUnlock-v1.0.3.zip
Normal file
Binary file not shown.
Binary file not shown.
BIN
payloads/Kexts/Acidanthera/Lilu-v1.5.6.zip
Normal file
BIN
payloads/Kexts/Acidanthera/Lilu-v1.5.6.zip
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
payloads/Kexts/Acidanthera/WhateverGreen-v1.5.3.zip
Normal file
BIN
payloads/Kexts/Acidanthera/WhateverGreen-v1.5.3.zip
Normal 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.
Binary file not shown.
BIN
payloads/Kexts/Misc/AppleUSBTrackpad-v1.0.1.zip
Normal file
BIN
payloads/Kexts/Misc/AppleUSBTrackpad-v1.0.1.zip
Normal file
Binary file not shown.
BIN
payloads/Kexts/Misc/Bluetooth-Spoof-v1.0.0.zip
Normal file
BIN
payloads/Kexts/Misc/Bluetooth-Spoof-v1.0.0.zip
Normal file
Binary file not shown.
Binary file not shown.
BIN
payloads/Kexts/Misc/latebloom-v0.22.zip
Normal file
BIN
payloads/Kexts/Misc/latebloom-v0.22.zip
Normal file
Binary file not shown.
@@ -764,7 +764,7 @@
|
||||
<key>model</key>
|
||||
<string>XXerve3,1</string>
|
||||
</dict>
|
||||
<key>#iMac7,1</key>
|
||||
<key>iMac7,1</key>
|
||||
<dict>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.apple.driver.AppleUSBHostMergeProperties</string>
|
||||
@@ -3527,14 +3527,14 @@
|
||||
<key>Tunnel Endpoint Device Vendor ID</key>
|
||||
<data>AQAAAA==</data>
|
||||
</dict>
|
||||
<key>#iMac7,1-EHC1</key>
|
||||
<key>iMac7,1-EHC1</key>
|
||||
<dict>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.apple.driver.AppleUSBHostMergeProperties</string>
|
||||
<key>IOClass</key>
|
||||
<string>AppleUSBHostMergeProperties</string>
|
||||
<key>IONameMatch</key>
|
||||
<string>EH01</string>
|
||||
<string>EHC1</string>
|
||||
<key>IOProviderClass</key>
|
||||
<string>AppleUSBEHCIPCI</string>
|
||||
<key>IOProviderMergeProperties</key>
|
||||
@@ -3590,14 +3590,14 @@
|
||||
<key>model</key>
|
||||
<string>iXac7,1</string>
|
||||
</dict>
|
||||
<key>#iMac7,1-EHC2</key>
|
||||
<key>iMac7,1-EHC2</key>
|
||||
<dict>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.apple.driver.AppleUSBHostMergeProperties</string>
|
||||
<key>IOClass</key>
|
||||
<string>AppleUSBHostMergeProperties</string>
|
||||
<key>IONameMatch</key>
|
||||
<string>EH02</string>
|
||||
<string>EHC2</string>
|
||||
<key>IOProviderClass</key>
|
||||
<string>AppleUSBEHCIPCI</string>
|
||||
<key>IOProviderMergeProperties</key>
|
||||
@@ -5461,7 +5461,7 @@
|
||||
<key>model</key>
|
||||
<string>Xacmini4,1</string>
|
||||
</dict>
|
||||
<key>#iMac7,1-OHC1</key>
|
||||
<key>iMac7,1-OHC1</key>
|
||||
<dict>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.apple.driver.AppleUSBHostMergeProperties</string>
|
||||
@@ -5501,9 +5501,9 @@
|
||||
</dict>
|
||||
</dict>
|
||||
<key>model</key>
|
||||
<string>iXac9,1</string>
|
||||
<string>iXac7,1</string>
|
||||
</dict>
|
||||
<key>#iMac7,1-OHC2</key>
|
||||
<key>iMac7,1-OHC2</key>
|
||||
<dict>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.apple.driver.AppleUSBHostMergeProperties</string>
|
||||
@@ -5543,7 +5543,7 @@
|
||||
</dict>
|
||||
</dict>
|
||||
<key>model</key>
|
||||
<string>iXac9,1</string>
|
||||
<string>iXac7,1</string>
|
||||
</dict>
|
||||
<key>iMac8,1-OHC1</key>
|
||||
<dict>
|
||||
|
||||
Binary file not shown.
BIN
payloads/Kexts/Wifi/IO80211ElCap-v2.0.0.zip
Normal file
BIN
payloads/Kexts/Wifi/IO80211ElCap-v2.0.0.zip
Normal 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.
@@ -5,12 +5,10 @@
|
||||
# - Place the X64 folder in the /payloads/OpenCore folder
|
||||
# - Rename to OpenCore-VERSION (ie. DEBUG or RELEASE)
|
||||
# - Run script
|
||||
# - Rename folders to appropriate versions (ie. OpenCore-v0.6.8)
|
||||
# - Rename folders to appropriate versions (ie. OpenCore-Build)
|
||||
# - Zip folders
|
||||
# TODO:
|
||||
# - Import OC version from Constants.py
|
||||
# - Download latest builds from dortania.github.io
|
||||
# - Automatically rename and zip folders
|
||||
from __future__ import print_function
|
||||
|
||||
import subprocess
|
||||
@@ -46,6 +44,7 @@ bad_tools = [
|
||||
"ResetSystem.efi",
|
||||
"RtcRw.efi",
|
||||
"CsrUtil.efi",
|
||||
"TpmInfo.efi",
|
||||
]
|
||||
|
||||
for version in build_types:
|
||||
@@ -67,9 +66,8 @@ for version in build_types:
|
||||
subprocess.run(f"rm ./OpenCore-{version}/EFI/OC/Tools/{delete_tools}".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
else:
|
||||
print(f"- Unable to find {delete_tools}, skipping")
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
print("- Renaming folder to OpenCore-Build and zipping")
|
||||
subprocess.run(f"mv ./OpenCore-{version} ./OpenCore-Build".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
subprocess.run(f"zip -r ./OpenCore-{version}.zip ./OpenCore-Build".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
subprocess.run(f"rm -rf ./OpenCore-Build".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
|
||||
BIN
payloads/Tools/ocvalidate
Executable file
BIN
payloads/Tools/ocvalidate
Executable file
Binary file not shown.
@@ -1 +1,2 @@
|
||||
requests
|
||||
pyobjc
|
||||
Reference in New Issue
Block a user