mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-20 18:54:30 +10:00
Compare commits
174 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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 | ||
|
|
40aea143cf | ||
|
|
e6fc4f4a6e | ||
|
|
b5ebc7ffd7 | ||
|
|
21482eda88 | ||
|
|
e91148e534 | ||
|
|
c2c2ffc00b | ||
|
|
100c54a82c | ||
|
|
2b81e38ea8 | ||
|
|
db2721354c | ||
|
|
f21856a65b | ||
|
|
c7cd22bf65 | ||
|
|
3d8c523b7a | ||
|
|
11df8195ce | ||
|
|
cdc80ef550 | ||
|
|
85559d4d9e | ||
|
|
88ecd19369 | ||
|
|
22822be944 | ||
|
|
55607c5437 | ||
|
|
0459c0a5dc | ||
|
|
2626f9733d | ||
|
|
128e68d735 | ||
|
|
abc1ca5ec9 | ||
|
|
ed6fee1f94 | ||
|
|
edad35e1f5 | ||
|
|
f8615a8852 | ||
|
|
dec0873a41 | ||
|
|
16e29d3a1e | ||
|
|
fa7e51252d | ||
|
|
84abbb7c11 | ||
|
|
292e09a0d7 | ||
|
|
c5fd4036a7 | ||
|
|
4843ed92c9 | ||
|
|
f75fac14e6 | ||
|
|
ac055a633c | ||
|
|
0dc40318d0 | ||
|
|
84d0272eda | ||
|
|
4b35681b5f | ||
|
|
bbb5c06ddc | ||
|
|
df0c196a94 | ||
|
|
12f9482d3d | ||
|
|
5f7b836330 | ||
|
|
94af2350f4 | ||
|
|
7b758fcf15 | ||
|
|
fecf9502d0 | ||
|
|
4747c2619f | ||
|
|
4b187a045a | ||
|
|
eb9a24eee7 |
2
.flake8
2
.flake8
@@ -1,4 +1,4 @@
|
|||||||
[flake8]
|
[flake8]
|
||||||
ignore = E501
|
extend-ignore = E501, E203
|
||||||
per-file-ignores =
|
per-file-ignores =
|
||||||
Resources/Constants.py:E704
|
Resources/Constants.py:E704
|
||||||
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:
|
||||||
|
- 0.2.3 (Latest Build)
|
||||||
|
- 0.2.2 (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
|
||||||
25
.github/workflows/build-app.yml
vendored
25
.github/workflows/build-app.yml
vendored
@@ -1,4 +1,4 @@
|
|||||||
name: CI - Build App
|
name: CI - Build TUI
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@@ -8,33 +8,30 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: Build App
|
name: Build TUI
|
||||||
runs-on: self-hosted
|
runs-on: x86_64
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
# - name: Install Python Dependencies
|
- name: Install Python Dependencies
|
||||||
# run: |
|
run: pip3 install --upgrade pyinstaller requests pyobjc
|
||||||
# python3 -m pip install -U pip
|
|
||||||
# pip3 install pyinstaller
|
|
||||||
|
|
||||||
- run: pyinstaller OpenCore-Patcher.spec
|
- run: pyinstaller OpenCore-Patcher.spec
|
||||||
- run: ./after_pyinstaller.sh
|
- 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: '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: cd dist; zip ../OpenCore-Patcher.zip OpenCore-Patcher; zip -r ../OpenCore-Patcher.app.zip OpenCore-Patcher.app
|
- run: ./../sign-tui.sh
|
||||||
- run: ./../sign-app.sh
|
|
||||||
- name: Upload App to Artifacts
|
- name: Upload App to Artifacts
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: OpenCore-Patcher.app
|
name: OpenCore-Patcher-TUI.app
|
||||||
path: OpenCore-Patcher.app.zip
|
path: OpenCore-Patcher-TUI.app.zip
|
||||||
|
|
||||||
- name: Upload to Release
|
- name: Upload to Release
|
||||||
if: github.event_name == 'release'
|
if: github.event_name == 'release'
|
||||||
uses: svenstaro/upload-release-action@e74ff71f7d8a4c4745b560a485cc5fdb9b5b999d
|
uses: svenstaro/upload-release-action@e74ff71f7d8a4c4745b560a485cc5fdb9b5b999d
|
||||||
with:
|
with:
|
||||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
file: OpenCore-Patcher.app.zip
|
file: OpenCore-Patcher-TUI.app.zip
|
||||||
tag: ${{ github.ref }}
|
tag: ${{ github.ref }}
|
||||||
file_glob: true
|
file_glob: true
|
||||||
|
|||||||
29
.github/workflows/build-cli.yml
vendored
29
.github/workflows/build-cli.yml
vendored
@@ -1,29 +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
|
|
||||||
- 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
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Install Python Dependencies
|
||||||
|
run: pip3 install --upgrade pyinstaller requests pyobjc
|
||||||
|
|
||||||
|
- run: 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
|
||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,6 +1,7 @@
|
|||||||
.DS_Store
|
.DS_Store
|
||||||
OCLP-GUI.command
|
OCLP-GUI.command
|
||||||
/payloads/Apple
|
/payloads/Apple
|
||||||
|
/payloads/Apple.zip
|
||||||
/payloads/__MACOSX
|
/payloads/__MACOSX
|
||||||
/App
|
/App
|
||||||
/Build-Folder
|
/Build-Folder
|
||||||
|
|||||||
93
CHANGELOG.md
93
CHANGELOG.md
@@ -1,14 +1,77 @@
|
|||||||
# OpenCore Legacy Patcher changelog
|
# OpenCore Legacy Patcher changelog
|
||||||
|
|
||||||
|
## 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
|
||||||
|
- Deprecates Apple-Binaries-OCLP
|
||||||
|
- Fix full screen and Airplay to Mac support for Intel HD4000 iGPUs in Monterey
|
||||||
|
- Automatically set `CMIO_Unit_Input_ASC.DoNotUseOpenCL` on TeraScale 2 GPUs
|
||||||
|
- Fix Country Code detection on Wireless Cards
|
||||||
|
- Add Windows detection and prompt during installation
|
||||||
|
- Fix Google Fonts rendering for Intel HD4000 iGPUs in Monterey
|
||||||
|
- Increment Binaries
|
||||||
|
- 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)
|
||||||
|
- Allow AirPlay to Mac support on Skylake - Coffeelake Macs
|
||||||
|
|
||||||
## 0.1.9
|
## 0.1.9
|
||||||
|
|
||||||
- Fix incorrect AMFI and SIP detection
|
- Fix incorrect AMFI and SIP detection
|
||||||
|
|
||||||
## 0.1.8
|
## 0.1.8
|
||||||
|
|
||||||
- Fix Kernel Panic in Big Sur and Monterey
|
- Fix Kernel Panic in Big Sur and Monterey
|
||||||
- Increment binaries:
|
- Increment binaries:
|
||||||
- Lilu (1.5.4 rolling - 06-15-2021)
|
- Lilu (1.5.4 rolling - 06-15-2021)
|
||||||
|
|
||||||
## 0.1.7
|
## 0.1.7
|
||||||
|
|
||||||
- Add FireWire Boot Support for Catalina and newer
|
- Add FireWire Boot Support for Catalina and newer
|
||||||
- Add NVMe firmware support for older models (ie. MacPro3,1)
|
- Add NVMe firmware support for older models (ie. MacPro3,1)
|
||||||
- OpenCore must be stored on a bootable volume (ie. USB or SATA)
|
- OpenCore must be stored on a bootable volume (ie. USB or SATA)
|
||||||
@@ -49,6 +112,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
|
- 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
|
## 0.1.6
|
||||||
|
|
||||||
- Add XHCI UEFI Driver for 3rd Party USB 3.0 Controllers
|
- Add XHCI UEFI Driver for 3rd Party USB 3.0 Controllers
|
||||||
- Allows for Boot Support from OpenCore' Picker
|
- Allows for Boot Support from OpenCore' Picker
|
||||||
- Fix UEFI output on MacPro3,1 with PC GPUs
|
- Fix UEFI output on MacPro3,1 with PC GPUs
|
||||||
@@ -65,6 +129,7 @@
|
|||||||
- Fix GPU Switching on MacBookPro6,x
|
- Fix GPU Switching on MacBookPro6,x
|
||||||
|
|
||||||
## 0.1.5
|
## 0.1.5
|
||||||
|
|
||||||
- Fix crashing when Wireless module not present
|
- Fix crashing when Wireless module not present
|
||||||
- Add iMac10,1 default dGPU pathing
|
- Add iMac10,1 default dGPU pathing
|
||||||
- Add agdpmod=vit9696 to all Nvidia Metal iMacs
|
- Add agdpmod=vit9696 to all Nvidia Metal iMacs
|
||||||
@@ -80,9 +145,11 @@
|
|||||||
- Add SeedUtil option to Advanced Patcher Settings
|
- Add SeedUtil option to Advanced Patcher Settings
|
||||||
|
|
||||||
## 0.1.4
|
## 0.1.4
|
||||||
|
|
||||||
- Fix Device Path formatting on 2012+ iMacs
|
- Fix Device Path formatting on 2012+ iMacs
|
||||||
|
|
||||||
## 0.1.3
|
## 0.1.3
|
||||||
|
|
||||||
- Fix internal PCIe devices reporting as external
|
- Fix internal PCIe devices reporting as external
|
||||||
- Opt for `built-in` when device path is detectable
|
- Opt for `built-in` when device path is detectable
|
||||||
- Innie 0ccd95e (1.3.0 release - 01-16-2021)
|
- Innie 0ccd95e (1.3.0 release - 01-16-2021)
|
||||||
@@ -101,6 +168,7 @@
|
|||||||
- Fix NVMe properties not applying when OpenCore is installed
|
- Fix NVMe properties not applying when OpenCore is installed
|
||||||
|
|
||||||
## 0.1.2
|
## 0.1.2
|
||||||
|
|
||||||
- Fix IDE support on 2008 era MacBooks, iMacs and Xserves
|
- Fix IDE support on 2008 era MacBooks, iMacs and Xserves
|
||||||
- Fix reduced output speeds on BCM94360 series Wifi cards
|
- Fix reduced output speeds on BCM94360 series Wifi cards
|
||||||
- Fix accidentally disabling non-existent iGPU in iMac11,2
|
- Fix accidentally disabling non-existent iGPU in iMac11,2
|
||||||
@@ -126,6 +194,7 @@
|
|||||||
- SidecarFixup efdf11c (1.0.0 release - 05-02-2021)
|
- SidecarFixup efdf11c (1.0.0 release - 05-02-2021)
|
||||||
|
|
||||||
## 0.1.1
|
## 0.1.1
|
||||||
|
|
||||||
- Fix iMac11,3 GFX0 pathing
|
- Fix iMac11,3 GFX0 pathing
|
||||||
- Add MouSSE support to iMac10,1 with Metal AMD GPU
|
- Add MouSSE support to iMac10,1 with Metal AMD GPU
|
||||||
- Fix iMac11,1 and iMac11,3 Nvidia boot issues after PRAM reset
|
- Fix iMac11,1 and iMac11,3 Nvidia boot issues after PRAM reset
|
||||||
@@ -145,9 +214,11 @@
|
|||||||
- Fix Acceleration Linking for Intel Ironlake iGPUs
|
- Fix Acceleration Linking for Intel Ironlake iGPUs
|
||||||
|
|
||||||
## 0.1.0
|
## 0.1.0
|
||||||
|
|
||||||
- Fix crash on iMacs with Metal GPUs
|
- Fix crash on iMacs with Metal GPUs
|
||||||
|
|
||||||
## 0.0.23
|
## 0.0.23
|
||||||
|
|
||||||
- Fix MacBookPro4,1 15" and 17" audio support
|
- Fix MacBookPro4,1 15" and 17" audio support
|
||||||
- Fix iMac7,1 24" and iMac9,1 24" audio support
|
- Fix iMac7,1 24" and iMac9,1 24" audio support
|
||||||
- Fix Macmini4,1 audio support
|
- Fix Macmini4,1 audio support
|
||||||
@@ -168,6 +239,7 @@
|
|||||||
- Disable SIP and SecureBootModel by default on legacy GPUs
|
- Disable SIP and SecureBootModel by default on legacy GPUs
|
||||||
|
|
||||||
## 0.0.22
|
## 0.0.22
|
||||||
|
|
||||||
- Add ExFat support for models missing driver
|
- Add ExFat support for models missing driver
|
||||||
- Aids BootCamp support for EFI based installs on 2010 and older Macs
|
- Aids BootCamp support for EFI based installs on 2010 and older Macs
|
||||||
- Fix CPU Boosting on 2011 and older Macs
|
- Fix CPU Boosting on 2011 and older Macs
|
||||||
@@ -176,11 +248,13 @@
|
|||||||
- Add BCM94322 and BCM94321 chipset support
|
- Add BCM94322 and BCM94321 chipset support
|
||||||
|
|
||||||
## 0.0.21
|
## 0.0.21
|
||||||
|
|
||||||
- Fix botched images in OpenCanopy
|
- Fix botched images in OpenCanopy
|
||||||
- Add support for 3rd party OpenCore usage detection during building
|
- Add support for 3rd party OpenCore usage detection during building
|
||||||
- Mainly for users transitioning from Ausdauersportler's OpenCore configuration
|
- Mainly for users transitioning from Ausdauersportler's OpenCore configuration
|
||||||
|
|
||||||
## 0.0.20
|
## 0.0.20
|
||||||
|
|
||||||
- Fix CPU Calculation on early MCP79 chipsets (ie. iMac9,1, MacBook5,x)
|
- Fix CPU Calculation on early MCP79 chipsets (ie. iMac9,1, MacBook5,x)
|
||||||
- Increment binaries
|
- Increment binaries
|
||||||
- OpenCore c528597 (0.6.8 release - 2021-04-05)
|
- OpenCore c528597 (0.6.8 release - 2021-04-05)
|
||||||
@@ -196,6 +270,7 @@
|
|||||||
- Fix Mac Pro and Xserve output issues
|
- Fix Mac Pro and Xserve output issues
|
||||||
|
|
||||||
## 0.0.19
|
## 0.0.19
|
||||||
|
|
||||||
- Add SMC-Spoof.kext to avoid triggering `smcupdater`
|
- Add SMC-Spoof.kext to avoid triggering `smcupdater`
|
||||||
- Add Root Volume patching for older machines
|
- Add Root Volume patching for older machines
|
||||||
- AppleHDA Patch for 2011 and older (Excluding MacPro4,1+)
|
- AppleHDA Patch for 2011 and older (Excluding MacPro4,1+)
|
||||||
@@ -214,6 +289,7 @@
|
|||||||
- Fix Broadcom Ethernet on older 2009-2011 Macs
|
- Fix Broadcom Ethernet on older 2009-2011 Macs
|
||||||
|
|
||||||
## 0.0.18
|
## 0.0.18
|
||||||
|
|
||||||
- Disable Vault by default due to breaking installations
|
- Disable Vault by default due to breaking installations
|
||||||
- Move BOOTx64.efi to System/Library/CoreServices/ to support GPT BootCamp installs
|
- Move BOOTx64.efi to System/Library/CoreServices/ to support GPT BootCamp installs
|
||||||
- Disable verbose by default, still configurable by end-user
|
- Disable verbose by default, still configurable by end-user
|
||||||
@@ -224,9 +300,11 @@
|
|||||||
- Add custom drive icons for external drives
|
- Add custom drive icons for external drives
|
||||||
|
|
||||||
## 0.0.17
|
## 0.0.17
|
||||||
|
|
||||||
- Fix build detection breaking on older OS
|
- Fix build detection breaking on older OS
|
||||||
|
|
||||||
## 0.0.16
|
## 0.0.16
|
||||||
|
|
||||||
- Move Serial selection to Patcher Settings
|
- Move Serial selection to Patcher Settings
|
||||||
- Add new SMBIOS patching options:
|
- 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
|
||||||
@@ -245,12 +323,14 @@
|
|||||||
- Enable `amfi_get_out_of_my_way=1` when SIP is disabled
|
- Enable `amfi_get_out_of_my_way=1` when SIP is disabled
|
||||||
|
|
||||||
## 0.0.15
|
## 0.0.15
|
||||||
|
|
||||||
- Add user-configurable OpenCore DEBUG builds
|
- Add user-configurable OpenCore DEBUG builds
|
||||||
- Add user-configurable Wifi and GPU patches
|
- Add user-configurable Wifi and GPU patches
|
||||||
- Fix ThirdPartyDrives model detection
|
- Fix ThirdPartyDrives model detection
|
||||||
- Add HW_BID injection to fix boot.efi error
|
- Add HW_BID injection to fix boot.efi error
|
||||||
|
|
||||||
## 0.0.14
|
## 0.0.14
|
||||||
|
|
||||||
- Enable ThirdPartyDrives to aid with hibernation on 3rd party SATA drives
|
- Enable ThirdPartyDrives to aid with hibernation on 3rd party SATA drives
|
||||||
- Increment OpenCore 7bb41aa (0.6.8 rolling, 2021-03-06)
|
- Increment OpenCore 7bb41aa (0.6.8 rolling, 2021-03-06)
|
||||||
- Add ForceBooterSignature to resolve hibernation issues
|
- Add ForceBooterSignature to resolve hibernation issues
|
||||||
@@ -259,6 +339,7 @@
|
|||||||
- Add GopPassThrough quirk for UGA-based systems
|
- Add GopPassThrough quirk for UGA-based systems
|
||||||
|
|
||||||
## 0.0.13
|
## 0.0.13
|
||||||
|
|
||||||
- Add CPUFriend support to resolve X86PlatformPlugin clashes
|
- Add CPUFriend support to resolve X86PlatformPlugin clashes
|
||||||
- (1.2.3 c388a62 release)
|
- (1.2.3 c388a62 release)
|
||||||
- Fix crash with MacBookAir5,x
|
- Fix crash with MacBookAir5,x
|
||||||
@@ -266,11 +347,13 @@
|
|||||||
- Remove Wireless patches for BCM4328/4321(14e4:4328) due to boot issues
|
- Remove Wireless patches for BCM4328/4321(14e4:4328) due to boot issues
|
||||||
|
|
||||||
## 0.0.12
|
## 0.0.12
|
||||||
|
|
||||||
- Convert OpenCore-Patcher binary to OpenCore-Patcher.app
|
- Convert OpenCore-Patcher binary to OpenCore-Patcher.app
|
||||||
- Add Backlight patches for modded Nvidia GPUs in iMac10,x-12,x
|
- Add Backlight patches for modded Nvidia GPUs in iMac10,x-12,x
|
||||||
- Fix sleep for iMac12,x with upgraded GPUs
|
- Fix sleep for iMac12,x with upgraded GPUs
|
||||||
|
|
||||||
## 0.0.11
|
## 0.0.11
|
||||||
|
|
||||||
- Re-add OpenCore GUI
|
- Re-add OpenCore GUI
|
||||||
- Rewrite in py3
|
- Rewrite in py3
|
||||||
- Add OpenCore-Patcher binary for releases avoiding local python requirement
|
- Add OpenCore-Patcher binary for releases avoiding local python requirement
|
||||||
@@ -282,6 +365,7 @@
|
|||||||
- Add Wifi card upgrade detection
|
- Add Wifi card upgrade detection
|
||||||
|
|
||||||
## 0.0.10
|
## 0.0.10
|
||||||
|
|
||||||
- Increment binaries
|
- Increment binaries
|
||||||
- OpenCore 43f5339 (0.6.6 release)
|
- OpenCore 43f5339 (0.6.6 release)
|
||||||
- Lilu d107554 (1.5.1 release)
|
- Lilu d107554 (1.5.1 release)
|
||||||
@@ -291,38 +375,47 @@
|
|||||||
- Update MacBookPro SMBIOS
|
- Update MacBookPro SMBIOS
|
||||||
|
|
||||||
## 0.0.9
|
## 0.0.9
|
||||||
|
|
||||||
- Resolve firmware install issues bricking Macs
|
- Resolve firmware install issues bricking Macs
|
||||||
|
|
||||||
## 0.0.8
|
## 0.0.8
|
||||||
|
|
||||||
- Fix USB Map
|
- Fix USB Map
|
||||||
- Add HiDPI patch
|
- Add HiDPI patch
|
||||||
|
|
||||||
## 0.0.7
|
## 0.0.7
|
||||||
|
|
||||||
- Add MacPro3,1 to HID patch
|
- Add MacPro3,1 to HID patch
|
||||||
- Fix missing SSDT-CPBG patch
|
- Fix missing SSDT-CPBG patch
|
||||||
- Fix BlacklistAppleUpdate
|
- Fix BlacklistAppleUpdate
|
||||||
- Add RestrictEvents kext
|
- Add RestrictEvents kext
|
||||||
|
|
||||||
## 0.0.6
|
## 0.0.6
|
||||||
|
|
||||||
- Fix macserial crashing
|
- Fix macserial crashing
|
||||||
|
|
||||||
## 0.0.5
|
## 0.0.5
|
||||||
|
|
||||||
- Enable hibernation support
|
- Enable hibernation support
|
||||||
- Work around USB Map failing
|
- Work around USB Map failing
|
||||||
- Add checks whether booting with OpenCore
|
- Add checks whether booting with OpenCore
|
||||||
- Fix MouSSE injection
|
- Fix MouSSE injection
|
||||||
|
|
||||||
## 0.0.4
|
## 0.0.4
|
||||||
|
|
||||||
- Add basic audio support for legacy chipsets
|
- Add basic audio support for legacy chipsets
|
||||||
- Add patch for dual GPU machines
|
- Add patch for dual GPU machines
|
||||||
|
|
||||||
## 0.0.3
|
## 0.0.3
|
||||||
|
|
||||||
- Fix Wireless patch logic
|
- Fix Wireless patch logic
|
||||||
|
|
||||||
## 0.0.2
|
## 0.0.2
|
||||||
|
|
||||||
- Expand IOHIDFamily Patch to all Nvidia chipsets
|
- Expand IOHIDFamily Patch to all Nvidia chipsets
|
||||||
- Fix Airdrop 1.0 support
|
- Fix Airdrop 1.0 support
|
||||||
- Add El Capitan era wireless cards
|
- Add El Capitan era wireless cards
|
||||||
|
|
||||||
## 0.0.1
|
## 0.0.1
|
||||||
|
|
||||||
- Initial developer preview
|
- Initial developer preview
|
||||||
|
|||||||
240
OCLP-CLI.command
240
OCLP-CLI.command
@@ -9,79 +9,60 @@ import platform
|
|||||||
import argparse
|
import argparse
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
from Resources import Build, ModelArray, PCIIDArray, Constants, SysPatch, DeviceProbe
|
from Resources import Build, ModelArray, Constants, SysPatch, device_probe, Utilities, ModelExample
|
||||||
|
|
||||||
|
|
||||||
class OpenCoreLegacyPatcher():
|
class OpenCoreLegacyPatcher:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
print("Loading...")
|
||||||
|
Utilities.disable_cls()
|
||||||
self.constants = Constants.Constants()
|
self.constants = Constants.Constants()
|
||||||
self.current_model: str = None
|
self.constants.computer = device_probe.Computer.probe()
|
||||||
opencore_model: str = subprocess.run("nvram 4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102:oem-product".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.decode()
|
self.computer = self.constants.computer
|
||||||
if not opencore_model.startswith("nvram: Error getting variable"):
|
|
||||||
opencore_model = [line.strip().split(":oem-product ", 1)[1] for line in opencore_model.split("\n") if line.strip().startswith("4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102:")][0]
|
|
||||||
self.current_model = opencore_model
|
|
||||||
else:
|
|
||||||
self.current_model = subprocess.run("system_profiler SPHardwareDataType".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
|
||||||
self.current_model = [line.strip().split(": ", 1)[1] for line in self.current_model.stdout.decode().split("\n") if line.strip().startswith("Model Identifier")][0]
|
|
||||||
self.constants.detected_os = int(platform.uname().release.partition(".")[0])
|
self.constants.detected_os = int(platform.uname().release.partition(".")[0])
|
||||||
if self.current_model in ModelArray.NoAPFSsupport:
|
|
||||||
self.constants.serial_settings = "Moderate"
|
|
||||||
if self.current_model in ModelArray.LegacyGPU:
|
|
||||||
dgpu_vendor,dgpu_device,dgpu_acpi = DeviceProbe.pci_probe().gpu_probe("GFX0")
|
|
||||||
if dgpu_vendor:
|
|
||||||
if (dgpu_vendor == self.constants.pci_amd_ati and (dgpu_device in PCIIDArray.amd_ids().polaris_ids or dgpu_device in PCIIDArray.amd_ids().vega_ids or dgpu_device in PCIIDArray.amd_ids().navi_ids or dgpu_device in PCIIDArray.amd_ids().legacy_gcn_ids)) or (dgpu_vendor == self.constants.pci_nvidia and dgpu_device in PCIIDArray.nvidia_ids().kepler_ids):
|
|
||||||
self.constants.sip_status = True
|
|
||||||
self.constants.secure_status = True
|
|
||||||
else:
|
|
||||||
self.constants.sip_status = False
|
|
||||||
self.constants.secure_status = False
|
|
||||||
|
|
||||||
# Logic for when user runs custom OpenCore build and do not expose it
|
custom_cpu_model_value = Utilities.get_nvram("revcpuname", "4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102", decode=True)
|
||||||
# Note: This logic currently only applies for iMacPro1,1 users, see below threads on the culprits:
|
if custom_cpu_model_value is not None:
|
||||||
# - https://forums.macrumors.com/threads/2011-imac-graphics-card-upgrade.1596614/post-17425857
|
# TODO: Fix to not use two separate variables
|
||||||
# - https://forums.macrumors.com/threads/opencore-on-the-mac-pro.2207814/
|
|
||||||
# PLEASE FOR THE LOVE OF GOD JUST SET ExposeSensitiveData CORRECTLY!!!
|
|
||||||
if self.current_model == "iMacPro1,1":
|
|
||||||
serial: str = subprocess.run("system_profiler SPHardwareDataType | grep Serial".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.decode()
|
|
||||||
serial = [line.strip().split("Number (system): ", 1)[1] for line in serial.split("\n") if line.strip().startswith("Serial")][0]
|
|
||||||
true_model = subprocess.run([str(self.constants.macserial_path), "--info", str(serial)], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
|
||||||
true_model = [i.partition(" - ")[2] for i in true_model.stdout.decode().split("\n") if "Model: " in i][0]
|
|
||||||
print(f"True Model: {true_model}")
|
|
||||||
if not true_model.startswith("Unknown"):
|
|
||||||
self.current_model = true_model
|
|
||||||
|
|
||||||
custom_cpu_model_value: str = subprocess.run("nvram 4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102:revcpuname".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.decode()
|
|
||||||
|
|
||||||
if not custom_cpu_model_value.startswith("nvram: Error getting variable"):
|
|
||||||
custom_cpu_model_value = [line.strip().split(":revcpuname ", 1)[1] for line in custom_cpu_model_value.split("\n") if line.strip().startswith("4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102:")][0]
|
|
||||||
if custom_cpu_model_value.split("%00")[0] != "":
|
|
||||||
self.constants.custom_cpu_model = 1
|
self.constants.custom_cpu_model = 1
|
||||||
self.constants.custom_cpu_model_value = custom_cpu_model_value.split("%00")[0]
|
self.constants.custom_cpu_model_value = custom_cpu_model_value.split("%00")[0]
|
||||||
|
|
||||||
|
if "-v" in (Utilities.get_nvram("boot-args") or ""):
|
||||||
|
self.constants.verbose_debug = True
|
||||||
|
|
||||||
|
# Check if running in RecoveryOS
|
||||||
|
self.constants.recovery_status = Utilities.check_recovery()
|
||||||
|
|
||||||
parser = argparse.ArgumentParser()
|
parser = argparse.ArgumentParser()
|
||||||
|
|
||||||
# Generic building args
|
# Generic building args
|
||||||
parser.add_argument('--build', help='Build OpenCore', action='store_true', required=False)
|
parser.add_argument("--build", help="Build OpenCore", action="store_true", required=False)
|
||||||
parser.add_argument('--verbose', help='Enable verbose boot', action='store_true', required=False)
|
parser.add_argument("--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_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("--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('--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_sip', help='Disable SIP', action='store_true', required=False)
|
parser.add_argument("--disable_smb", help="Disable SecureBootModel", action="store_true", required=False)
|
||||||
parser.add_argument('--disable_smb', help='Disable SecureBootModel', action='store_true', required=False)
|
parser.add_argument("--vault", help="Enable OpenCore Vaulting", action="store_true", required=False)
|
||||||
parser.add_argument('--vault', help='Enable OpenCore Vaulting', action='store_true', required=False)
|
parser.add_argument("--support_all", help="Allow OpenCore on natively supported Models", action="store_true", required=False)
|
||||||
parser.add_argument('--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('--force_legacy', help='Allow acceleration on Mac Pros and Xserves', action='store_true', required=False)
|
parser.add_argument("--nvme", help="Enable NVMe Booting", action="store_true", required=False)
|
||||||
|
parser.add_argument("--wlan", help="Enable Wake on WLAN support", action="store_true", required=False)
|
||||||
|
parser.add_argument("--disable_amfi", help="Disable AMFI", action="store_true", required=False)
|
||||||
|
parser.add_argument("--moderate_smbios", help="Moderate SMBIOS Patching", action="store_true", required=False)
|
||||||
|
|
||||||
# Building args requiring value values
|
# Building args requiring value values
|
||||||
parser.add_argument('--model', action='store', help='Set custom model', required=False)
|
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("--smbios_spoof", action="store", help="Set SMBIOS patching mode", required=False)
|
||||||
|
|
||||||
# SysPatch args
|
# SysPatch args
|
||||||
parser.add_argument('--patch_sys_vol', help='Patches root volume', action='store_true', required=False)
|
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("--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()
|
args = parser.parse_args()
|
||||||
|
|
||||||
@@ -94,6 +75,14 @@ class OpenCoreLegacyPatcher():
|
|||||||
else:
|
else:
|
||||||
print("- Using default payloads location")
|
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:
|
if args.verbose:
|
||||||
print("- Set verbose configuration")
|
print("- Set verbose configuration")
|
||||||
self.constants.verbose_debug = True
|
self.constants.verbose_debug = True
|
||||||
@@ -104,9 +93,6 @@ class OpenCoreLegacyPatcher():
|
|||||||
if args.debug_kext:
|
if args.debug_kext:
|
||||||
print("- Set kext DEBUG configuration")
|
print("- Set kext DEBUG configuration")
|
||||||
self.constants.kext_debug = True
|
self.constants.kext_debug = True
|
||||||
if args.skip_wifi:
|
|
||||||
print("- Set wifi skip configuration")
|
|
||||||
self.constants.wifi_build = True
|
|
||||||
if args.hide_picker:
|
if args.hide_picker:
|
||||||
print("- Set HidePicker configuration")
|
print("- Set HidePicker configuration")
|
||||||
self.constants.showpicker = False
|
self.constants.showpicker = False
|
||||||
@@ -119,19 +105,21 @@ class OpenCoreLegacyPatcher():
|
|||||||
if args.vault:
|
if args.vault:
|
||||||
print("- Set Vault configuration")
|
print("- Set Vault configuration")
|
||||||
self.constants.vault = True
|
self.constants.vault = True
|
||||||
if args.metal_gpu:
|
if args.firewire:
|
||||||
if args.metal_gpu == "Nvidia":
|
print("- Set FireWire Boot configuration")
|
||||||
print("- Set Metal GPU patches to Nvidia")
|
self.constants.firewire_boot = True
|
||||||
self.constants.metal_build = True
|
if args.nvme:
|
||||||
self.constants.imac_vendor = "Nvidia"
|
print("- Set NVMe Boot configuration")
|
||||||
elif args.metal_gpu == "AMD":
|
self.constants.nvme_boot = True
|
||||||
print("- Set Metal GPU patches to AMD")
|
if args.disable_amfi:
|
||||||
self.constants.metal_build = True
|
print("- Set Disable AMFI configuration")
|
||||||
self.constants.imac_vendor = "AMD"
|
self.constants.disable_amfi = True
|
||||||
else:
|
if args.wlan:
|
||||||
print(f"- Unknown GPU arg passed: {args.metal_gpu}")
|
print("- Set Wake on WLAN configuration")
|
||||||
self.constants.metal_build = False
|
self.constants.enable_wake_on_wlan = True
|
||||||
self.constants.imac_vendor = "None"
|
if args.moderate_smbios:
|
||||||
|
print("- Set Moderate SMBIOS Patching configuration")
|
||||||
|
self.constants.serial_settings = "Moderate"
|
||||||
if args.smbios_spoof:
|
if args.smbios_spoof:
|
||||||
if args.smbios_spoof == "Minimal":
|
if args.smbios_spoof == "Minimal":
|
||||||
self.constants.serial_settings = "Minimal"
|
self.constants.serial_settings = "Minimal"
|
||||||
@@ -147,36 +135,126 @@ class OpenCoreLegacyPatcher():
|
|||||||
self.constants.allow_oc_everywhere = True
|
self.constants.allow_oc_everywhere = True
|
||||||
self.constants.serial_settings = "None"
|
self.constants.serial_settings = "None"
|
||||||
|
|
||||||
if args.force_legacy:
|
|
||||||
print("- Allowing legacy acceleration patches on newer models")
|
|
||||||
self.constants.assume_legacy = True
|
|
||||||
|
|
||||||
if args.build:
|
if args.build:
|
||||||
if args.model:
|
if args.model:
|
||||||
print(f"- Using custom model: {args.model}")
|
print(f"- Using custom model: {args.model}")
|
||||||
self.constants.custom_model = args.model
|
self.constants.custom_model = args.model
|
||||||
|
self.set_defaults(self.constants.custom_model, False)
|
||||||
self.build_opencore()
|
self.build_opencore()
|
||||||
|
elif self.computer.real_model not in ModelArray.SupportedSMBIOS and self.constants.allow_oc_everywhere is False:
|
||||||
|
print(
|
||||||
|
"""Your model is not supported by this patcher for running unsupported OSes!"
|
||||||
|
|
||||||
|
If you plan to create the USB for another machine, please select the "Change Model" option in the menu."""
|
||||||
|
)
|
||||||
|
sys.exit(1)
|
||||||
else:
|
else:
|
||||||
print(f"- Using detected model: {self.current_model}")
|
print(f"- Using detected model: {self.constants.computer.real_model}")
|
||||||
|
self.set_defaults(self.constants.custom_model, True)
|
||||||
self.build_opencore()
|
self.build_opencore()
|
||||||
if args.patch_sys_vol:
|
if args.patch_sys_vol:
|
||||||
|
if args.terascale_2:
|
||||||
|
print("- Set TeraScale 2 Accel configuration")
|
||||||
|
self.constants.terascale_2_patch = True
|
||||||
print("- Set System Volume patching")
|
print("- Set System Volume patching")
|
||||||
self.patch_vol()
|
self.patch_vol()
|
||||||
elif args.unpatch_sys_vol:
|
elif args.unpatch_sys_vol:
|
||||||
print("- Set System Volume unpatching")
|
print("- Set System Volume unpatching")
|
||||||
self.unpatch_vol()
|
self.unpatch_vol()
|
||||||
|
|
||||||
|
def set_defaults(self, model, host_is_target):
|
||||||
|
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,
|
||||||
|
]
|
||||||
|
):
|
||||||
|
print("- Detected Metal GPU, overriding default configuration")
|
||||||
|
# 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
|
||||||
|
elif host_is_target:
|
||||||
|
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
|
||||||
|
print("- Detected Metal dGPU, overriding default configuration")
|
||||||
|
self.constants.sip_status = True
|
||||||
|
elif host_is_target:
|
||||||
|
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" and host_is_target:
|
||||||
|
# MacBook8,1 has an odd bug where it cannot install Monterey with Minimal spoofing
|
||||||
|
self.constants.serial_settings == "Moderate"
|
||||||
|
|
||||||
|
self.constants.latebloom_delay, self.constants.latebloom_range, self.constants.latebloom_debug = Utilities.latebloom_detection(model)
|
||||||
|
|
||||||
def patch_vol(self):
|
def patch_vol(self):
|
||||||
SysPatch.PatchSysVolume(self.constants.custom_model or self.current_model, self.constants).start_patch()
|
SysPatch.PatchSysVolume(self.constants.custom_model or self.constants.computer.real_model, self.constants).start_patch()
|
||||||
|
|
||||||
def unpatch_vol(self):
|
def unpatch_vol(self):
|
||||||
SysPatch.PatchSysVolume(self.constants.custom_model or self.current_model, self.constants).start_unpatch()
|
SysPatch.PatchSysVolume(self.constants.custom_model or self.constants.computer.real_model, self.constants).start_unpatch()
|
||||||
|
|
||||||
def build_opencore(self):
|
def build_opencore(self):
|
||||||
Build.BuildOpenCore(self.constants.custom_model or self.current_model, self.constants).build_opencore()
|
Build.BuildOpenCore(self.constants.custom_model or self.constants.computer.real_model, self.constants).build_opencore()
|
||||||
|
|
||||||
def install_opencore(self):
|
def install_opencore(self):
|
||||||
Build.BuildOpenCore(self.constants.custom_model or self.current_model, self.constants).copy_efi()
|
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,
|
||||||
|
]
|
||||||
|
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()
|
OpenCoreLegacyPatcher()
|
||||||
|
|
||||||
|
|||||||
@@ -6,8 +6,9 @@ block_cipher = None
|
|||||||
|
|
||||||
|
|
||||||
a = Analysis(['OCLP-CLI.command'],
|
a = Analysis(['OCLP-CLI.command'],
|
||||||
|
pathex=['Resources'],
|
||||||
binaries=[],
|
binaries=[],
|
||||||
datas=[('payloads', 'payloads'), ('Resources', 'Resources')],
|
datas=[('payloads', 'payloads')],
|
||||||
hiddenimports=[],
|
hiddenimports=[],
|
||||||
hookspath=[],
|
hookspath=[],
|
||||||
runtime_hooks=[],
|
runtime_hooks=[],
|
||||||
@@ -23,7 +24,7 @@ exe = EXE(pyz,
|
|||||||
a.binaries,
|
a.binaries,
|
||||||
a.zipfiles,
|
a.zipfiles,
|
||||||
a.datas,
|
a.datas,
|
||||||
[],
|
[('u', None, 'OPTION')],
|
||||||
name='OCLP-CLI',
|
name='OCLP-CLI',
|
||||||
debug=False,
|
debug=False,
|
||||||
bootloader_ignore_signals=False,
|
bootloader_ignore_signals=False,
|
||||||
|
|||||||
@@ -3,120 +3,140 @@
|
|||||||
|
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
|
|
||||||
import plistlib
|
import platform
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
import platform
|
|
||||||
|
|
||||||
from Resources import Build, ModelArray, PCIIDArray, Constants, SysPatch, Utilities, CliMenu, DeviceProbe
|
from Resources import Build, CliMenu, Constants, ModelArray, SysPatch, Utilities, device_probe
|
||||||
|
|
||||||
|
|
||||||
class OpenCoreLegacyPatcher():
|
class OpenCoreLegacyPatcher:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
print("Loading...")
|
||||||
self.constants = Constants.Constants()
|
self.constants = Constants.Constants()
|
||||||
self.current_model: str = None
|
self.constants.computer = device_probe.Computer.probe()
|
||||||
self.current_model = DeviceProbe.smbios_probe().model_detect(False)
|
self.computer = self.constants.computer
|
||||||
self.constants.detected_os = int(platform.uname().release.partition(".")[0])
|
self.constants.detected_os = int(platform.uname().release.partition(".")[0])
|
||||||
self.check_default_settings(self.current_model, False)
|
self.constants.detected_os_minor = int(platform.uname().release.partition(".")[2].partition(".")[0])
|
||||||
|
self.set_defaults(self.computer.real_model, True)
|
||||||
|
|
||||||
custom_cpu_model_value: str = subprocess.run("nvram 4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102:revcpuname".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.decode()
|
def set_defaults(self, model, host_is_target):
|
||||||
if not custom_cpu_model_value.startswith("nvram: Error getting variable"):
|
# Defaults
|
||||||
custom_cpu_model_value = [line.strip().split(":revcpuname ", 1)[1] for line in custom_cpu_model_value.split("\n") if line.strip().startswith("4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102:")][0]
|
self.constants.sip_status = True
|
||||||
if custom_cpu_model_value.split("%00")[0] != "":
|
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"
|
||||||
|
|
||||||
|
custom_cpu_model_value = Utilities.get_nvram("revcpuname", "4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102", decode=True)
|
||||||
|
if custom_cpu_model_value is not None:
|
||||||
|
# TODO: Fix to not use two separate variables
|
||||||
self.constants.custom_cpu_model = 1
|
self.constants.custom_cpu_model = 1
|
||||||
self.constants.custom_cpu_model_value = custom_cpu_model_value.split("%00")[0]
|
self.constants.custom_cpu_model_value = custom_cpu_model_value.split("%00")[0]
|
||||||
|
|
||||||
if "-v" in (Utilities.get_nvram("boot-args", decode=False) or ""):
|
if "-v" in (Utilities.get_nvram("boot-args") or ""):
|
||||||
self.constants.verbose_debug = True
|
self.constants.verbose_debug = True
|
||||||
|
|
||||||
|
if Utilities.amfi_status() is False:
|
||||||
|
self.constants.disable_amfi = True
|
||||||
|
|
||||||
|
self.constants.latebloom_delay, self.constants.latebloom_range, self.constants.latebloom_debug = Utilities.latebloom_detection(model)
|
||||||
|
|
||||||
# Check if running in RecoveryOS
|
# Check if running in RecoveryOS
|
||||||
self.check_recovery()
|
self.constants.recovery_status = Utilities.check_recovery()
|
||||||
|
|
||||||
def check_default_settings(self, model, custom):
|
|
||||||
self.constants.sip_status = True
|
|
||||||
self.constants.disable_amfi = False
|
|
||||||
if model in ModelArray.LegacyGPU:
|
|
||||||
if custom is False:
|
|
||||||
dgpu_vendor,dgpu_device,dgpu_acpi = DeviceProbe.pci_probe().gpu_probe("GFX0")
|
|
||||||
if (dgpu_vendor == self.constants.pci_amd_ati and (dgpu_device in PCIIDArray.amd_ids().polaris_ids or dgpu_device in PCIIDArray.amd_ids().vega_ids or dgpu_device in PCIIDArray.amd_ids().navi_ids or dgpu_device in PCIIDArray.amd_ids().legacy_gcn_ids)) or (dgpu_vendor == self.constants.pci_nvidia and dgpu_device in PCIIDArray.nvidia_ids().kepler_ids):
|
|
||||||
self.constants.sip_status = True
|
|
||||||
self.constants.secure_status = False
|
|
||||||
self.constants.disable_amfi = False
|
|
||||||
else:
|
|
||||||
self.constants.sip_status = False
|
|
||||||
self.constants.secure_status = False
|
|
||||||
self.constants.disable_amfi = True
|
|
||||||
else:
|
|
||||||
self.constants.sip_status = False
|
|
||||||
self.constants.secure_status = False
|
|
||||||
self.constants.disable_amfi = True
|
|
||||||
if model in ModelArray.ModernGPU:
|
|
||||||
if model in ["iMac13,1", "iMac13,3"]:
|
|
||||||
|
|
||||||
if custom is False:
|
|
||||||
dgpu_vendor,dgpu_device,dgpu_acpi = DeviceProbe.pci_probe().gpu_probe("GFX0")
|
|
||||||
if not dgpu_vendor:
|
|
||||||
self.constants.sip_status = False
|
|
||||||
self.constants.secure_status = False
|
|
||||||
else:
|
|
||||||
self.constants.sip_status = False
|
|
||||||
self.constants.secure_status = False
|
|
||||||
|
|
||||||
def check_recovery(self):
|
|
||||||
root_partition_info = plistlib.loads(subprocess.run("diskutil info -plist /".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode())
|
|
||||||
if root_partition_info["VolumeName"] == "macOS Base System" and \
|
|
||||||
root_partition_info["FilesystemType"] == "apfs" and \
|
|
||||||
root_partition_info["BusProtocol"] == "Disk Image":
|
|
||||||
self.constants.recovery_status = True
|
|
||||||
else:
|
|
||||||
self.constants.recovery_status = False
|
|
||||||
|
|
||||||
def build_opencore(self):
|
def build_opencore(self):
|
||||||
Build.BuildOpenCore(self.constants.custom_model or self.current_model, self.constants).build_opencore()
|
Build.BuildOpenCore(self.constants.custom_model or self.constants.computer.real_model, self.constants).build_opencore()
|
||||||
|
|
||||||
def install_opencore(self):
|
def install_opencore(self):
|
||||||
Build.BuildOpenCore(self.constants.custom_model or self.current_model, self.constants).copy_efi()
|
Build.BuildOpenCore(self.constants.custom_model or self.constants.computer.real_model, self.constants).copy_efi()
|
||||||
|
|
||||||
def change_model(self):
|
def change_model(self):
|
||||||
Utilities.cls()
|
Utilities.cls()
|
||||||
Utilities.header(["Select Different Model"])
|
Utilities.header(["Select Different Model"])
|
||||||
print("""
|
print(
|
||||||
|
"""
|
||||||
Tip: Run the following command on the target machine to find the model identifier:
|
Tip: Run the following command on the target machine to find the model identifier:
|
||||||
|
|
||||||
system_profiler SPHardwareDataType | grep 'Model Identifier'
|
system_profiler SPHardwareDataType | grep 'Model Identifier'
|
||||||
""")
|
"""
|
||||||
|
)
|
||||||
self.constants.custom_model = input("Please enter the model identifier of the target machine: ").strip()
|
self.constants.custom_model = input("Please enter the model identifier of the target machine: ").strip()
|
||||||
if self.constants.custom_model not in ModelArray.SupportedSMBIOS:
|
if self.constants.custom_model not in ModelArray.SupportedSMBIOS:
|
||||||
print(f"""
|
print(
|
||||||
{self.constants.custom_model} is not a valid SMBIOS Identifier for macOS {self.constants.os_support}!
|
f"""
|
||||||
""")
|
{self.constants.custom_model} is not a valid SMBIOS Identifier for macOS {self.constants.os_support}!
|
||||||
|
"""
|
||||||
|
)
|
||||||
print_models = input(f"Print list of valid options for macOS {self.constants.os_support}? (y/n)")
|
print_models = input(f"Print list of valid options for macOS {self.constants.os_support}? (y/n)")
|
||||||
if print_models in {"y", "Y", "yes", "Yes"}:
|
if print_models.lower() in {"y", "yes"}:
|
||||||
print("\n".join(ModelArray.SupportedSMBIOS))
|
print("\n".join(ModelArray.SupportedSMBIOS))
|
||||||
input("\nPress [ENTER] to continue")
|
input("\nPress [ENTER] to continue")
|
||||||
else:
|
else:
|
||||||
self.check_default_settings(self.constants.custom_model, True)
|
self.set_defaults(self.constants.custom_model, False)
|
||||||
|
|
||||||
def patcher_settings(self):
|
def patcher_settings(self):
|
||||||
response = None
|
response = None
|
||||||
while not (response and response == -1):
|
while not (response and response == -1):
|
||||||
title = [
|
title = ["Adjust Patcher Settings"]
|
||||||
"Adjust Patcher Settings"
|
|
||||||
]
|
|
||||||
menu = Utilities.TUIMenu(title, "Please select an option: ", auto_number=True, top_level=True)
|
menu = Utilities.TUIMenu(title, "Please select an option: ", auto_number=True, top_level=True)
|
||||||
options = [
|
options = [
|
||||||
[f"Enable Verbose Mode:\t\tCurrently {self.constants.verbose_debug}", CliMenu.MenuOptions(self.constants.custom_model or self.current_model, self.constants).change_verbose],
|
[f"Enable 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.current_model, self.constants).change_oc],
|
[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.current_model, self.constants).change_kext],
|
[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.current_model, self.constants).change_showpicker],
|
[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.current_model, self.constants).change_vault],
|
[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.current_model, self.constants).allow_firewire],
|
[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.current_model, self.constants).allow_nvme],
|
[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],
|
||||||
[f"Enable TeraScale 2 Acceleration:\tCurrently {self.constants.terscale_2_patch}", CliMenu.MenuOptions(self.constants.custom_model or self.current_model, self.constants).enable_terascale],
|
[f"Allow Wake on WLAN:\t\t\tCurrently {self.constants.enable_wake_on_wlan}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).allow_wowl],
|
||||||
[f"Disable AMFI:\t\t\tCurrently {self.constants.disable_amfi}", CliMenu.MenuOptions(self.constants.custom_model or self.current_model, self.constants).set_amfi],
|
[f"Allow 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 SIP and SecureBootModel:\tSIP: {self.constants.sip_status} SBM: {self.constants.secure_status}", CliMenu.MenuOptions(self.constants.custom_model or self.current_model, self.constants).change_sip],
|
[f"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"Allow OpenCore on native Models:\tCurrently {self.constants.allow_oc_everywhere}", CliMenu.MenuOptions(self.constants.custom_model or self.current_model, self.constants).allow_native_models],
|
[
|
||||||
[f"Advanced Patch Settings, for developers only", self.advanced_patcher_settings],
|
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 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,
|
||||||
|
],
|
||||||
|
[
|
||||||
|
f"Latebloom settings:\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,
|
||||||
|
],
|
||||||
|
["Advanced Patch Settings, for developers only", self.advanced_patcher_settings],
|
||||||
]
|
]
|
||||||
|
|
||||||
for option in options:
|
for option in options:
|
||||||
@@ -127,21 +147,20 @@ system_profiler SPHardwareDataType | grep 'Model Identifier'
|
|||||||
def advanced_patcher_settings(self):
|
def advanced_patcher_settings(self):
|
||||||
response = None
|
response = None
|
||||||
while not (response and response == -1):
|
while not (response and response == -1):
|
||||||
title = [
|
title = ["Adjust Advanced Patcher Settings, for developers ONLY"]
|
||||||
"Adjust Advanced Patcher Settings, for developers ONLY"
|
|
||||||
]
|
|
||||||
menu = Utilities.TUIMenu(title, "Please select an option: ", auto_number=True, top_level=True)
|
menu = Utilities.TUIMenu(title, "Please select an option: ", auto_number=True, top_level=True)
|
||||||
options = [
|
options = [
|
||||||
[f"Assume Metal GPU Always:\t\tCurrently {self.constants.imac_vendor}", CliMenu.MenuOptions(self.constants.custom_model or self.current_model, self.constants).change_metal],
|
[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"Assume Upgraded Wifi Always:\tCurrently {self.constants.wifi_build}", CliMenu.MenuOptions(self.constants.custom_model or self.current_model, self.constants).change_wifi],
|
[f"Set 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"Set SMBIOS Mode:\t\t\tCurrently {self.constants.serial_settings}", CliMenu.MenuOptions(self.constants.custom_model or self.current_model, self.constants).change_serial],
|
[f"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"DRM Preferences:\t\t\tCurrently {self.constants.drm_support}", CliMenu.MenuOptions(self.constants.custom_model or self.current_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"Set Generic Bootstrap:\t\tCurrently {self.constants.boot_efi}", CliMenu.MenuOptions(self.constants.custom_model or self.current_model, self.constants).bootstrap_setting],
|
[
|
||||||
#[f"Assume Legacy GPU:\t\t\tCurrently {self.constants.assume_legacy}", CliMenu.MenuOptions(self.constants.custom_model or self.current_model, self.constants).force_accel_setting],
|
f"Disable CPU Friend:\t\t\tCurrently {self.constants.disallow_cpufriend}",
|
||||||
[f"Disable CPU Friend:\t\t\tCurrently {self.constants.disallow_cpufriend}", CliMenu.MenuOptions(self.constants.custom_model or self.current_model, self.constants).disable_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.current_model, self.constants).set_smbios],
|
],
|
||||||
[f"Set Custom name {self.constants.custom_cpu_model_value}", CliMenu.MenuOptions(self.constants.custom_model or self.current_model, self.constants).custom_cpu],
|
[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 SeedUtil Status", CliMenu.MenuOptions(self.constants.custom_model or self.current_model, self.constants).set_seedutil],
|
[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:
|
for option in options:
|
||||||
@@ -150,8 +169,11 @@ system_profiler SPHardwareDataType | grep 'Model Identifier'
|
|||||||
response = menu.start()
|
response = menu.start()
|
||||||
|
|
||||||
def credits(self):
|
def credits(self):
|
||||||
Utilities.TUIOnlyPrint(["Credits"], "Press [Enter] to go back.\n",
|
Utilities.TUIOnlyPrint(
|
||||||
["""Many thanks to the following:
|
["Credits"],
|
||||||
|
"Press [Enter] to go back.\n",
|
||||||
|
[
|
||||||
|
"""Many thanks to the following:
|
||||||
|
|
||||||
- Acidanthera:\tOpenCore, kexts and other tools
|
- Acidanthera:\tOpenCore, kexts and other tools
|
||||||
- Khronokernel:\tWriting and maintaining this patcher
|
- Khronokernel:\tWriting and maintaining this patcher
|
||||||
@@ -159,7 +181,9 @@ system_profiler SPHardwareDataType | grep 'Model Identifier'
|
|||||||
- ASentientBot:\tLegacy Acceleration Patches
|
- ASentientBot:\tLegacy Acceleration Patches
|
||||||
- Ausdauersportler:\tLinking fixes for SNBGraphicsFB and AMDX3000
|
- Ausdauersportler:\tLinking fixes for SNBGraphicsFB and AMDX3000
|
||||||
- Syncretic:\t\tAAAMouSSE and telemetrap
|
- Syncretic:\t\tAAAMouSSE and telemetrap
|
||||||
- cdf:\t\tNightShiftEnabler and Innie"""]).start()
|
- cdf:\t\tNightShiftEnabler and Innie"""
|
||||||
|
],
|
||||||
|
).start()
|
||||||
|
|
||||||
def PatchVolume(self):
|
def PatchVolume(self):
|
||||||
Utilities.cls()
|
Utilities.cls()
|
||||||
@@ -202,6 +226,20 @@ Supported Options:
|
|||||||
|
|
||||||
1. Patch System Volume
|
1. Patch System Volume
|
||||||
2. Unpatch System Volume (Experimental)
|
2. Unpatch System Volume (Experimental)
|
||||||
|
B. Exit
|
||||||
|
"""
|
||||||
|
mojave_catalina = """Patches Root volume to fix misc issues such as:
|
||||||
|
- Graphics Acceleration
|
||||||
|
- Nvidia: Tesla - Fermi (8000-500 series)
|
||||||
|
- Intel: Ironlake - Sandy Bridge
|
||||||
|
- 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.
|
||||||
|
Supported Options:
|
||||||
|
1. Patch System Volume
|
||||||
B. Exit
|
B. Exit
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@@ -218,14 +256,16 @@ B. Exit
|
|||||||
print(monterey)
|
print(monterey)
|
||||||
elif self.constants.detected_os == self.constants.big_sur:
|
elif self.constants.detected_os == self.constants.big_sur:
|
||||||
print(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:
|
else:
|
||||||
print(default)
|
print(default)
|
||||||
no_patch = True
|
no_patch = True
|
||||||
change_menu = input("Patch System Volume?: ")
|
change_menu = input("Patch System Volume?: ")
|
||||||
if no_patch is not True and change_menu == "1":
|
if no_patch is not True and change_menu == "1":
|
||||||
SysPatch.PatchSysVolume(self.constants.custom_model or self.current_model, self.constants).start_patch()
|
SysPatch.PatchSysVolume(self.constants.custom_model or self.computer.real_model, self.constants).start_patch()
|
||||||
elif no_patch is not True and change_menu == "2":
|
elif no_patch is not True and change_menu == "2" and self.constants.detected_os > self.constants.catalina:
|
||||||
SysPatch.PatchSysVolume(self.constants.custom_model or self.current_model, self.constants).start_unpatch()
|
SysPatch.PatchSysVolume(self.constants.custom_model or self.computer.real_model, self.constants).start_unpatch()
|
||||||
else:
|
else:
|
||||||
print("Returning to main menu")
|
print("Returning to main menu")
|
||||||
|
|
||||||
@@ -234,38 +274,38 @@ B. Exit
|
|||||||
while not (response and response == -1):
|
while not (response and response == -1):
|
||||||
title = [
|
title = [
|
||||||
f"OpenCore Legacy Patcher v{self.constants.patcher_version}",
|
f"OpenCore Legacy Patcher v{self.constants.patcher_version}",
|
||||||
f"Selected Model: {self.constants.custom_model or self.current_model}",
|
f"Selected Model: {self.constants.custom_model or self.computer.real_model}",
|
||||||
]
|
]
|
||||||
|
|
||||||
if (self.constants.custom_model or self.current_model) not in ModelArray.SupportedSMBIOS and self.constants.allow_oc_everywhere is False:
|
if (self.constants.custom_model or self.computer.real_model) not in ModelArray.SupportedSMBIOS and self.constants.allow_oc_everywhere is False:
|
||||||
in_between = [
|
in_between = [
|
||||||
'Your model is not supported by this patcher for running unsupported OSes!',
|
"Your model is not supported by this patcher for running unsupported OSes!",
|
||||||
'',
|
"",
|
||||||
'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 "Change Model" option in the menu.',
|
||||||
]
|
]
|
||||||
elif not self.constants.custom_model and self.current_model == "iMac7,1" and \
|
elif not self.constants.custom_model and self.computer.real_model == "iMac7,1" and "SSE4.1" not in self.computer.cpu.flags:
|
||||||
DeviceProbe.pci_probe().cpu_feature("SSE4.1") is False:
|
|
||||||
in_between = [
|
in_between = [
|
||||||
'Your model requires a CPU upgrade to a CPU supporting SSE4.1+ to be supported by this patcher!',
|
"Your model requires a CPU upgrade to a CPU supporting SSE4.1+ to be supported by this patcher!",
|
||||||
'',
|
"",
|
||||||
f'If you plan to create the USB for another {self.current_model} with SSE4.1+, please select the "Change Model" option in the menu.'
|
f'If you plan to create the USB for another {self.computer.real_model} with SSE4.1+, please select the "Change Model" option in the menu.',
|
||||||
]
|
]
|
||||||
elif self.constants.custom_model == "iMac7,1":
|
elif self.constants.custom_model == "iMac7,1":
|
||||||
in_between = ["This model is supported",
|
in_between = ["This model is supported", "However please ensure the CPU has been upgraded to support SSE4.1+"]
|
||||||
"However please ensure the CPU has been upgraded to support SSE4.1+"
|
|
||||||
]
|
|
||||||
else:
|
else:
|
||||||
in_between = ["This model is supported"]
|
in_between = ["This model is supported"]
|
||||||
|
|
||||||
menu = Utilities.TUIMenu(title, "Please select an option: ", in_between=in_between, auto_number=True, top_level=True)
|
menu = Utilities.TUIMenu(title, "Please select an option: ", in_between=in_between, auto_number=True, top_level=True)
|
||||||
|
|
||||||
options = (
|
options = (
|
||||||
[["Build OpenCore", self.build_opencore]] if ((self.constants.custom_model or self.current_model) in ModelArray.SupportedSMBIOS) or self.constants.allow_oc_everywhere is True else []) + [
|
[["Build OpenCore", self.build_opencore]]
|
||||||
|
if ((self.constants.custom_model or self.computer.real_model) in ModelArray.SupportedSMBIOS) or self.constants.allow_oc_everywhere is True
|
||||||
|
else []
|
||||||
|
) + [
|
||||||
["Install OpenCore to USB/internal drive", self.install_opencore],
|
["Install OpenCore to USB/internal drive", self.install_opencore],
|
||||||
["Post-Install Volume Patch", self.PatchVolume],
|
["Post-Install Volume Patch", self.PatchVolume],
|
||||||
["Change Model", self.change_model],
|
["Change Model", self.change_model],
|
||||||
["Patcher Settings", self.patcher_settings],
|
["Patcher Settings", self.patcher_settings],
|
||||||
["Credits", self.credits]
|
["Credits", self.credits],
|
||||||
]
|
]
|
||||||
|
|
||||||
for option in options:
|
for option in options:
|
||||||
|
|||||||
@@ -6,8 +6,9 @@ block_cipher = None
|
|||||||
|
|
||||||
|
|
||||||
a = Analysis(['OpenCore-Patcher.command'],
|
a = Analysis(['OpenCore-Patcher.command'],
|
||||||
|
pathex=['Resources'],
|
||||||
binaries=[],
|
binaries=[],
|
||||||
datas=[('payloads', 'payloads'), ('Resources', 'Resources')],
|
datas=[('payloads', 'payloads')],
|
||||||
hiddenimports=[],
|
hiddenimports=[],
|
||||||
hookspath=[],
|
hookspath=[],
|
||||||
runtime_hooks=[],
|
runtime_hooks=[],
|
||||||
|
|||||||
16
README.md
16
README.md
@@ -3,7 +3,7 @@
|
|||||||
<h1>OpenCore Legacy Patcher</h1>
|
<h1>OpenCore Legacy Patcher</h1>
|
||||||
</div>
|
</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:
|
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.
|
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
|
## Support
|
||||||
|
|
||||||
@@ -28,7 +29,11 @@ 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)
|
* [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)
|
||||||
|
* [Nightly OpenCore Patcher (CLI)](https://nightly.link/dortania/OpenCore-Legacy-Patcher/workflows/build-gui/main/OCLP-CLI.zip)
|
||||||
|
|
||||||
## Credits
|
## Credits
|
||||||
|
|
||||||
@@ -50,7 +55,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)
|
* [Innie](https://github.com/cdf/Innie) and [NightShiftEnabler](https://github.com/cdf/NightShiftEnabler)
|
||||||
* [Syncretic](https://forums.macrumors.com/members/syncretic.1173816/)
|
* [Syncretic](https://forums.macrumors.com/members/syncretic.1173816/)
|
||||||
* [AAAMouSSE](https://forums.macrumors.com/threads/mp3-1-others-sse-4-2-emulation-to-enable-amd-metal-driver.2206682/) and [telemetrap](https://forums.macrumors.com/threads/mp3-1-others-sse-4-2-emulation-to-enable-amd-metal-driver.2206682/post-28447707)
|
* [AAAMouSSE](https://forums.macrumors.com/threads/mp3-1-others-sse-4-2-emulation-to-enable-amd-metal-driver.2206682/) 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
|
* Development of previous patchers, laying out much of what needs to be patched
|
||||||
* [mario_bros_tech](https://github.com/mariobrostech) and the rest of the Unsupported Mac Discord
|
* [mario_bros_tech](https://github.com/mariobrostech) and the rest of the Unsupported Mac Discord
|
||||||
* Catalyst that started OpenCore Legacy Patcher
|
* Catalyst that started OpenCore Legacy Patcher
|
||||||
|
|||||||
@@ -3,6 +3,8 @@
|
|||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
|
|
||||||
import binascii
|
import binascii
|
||||||
|
import copy
|
||||||
|
import pickle
|
||||||
import plistlib
|
import plistlib
|
||||||
import shutil
|
import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
@@ -12,15 +14,7 @@ import ast
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from datetime import date
|
from datetime import date
|
||||||
|
|
||||||
from Resources import Constants, ModelArray, PCIIDArray, Utilities, DeviceProbe
|
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")
|
|
||||||
|
|
||||||
|
|
||||||
def rmtree_handler(func, path, exc_info):
|
def rmtree_handler(func, path, exc_info):
|
||||||
@@ -34,65 +28,78 @@ class BuildOpenCore:
|
|||||||
self.model = model
|
self.model = model
|
||||||
self.config = None
|
self.config = None
|
||||||
self.constants: Constants.Constants = versions
|
self.constants: Constants.Constants = versions
|
||||||
|
self.computer = self.constants.computer
|
||||||
|
|
||||||
def smbios_set(self):
|
self.gfx0_path = None
|
||||||
|
|
||||||
|
def smbios_set(self, model):
|
||||||
print("- Setting macOS Monterey Supported SMBIOS")
|
print("- Setting macOS Monterey Supported SMBIOS")
|
||||||
if self.model in ModelArray.MacBookAir61:
|
if model in ModelArray.MacBookAir_11:
|
||||||
print("- Spoofing to MacBookAir7,1")
|
|
||||||
return "MacBookAir7,1"
|
return "MacBookAir7,1"
|
||||||
elif self.model in ModelArray.MacBookAir62:
|
elif model in ModelArray.MacBookAir_13:
|
||||||
print("- Spoofing to MacBookAir7,2")
|
|
||||||
return "MacBookAir7,2"
|
return "MacBookAir7,2"
|
||||||
elif self.model in ModelArray.MacBook81:
|
elif model in ModelArray.MacBook_12:
|
||||||
print("- Spoofing to MacBook9,1")
|
|
||||||
return "MacBook9,1"
|
return "MacBook9,1"
|
||||||
elif self.model in ModelArray.MacBookPro111:
|
elif model in ModelArray.MacBookPro_13:
|
||||||
print("- Spoofing to MacBookPro12,1")
|
|
||||||
return "MacBookPro12,1"
|
return "MacBookPro12,1"
|
||||||
elif self.model in ModelArray.MacBookPro112:
|
elif model in ModelArray.MacBookPro_15_iGPU:
|
||||||
print("- Spoofing to MacBookPro11,4")
|
|
||||||
return "MacBookPro11,4"
|
return "MacBookPro11,4"
|
||||||
elif self.model in ModelArray.MacBookPro113:
|
elif model in ModelArray.MacBookPro_15_dGPU:
|
||||||
print("- Spoofing to MacBookPro11,5")
|
|
||||||
return "MacBookPro11,5"
|
return "MacBookPro11,5"
|
||||||
elif self.model in ModelArray.Macmini71:
|
elif model in ModelArray.Macmini:
|
||||||
print("- Spoofing to Macmini7,1")
|
|
||||||
return "Macmini7,1"
|
return "Macmini7,1"
|
||||||
elif self.model in ModelArray.iMacPro11:
|
elif model in ModelArray.iMac_iGPUless:
|
||||||
print("- Spoofing to iMacPro1,1")
|
|
||||||
return "iMacPro1,1"
|
return "iMacPro1,1"
|
||||||
elif self.model in ModelArray.iMac151:
|
elif model in ModelArray.iMac_dGPU:
|
||||||
# Check for upgraded GPUs on iMacs
|
# Check for upgraded GPUs on iMacs
|
||||||
if self.constants.drm_support is True:
|
if self.constants.drm_support is True:
|
||||||
print("- Spoofing to iMacPro1,1")
|
|
||||||
return "iMacPro1,1"
|
return "iMacPro1,1"
|
||||||
else:
|
else:
|
||||||
print("- Spoofing to iMac17,1")
|
|
||||||
return "iMac17,1"
|
return "iMac17,1"
|
||||||
elif self.model in ModelArray.iMac144:
|
elif model in ModelArray.iMac_iGPU:
|
||||||
print("- Spoofing to iMac16,1")
|
|
||||||
return "iMac16,1"
|
return "iMac16,1"
|
||||||
elif self.model in ModelArray.MacPro71:
|
elif model in ModelArray.MacPro:
|
||||||
print("- Spoofing to MacPro7,1")
|
|
||||||
return "MacPro7,1"
|
return "MacPro7,1"
|
||||||
else:
|
else:
|
||||||
return self.model
|
return model
|
||||||
|
|
||||||
def fw_feature_detect(self, model):
|
def fw_feature_detect(self, model):
|
||||||
# Values based off OpenCorePkg's Firmwarefeatures and FirmwarefeaturesMask
|
# Values based off OpenCorePkg's Firmwarefeatures and FirmwarefeaturesMask
|
||||||
# Additionally, APFS bit(19) flipped
|
# Additionally, APFS bit(19) flipped
|
||||||
# https://github.com/acidanthera/OpenCorePkg/blob/0.6.9/Include/Apple/IndustryStandard/AppleFeatures.h#L136
|
# https://github.com/acidanthera/OpenCorePkg/blob/0.6.9/Include/Apple/IndustryStandard/AppleFeatures.h#L136
|
||||||
if model == "iMac7,1":
|
if model == "iMac7,1":
|
||||||
fw_feature = b'\x07\x14\x08\xc0\x00\x00\x00\x00'
|
fw_feature = b"\x07\x14\x08\xc0\x00\x00\x00\x00"
|
||||||
fw_mask = b'\xff\x1f\x08\xc0\x00\x00\x00\x00'
|
fw_mask = b"\xff\x1f\x08\xc0\x00\x00\x00\x00"
|
||||||
elif model in ["MacPro4,1", "Xserve3,1"]:
|
elif model in ["MacPro4,1", "Xserve3,1"]:
|
||||||
fw_feature = b'7\xf5\t\xe0\x00\x00\x00\x00'
|
fw_feature = b"7\xf5\t\xe0\x00\x00\x00\x00"
|
||||||
fw_mask = b'7\xff\x0b\xc0\x00\x00\x00\x00'
|
fw_mask = b"7\xff\x0b\xc0\x00\x00\x00\x00"
|
||||||
else:
|
else:
|
||||||
fw_feature = b'\x03\x14\x08\xc0\x00\x00\x00\x00'
|
fw_feature = b"\x03\x14\x08\xc0\x00\x00\x00\x00"
|
||||||
fw_mask = b'\xff\x3f\x08\xc0\x00\x00\x00\x00'
|
fw_mask = b"\xff\x3f\x08\xc0\x00\x00\x00\x00"
|
||||||
return fw_feature, fw_mask
|
return fw_feature, fw_mask
|
||||||
|
|
||||||
|
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):
|
def build_efi(self):
|
||||||
Utilities.cls()
|
Utilities.cls()
|
||||||
if not self.constants.custom_model:
|
if not self.constants.custom_model:
|
||||||
@@ -112,8 +119,7 @@ class BuildOpenCore:
|
|||||||
print("Deleting old copy of OpenCore folder")
|
print("Deleting old copy of OpenCore folder")
|
||||||
shutil.rmtree(self.constants.opencore_release_folder, onerror=rmtree_handler, ignore_errors=True)
|
shutil.rmtree(self.constants.opencore_release_folder, onerror=rmtree_handler, ignore_errors=True)
|
||||||
|
|
||||||
print()
|
print(f"\n- Adding OpenCore v{self.constants.opencore_version} {self.constants.opencore_build}")
|
||||||
print(f"- Adding OpenCore v{self.constants.opencore_version} {self.constants.opencore_build}")
|
|
||||||
shutil.copy(self.constants.opencore_zip_source, self.constants.build_path)
|
shutil.copy(self.constants.opencore_zip_source, self.constants.build_path)
|
||||||
zipfile.ZipFile(self.constants.opencore_zip_copied).extractall(self.constants.build_path)
|
zipfile.ZipFile(self.constants.opencore_zip_copied).extractall(self.constants.build_path)
|
||||||
|
|
||||||
@@ -126,6 +132,9 @@ class BuildOpenCore:
|
|||||||
self.config["#Revision"]["Build-Version"] = f"{self.constants.patcher_version} - {date.today()}"
|
self.config["#Revision"]["Build-Version"] = f"{self.constants.patcher_version} - {date.today()}"
|
||||||
if not self.constants.custom_model:
|
if not self.constants.custom_model:
|
||||||
self.config["#Revision"]["Build-Type"] = "OpenCore Built on Target Machine"
|
self.config["#Revision"]["Build-Type"] = "OpenCore Built on Target Machine"
|
||||||
|
computer_copy = copy.copy(self.computer)
|
||||||
|
computer_copy.ioregistry = None
|
||||||
|
self.config["#Revision"]["Hardware-Probe"] = pickle.dumps(computer_copy)
|
||||||
else:
|
else:
|
||||||
self.config["#Revision"]["Build-Type"] = "OpenCore Built for External Machine"
|
self.config["#Revision"]["Build-Type"] = "OpenCore Built for External Machine"
|
||||||
self.config["#Revision"]["OpenCore-Version"] = f"{self.constants.opencore_version} - {self.constants.opencore_build} - {self.constants.opencore_commit}"
|
self.config["#Revision"]["OpenCore-Version"] = f"{self.constants.opencore_version} - {self.constants.opencore_build} - {self.constants.opencore_commit}"
|
||||||
@@ -136,113 +145,89 @@ class BuildOpenCore:
|
|||||||
# Essential kexts
|
# Essential kexts
|
||||||
("Lilu.kext", self.constants.lilu_version, self.constants.lilu_path, lambda: True),
|
("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),
|
("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"]),
|
("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),
|
("SMC-Spoof.kext", self.constants.smcspoof_version, self.constants.smcspoof_path, lambda: self.constants.allow_oc_everywhere is False),
|
||||||
# CPU patches
|
# CPU patches
|
||||||
("AppleMCEReporterDisabler.kext", self.constants.mce_version, self.constants.mce_path, lambda: self.model in ModelArray.DualSocket),
|
("AppleMCEReporterDisabler.kext", self.constants.mce_version, self.constants.mce_path, lambda: self.model in ModelArray.DualSocket),
|
||||||
("AAAMouSSE.kext", self.constants.mousse_version, self.constants.mousse_path, lambda: self.model in ModelArray.SSEEmulator),
|
("AAAMouSSE.kext", self.constants.mousse_version, self.constants.mousse_path, lambda: self.model in ModelArray.SSEEmulator),
|
||||||
("telemetrap.kext", self.constants.telemetrap_version, self.constants.telemetrap_path, lambda: self.model in ModelArray.MissingSSE42),
|
("telemetrap.kext", self.constants.telemetrap_version, self.constants.telemetrap_path, lambda: self.model in ModelArray.MissingSSE42),
|
||||||
("CPUFriend.kext", self.constants.cpufriend_version, self.constants.cpufriend_path, lambda: self.model not in ["iMac7,1", "Xserve2,1"] and self.constants.allow_oc_everywhere is False and self.constants.disallow_cpufriend is False),
|
(
|
||||||
|
"CPUFriend.kext",
|
||||||
|
self.constants.cpufriend_version,
|
||||||
|
self.constants.cpufriend_path,
|
||||||
|
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
|
# Ethernet patches
|
||||||
("nForceEthernet.kext", self.constants.nforce_version, self.constants.nforce_path, lambda: self.model in ModelArray.EthernetNvidia),
|
("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),
|
("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),
|
("CatalinaBCM5701Ethernet.kext", self.constants.bcm570_version, self.constants.bcm570_path, lambda: self.model in ModelArray.EthernetBroadcom),
|
||||||
# Legacy audio
|
# 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
|
# IDE patch
|
||||||
("AppleIntelPIIXATA.kext", self.constants.piixata_version, self.constants.piixata_path, lambda: self.model in ModelArray.IDEPatch),
|
("AppleIntelPIIXATA.kext", self.constants.piixata_version, self.constants.piixata_path, lambda: self.model in ModelArray.IDEPatch),
|
||||||
# Misc
|
# 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.SidecarPatch),
|
||||||
("DebugEnhancer.kext", self.constants.debugenhancer_version, self.constants.debugenhancer_path, lambda: self.constants.kext_debug is True),
|
("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),
|
||||||
]:
|
]:
|
||||||
self.enable_kext(name, version, path, check)
|
self.enable_kext(name, version, path, check)
|
||||||
|
|
||||||
if self.constants.allow_oc_everywhere is False:
|
if self.constants.allow_oc_everywhere is False:
|
||||||
self.get_item_by_kv(self.config["Kernel"]["Patch"], "Identifier", "com.apple.driver.AppleSMC")["Enabled"] = True
|
self.get_item_by_kv(self.config["Kernel"]["Patch"], "Identifier", "com.apple.driver.AppleSMC")["Enabled"] = True
|
||||||
|
|
||||||
|
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.MacPro71):
|
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:
|
# Use Innie's same logic:
|
||||||
# https://github.com/cdf/Innie/blob/v1.3.0/Innie/Innie.cpp#L90-L97
|
# https://github.com/cdf/Innie/blob/v1.3.0/Innie/Innie.cpp#L90-L97
|
||||||
storage_devices = plistlib.loads(subprocess.run("ioreg -c IOPCIDevice -r -d2 -a".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode())
|
for i, controller in enumerate(self.computer.storage):
|
||||||
storage_devices = [i for i in storage_devices if i["class-code"] == binascii.unhexlify(self.constants.classcode_sata) or i["class-code"] == binascii.unhexlify(self.constants.classcode_nvme)]
|
print(f"- Fixing PCIe Storage Controller ({i + 1}) reporting")
|
||||||
storage_path_gfx: str = subprocess.run([self.constants.gfxutil_path] + f"-v".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.decode()
|
if controller.pci_path:
|
||||||
try:
|
self.config["DeviceProperties"]["Add"][controller.pci_path] = {"built-in": 1}
|
||||||
x = 1
|
else:
|
||||||
for i in storage_devices:
|
print(f"- Failed to find Device path for PCIe Storage Controller {i}, falling back to Innie")
|
||||||
storage_vendor = Utilities.hexswap(binascii.hexlify(i["vendor-id"]).decode()[:4])
|
|
||||||
storage_device = Utilities.hexswap(binascii.hexlify(i["device-id"]).decode()[:4])
|
|
||||||
print(f'- Fixing PCIe Storage Controller ({x}) reporting')
|
|
||||||
try:
|
|
||||||
storage_path = [line.strip().split("= ", 1)[1] for line in storage_path_gfx.split("\n") if f'{storage_vendor}:{storage_device}'.lower() in line.strip()][0]
|
|
||||||
self.config["DeviceProperties"]["Add"][storage_path] = { "built-in": 1}
|
|
||||||
except IndexError:
|
|
||||||
print(f"- Failed to find Device path for PCIe Storage Controller {x}, falling back to Innie")
|
|
||||||
if self.get_kext_by_bundle_path("Innie.kext")["Enabled"] is False:
|
if self.get_kext_by_bundle_path("Innie.kext")["Enabled"] is False:
|
||||||
self.enable_kext("Innie.kext", self.constants.innie_version, self.constants.innie_path)
|
self.enable_kext("Innie.kext", self.constants.innie_version, self.constants.innie_path)
|
||||||
x = x + 1
|
if not self.computer.storage:
|
||||||
except ValueError:
|
print("- No PCIe Storage Controllers found to fix")
|
||||||
print("- No PCIe Storage Controllers found to fix(V)")
|
|
||||||
except IndexError:
|
|
||||||
print("- No PCIe Storage Controllers found to fix(I)")
|
|
||||||
|
|
||||||
if not self.constants.custom_model:
|
if not self.constants.custom_model:
|
||||||
nvme_devices = plistlib.loads(subprocess.run("ioreg -c IOPCIDevice -r -d2 -a".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode())
|
nvme_devices = [i for i in self.computer.storage if isinstance(i, device_probe.NVMeController)]
|
||||||
nvme_devices = [i for i in nvme_devices if i.get("IORegistryEntryChildren", None) and i["vendor-id"] != binascii.unhexlify("6B100000") and i["IORegistryEntryChildren"][0]["IORegistryEntryName"] == "IONVMeController"]
|
for i, controller in enumerate(nvme_devices):
|
||||||
try:
|
print(f"- Found 3rd Party NVMe SSD ({i + 1}): {Utilities.friendly_hex(controller.vendor_id)}:{Utilities.friendly_hex(controller.device_id)}")
|
||||||
x = 1
|
self.config["#Revision"][f"Hardware-NVMe-{i}"] = f"{Utilities.friendly_hex(controller.vendor_id)}:{Utilities.friendly_hex(controller.device_id)}"
|
||||||
for i in nvme_devices:
|
|
||||||
nvme_vendor = Utilities.hexswap(binascii.hexlify(i["vendor-id"]).decode()[:4])
|
|
||||||
nvme_device = Utilities.hexswap(binascii.hexlify(i["device-id"]).decode()[:4])
|
|
||||||
print(f'- Found 3rd Party NVMe SSD ({x}): {nvme_vendor}:{nvme_device}')
|
|
||||||
nvme_aspm = i["pci-aspm-default"]
|
|
||||||
try:
|
|
||||||
nvme_acpi = i["acpi-path"]
|
|
||||||
nvme_acpi = DeviceProbe.pci_probe().acpi_strip(nvme_acpi)
|
|
||||||
except KeyError:
|
|
||||||
print(f"- No ACPI entry found for NVMe SSD ({x})")
|
|
||||||
nvme_acpi = ""
|
|
||||||
# Disable Bit 0 (L0s), enable Bit 1 (L1)
|
# Disable Bit 0 (L0s), enable Bit 1 (L1)
|
||||||
if not isinstance(nvme_aspm, int):
|
nvme_aspm = (controller.aspm & (~0b11)) | 0b10
|
||||||
nvme_aspm = int.from_bytes(nvme_aspm, byteorder='little')
|
|
||||||
nvme_aspm = (nvme_aspm & (~3)) | 2
|
if controller.pci_path:
|
||||||
#nvme_aspm &= ~1 # Turn off bit 1
|
print(f"- Found NVMe ({i}) at {controller.pci_path}")
|
||||||
#nvme_aspm |= 2 # Turn on bit 2
|
self.config["DeviceProperties"]["Add"].setdefault(controller.pci_path, {})["pci-aspm-default"] = nvme_aspm
|
||||||
self.config["#Revision"][f"Hardware-NVMe-{x}"] = f'{nvme_vendor}:{nvme_device}'
|
self.config["DeviceProperties"]["Add"][controller.pci_path.rpartition("/")[0]] = {"pci-aspm-default": nvme_aspm}
|
||||||
try:
|
else:
|
||||||
nvme_path = DeviceProbe.pci_probe().deviceproperty_probe(nvme_vendor, nvme_device, nvme_acpi)
|
|
||||||
if nvme_path == "":
|
|
||||||
raise IndexError
|
|
||||||
nvme_path_parent = DeviceProbe.pci_probe().device_property_parent(nvme_path)
|
|
||||||
print(f"- Found NVMe ({x}) at {nvme_path}")
|
|
||||||
self.config["DeviceProperties"]["Add"][nvme_path] = {"pci-aspm-default": nvme_aspm, "built-in": 1}
|
|
||||||
self.config["DeviceProperties"]["Add"][nvme_path_parent] = {"pci-aspm-default": nvme_aspm}
|
|
||||||
except IndexError:
|
|
||||||
if "-nvmefaspm" not in self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"]:
|
if "-nvmefaspm" not in self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"]:
|
||||||
print("- Falling back to -nvmefaspm")
|
print("- Falling back to -nvmefaspm")
|
||||||
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " -nvmefaspm"
|
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " -nvmefaspm"
|
||||||
|
|
||||||
if self.get_kext_by_bundle_path("NVMeFix.kext")["Enabled"] is False:
|
if self.get_kext_by_bundle_path("NVMeFix.kext")["Enabled"] is False:
|
||||||
self.enable_kext("NVMeFix.kext", self.constants.nvmefix_version, self.constants.nvmefix_path)
|
self.enable_kext("NVMeFix.kext", self.constants.nvmefix_version, self.constants.nvmefix_path)
|
||||||
x = x + 1
|
|
||||||
except ValueError:
|
if not nvme_devices:
|
||||||
print("- No 3rd Party NVMe drive found(V)")
|
print("- No 3rd Party NVMe drives found")
|
||||||
except IndexError:
|
|
||||||
print("- No 3rd Party NVMe drive found(I)")
|
|
||||||
|
|
||||||
def wifi_fake_id(self):
|
def wifi_fake_id(self):
|
||||||
default_path = True
|
|
||||||
self.enable_kext("AirportBrcmFixup.kext", self.constants.airportbcrmfixup_version, self.constants.airportbcrmfixup_path)
|
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:
|
if not self.constants.custom_model and self.computer.wifi and self.computer.wifi.pci_path:
|
||||||
arpt_path = DeviceProbe.pci_probe().deviceproperty_probe(wifi_vendor, wifi_device, wifi_acpi)
|
arpt_path = self.computer.wifi.pci_path
|
||||||
if arpt_path:
|
|
||||||
print(f"- Found ARPT device at {arpt_path}")
|
print(f"- Found ARPT device at {arpt_path}")
|
||||||
default_path = False
|
|
||||||
else:
|
else:
|
||||||
default_path = True
|
|
||||||
if default_path is True:
|
|
||||||
if self.model in ModelArray.nvidiaHDEF:
|
if self.model in ModelArray.nvidiaHDEF:
|
||||||
# Nvidia chipsets all have the same path to ARPT
|
# Nvidia chipsets all have the same path to ARPT
|
||||||
arpt_path = "PciRoot(0x0)/Pci(0x15,0x0)/Pci(0x0,0x0)"
|
arpt_path = "PciRoot(0x0)/Pci(0x15,0x0)/Pci(0x0,0x0)"
|
||||||
@@ -257,42 +242,54 @@ class BuildOpenCore:
|
|||||||
# iMac11,x-12,x also apply
|
# iMac11,x-12,x also apply
|
||||||
arpt_path = "PciRoot(0x0)/Pci(0x1C,0x1)/Pci(0x0,0x0)"
|
arpt_path = "PciRoot(0x0)/Pci(0x1C,0x1)/Pci(0x0,0x0)"
|
||||||
print(f"- Using known DevicePath {arpt_path}")
|
print(f"- Using known DevicePath {arpt_path}")
|
||||||
print("- Applying fake ID for WiFi")
|
|
||||||
self.config["DeviceProperties"]["Add"][arpt_path] = {"device-id": binascii.unhexlify("ba430000"), "compatible": "pci14e4,43ba"}
|
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].update({"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
|
# WiFi patches
|
||||||
# TODO: -a is not supported in Lion and older, need to add proper fix
|
# TODO: -a is not supported in Lion and older, need to add proper fix
|
||||||
if self.constants.detected_os > self.constants.lion and not self.constants.custom_model:
|
if self.constants.detected_os > self.constants.lion and not self.constants.custom_model:
|
||||||
wifi_vendor,wifi_device,wifi_ioname,wifi_acpi = DeviceProbe.pci_probe().wifi_probe()
|
if self.computer.wifi:
|
||||||
if wifi_vendor:
|
print(f"- Found Wireless Device {Utilities.friendly_hex(self.computer.wifi.vendor_id)}:{Utilities.friendly_hex(self.computer.wifi.device_id)}")
|
||||||
print(f"- Found Wireless Device {wifi_vendor}:{wifi_device} ({wifi_ioname})")
|
self.config["#Revision"]["Hardware-Wifi"] = f"{Utilities.friendly_hex(self.computer.wifi.vendor_id)}:{Utilities.friendly_hex(self.computer.wifi.device_id)}"
|
||||||
self.config["#Revision"]["Hardware-Wifi"] = f"{wifi_vendor}:{wifi_device} ({wifi_ioname})"
|
|
||||||
else:
|
else:
|
||||||
wifi_vendor = ""
|
|
||||||
print("- Unable to run Wireless hardware detection")
|
print("- Unable to run Wireless hardware detection")
|
||||||
|
|
||||||
if self.constants.wifi_build is True:
|
if self.constants.wifi_build is True:
|
||||||
print("- Skipping Wifi patches on request")
|
print("- Skipping Wifi patches on request")
|
||||||
elif not self.constants.custom_model and wifi_vendor:
|
elif not self.constants.custom_model and self.computer.wifi:
|
||||||
if wifi_vendor == self.constants.pci_broadcom:
|
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
|
# This works around OCLP spoofing the Wifi card and therefore unable to actually detect the correct device
|
||||||
if wifi_device in PCIIDArray.broadcom_ids().BCM4360Wifi and wifi_ioname not in ["pci14e4,4353", "pci14e4,4331"]:
|
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)
|
self.enable_kext("AirportBrcmFixup.kext", self.constants.airportbcrmfixup_version, self.constants.airportbcrmfixup_path)
|
||||||
elif wifi_ioname in ["pci14e4,4353", "pci14e4,4331"] or wifi_device in PCIIDArray.broadcom_ids().BCM94331Wifi:
|
print(f"- Setting Wireless Card's Country Code: {self.computer.wifi.country_code}")
|
||||||
|
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)
|
wifi_fake_id(self)
|
||||||
elif wifi_device in PCIIDArray.broadcom_ids().BCM94322Wifi:
|
elif self.computer.wifi.chipset == device_probe.Broadcom.Chipsets.AirPortBrcm4331:
|
||||||
self.enable_kext("IO80211Mojave.kext", self.constants.io80211mojave_version, self.constants.io80211mojave_path)
|
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.get_kext_by_bundle_path("IO80211Mojave.kext/Contents/PlugIns/AirPortBrcm4331.kext")["Enabled"] = True
|
||||||
elif wifi_device in PCIIDArray.broadcom_ids().BCM94328Wifi:
|
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("corecaptureElCap.kext", self.constants.corecaptureelcap_version, self.constants.corecaptureelcap_path)
|
||||||
self.enable_kext("IO80211ElCap.kext", self.constants.io80211elcap_version, self.constants.io80211elcap_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
|
self.get_kext_by_bundle_path("IO80211ElCap.kext/Contents/PlugIns/AppleAirPortBrcm43224.kext")["Enabled"] = True
|
||||||
elif wifi_vendor == self.constants.pci_atheros and wifi_device in PCIIDArray.atheros_ids().AtherosWifi:
|
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.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.get_kext_by_bundle_path("IO80211HighSierra.kext/Contents/PlugIns/AirPortAtheros40.kext")["Enabled"] = True
|
||||||
else:
|
else:
|
||||||
if self.model in ["iMac14,1", "iMac14,2", "iMac14,3"]:
|
if self.model in ModelArray.WifiBCM94331:
|
||||||
self.enable_kext("AirportBrcmFixup.kext", self.constants.airportbcrmfixup_version, self.constants.airportbcrmfixup_path)
|
|
||||||
elif self.model in ModelArray.WifiBCM94331:
|
|
||||||
wifi_fake_id(self)
|
wifi_fake_id(self)
|
||||||
elif self.model in ModelArray.WifiBCM94322:
|
elif self.model in ModelArray.WifiBCM94322:
|
||||||
self.enable_kext("IO80211Mojave.kext", self.constants.io80211mojave_version, self.constants.io80211mojave_path)
|
self.enable_kext("IO80211Mojave.kext", self.constants.io80211mojave_version, self.constants.io80211mojave_path)
|
||||||
@@ -304,10 +301,17 @@ class BuildOpenCore:
|
|||||||
elif self.model in ModelArray.WifiAtheros:
|
elif self.model in ModelArray.WifiAtheros:
|
||||||
self.enable_kext("IO80211HighSierra.kext", self.constants.io80211high_sierra_version, self.constants.io80211high_sierra_path)
|
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.get_kext_by_bundle_path("IO80211HighSierra.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}"
|
||||||
|
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
|
# CPUFriend
|
||||||
pp_map_path = Path(self.constants.platform_plugin_plist_path) / Path(f"{self.model}/Info.plist")
|
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_kext_folder).mkdir()
|
||||||
Path(self.constants.pp_contents_folder).mkdir()
|
Path(self.constants.pp_contents_folder).mkdir()
|
||||||
shutil.copy(pp_map_path, self.constants.pp_contents_folder)
|
shutil.copy(pp_map_path, self.constants.pp_contents_folder)
|
||||||
@@ -334,14 +338,18 @@ class BuildOpenCore:
|
|||||||
# USB Map
|
# USB Map
|
||||||
usb_map_path = Path(self.constants.plist_folder_path) / Path("AppleUSBMaps/Info.plist")
|
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
|
# 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 (
|
||||||
print(f"- Adding USB-Map.kext")
|
usb_map_path.exists()
|
||||||
|
and self.constants.allow_oc_everywhere is False
|
||||||
|
and self.model not in ["iMac7,1", "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_kext_folder).mkdir()
|
||||||
Path(self.constants.map_contents_folder).mkdir()
|
Path(self.constants.map_contents_folder).mkdir()
|
||||||
shutil.copy(usb_map_path, self.constants.map_contents_folder)
|
shutil.copy(usb_map_path, self.constants.map_contents_folder)
|
||||||
self.get_kext_by_bundle_path("USB-Map.kext")["Enabled"] = True
|
self.get_kext_by_bundle_path("USB-Map.kext")["Enabled"] = True
|
||||||
|
|
||||||
|
|
||||||
if self.constants.allow_oc_everywhere is False:
|
if self.constants.allow_oc_everywhere is False:
|
||||||
if self.model == "MacBookPro9,1":
|
if self.model == "MacBookPro9,1":
|
||||||
print("- Adding AppleMuxControl Override")
|
print("- Adding AppleMuxControl Override")
|
||||||
@@ -371,28 +379,37 @@ class BuildOpenCore:
|
|||||||
# AGPM Patch
|
# AGPM Patch
|
||||||
if self.model in ModelArray.DualGPUPatch:
|
if self.model in ModelArray.DualGPUPatch:
|
||||||
print("- Adding dual GPU patch")
|
print("- Adding dual GPU patch")
|
||||||
if not self.constants.custom_model:
|
if not self.constants.custom_model and self.computer.dgpu and self.computer.dgpu.pci_path:
|
||||||
dgpu_vendor,dgpu_device,dgpu_acpi = DeviceProbe.pci_probe().gpu_probe("GFX0")
|
self.gfx0_path = self.computer.dgpu.pci_path
|
||||||
self.gfx0_path = DeviceProbe.pci_probe().deviceproperty_probe(dgpu_vendor,dgpu_device,dgpu_acpi)
|
|
||||||
if self.gfx0_path == "":
|
|
||||||
print("- Failed to find GFX0 Device path, falling back on known logic")
|
|
||||||
self.gfx0_path = "PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)"
|
|
||||||
else:
|
|
||||||
print(f"- Found GFX0 Device Path: {self.gfx0_path}")
|
print(f"- Found GFX0 Device Path: {self.gfx0_path}")
|
||||||
else:
|
else:
|
||||||
|
if not self.constants.custom_model:
|
||||||
|
print("- Failed to find GFX0 Device path, falling back on known logic")
|
||||||
self.gfx0_path = "PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)"
|
self.gfx0_path = "PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)"
|
||||||
|
|
||||||
if self.model in ModelArray.IntelNvidiaDRM and self.constants.drm_support is True:
|
if self.model in ModelArray.IntelNvidiaDRM and self.constants.drm_support is True:
|
||||||
print("- Prioritizing DRM support over Intel QuickSync")
|
print("- Prioritizing DRM support over Intel QuickSync")
|
||||||
self.config["DeviceProperties"]["Add"][self.gfx0_path] = {"agdpmod": "vit9696", "shikigva": 256}
|
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")}
|
self.config["DeviceProperties"]["Add"]["PciRoot(0x0)/Pci(0x2,0x0)"] = {
|
||||||
|
"name": binascii.unhexlify("23646973706C6179"),
|
||||||
|
"IOName": "#display",
|
||||||
|
"class-code": binascii.unhexlify("FFFFFFFF"),
|
||||||
|
}
|
||||||
else:
|
else:
|
||||||
self.config["DeviceProperties"]["Add"][self.gfx0_path] = {"agdpmod": "vit9696"}
|
self.config["DeviceProperties"]["Add"][self.gfx0_path] = {"agdpmod": "vit9696"}
|
||||||
|
|
||||||
if self.model in ["iMac13,1", "iMac13,2", "iMac13,3"]:
|
if self.model in ["iMac13,1", "iMac13,2", "iMac13,3"]:
|
||||||
dgpu_vendor,dgpu_device,dgpu_acpi = DeviceProbe.pci_probe().gpu_probe("GFX0")
|
if self.computer.dgpu:
|
||||||
if dgpu_vendor:
|
if self.constants.allow_ivy_igpu is False:
|
||||||
print("- Fixing sleep support in macOS 12")
|
print("- Disabling iGPU to fix 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")}
|
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
|
# Audio Patch
|
||||||
if self.model in ModelArray.LegacyAudio:
|
if self.model in ModelArray.LegacyAudio:
|
||||||
@@ -400,9 +417,17 @@ class BuildOpenCore:
|
|||||||
hdef_path = "PciRoot(0x0)/Pci(0x8,0x0)" if self.model in ModelArray.nvidiaHDEF else "PciRoot(0x0)/Pci(0x1b,0x0)"
|
hdef_path = "PciRoot(0x0)/Pci(0x8,0x0)" if self.model in ModelArray.nvidiaHDEF else "PciRoot(0x0)/Pci(0x1b,0x0)"
|
||||||
# In AppleALC, MacPro3,1's original layout is already in use, forcing layout 13 instead
|
# In AppleALC, MacPro3,1's original layout is already in use, forcing layout 13 instead
|
||||||
if self.model == "MacPro3,1":
|
if self.model == "MacPro3,1":
|
||||||
self.config["DeviceProperties"]["Add"][hdef_path] = {"apple-layout-id": 90, "use-apple-layout-id": 1, "alc-layout-id": 13, }
|
self.config["DeviceProperties"]["Add"][hdef_path] = {
|
||||||
|
"apple-layout-id": 90,
|
||||||
|
"use-apple-layout-id": 1,
|
||||||
|
"alc-layout-id": 13,
|
||||||
|
}
|
||||||
else:
|
else:
|
||||||
self.config["DeviceProperties"]["Add"][hdef_path] = {"apple-layout-id": 90, "use-apple-layout-id": 1, "use-layout-id": 1, }
|
self.config["DeviceProperties"]["Add"][hdef_path] = {
|
||||||
|
"apple-layout-id": 90,
|
||||||
|
"use-apple-layout-id": 1,
|
||||||
|
"use-layout-id": 1,
|
||||||
|
}
|
||||||
|
|
||||||
# Enable FireWire Boot Support
|
# Enable FireWire Boot Support
|
||||||
if self.constants.firewire_boot is True and self.model not in ModelArray.NoFireWireSupport:
|
if self.constants.firewire_boot is True and self.model not in ModelArray.NoFireWireSupport:
|
||||||
@@ -413,10 +438,11 @@ class BuildOpenCore:
|
|||||||
self.get_kext_by_bundle_path("IOFireWireFamily.kext/Contents/PlugIns/AppleFWOHCI.kext")["Enabled"] = True
|
self.get_kext_by_bundle_path("IOFireWireFamily.kext/Contents/PlugIns/AppleFWOHCI.kext")["Enabled"] = True
|
||||||
|
|
||||||
def backlight_path_detection(self):
|
def backlight_path_detection(self):
|
||||||
|
if not self.constants.custom_model and self.computer.dgpu and self.computer.dgpu.pci_path:
|
||||||
|
self.gfx0_path = self.computer.dgpu.pci_path
|
||||||
|
print(f"- Found GFX0 Device Path: {self.gfx0_path}")
|
||||||
|
else:
|
||||||
if not self.constants.custom_model:
|
if not self.constants.custom_model:
|
||||||
dgpu_vendor,dgpu_device,dgpu_acpi = DeviceProbe.pci_probe().gpu_probe("GFX0")
|
|
||||||
self.gfx0_path = DeviceProbe.pci_probe().deviceproperty_probe(dgpu_vendor,dgpu_device,dgpu_acpi)
|
|
||||||
if self.gfx0_path == "":
|
|
||||||
print("- Failed to find GFX0 Device path, falling back on known logic")
|
print("- Failed to find GFX0 Device path, falling back on known logic")
|
||||||
if self.model in ["iMac11,1", "iMac11,3"]:
|
if self.model in ["iMac11,1", "iMac11,3"]:
|
||||||
self.gfx0_path = "PciRoot(0x0)/Pci(0x3,0x0)/Pci(0x0,0x0)"
|
self.gfx0_path = "PciRoot(0x0)/Pci(0x3,0x0)/Pci(0x0,0x0)"
|
||||||
@@ -424,33 +450,43 @@ class BuildOpenCore:
|
|||||||
self.gfx0_path = "PciRoot(0x0)/Pci(0xc,0x0)/Pci(0x0,0x0)"
|
self.gfx0_path = "PciRoot(0x0)/Pci(0xc,0x0)/Pci(0x0,0x0)"
|
||||||
else:
|
else:
|
||||||
self.gfx0_path = "PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)"
|
self.gfx0_path = "PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)"
|
||||||
else:
|
|
||||||
print(f"- Found GFX0 Device Path: {self.gfx0_path}")
|
|
||||||
|
|
||||||
else:
|
|
||||||
if self.model in ["iMac11,1", "iMac11,3"]:
|
|
||||||
self.gfx0_path = "PciRoot(0x0)/Pci(0x3,0x0)/Pci(0x0,0x0)"
|
|
||||||
elif self.model == "iMac10,1":
|
|
||||||
self.gfx0_path = "PciRoot(0x0)/Pci(0xc,0x0)/Pci(0x0,0x0)"
|
|
||||||
else:
|
|
||||||
self.gfx0_path = "PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)"
|
|
||||||
print(f"- Using known GFX0 path: {self.gfx0_path}")
|
|
||||||
|
|
||||||
|
|
||||||
def nvidia_patch(self, backlight_path):
|
def nvidia_patch(self, backlight_path):
|
||||||
self.constants.custom_mxm_gpu = True
|
self.constants.custom_mxm_gpu = True
|
||||||
if self.model in ["iMac11,1", "iMac11,2", "iMac11,3", "iMac10,1"]:
|
if self.model in ["iMac11,1", "iMac11,2", "iMac11,3", "iMac10,1"]:
|
||||||
print("- Adding Nvidia Brightness Control and DRM patches")
|
print("- Adding Nvidia Brightness Control and DRM patches")
|
||||||
self.config["DeviceProperties"]["Add"][backlight_path] = {"applbkl": binascii.unhexlify("01000000"), "@0,backlight-control": binascii.unhexlify("01000000"), "@0,built-in": binascii.unhexlify("01000000"), "shikigva": 256, "agdpmod": "vit9696"}
|
self.config["DeviceProperties"]["Add"][backlight_path] = {
|
||||||
|
"applbkl": binascii.unhexlify("01000000"),
|
||||||
|
"@0,backlight-control": binascii.unhexlify("01000000"),
|
||||||
|
"@0,built-in": binascii.unhexlify("01000000"),
|
||||||
|
"shikigva": 256,
|
||||||
|
"agdpmod": "vit9696",
|
||||||
|
}
|
||||||
if self.constants.custom_model and self.model == "iMac11,2":
|
if self.constants.custom_model and self.model == "iMac11,2":
|
||||||
# iMac11,2 can have either PciRoot(0x0)/Pci(0x3,0x0)/Pci(0x0,0x0) or PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)
|
# iMac11,2 can have either PciRoot(0x0)/Pci(0x3,0x0)/Pci(0x0,0x0) or PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)
|
||||||
# Set both properties when we cannot run hardware detection
|
# Set both properties when we cannot run hardware detection
|
||||||
self.config["DeviceProperties"]["Add"]["PciRoot(0x0)/Pci(0x3,0x0)/Pci(0x0,0x0)"] = {"applbkl": binascii.unhexlify("01000000"), "@0,backlight-control": binascii.unhexlify("01000000"), "@0,built-in": binascii.unhexlify("01000000"), "shikigva": 256, "agdpmod": "vit9696"}
|
self.config["DeviceProperties"]["Add"]["PciRoot(0x0)/Pci(0x3,0x0)/Pci(0x0,0x0)"] = {
|
||||||
|
"applbkl": binascii.unhexlify("01000000"),
|
||||||
|
"@0,backlight-control": binascii.unhexlify("01000000"),
|
||||||
|
"@0,built-in": binascii.unhexlify("01000000"),
|
||||||
|
"shikigva": 256,
|
||||||
|
"agdpmod": "vit9696",
|
||||||
|
}
|
||||||
elif self.model in ["iMac12,1", "iMac12,2"]:
|
elif self.model in ["iMac12,1", "iMac12,2"]:
|
||||||
print("- Adding Nvidia Brightness Control and DRM patches")
|
print("- Adding Nvidia Brightness Control and DRM patches")
|
||||||
self.config["DeviceProperties"]["Add"][backlight_path] = {"applbkl": binascii.unhexlify("01000000"), "@0,backlight-control": binascii.unhexlify("01000000"), "@0,built-in": binascii.unhexlify("01000000"), "shikigva": 256, "agdpmod": "vit9696"}
|
self.config["DeviceProperties"]["Add"][backlight_path] = {
|
||||||
|
"applbkl": binascii.unhexlify("01000000"),
|
||||||
|
"@0,backlight-control": binascii.unhexlify("01000000"),
|
||||||
|
"@0,built-in": binascii.unhexlify("01000000"),
|
||||||
|
"shikigva": 256,
|
||||||
|
"agdpmod": "vit9696",
|
||||||
|
}
|
||||||
print("- Disabling unsupported iGPU")
|
print("- Disabling unsupported iGPU")
|
||||||
self.config["DeviceProperties"]["Add"]["PciRoot(0x0)/Pci(0x2,0x0)"] = {"name": binascii.unhexlify("23646973706C6179"), "IOName": "#display", "class-code": binascii.unhexlify("FFFFFFFF")}
|
self.config["DeviceProperties"]["Add"]["PciRoot(0x0)/Pci(0x2,0x0)"] = {
|
||||||
|
"name": binascii.unhexlify("23646973706C6179"),
|
||||||
|
"IOName": "#display",
|
||||||
|
"class-code": binascii.unhexlify("FFFFFFFF"),
|
||||||
|
}
|
||||||
shutil.copy(self.constants.backlight_injector_path, self.constants.kexts_path)
|
shutil.copy(self.constants.backlight_injector_path, self.constants.kexts_path)
|
||||||
self.get_kext_by_bundle_path("BacklightInjector.kext")["Enabled"] = True
|
self.get_kext_by_bundle_path("BacklightInjector.kext")["Enabled"] = True
|
||||||
self.config["UEFI"]["Quirks"]["ForgeUefiSupport"] = True
|
self.config["UEFI"]["Quirks"]["ForgeUefiSupport"] = True
|
||||||
@@ -466,7 +502,11 @@ class BuildOpenCore:
|
|||||||
self.config["DeviceProperties"]["Add"]["PciRoot(0x0)/Pci(0x3,0x0)/Pci(0x0,0x0)"] = {"shikigva": 80, "unfairgva": 1}
|
self.config["DeviceProperties"]["Add"]["PciRoot(0x0)/Pci(0x3,0x0)/Pci(0x0,0x0)"] = {"shikigva": 80, "unfairgva": 1}
|
||||||
if self.model in ["iMac12,1", "iMac12,2"]:
|
if self.model in ["iMac12,1", "iMac12,2"]:
|
||||||
print("- Disabling unsupported iGPU")
|
print("- Disabling unsupported iGPU")
|
||||||
self.config["DeviceProperties"]["Add"]["PciRoot(0x0)/Pci(0x2,0x0)"] = {"name": binascii.unhexlify("23646973706C6179"), "IOName": "#display", "class-code": binascii.unhexlify("FFFFFFFF")}
|
self.config["DeviceProperties"]["Add"]["PciRoot(0x0)/Pci(0x2,0x0)"] = {
|
||||||
|
"name": binascii.unhexlify("23646973706C6179"),
|
||||||
|
"IOName": "#display",
|
||||||
|
"class-code": binascii.unhexlify("FFFFFFFF"),
|
||||||
|
}
|
||||||
elif self.model == "iMac10,1":
|
elif self.model == "iMac10,1":
|
||||||
self.enable_kext("AAAMouSSE.kext", self.constants.mousse_version, self.constants.mousse_path)
|
self.enable_kext("AAAMouSSE.kext", self.constants.mousse_version, self.constants.mousse_path)
|
||||||
|
|
||||||
@@ -480,67 +520,64 @@ class BuildOpenCore:
|
|||||||
nvidia_patch(self, self.gfx0_path)
|
nvidia_patch(self, self.gfx0_path)
|
||||||
else:
|
else:
|
||||||
print("- Failed to find vendor")
|
print("- Failed to find vendor")
|
||||||
elif not self.constants.custom_model and self.model in ModelArray.LegacyGPU:
|
elif not self.constants.custom_model and self.model in ModelArray.LegacyGPU and self.computer.dgpu:
|
||||||
dgpu_vendor,dgpu_device,dgpu_acpi = DeviceProbe.pci_probe().gpu_probe("GFX0")
|
print(f"- Detected dGPU: {Utilities.friendly_hex(self.computer.dgpu.vendor_id)}:{Utilities.friendly_hex(self.computer.dgpu.device_id)}")
|
||||||
if dgpu_vendor:
|
if self.computer.dgpu.arch in [
|
||||||
print(f"- Detected dGPU: {dgpu_vendor}:{dgpu_device}")
|
device_probe.AMD.Archs.Legacy_GCN,
|
||||||
if dgpu_vendor == self.constants.pci_amd_ati and (dgpu_device in PCIIDArray.amd_ids().polaris_ids or dgpu_device in PCIIDArray.amd_ids().vega_ids or dgpu_device in PCIIDArray.amd_ids().navi_ids or dgpu_device in PCIIDArray.amd_ids().legacy_gcn_ids):
|
device_probe.AMD.Archs.Polaris,
|
||||||
|
device_probe.AMD.Archs.Vega,
|
||||||
|
device_probe.AMD.Archs.Navi,
|
||||||
|
]:
|
||||||
backlight_path_detection(self)
|
backlight_path_detection(self)
|
||||||
amd_patch(self, self.gfx0_path)
|
amd_patch(self, self.gfx0_path)
|
||||||
elif dgpu_vendor == self.constants.pci_nvidia and dgpu_device in PCIIDArray.nvidia_ids().kepler_ids:
|
elif self.computer.dgpu.arch == device_probe.NVIDIA.Archs.Kepler:
|
||||||
backlight_path_detection(self)
|
backlight_path_detection(self)
|
||||||
nvidia_patch(self, self.gfx0_path)
|
nvidia_patch(self, self.gfx0_path)
|
||||||
if self.model in ModelArray.MacPro71:
|
if self.model in ModelArray.MacPro:
|
||||||
if not self.constants.custom_model:
|
if not self.constants.custom_model:
|
||||||
mp_dgpu_devices = plistlib.loads(subprocess.run("ioreg -c IOPCIDevice -r -d2 -a".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode())
|
for i, device in enumerate(self.computer.gpus):
|
||||||
mp_dgpu_devices = [i for i in mp_dgpu_devices if i["class-code"] == binascii.unhexlify("00000300") or i["class-code"] == binascii.unhexlify("00800300")]
|
print(f"- Found dGPU ({i + 1}): {Utilities.friendly_hex(device.vendor_id)}:{Utilities.friendly_hex(device.device_id)}")
|
||||||
mp_dgpu_devices_gfx: str = subprocess.run([self.constants.gfxutil_path] + f"-v".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.decode()
|
self.config["#Revision"][f"Hardware-MacPro-dGPU-{i + 1}"] = f"{Utilities.friendly_hex(device.vendor_id)}:{Utilities.friendly_hex(device.device_id)}"
|
||||||
try:
|
|
||||||
x = 1
|
|
||||||
for i in mp_dgpu_devices:
|
|
||||||
mp_dgpu_vendor = Utilities.hexswap(binascii.hexlify(i["vendor-id"]).decode()[:4])
|
|
||||||
mp_dgpu_device = Utilities.hexswap(binascii.hexlify(i["device-id"]).decode()[:4])
|
|
||||||
|
|
||||||
print(f'- Found dGPU ({x}): {mp_dgpu_vendor}:{mp_dgpu_device}')
|
if device.pci_path:
|
||||||
self.config["#Revision"][f"Hardware-MacPro-dGPU-{x}"] = f'{mp_dgpu_vendor}:{mp_dgpu_device}'
|
print(f"- Found dGPU ({i + 1}) at {device.pci_path}")
|
||||||
|
if isinstance(device, device_probe.AMD):
|
||||||
try:
|
|
||||||
mp_dgpu_path = [line.strip().split("= ", 1)[1] for line in mp_dgpu_devices_gfx.split("\n") if f'{mp_dgpu_vendor}:{mp_dgpu_device}'.lower() in line.strip()][0]
|
|
||||||
print(f"- Found dGPU ({x}) at {mp_dgpu_path}")
|
|
||||||
if mp_dgpu_vendor == self.constants.pci_amd_ati:
|
|
||||||
print("- Adding Mac Pro, Xserve DRM patches")
|
print("- Adding Mac Pro, Xserve DRM patches")
|
||||||
self.config["DeviceProperties"]["Add"][mp_dgpu_path] = {"shikigva": 128, "unfairgva": 1, "rebuild-device-tree": 1}
|
self.config["DeviceProperties"]["Add"][device.pci_path] = {"shikigva": 128, "unfairgva": 1, "rebuild-device-tree": 1}
|
||||||
elif mp_dgpu_vendor == self.constants.pci_nvidia:
|
elif isinstance(device, device_probe.NVIDIA):
|
||||||
print("- Enabling Nvidia Output Patch")
|
print("- Enabling Nvidia Output Patch")
|
||||||
self.config["DeviceProperties"]["Add"][mp_dgpu_path] = {"rebuild-device-tree": 1}
|
self.config["DeviceProperties"]["Add"][device.pci_path] = {"rebuild-device-tree": 1}
|
||||||
self.config["UEFI"]["Quirks"]["ForgeUefiSupport"] = True
|
self.config["UEFI"]["Quirks"]["ForgeUefiSupport"] = True
|
||||||
self.config["UEFI"]["Quirks"]["ReloadOptionRoms"] = True
|
self.config["UEFI"]["Quirks"]["ReloadOptionRoms"] = True
|
||||||
|
|
||||||
except IndexError:
|
else:
|
||||||
print(f"- Failed to find Device path for NVMe {x}")
|
print(f"- Failed to find Device path for dGPU {i + 1}")
|
||||||
if mp_dgpu_vendor == self.constants.pci_amd_ati:
|
if isinstance(device, device_probe.AMD):
|
||||||
print("- Adding Mac Pro, Xserve DRM patches")
|
print("- Adding Mac Pro, Xserve DRM patches")
|
||||||
if "shikigva=128 unfairgva=1 -wegtree" not in self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"]:
|
if "shikigva=128 unfairgva=1" not in self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"]:
|
||||||
print("- Falling back to boot-args")
|
print("- Falling back to boot-args")
|
||||||
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " shikigva=128 unfairgva=1 -wegtree"
|
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " shikigva=128 unfairgva=1" + (
|
||||||
elif mp_dgpu_vendor == self.constants.pci_nvidia:
|
" -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")
|
print("- Enabling Nvidia Output Patch")
|
||||||
if "-wegtree" not in self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"]:
|
if "-wegtree" not in self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"]:
|
||||||
print("- Falling back to boot-args")
|
print("- Falling back to boot-args")
|
||||||
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " -wegtree"
|
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " -wegtree"
|
||||||
self.config["UEFI"]["Quirks"]["ForgeUefiSupport"] = True
|
self.config["UEFI"]["Quirks"]["ForgeUefiSupport"] = True
|
||||||
self.config["UEFI"]["Quirks"]["ReloadOptionRoms"] = True
|
self.config["UEFI"]["Quirks"]["ReloadOptionRoms"] = True
|
||||||
x = x + 1
|
|
||||||
except ValueError:
|
if not self.computer.gpus:
|
||||||
print("- No socketed dGPU found")
|
|
||||||
except IndexError:
|
|
||||||
print("- No socketed dGPU found")
|
print("- No socketed dGPU found")
|
||||||
|
|
||||||
else:
|
else:
|
||||||
print("- Adding Mac Pro, Xserve DRM patches")
|
print("- Adding Mac Pro, Xserve DRM patches")
|
||||||
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " shikigva=128 unfairgva=1 -wegtree"
|
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " shikigva=128 unfairgva=1 -wegtree"
|
||||||
|
|
||||||
# Add XhciDxe if firmware doesn't have XHCI controller support and XCHI controller detected
|
# Add XhciDxe if firmware doesn't have XHCI controller support and XCHI controller detected
|
||||||
#if self.model not in ModelArray.XhciSupport and not self.constants.custom_model:
|
# 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())
|
# devices = plistlib.loads(subprocess.run("ioreg -c IOPCIDevice -r -d2 -a".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode())
|
||||||
# try:
|
# try:
|
||||||
# devices = [i for i in devices if i["class-code"] == binascii.unhexlify(self.constants.classcode_xhci)]
|
# devices = [i for i in devices if i["class-code"] == binascii.unhexlify(self.constants.classcode_xhci)]
|
||||||
@@ -587,11 +624,13 @@ class BuildOpenCore:
|
|||||||
if self.constants.kext_debug is True:
|
if self.constants.kext_debug is True:
|
||||||
print("- Enabling DEBUG Kexts")
|
print("- Enabling DEBUG Kexts")
|
||||||
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " -liludbgall"
|
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " -liludbgall"
|
||||||
#self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " msgbuf=1048576"
|
# 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:
|
if self.constants.opencore_debug is True:
|
||||||
print("- Enabling DEBUG OpenCore")
|
print("- Enabling DEBUG OpenCore")
|
||||||
self.config["Misc"]["Debug"]["Target"] = 67
|
self.config["Misc"]["Debug"]["Target"] = 0x43
|
||||||
self.config["Misc"]["Debug"]["DisplayLevel"] = 672151678018
|
self.config["Misc"]["Debug"]["DisplayLevel"] = 0x80000042
|
||||||
if self.constants.showpicker is True:
|
if self.constants.showpicker is True:
|
||||||
print("- Enabling ShowPicker")
|
print("- Enabling ShowPicker")
|
||||||
self.config["Misc"]["Boot"]["ShowPicker"] = True
|
self.config["Misc"]["Boot"]["ShowPicker"] = True
|
||||||
@@ -629,11 +668,17 @@ class BuildOpenCore:
|
|||||||
if self.model == self.constants.override_smbios:
|
if self.model == self.constants.override_smbios:
|
||||||
print("- Adding -no_compat_check")
|
print("- Adding -no_compat_check")
|
||||||
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " -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"]
|
||||||
|
|
||||||
def set_smbios(self):
|
def set_smbios(self):
|
||||||
spoofed_model = self.model
|
spoofed_model = self.model
|
||||||
if self.constants.override_smbios == "Default":
|
if self.constants.override_smbios == "Default":
|
||||||
spoofed_model = self.smbios_set()
|
spoofed_model = self.smbios_set(self.model)
|
||||||
|
print(f"- Spoofing to {spoofed_model}")
|
||||||
else:
|
else:
|
||||||
spoofed_model = self.constants.override_smbios
|
spoofed_model = self.constants.override_smbios
|
||||||
try:
|
try:
|
||||||
@@ -651,7 +696,7 @@ class BuildOpenCore:
|
|||||||
if self.constants.custom_cpu_model == 0 or self.constants.custom_cpu_model == 1:
|
if self.constants.custom_cpu_model == 0 or self.constants.custom_cpu_model == 1:
|
||||||
self.config["PlatformInfo"]["SMBIOS"]["ProcessorType"] = 1537
|
self.config["PlatformInfo"]["SMBIOS"]["ProcessorType"] = 1537
|
||||||
if self.model in ModelArray.NoAPFSsupport:
|
if self.model in ModelArray.NoAPFSsupport:
|
||||||
fw_feature,fw_mask = self.fw_feature_detect(self.model)
|
fw_feature, fw_mask = self.fw_feature_detect(self.model)
|
||||||
self.config["PlatformInfo"]["PlatformNVRAM"]["FirmwareFeatures"] = fw_feature
|
self.config["PlatformInfo"]["PlatformNVRAM"]["FirmwareFeatures"] = fw_feature
|
||||||
self.config["PlatformInfo"]["SMBIOS"]["FirmwareFeatures"] = fw_feature
|
self.config["PlatformInfo"]["SMBIOS"]["FirmwareFeatures"] = fw_feature
|
||||||
self.config["PlatformInfo"]["PlatformNVRAM"]["FirmwareFeaturesMask"] = fw_mask
|
self.config["PlatformInfo"]["PlatformNVRAM"]["FirmwareFeaturesMask"] = fw_mask
|
||||||
@@ -709,7 +754,11 @@ class BuildOpenCore:
|
|||||||
self.config["PlatformInfo"]["CustomMemory"] = True
|
self.config["PlatformInfo"]["CustomMemory"] = True
|
||||||
|
|
||||||
# USB Map and CPUFriend Patching
|
# 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 ["iMac7,1", "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")
|
new_map_ls = Path(self.constants.map_contents_folder) / Path("Info.plist")
|
||||||
map_config = plistlib.load(Path(new_map_ls).open("rb"))
|
map_config = plistlib.load(Path(new_map_ls).open("rb"))
|
||||||
# Strip unused USB maps
|
# Strip unused USB maps
|
||||||
@@ -729,7 +778,7 @@ class BuildOpenCore:
|
|||||||
except KeyError:
|
except KeyError:
|
||||||
continue
|
continue
|
||||||
plistlib.dump(map_config, Path(new_map_ls).open("wb"), sort_keys=True)
|
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
|
# Adjust CPU Friend Data to correct SMBIOS
|
||||||
new_cpu_ls = Path(self.constants.pp_contents_folder) / Path("Info.plist")
|
new_cpu_ls = Path(self.constants.pp_contents_folder) / Path("Info.plist")
|
||||||
cpu_config = plistlib.load(Path(new_cpu_ls).open("rb"))
|
cpu_config = plistlib.load(Path(new_cpu_ls).open("rb"))
|
||||||
@@ -739,7 +788,6 @@ class BuildOpenCore:
|
|||||||
cpu_config["IOKitPersonalities"]["CPUFriendDataProvider"]["cf-frequency-data"] = string_stuff
|
cpu_config["IOKitPersonalities"]["CPUFriendDataProvider"]["cf-frequency-data"] = string_stuff
|
||||||
plistlib.dump(cpu_config, Path(new_cpu_ls).open("wb"), sort_keys=True)
|
plistlib.dump(cpu_config, Path(new_cpu_ls).open("wb"), sort_keys=True)
|
||||||
|
|
||||||
|
|
||||||
if self.constants.allow_oc_everywhere is False:
|
if self.constants.allow_oc_everywhere is False:
|
||||||
if self.model == "MacBookPro9,1":
|
if self.model == "MacBookPro9,1":
|
||||||
new_amc_ls = Path(self.constants.amc_contents_folder) / Path("Info.plist")
|
new_amc_ls = Path(self.constants.amc_contents_folder) / Path("Info.plist")
|
||||||
@@ -754,10 +802,11 @@ class BuildOpenCore:
|
|||||||
if self.model in ModelArray.AGDPSupport:
|
if self.model in ModelArray.AGDPSupport:
|
||||||
new_agdp_ls = Path(self.constants.agdp_contents_folder) / Path("Info.plist")
|
new_agdp_ls = Path(self.constants.agdp_contents_folder) / Path("Info.plist")
|
||||||
agdp_config = plistlib.load(Path(new_agdp_ls).open("rb"))
|
agdp_config = plistlib.load(Path(new_agdp_ls).open("rb"))
|
||||||
agdp_config["IOKitPersonalities"]["AppleGraphicsDevicePolicy"]["ConfigMap"][self.spoofed_board] = agdp_config["IOKitPersonalities"]["AppleGraphicsDevicePolicy"]["ConfigMap"].pop(self.model)
|
agdp_config["IOKitPersonalities"]["AppleGraphicsDevicePolicy"]["ConfigMap"][self.spoofed_board] = agdp_config["IOKitPersonalities"]["AppleGraphicsDevicePolicy"]["ConfigMap"].pop(
|
||||||
|
self.model
|
||||||
|
)
|
||||||
plistlib.dump(agdp_config, Path(new_agdp_ls).open("wb"), sort_keys=True)
|
plistlib.dump(agdp_config, Path(new_agdp_ls).open("wb"), sort_keys=True)
|
||||||
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_item_by_kv(iterable, key, value):
|
def get_item_by_kv(iterable, key, value):
|
||||||
item = None
|
item = None
|
||||||
@@ -819,7 +868,7 @@ class BuildOpenCore:
|
|||||||
zip_file.extractall(self.constants.oc_folder)
|
zip_file.extractall(self.constants.oc_folder)
|
||||||
item.unlink()
|
item.unlink()
|
||||||
|
|
||||||
if self.constants.recovery_status == False:
|
if not self.constants.recovery_status:
|
||||||
# Crashes in RecoveryOS for unknown reason
|
# Crashes in RecoveryOS for unknown reason
|
||||||
for i in self.constants.build_path.rglob("__MACOSX"):
|
for i in self.constants.build_path.rglob("__MACOSX"):
|
||||||
shutil.rmtree(i)
|
shutil.rmtree(i)
|
||||||
@@ -829,7 +878,7 @@ class BuildOpenCore:
|
|||||||
def sign_files(self):
|
def sign_files(self):
|
||||||
if self.constants.vault is True:
|
if self.constants.vault is True:
|
||||||
print("- Vaulting EFI")
|
print("- Vaulting EFI")
|
||||||
subprocess.run([self.constants.vault_path] + f"{self.constants.oc_folder}/".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
subprocess.run([str(self.constants.vault_path), f"{self.constants.oc_folder}/"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||||
|
|
||||||
def build_opencore(self):
|
def build_opencore(self):
|
||||||
self.build_efi()
|
self.build_efi()
|
||||||
@@ -894,7 +943,7 @@ Please build OpenCore first!"""
|
|||||||
for disk in all_disks:
|
for disk in all_disks:
|
||||||
if not any(all_disks[disk]["partitions"][partition]["fs"] in ("msdos", "EFI") for partition in all_disks[disk]["partitions"]):
|
if not any(all_disks[disk]["partitions"][partition]["fs"] in ("msdos", "EFI") for partition in all_disks[disk]["partitions"]):
|
||||||
continue
|
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()
|
response = menu.start()
|
||||||
|
|
||||||
@@ -914,12 +963,12 @@ Please build OpenCore first!"""
|
|||||||
for partition in selected_disk["partitions"]:
|
for partition in selected_disk["partitions"]:
|
||||||
if selected_disk["partitions"][partition]["fs"] not in ("msdos", "EFI"):
|
if selected_disk["partitions"][partition]["fs"] not in ("msdos", "EFI"):
|
||||||
continue
|
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 (
|
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
|
selected_disk["partitions"][partition]["type"] == "Microsoft Basic Data" and selected_disk["partitions"][partition]["size"] < 1024 * 1024 * 512
|
||||||
): # 512 megabytes:
|
): # 512 megabytes:
|
||||||
text += " *"
|
text += " *"
|
||||||
menu.add_menu_option(text, key=partition[len(disk_identifier) + 1:])
|
menu.add_menu_option(text, key=partition[len(disk_identifier) + 1 :])
|
||||||
|
|
||||||
response = menu.start()
|
response = menu.start()
|
||||||
|
|
||||||
@@ -936,7 +985,7 @@ Please build OpenCore first!"""
|
|||||||
" without altering line endings",
|
" without altering line endings",
|
||||||
]
|
]
|
||||||
|
|
||||||
if self.constants.detected_os > self.constants.yosemite and self.constants.recovery_status == False:
|
if self.constants.detected_os >= self.constants.el_capitan and not self.constants.recovery_status:
|
||||||
result = subprocess.run(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
result = subprocess.run(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||||
else:
|
else:
|
||||||
result = subprocess.run(f"diskutil mount {disk_identifier}s{response}".split(), stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
result = subprocess.run(f"diskutil mount {disk_identifier}s{response}".split(), stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||||
@@ -965,6 +1014,19 @@ Please build OpenCore first!"""
|
|||||||
Utilities.header(["Copying OpenCore"])
|
Utilities.header(["Copying OpenCore"])
|
||||||
|
|
||||||
if mount_path.exists():
|
if mount_path.exists():
|
||||||
|
if (mount_path / Path("EFI/Microsoft")).exists():
|
||||||
|
print("- Found Windows Boot Loader")
|
||||||
|
print("\nWould you like to continue installing OpenCore?")
|
||||||
|
print("Installing OpenCore onto this drive may make Windows unbootable until OpenCore")
|
||||||
|
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\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"]:
|
||||||
|
subprocess.run(["diskutil", "umount", mount_path], stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||||
|
return
|
||||||
if (mount_path / Path("EFI/OC")).exists():
|
if (mount_path / Path("EFI/OC")).exists():
|
||||||
print("- Removing preexisting EFI/OC folder")
|
print("- Removing preexisting EFI/OC folder")
|
||||||
shutil.rmtree(mount_path / Path("EFI/OC"), onerror=rmtree_handler)
|
shutil.rmtree(mount_path / Path("EFI/OC"), onerror=rmtree_handler)
|
||||||
@@ -996,10 +1058,10 @@ Please build OpenCore first!"""
|
|||||||
print("- Adding Internal Drive icon")
|
print("- Adding Internal Drive icon")
|
||||||
shutil.copy(self.constants.icon_path_internal, mount_path)
|
shutil.copy(self.constants.icon_path_internal, mount_path)
|
||||||
print("- Cleaning install location")
|
print("- Cleaning install location")
|
||||||
if self.constants.recovery_status == False:
|
if not self.constants.recovery_status:
|
||||||
# RecoveryOS doesn't support dot_clean
|
# RecoveryOS doesn't support dot_clean
|
||||||
# Remove dot_clean, requires full disk access
|
# Remove dot_clean, requires full disk access
|
||||||
#subprocess.run(["dot_clean", mount_path], stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
# subprocess.run(["dot_clean", mount_path], stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||||
print("- Unmounting EFI partition")
|
print("- Unmounting EFI partition")
|
||||||
subprocess.run(["diskutil", "umount", mount_path], stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
subprocess.run(["diskutil", "umount", mount_path], stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||||
print("- OpenCore transfer complete")
|
print("- OpenCore transfer complete")
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
from Resources import ModelArray, Constants, Utilities
|
from Resources import Constants, Utilities
|
||||||
|
|
||||||
|
|
||||||
class MenuOptions:
|
class MenuOptions:
|
||||||
@@ -49,7 +49,8 @@ class MenuOptions:
|
|||||||
def change_metal(self):
|
def change_metal(self):
|
||||||
Utilities.cls()
|
Utilities.cls()
|
||||||
Utilities.header(["Assume Metal GPU Always in iMac"])
|
Utilities.header(["Assume Metal GPU Always in iMac"])
|
||||||
print("""This is for iMacs that have upgraded Metal GPUs, otherwise
|
print(
|
||||||
|
"""This is for iMacs that have upgraded Metal GPUs, otherwise
|
||||||
Patcher assumes based on stock configuration (ie. iMac10,x-12,x)
|
Patcher assumes based on stock configuration (ie. iMac10,x-12,x)
|
||||||
|
|
||||||
Valid Options:
|
Valid Options:
|
||||||
@@ -60,7 +61,8 @@ Valid Options:
|
|||||||
|
|
||||||
Note: Patcher will detect whether hardware has been upgraded regardless, this
|
Note: Patcher will detect whether hardware has been upgraded regardless, this
|
||||||
option is for those patching on a different machine or OCLP cannot detect.
|
option is for those patching on a different machine or OCLP cannot detect.
|
||||||
""")
|
"""
|
||||||
|
)
|
||||||
change_menu = input("Set GPU Patch type(ie. 1): ")
|
change_menu = input("Set GPU Patch type(ie. 1): ")
|
||||||
if change_menu == "1":
|
if change_menu == "1":
|
||||||
self.constants.metal_build = False
|
self.constants.metal_build = False
|
||||||
@@ -74,26 +76,11 @@ option is for those patching on a different machine or OCLP cannot detect.
|
|||||||
else:
|
else:
|
||||||
print("Invalid option")
|
print("Invalid option")
|
||||||
|
|
||||||
def change_wifi(self):
|
|
||||||
Utilities.cls()
|
|
||||||
Utilities.header(["Assume Upgraded Wifi Always"])
|
|
||||||
print("""This is for Macs with upgraded wifi cards(ie. BCM94360/2)
|
|
||||||
|
|
||||||
Note: Patcher will detect whether hardware has been upgraded regardless, this
|
|
||||||
option is for those patching on a different machine or cannot detect.
|
|
||||||
""")
|
|
||||||
change_menu = input("Enable Upgraded Wifi build algorithm?(y/n): ")
|
|
||||||
if change_menu in {"y", "Y", "yes", "Yes"}:
|
|
||||||
self.constants.wifi_build = True
|
|
||||||
elif change_menu in {"n", "N", "no", "No"}:
|
|
||||||
self.constants.wifi_build = False
|
|
||||||
else:
|
|
||||||
print("Invalid option")
|
|
||||||
|
|
||||||
def change_serial(self):
|
def change_serial(self):
|
||||||
Utilities.cls()
|
Utilities.cls()
|
||||||
Utilities.header(["Set SMBIOS Mode"])
|
Utilities.header(["Set SMBIOS Mode"])
|
||||||
print("""This section is for setting how OpenCore generates the SMBIOS
|
print(
|
||||||
|
"""This section is for setting how OpenCore generates the SMBIOS
|
||||||
Recommended for adanced users who want control how serials are handled
|
Recommended for adanced users who want control how serials are handled
|
||||||
|
|
||||||
Valid options:
|
Valid options:
|
||||||
@@ -103,7 +90,8 @@ Valid options:
|
|||||||
3. Advanced:\tReplace entire SMBIOS and generate new serials
|
3. Advanced:\tReplace entire SMBIOS and generate new serials
|
||||||
|
|
||||||
Note: For new users we recommend leaving as default(1. Minimal)
|
Note: For new users we recommend leaving as default(1. Minimal)
|
||||||
""")
|
"""
|
||||||
|
)
|
||||||
change_menu = input("Set SMBIOS Mode(ie. 1): ")
|
change_menu = input("Set SMBIOS Mode(ie. 1): ")
|
||||||
if change_menu == "1":
|
if change_menu == "1":
|
||||||
self.constants.serial_settings = "Minimal"
|
self.constants.serial_settings = "Minimal"
|
||||||
@@ -117,10 +105,12 @@ Note: For new users we recommend leaving as default(1. Minimal)
|
|||||||
def change_showpicker(self):
|
def change_showpicker(self):
|
||||||
Utilities.cls()
|
Utilities.cls()
|
||||||
Utilities.header(["Set OpenCore Picker mode"])
|
Utilities.header(["Set OpenCore Picker mode"])
|
||||||
print("""By default, OpenCore will show its boot picker each time on boot up,
|
print(
|
||||||
|
"""By default, OpenCore will show its boot picker each time on boot up,
|
||||||
however this can be disabled by default and be shown on command by repeatedly
|
however this can be disabled by default and be shown on command by repeatedly
|
||||||
pressing the "Esc" key
|
pressing the "Esc" key
|
||||||
""")
|
"""
|
||||||
|
)
|
||||||
change_menu = input("Show OpenCore Picker by default(y/n): ")
|
change_menu = input("Show OpenCore Picker by default(y/n): ")
|
||||||
if change_menu in {"y", "Y", "yes", "Yes"}:
|
if change_menu in {"y", "Y", "yes", "Yes"}:
|
||||||
self.constants.showpicker = True
|
self.constants.showpicker = True
|
||||||
@@ -132,13 +122,15 @@ pressing the "Esc" key
|
|||||||
def change_vault(self):
|
def change_vault(self):
|
||||||
Utilities.cls()
|
Utilities.cls()
|
||||||
Utilities.header(["Set OpenCore Vaulting"])
|
Utilities.header(["Set OpenCore Vaulting"])
|
||||||
print("""By default, this patcher will sign all your files and ensure none of the
|
print(
|
||||||
|
"""By default, this patcher will sign all your files and ensure none of the
|
||||||
contents can be tampered with. However for more advanced users, you may
|
contents can be tampered with. However for more advanced users, you may
|
||||||
want to be able to freely edit the config.plist and files.
|
want to be able to freely edit the config.plist and files.
|
||||||
|
|
||||||
Note: For security reasons, OpenShell will be disabled when Vault is set.
|
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): ")
|
||||||
if change_menu in {"y", "Y", "yes", "Yes"}:
|
if change_menu in {"y", "Y", "yes", "Yes"}:
|
||||||
self.constants.vault = True
|
self.constants.vault = True
|
||||||
@@ -150,7 +142,8 @@ Note: For security reasons, OpenShell will be disabled when Vault is set.
|
|||||||
def change_sip(self):
|
def change_sip(self):
|
||||||
Utilities.cls()
|
Utilities.cls()
|
||||||
Utilities.header(["Set SIP and SecureBootModel"])
|
Utilities.header(["Set SIP and SecureBootModel"])
|
||||||
print("""SIP and SecureBootModel are used to ensure proper OTA functionality,
|
print(
|
||||||
|
"""SIP and SecureBootModel are used to ensure proper OTA functionality,
|
||||||
however to patch the root volume both of these must be disabled.
|
however to patch the root volume both of these must be disabled.
|
||||||
Only disable is absolutely necessary. SIP value = 0xFEF
|
Only disable is absolutely necessary. SIP value = 0xFEF
|
||||||
|
|
||||||
@@ -161,7 +154,8 @@ Valid options:
|
|||||||
3. Disable SecureBootModel Only
|
3. Disable SecureBootModel Only
|
||||||
4. Disable Both
|
4. Disable Both
|
||||||
|
|
||||||
""")
|
"""
|
||||||
|
)
|
||||||
change_menu = input("Set SIP and SecureBootModel(ie. 1): ")
|
change_menu = input("Set SIP and SecureBootModel(ie. 1): ")
|
||||||
if change_menu == "1":
|
if change_menu == "1":
|
||||||
self.constants.sip_status = True
|
self.constants.sip_status = True
|
||||||
@@ -181,10 +175,12 @@ Valid options:
|
|||||||
def set_amfi(self):
|
def set_amfi(self):
|
||||||
Utilities.cls()
|
Utilities.cls()
|
||||||
Utilities.header(["Disable AMFI"])
|
Utilities.header(["Disable AMFI"])
|
||||||
print("""Required for Root Patching non-Metal GPUs
|
print(
|
||||||
|
"""Required for Root Patching non-Metal GPUs
|
||||||
in macOS Big Sur. Without this, will receive kernel panic once
|
in macOS Big Sur. Without this, will receive kernel panic once
|
||||||
Patcher finishes installing legacy acceleration patches.
|
Patcher finishes installing legacy acceleration patches.
|
||||||
""")
|
"""
|
||||||
|
)
|
||||||
change_menu = input("Disable AMFI(y/n): ")
|
change_menu = input("Disable AMFI(y/n): ")
|
||||||
if change_menu in {"y", "Y", "yes", "Yes"}:
|
if change_menu in {"y", "Y", "yes", "Yes"}:
|
||||||
self.constants.disable_amfi = True
|
self.constants.disable_amfi = True
|
||||||
@@ -193,25 +189,11 @@ Patcher finishes installing legacy acceleration patches.
|
|||||||
else:
|
else:
|
||||||
print("Invalid option")
|
print("Invalid option")
|
||||||
|
|
||||||
def change_imac_nvidia(self):
|
|
||||||
Utilities.cls()
|
|
||||||
Utilities.header(["Assume Metal GPU Always"])
|
|
||||||
print("""Specifically for iMac10,x-12,x with Metal Nvidia GPU upgrades
|
|
||||||
By default the patcher will try to detect what hardware is
|
|
||||||
running, however this will enforce iMac Nvidia Build Patches.
|
|
||||||
""")
|
|
||||||
change_menu = input("Assume iMac Nvidia patches(y/n): ")
|
|
||||||
if change_menu in {"y", "Y", "yes", "Yes"}:
|
|
||||||
self.constants.imac_nvidia_build = True
|
|
||||||
elif change_menu in {"n", "N", "no", "No"}:
|
|
||||||
self.constants.imac_nvidia_build = False
|
|
||||||
else:
|
|
||||||
print("Invalid option")
|
|
||||||
|
|
||||||
def bootstrap_setting(self):
|
def bootstrap_setting(self):
|
||||||
Utilities.cls()
|
Utilities.cls()
|
||||||
Utilities.header(["Set Bootstrap method"])
|
Utilities.header(["Set Bootstrap method"])
|
||||||
print("""Sets OpenCore's bootstrap method, currently the patcher supports the
|
print(
|
||||||
|
"""Sets OpenCore's bootstrap method, currently the patcher supports the
|
||||||
following options.
|
following options.
|
||||||
|
|
||||||
Valid options:
|
Valid options:
|
||||||
@@ -226,7 +208,8 @@ and not to macOS itself.
|
|||||||
Recommended to set to BOOTx64.efi in situations where your Mac cannot
|
Recommended to set to BOOTx64.efi in situations where your Mac cannot
|
||||||
see the EFI Boot entry in the boot picker.
|
see the EFI Boot entry in the boot picker.
|
||||||
|
|
||||||
""")
|
"""
|
||||||
|
)
|
||||||
change_menu = input("Set Bootstrap method: ")
|
change_menu = input("Set Bootstrap method: ")
|
||||||
if change_menu == "1":
|
if change_menu == "1":
|
||||||
self.constants.boot_efi = False
|
self.constants.boot_efi = False
|
||||||
@@ -235,11 +218,11 @@ see the EFI Boot entry in the boot picker.
|
|||||||
else:
|
else:
|
||||||
print("Invalid option")
|
print("Invalid option")
|
||||||
|
|
||||||
|
|
||||||
def drm_setting(self):
|
def drm_setting(self):
|
||||||
Utilities.cls()
|
Utilities.cls()
|
||||||
Utilities.header(["Set DRM preferences"])
|
Utilities.header(["Set DRM preferences"])
|
||||||
print("""Sets OpenCore's DRM preferences for iMac13,x and iMac14,x.
|
print(
|
||||||
|
"""Sets OpenCore's DRM preferences for iMac13,x and iMac14,x.
|
||||||
In Big Sur, some DRM based content may be broken by
|
In Big Sur, some DRM based content may be broken by
|
||||||
default in AppleTV, Photobooth, etc.
|
default in AppleTV, Photobooth, etc.
|
||||||
|
|
||||||
@@ -249,7 +232,8 @@ greatly hampers Video rendering performance in Final Cut Pro and
|
|||||||
other programs relying on such features.
|
other programs relying on such features.
|
||||||
|
|
||||||
Recommend only disabling if absolutely required.
|
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): ")
|
||||||
if change_menu in {"y", "Y", "yes", "Yes"}:
|
if change_menu in {"y", "Y", "yes", "Yes"}:
|
||||||
self.constants.drm_support = True
|
self.constants.drm_support = True
|
||||||
@@ -258,30 +242,16 @@ Recommend only disabling if absolutely required.
|
|||||||
else:
|
else:
|
||||||
print("Invalid option")
|
print("Invalid option")
|
||||||
|
|
||||||
def force_accel_setting(self):
|
|
||||||
Utilities.cls()
|
|
||||||
Utilities.header(["Assume Legacy GPU"])
|
|
||||||
print("""Allows any model to force install Legacy Acceleration
|
|
||||||
patches. Only required for Mac Pro and Xserve users.
|
|
||||||
|
|
||||||
DO NOT RUN IF METAL GPU IS INSTALLED
|
|
||||||
""")
|
|
||||||
change_menu = input("Enable Beta Acceleration Patches(y/n): ")
|
|
||||||
if change_menu in {"y", "Y", "yes", "Yes"}:
|
|
||||||
self.constants.assume_legacy = True
|
|
||||||
elif change_menu in {"n", "N", "no", "No"}:
|
|
||||||
self.constants.assume_legacy = False
|
|
||||||
else:
|
|
||||||
print("Invalid option")
|
|
||||||
|
|
||||||
def allow_native_models(self):
|
def allow_native_models(self):
|
||||||
Utilities.cls()
|
Utilities.cls()
|
||||||
Utilities.header(["Allow OpenCore on native Models"])
|
Utilities.header(["Allow OpenCore on native Models"])
|
||||||
print("""Allows natively supported Macs to use OpenCore. Recommended
|
print(
|
||||||
|
"""Allows natively supported Macs to use OpenCore. Recommended
|
||||||
for users with 3rd Party NVMe SSDs to achieve improved overall
|
for users with 3rd Party NVMe SSDs to achieve improved overall
|
||||||
power usage.
|
power usage.
|
||||||
|
|
||||||
""")
|
"""
|
||||||
|
)
|
||||||
change_menu = input("Allow OpenCore on all Models(y/n): ")
|
change_menu = input("Allow OpenCore on all Models(y/n): ")
|
||||||
if change_menu in {"y", "Y", "yes", "Yes"}:
|
if change_menu in {"y", "Y", "yes", "Yes"}:
|
||||||
self.constants.allow_oc_everywhere = True
|
self.constants.allow_oc_everywhere = True
|
||||||
@@ -295,13 +265,15 @@ power usage.
|
|||||||
def custom_cpu(self):
|
def custom_cpu(self):
|
||||||
Utilities.cls()
|
Utilities.cls()
|
||||||
Utilities.header(["Set custom CPU Model Name"])
|
Utilities.header(["Set custom CPU Model Name"])
|
||||||
print("""Change reported CPU Model name in About This Mac
|
print(
|
||||||
|
"""Change reported CPU Model name in About This Mac
|
||||||
Custom names will report as follows:
|
Custom names will report as follows:
|
||||||
|
|
||||||
1: Original Name: 2.5 Ghz Dual-Core Intel Core i5
|
1: Original Name: 2.5 Ghz Dual-Core Intel Core i5
|
||||||
2. CPU name: Intel(R) Core(TM) i5-3210M CPU @ 2.50Ghz
|
2. CPU name: Intel(R) Core(TM) i5-3210M CPU @ 2.50Ghz
|
||||||
3. Custom Name: 2.5Ghz Cotton Candy (example)
|
3. Custom Name: 2.5Ghz Cotton Candy (example)
|
||||||
""")
|
"""
|
||||||
|
)
|
||||||
if self.constants.custom_cpu_model_value == "":
|
if self.constants.custom_cpu_model_value == "":
|
||||||
if self.constants.custom_cpu_model == 0:
|
if self.constants.custom_cpu_model == 0:
|
||||||
print("Currently using original name")
|
print("Currently using original name")
|
||||||
@@ -325,50 +297,40 @@ Custom names will report as follows:
|
|||||||
def custom_color_thing(self):
|
def custom_color_thing(self):
|
||||||
Utilities.cls()
|
Utilities.cls()
|
||||||
Utilities.header(["Set custom CPU Model Name"])
|
Utilities.header(["Set custom CPU Model Name"])
|
||||||
print("""Change reported CPU Model name in About This Mac
|
print(
|
||||||
|
"""Change reported CPU Model name in About This Mac
|
||||||
Custom names will report as follows:
|
Custom names will report as follows:
|
||||||
|
|
||||||
1: Custom Color
|
1: Custom Color
|
||||||
2. Reset
|
2. Reset
|
||||||
""")
|
"""
|
||||||
|
)
|
||||||
change_menu = input("Set custom CPU Name(1,2,3): ")
|
change_menu = input("Set custom CPU Name(1,2,3): ")
|
||||||
if change_menu == "1":
|
if change_menu == "1":
|
||||||
print("")
|
print("")
|
||||||
#temp_tk_root = tk.Tk()
|
# temp_tk_root = tk.Tk()
|
||||||
#temp_tk_root.wm_withdraw()
|
# temp_tk_root.wm_withdraw()
|
||||||
#self.constants.custom_color = colorchooser.askcolor(title="Choose color")
|
# self.constants.custom_color = colorchooser.askcolor(title="Choose color")
|
||||||
#temp_tk_root.destroy()
|
# temp_tk_root.destroy()
|
||||||
elif change_menu == "2":
|
elif change_menu == "2":
|
||||||
self.constants.custom_color = ""
|
self.constants.custom_color = ""
|
||||||
else:
|
else:
|
||||||
print("Invalid option")
|
print("Invalid option")
|
||||||
|
|
||||||
def download_more_ram_dot_com(self):
|
|
||||||
Utilities.cls()
|
|
||||||
Utilities.header(["Download more RAM"])
|
|
||||||
print("""Downloads more RAM to your Mac!
|
|
||||||
Currently only offers 1.5TB bundles
|
|
||||||
""")
|
|
||||||
change_menu = input("Download more RAM?(y/n): ")
|
|
||||||
if change_menu == "y":
|
|
||||||
self.constants.download_ram = True
|
|
||||||
elif change_menu == "n":
|
|
||||||
self.constants.download_ram = False
|
|
||||||
else:
|
|
||||||
print("Invalid option")
|
|
||||||
|
|
||||||
def disable_cpufriend(self):
|
def disable_cpufriend(self):
|
||||||
Utilities.cls()
|
Utilities.cls()
|
||||||
Utilities.header(["Disable CPU Friend?"])
|
Utilities.header(["Disable CPU Friend?"])
|
||||||
print("""Only recommended for advanced users
|
print(
|
||||||
|
"""Only recommended for advanced users
|
||||||
Disabling CPUFriend forces macOS into using a different
|
Disabling CPUFriend forces macOS into using a different
|
||||||
Mac's power profile for CPUs and GPUs, which can harm the
|
Mac's power profile for CPUs and GPUs, which can harm the
|
||||||
hardware
|
hardware
|
||||||
""")
|
"""
|
||||||
|
)
|
||||||
change_menu = input("Disable CPU Friend?(y/n): ")
|
change_menu = input("Disable CPU Friend?(y/n): ")
|
||||||
if change_menu == "y":
|
if change_menu in {"y", "Y", "yes", "Yes"}:
|
||||||
self.constants.disallow_cpufriend = True
|
self.constants.disallow_cpufriend = True
|
||||||
elif change_menu == "n":
|
elif change_menu in {"n", "N", "no", "No"}:
|
||||||
self.constants.disallow_cpufriend = False
|
self.constants.disallow_cpufriend = False
|
||||||
else:
|
else:
|
||||||
print("Invalid option")
|
print("Invalid option")
|
||||||
@@ -376,24 +338,30 @@ hardware
|
|||||||
def set_seedutil(self):
|
def set_seedutil(self):
|
||||||
Utilities.cls()
|
Utilities.cls()
|
||||||
Utilities.header(["Set SeedUtil Status"])
|
Utilities.header(["Set SeedUtil Status"])
|
||||||
print("""Used for setting OS Update Preferences
|
print(
|
||||||
|
"""Used for setting OS Update Preferences
|
||||||
|
|
||||||
Valid options:
|
Valid options:
|
||||||
1. Public Release Seed (Default)
|
1. Public Release Seed (Default)
|
||||||
2. Public Beta Seed
|
2. Public Beta Seed
|
||||||
3. Developer Beta Seed
|
3. Developer Beta Seed
|
||||||
4. Check SeedUtil's current status
|
4. Check SeedUtil's current status
|
||||||
""")
|
"""
|
||||||
|
)
|
||||||
|
|
||||||
change_menu = input("Set update status(Press [ENTER] to exit): ")
|
change_menu = input("Set update status(Press [ENTER] to exit): ")
|
||||||
if change_menu == "1":
|
if change_menu == "1":
|
||||||
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", "unenroll"], stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||||
elif change_menu == "2":
|
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", "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()
|
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":
|
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", "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()
|
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":
|
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 = 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]
|
result = [i.partition(":")[2] for i in result.stdout.decode().split("\n") if "Currently enrolled in" in i][0]
|
||||||
@@ -406,13 +374,15 @@ Valid options:
|
|||||||
def set_smbios(self):
|
def set_smbios(self):
|
||||||
Utilities.cls()
|
Utilities.cls()
|
||||||
Utilities.header(["Override SMBIOS Spoof"])
|
Utilities.header(["Override SMBIOS Spoof"])
|
||||||
print("""Change model OpenCore spoofs Mac too
|
print(
|
||||||
|
"""Change model OpenCore spoofs Mac too
|
||||||
|
|
||||||
Valid options:
|
Valid options:
|
||||||
1. Default set by OpenCore (Default)
|
1. Default set by OpenCore (Default)
|
||||||
2. User Override
|
2. User Override
|
||||||
3. Disable all spoofing (unsupported configuration)
|
3. Disable all spoofing (unsupported configuration)
|
||||||
""")
|
"""
|
||||||
|
)
|
||||||
|
|
||||||
change_menu = input("Set SMBIOS status: ")
|
change_menu = input("Set SMBIOS status: ")
|
||||||
if change_menu == "1":
|
if change_menu == "1":
|
||||||
@@ -435,7 +405,8 @@ Valid options:
|
|||||||
def allow_firewire(self):
|
def allow_firewire(self):
|
||||||
Utilities.cls()
|
Utilities.cls()
|
||||||
Utilities.header(["Allow FireWire Boot Support"])
|
Utilities.header(["Allow FireWire Boot Support"])
|
||||||
print("""
|
print(
|
||||||
|
"""
|
||||||
In macOS Catalina and newer, Apple restricted
|
In macOS Catalina and newer, Apple restricted
|
||||||
usage of FireWire devices to boot macOS for
|
usage of FireWire devices to boot macOS for
|
||||||
security concerns relating to DMA access.
|
security concerns relating to DMA access.
|
||||||
@@ -445,12 +416,13 @@ you can re-enable FireWire support for Catalina
|
|||||||
and newer.
|
and newer.
|
||||||
|
|
||||||
Note: MacBook5,x-7,1 don't support FireWire boot
|
Note: MacBook5,x-7,1 don't support FireWire boot
|
||||||
""")
|
"""
|
||||||
|
)
|
||||||
|
|
||||||
change_menu = input("Enable FireWire Boot support?(y/n): ")
|
change_menu = input("Enable FireWire Boot support?(y/n): ")
|
||||||
if change_menu == "y":
|
if change_menu in {"y", "Y", "yes", "Yes"}:
|
||||||
self.constants.firewire_boot = True
|
self.constants.firewire_boot = True
|
||||||
elif change_menu == "n":
|
elif change_menu in {"n", "N", "no", "No"}:
|
||||||
self.constants.firewire_boot = False
|
self.constants.firewire_boot = False
|
||||||
else:
|
else:
|
||||||
print("Invalid option")
|
print("Invalid option")
|
||||||
@@ -458,7 +430,8 @@ Note: MacBook5,x-7,1 don't support FireWire boot
|
|||||||
def allow_nvme(self):
|
def allow_nvme(self):
|
||||||
Utilities.cls()
|
Utilities.cls()
|
||||||
Utilities.header(["Allow NVMe UEFI Support"])
|
Utilities.header(["Allow NVMe UEFI Support"])
|
||||||
print("""
|
print(
|
||||||
|
"""
|
||||||
For machines not natively supporting NVMe,
|
For machines not natively supporting NVMe,
|
||||||
this option allows you to see and boot NVMe
|
this option allows you to see and boot NVMe
|
||||||
drive in OpenCore's picker
|
drive in OpenCore's picker
|
||||||
@@ -468,21 +441,22 @@ Not required if your machine natively supports NVMe
|
|||||||
Note: You must have OpenCore on a bootable volume
|
Note: You must have OpenCore on a bootable volume
|
||||||
first, ie. USB or SATA drive. Once loaded,
|
first, ie. USB or SATA drive. Once loaded,
|
||||||
OpenCore will enable NVMe support in it's picker
|
OpenCore will enable NVMe support in it's picker
|
||||||
""")
|
"""
|
||||||
|
)
|
||||||
|
|
||||||
change_menu = input("Enable NVMe Boot support?(y/n): ")
|
change_menu = input("Enable NVMe Boot support?(y/n): ")
|
||||||
if change_menu == "y":
|
if change_menu in {"y", "Y", "yes", "Yes"}:
|
||||||
self.constants.nvme_boot = True
|
self.constants.nvme_boot = True
|
||||||
elif change_menu == "n":
|
elif change_menu in {"n", "N", "no", "No"}:
|
||||||
self.constants.nvme_boot = False
|
self.constants.nvme_boot = False
|
||||||
else:
|
else:
|
||||||
print("Invalid option")
|
print("Invalid option")
|
||||||
|
|
||||||
|
|
||||||
def enable_terascale(self):
|
def enable_terascale(self):
|
||||||
Utilities.cls()
|
Utilities.cls()
|
||||||
Utilities.header(["Enable TeraScale 2 Acceleration"])
|
Utilities.header(["Enable TeraScale 2 Acceleration"])
|
||||||
print("""
|
print(
|
||||||
|
"""
|
||||||
Currently TeraScale 2 graphics acceleration is in beta with
|
Currently TeraScale 2 graphics acceleration is in beta with
|
||||||
some unfortunate bugs on login including strobing colours
|
some unfortunate bugs on login including strobing colours
|
||||||
until the user forces Million Colours on the Display with
|
until the user forces Million Colours on the Display with
|
||||||
@@ -493,12 +467,101 @@ patches or ask someone to handle inital setup to ensure
|
|||||||
no issues
|
no issues
|
||||||
|
|
||||||
Note: Acceleration only applies to macOS Big Sur
|
Note: Acceleration only applies to macOS Big Sur
|
||||||
""")
|
"""
|
||||||
|
)
|
||||||
|
|
||||||
change_menu = input("Enable TS2 Acceleration?(y/n): ")
|
change_menu = input("Enable TS2 Acceleration?(y/n): ")
|
||||||
if change_menu == "y":
|
if change_menu in {"y", "Y", "yes", "Yes"}:
|
||||||
self.constants.terscale_2_patch = True
|
self.constants.terascale_2_patch = True
|
||||||
elif change_menu == "n":
|
elif change_menu in {"n", "N", "no", "No"}:
|
||||||
self.constants.terscale_2_patch = False
|
self.constants.terascale_2_patch = False
|
||||||
|
else:
|
||||||
|
print("Invalid option")
|
||||||
|
|
||||||
|
def allow_wowl(self):
|
||||||
|
Utilities.cls()
|
||||||
|
Utilities.header(["Allow Wake on WLAN"])
|
||||||
|
print(
|
||||||
|
"""
|
||||||
|
Due to an unfortunate bug in macOS Big Sur+, Wake on WLAN is
|
||||||
|
disabled by default for BCM943224, BCM94331 and BCM94360/2 chipsets.
|
||||||
|
|
||||||
|
This is due to Wake on WLAN creating network instability and in other cases
|
||||||
|
halving network speeds. This issue is not replicable across machines however
|
||||||
|
be prepared if enabling.
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
|
||||||
|
change_menu = input("Allow Wake on WLAN?(y/n): ")
|
||||||
|
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
|
||||||
|
else:
|
||||||
|
print("Invalid option")
|
||||||
|
|
||||||
|
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 and FileVault 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): ")
|
||||||
|
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
|
||||||
|
else:
|
||||||
|
print("Invalid option")
|
||||||
|
|
||||||
|
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)})
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
|
||||||
|
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")
|
||||||
|
elif change_menu == "2":
|
||||||
|
try:
|
||||||
|
self.constants.latebloom_range = int(input("Set range: "))
|
||||||
|
except ValueError:
|
||||||
|
input("Invalid value, press [ENTER] to continue")
|
||||||
|
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")
|
||||||
else:
|
else:
|
||||||
print("Invalid option")
|
print("Invalid option")
|
||||||
@@ -5,13 +5,16 @@
|
|||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
from typing import Optional
|
||||||
|
|
||||||
|
from Resources import device_probe
|
||||||
|
|
||||||
|
|
||||||
class Constants:
|
class Constants:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.patcher_version = "0.1.9"
|
self.patcher_version = "0.2.4"
|
||||||
self.opencore_commit = "4e0ff2d - 05-23-2021"
|
self.opencore_commit = "be2d9fe - 07-2-2021"
|
||||||
self.opencore_version = "0.7.0"
|
self.opencore_version = "0.7.1"
|
||||||
self.lilu_version = "1.5.4"
|
self.lilu_version = "1.5.4"
|
||||||
self.whatevergreen_version = "1.5.1"
|
self.whatevergreen_version = "1.5.1"
|
||||||
self.airportbcrmfixup_version = "2.1.3"
|
self.airportbcrmfixup_version = "2.1.3"
|
||||||
@@ -34,23 +37,25 @@ class Constants:
|
|||||||
self.cpufriend_version = "1.2.4"
|
self.cpufriend_version = "1.2.4"
|
||||||
self.nightshift_version = "1.1.0"
|
self.nightshift_version = "1.1.0"
|
||||||
self.smcspoof_version = "1.0.0"
|
self.smcspoof_version = "1.0.0"
|
||||||
self.cputscsync = "1.0.3"
|
|
||||||
self.hibernationfixup = "1.3.9"
|
|
||||||
self.nvmefix_version = "1.0.9"
|
self.nvmefix_version = "1.0.9"
|
||||||
self.sidecarfixup_version = "1.0.2"
|
self.featureunlock_version = "1.0.3"
|
||||||
self.debugenhancer_version = "1.0.3"
|
self.debugenhancer_version = "1.0.3"
|
||||||
self.innie_version = "1.3.0"
|
self.innie_version = "1.3.0"
|
||||||
self.fw_kext = "1.0.0"
|
self.fw_kext = "1.0.0"
|
||||||
self.payload_version = "0.0.18" # Apple-Binaries-OCLP
|
self.latebloom_version = "0.19"
|
||||||
|
self.disk = ""
|
||||||
|
self.patch_disk = ""
|
||||||
|
self.patcher_support_pkg_version = "0.0.15" # PatcherSupportPkg
|
||||||
|
|
||||||
# Get resource path
|
# Get resource path
|
||||||
self.current_path = Path(__file__).parent.parent.resolve()
|
self.current_path = Path(__file__).parent.parent.resolve()
|
||||||
self.payload_path = self.current_path / Path("payloads")
|
self.payload_path = self.current_path / Path("payloads")
|
||||||
|
|
||||||
self.custom_model: str = None
|
# Hardware
|
||||||
self.custom_mxm_gpu: str = None
|
self.computer: device_probe.Computer = None # type: ignore
|
||||||
self.current_gpuv: str = None
|
|
||||||
self.current_gpud: str = None
|
self.custom_model: Optional[str] = None
|
||||||
|
self.custom_mxm_gpu: bool = False
|
||||||
|
|
||||||
# Patcher Settings
|
# Patcher Settings
|
||||||
self.opencore_debug = False
|
self.opencore_debug = False
|
||||||
@@ -58,8 +63,6 @@ class Constants:
|
|||||||
self.kext_debug = False
|
self.kext_debug = False
|
||||||
self.verbose_debug = False
|
self.verbose_debug = False
|
||||||
self.os_support = 12.0
|
self.os_support = 12.0
|
||||||
self.min_os_support = 11.0
|
|
||||||
self.max_os_support = 12.0
|
|
||||||
self.metal_build = False
|
self.metal_build = False
|
||||||
self.imac_vendor = "None"
|
self.imac_vendor = "None"
|
||||||
self.wifi_build = False
|
self.wifi_build = False
|
||||||
@@ -70,10 +73,9 @@ class Constants:
|
|||||||
self.sip_status = True
|
self.sip_status = True
|
||||||
self.secure_status = False
|
self.secure_status = False
|
||||||
self.detected_os = 0
|
self.detected_os = 0
|
||||||
|
self.detected_os_minor = 0
|
||||||
self.boot_efi = False
|
self.boot_efi = False
|
||||||
self.drm_support = False
|
self.drm_support = False
|
||||||
self.legacy_acceleration_patch = True
|
|
||||||
self.assume_legacy = False
|
|
||||||
self.allow_oc_everywhere = False
|
self.allow_oc_everywhere = False
|
||||||
self.custom_cpu_model = 2
|
self.custom_cpu_model = 2
|
||||||
self.custom_cpu_model_value = ""
|
self.custom_cpu_model_value = ""
|
||||||
@@ -86,7 +88,15 @@ class Constants:
|
|||||||
self.firewire_boot = False
|
self.firewire_boot = False
|
||||||
self.nvme_boot = False
|
self.nvme_boot = False
|
||||||
self.disable_amfi = False
|
self.disable_amfi = False
|
||||||
self.terscale_2_patch = False
|
self.terascale_2_patch = False
|
||||||
|
self.enable_wake_on_wlan = False
|
||||||
|
self.allow_ivy_igpu = False
|
||||||
|
self.moj_cat_accel = False
|
||||||
|
self.latebloom_status = False
|
||||||
|
self.latebloom_delay = 0
|
||||||
|
self.latebloom_range = 0
|
||||||
|
self.latebloom_debug = 0
|
||||||
|
self.validate = False
|
||||||
|
|
||||||
# OS Versions
|
# OS Versions
|
||||||
self.tiger = 8
|
self.tiger = 8
|
||||||
@@ -128,255 +138,422 @@ class Constants:
|
|||||||
self.arch_kepler = "GK100"
|
self.arch_kepler = "GK100"
|
||||||
|
|
||||||
# External Files
|
# External Files
|
||||||
self.url_apple_binaries = "https://github.com/dortania/Apple-Binaries-OCLP/archive/refs/tags/"
|
self.url_patcher_support_pkg = "https://github.com/dortania/PatcherSupportPkg/releases/download/"
|
||||||
|
|
||||||
|
self.legacy_accel_support = [
|
||||||
|
self.mojave,
|
||||||
|
self.catalina,
|
||||||
|
self.big_sur,
|
||||||
|
]
|
||||||
|
|
||||||
# Payload Location
|
# Payload Location
|
||||||
# OpenCore
|
# OpenCore
|
||||||
@property
|
@property
|
||||||
def opencore_zip_source(self): return self.payload_path / Path(f"OpenCore/OpenCore-{self.opencore_build}.zip")
|
def opencore_zip_source(self):
|
||||||
|
return self.payload_path / Path(f"OpenCore/OpenCore-{self.opencore_build}.zip")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def plist_template(self): return self.payload_path / Path(f"Config/config.plist")
|
def plist_template(self):
|
||||||
|
return self.payload_path / Path("Config/config.plist")
|
||||||
|
|
||||||
# Mount Location
|
# Mount Location
|
||||||
@property
|
@property
|
||||||
def payload_mnt1_path(self): return self.payload_path / Path("mnt1")
|
def payload_mnt1_path(self):
|
||||||
|
return self.payload_path / Path("mnt1")
|
||||||
|
|
||||||
# ACPI
|
# ACPI
|
||||||
@property
|
@property
|
||||||
def pci_ssdt_path(self): return self.payload_path / Path("ACPI/SSDT-CPBG.aml")
|
def pci_ssdt_path(self):
|
||||||
|
return self.payload_path / Path("ACPI/SSDT-CPBG.aml")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def windows_ssdt_path(self): return self.payload_path / Path("ACPI/SSDT-PCI.aml")
|
def windows_ssdt_path(self):
|
||||||
|
return self.payload_path / Path("ACPI/SSDT-PCI.aml")
|
||||||
|
|
||||||
# Drivers
|
# Drivers
|
||||||
@property
|
@property
|
||||||
def nvme_driver_path(self): return self.payload_path / Path("Drivers/NvmExpressDxe.efi")
|
def nvme_driver_path(self):
|
||||||
|
return self.payload_path / Path("Drivers/NvmExpressDxe.efi")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def exfat_legacy_driver_path(self): return self.payload_path / Path("Drivers/ExFatDxeLegacy.efi")
|
def exfat_legacy_driver_path(self):
|
||||||
|
return self.payload_path / Path("Drivers/ExFatDxeLegacy.efi")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def xhci_driver_path(self): return self.payload_path / Path("Drivers/XhciDxe.efi")
|
def xhci_driver_path(self):
|
||||||
|
return self.payload_path / Path("Drivers/XhciDxe.efi")
|
||||||
|
|
||||||
# Kexts
|
# Kexts
|
||||||
@property
|
@property
|
||||||
def payload_kexts_path(self): return self.payload_path / Path("Kexts")
|
def payload_kexts_path(self):
|
||||||
|
return self.payload_path / Path("Kexts")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def lilu_path(self): return self.payload_kexts_path / Path(f"Acidanthera/Lilu-v{self.lilu_version}.zip")
|
def lilu_path(self):
|
||||||
|
return self.payload_kexts_path / Path(f"Acidanthera/Lilu-v{self.lilu_version}.zip")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def whatevergreen_path(self): return self.payload_kexts_path / Path(f"Acidanthera/WhateverGreen-v{self.whatevergreen_version}.zip")
|
def whatevergreen_path(self):
|
||||||
|
return self.payload_kexts_path / Path(f"Acidanthera/WhateverGreen-v{self.whatevergreen_version}.zip")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def airportbcrmfixup_path(self): return self.payload_kexts_path / Path(f"Acidanthera/AirportBrcmFixup-v{self.airportbcrmfixup_version}.zip")
|
def airportbcrmfixup_path(self):
|
||||||
|
return self.payload_kexts_path / Path(f"Acidanthera/AirportBrcmFixup-v{self.airportbcrmfixup_version}.zip")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def restrictevents_path(self): return self.payload_kexts_path / Path(f"Acidanthera/RestrictEvents-v{self.restrictevents_version}.zip")
|
def restrictevents_path(self):
|
||||||
|
return self.payload_kexts_path / Path(f"Acidanthera/RestrictEvents-v{self.restrictevents_version}.zip")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def restrictevents_mbp_path(self): return self.payload_kexts_path / Path(f"Acidanthera/RestrictEvents-MBP91-v{self.restrictevents_mbp_version}.zip")
|
def restrictevents_mbp_path(self):
|
||||||
|
return self.payload_kexts_path / Path(f"Acidanthera/RestrictEvents-MBP91-v{self.restrictevents_mbp_version}.zip")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def bcm570_path(self): return self.payload_kexts_path / Path(f"Ethernet/CatalinaBCM5701Ethernet-v{self.bcm570_version}.zip")
|
def bcm570_path(self):
|
||||||
|
return self.payload_kexts_path / Path(f"Ethernet/CatalinaBCM5701Ethernet-v{self.bcm570_version}.zip")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def marvel_path(self): return self.payload_kexts_path / Path(f"Ethernet/MarvelYukonEthernet-v{self.marvel_version}.zip")
|
def marvel_path(self):
|
||||||
|
return self.payload_kexts_path / Path(f"Ethernet/MarvelYukonEthernet-v{self.marvel_version}.zip")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def nforce_path(self): return self.payload_kexts_path / Path(f"Ethernet/nForceEthernet-v{self.nforce_version}.zip")
|
def nforce_path(self):
|
||||||
|
return self.payload_kexts_path / Path(f"Ethernet/nForceEthernet-v{self.nforce_version}.zip")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def mce_path(self): return self.payload_kexts_path / Path(f"Misc/AppleMCEReporterDisabler-v{self.mce_version}.zip")
|
def mce_path(self):
|
||||||
|
return self.payload_kexts_path / Path(f"Misc/AppleMCEReporterDisabler-v{self.mce_version}.zip")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def mousse_path(self): return self.payload_kexts_path / Path(f"SSE/AAAMouSSE-v{self.mousse_version}.zip")
|
def mousse_path(self):
|
||||||
|
return self.payload_kexts_path / Path(f"SSE/AAAMouSSE-v{self.mousse_version}.zip")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def telemetrap_path(self): return self.payload_kexts_path / Path(f"SSE/telemetrap-v{self.telemetrap_version}.zip")
|
def telemetrap_path(self):
|
||||||
|
return self.payload_kexts_path / Path(f"SSE/telemetrap-v{self.telemetrap_version}.zip")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def corecaptureelcap_path(self): return self.payload_kexts_path / Path(f"Wifi/corecaptureElCap-v{self.corecaptureelcap_version}.zip")
|
def corecaptureelcap_path(self):
|
||||||
|
return self.payload_kexts_path / Path(f"Wifi/corecaptureElCap-v{self.corecaptureelcap_version}.zip")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def io80211elcap_path(self): return self.payload_kexts_path / Path(f"Wifi/IO80211ElCap-v{self.io80211elcap_version}.zip")
|
def io80211elcap_path(self):
|
||||||
|
return self.payload_kexts_path / Path(f"Wifi/IO80211ElCap-v{self.io80211elcap_version}.zip")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def io80211high_sierra_path(self): return self.payload_kexts_path / Path(f"Wifi/IO80211HighSierra-v{self.io80211high_sierra_version}.zip")
|
def io80211high_sierra_path(self):
|
||||||
|
return self.payload_kexts_path / Path(f"Wifi/IO80211HighSierra-v{self.io80211high_sierra_version}.zip")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def io80211mojave_path(self): return self.payload_kexts_path / Path(f"Wifi/IO80211Mojave-v{self.io80211mojave_version}.zip")
|
def io80211mojave_path(self):
|
||||||
|
return self.payload_kexts_path / Path(f"Wifi/IO80211Mojave-v{self.io80211mojave_version}.zip")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def applealc_path(self): return self.payload_kexts_path / Path(f"Acidanthera/AppleALC-v{self.applealc_version}.zip")
|
def applealc_path(self):
|
||||||
|
return self.payload_kexts_path / Path(f"Acidanthera/AppleALC-v{self.applealc_version}.zip")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def piixata_path(self): return self.payload_kexts_path / Path(f"Misc/AppleIntelPIIXATA-v{self.piixata_version}.zip")
|
def piixata_path(self):
|
||||||
|
return self.payload_kexts_path / Path(f"Misc/AppleIntelPIIXATA-v{self.piixata_version}.zip")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def backlight_path(self): return self.payload_kexts_path / Path(f"Misc/AppleBacklightFixup-v{self.backlight_version}.zip")
|
def backlight_path(self):
|
||||||
|
return self.payload_kexts_path / Path(f"Misc/AppleBacklightFixup-v{self.backlight_version}.zip")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def backlight_injector_path(self): return self.payload_kexts_path / Path(f"Misc/BacklightInjector-v{self.backlight_injector_version}.zip")
|
def backlight_injector_path(self):
|
||||||
|
return self.payload_kexts_path / Path(f"Misc/BacklightInjector-v{self.backlight_injector_version}.zip")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def cpufriend_path(self): return self.payload_kexts_path / Path(f"Acidanthera/CPUFriend-v{self.cpufriend_version}.zip")
|
def cpufriend_path(self):
|
||||||
|
return self.payload_kexts_path / Path(f"Acidanthera/CPUFriend-v{self.cpufriend_version}.zip")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def nightshift_path(self): return self.payload_kexts_path / Path(f"Misc/NightShiftEnabler-v{self.nightshift_version}.zip")
|
def nightshift_path(self):
|
||||||
|
return self.payload_kexts_path / Path(f"Misc/NightShiftEnabler-v{self.nightshift_version}.zip")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def smcspoof_path(self): return self.payload_kexts_path / Path(f"Misc/SMC-Spoof-v{self.smcspoof_version}.zip")
|
def smcspoof_path(self):
|
||||||
|
return self.payload_kexts_path / Path(f"Misc/SMC-Spoof-v{self.smcspoof_version}.zip")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def cputscsync_path(self): return self.payload_kexts_path / Path(f"Acidanthera/CpuTscSync-v{self.cputscsync}.zip")
|
def nvmefix_path(self):
|
||||||
|
return self.payload_kexts_path / Path(f"Acidanthera/NVMeFix-v{self.nvmefix_version}.zip")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def hibernationfixup_path(self): return self.payload_kexts_path / Path(f"Acidanthera/HibernationFixup-v{self.hibernationfixup}.zip")
|
def featureunlock_path(self):
|
||||||
|
return self.payload_kexts_path / Path(f"Acidanthera/FeatureUnlock-v{self.featureunlock_version}.zip")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def nvmefix_path(self): return self.payload_kexts_path / Path(f"Acidanthera/NVMeFix-v{self.nvmefix_version}.zip")
|
def debugenhancer_path(self):
|
||||||
|
return self.payload_kexts_path / Path(f"Acidanthera/DebugEnhancer-v{self.debugenhancer_version}.zip")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def sidecarfixup_path(self): return self.payload_kexts_path / Path(f"Acidanthera/SidecarFixup-v{self.sidecarfixup_version}.zip")
|
def innie_path(self):
|
||||||
|
return self.payload_kexts_path / Path(f"Misc/Innie-v{self.innie_version}.zip")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def debugenhancer_path(self): return self.payload_kexts_path / Path(f"Acidanthera/DebugEnhancer-v{self.debugenhancer_version}.zip")
|
def latebloom_path(self):
|
||||||
|
return self.payload_kexts_path / Path(f"Misc/latebloom-v{self.latebloom_version}.zip")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def innie_path(self): return self.payload_kexts_path / Path(f"Misc/Innie-v{self.innie_version}.zip")
|
def plist_folder_path(self):
|
||||||
|
return self.payload_kexts_path / Path("Plists")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def plist_folder_path(self): return self.payload_kexts_path / Path(f"Plists")
|
def platform_plugin_plist_path(self):
|
||||||
|
return self.plist_folder_path / Path("PlatformPlugin")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def platform_plugin_plist_path(self): return self.plist_folder_path / Path(f"PlatformPlugin")
|
def fw_family_path(self):
|
||||||
|
return self.payload_kexts_path / Path(f"FireWire/IOFireWireFamily-v{self.fw_kext}.zip")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def fw_family_path(self): return self.payload_kexts_path / Path(f"FireWire/IOFireWireFamily-v{self.fw_kext}.zip")
|
def fw_sbp2_path(self):
|
||||||
|
return self.payload_kexts_path / Path(f"FireWire/IOFireWireSBP2-v{self.fw_kext}.zip")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def fw_sbp2_path(self): return self.payload_kexts_path / Path(f"FireWire/IOFireWireSBP2-v{self.fw_kext}.zip")
|
def fw_bus_path(self):
|
||||||
@property
|
return self.payload_kexts_path / Path(f"FireWire/IOFireWireSerialBusProtocolTransport-v{self.fw_kext}.zip")
|
||||||
def fw_bus_path(self): return self.payload_kexts_path / Path(f"FireWire/IOFireWireSerialBusProtocolTransport-v{self.fw_kext}.zip")
|
|
||||||
|
|
||||||
# Build Location
|
# Build Location
|
||||||
@property
|
@property
|
||||||
def build_path(self): return self.current_path / Path("Build-Folder/")
|
def build_path(self):
|
||||||
@property
|
return self.current_path / Path("Build-Folder/")
|
||||||
def opencore_release_folder(self): return self.build_path / Path(f"OpenCore-{self.opencore_build}")
|
|
||||||
@property
|
|
||||||
def opencore_zip_copied(self): return self.build_path / Path(f"OpenCore-{self.opencore_build}.zip")
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def oc_folder(self): return self.opencore_release_folder / Path("EFI/OC/")
|
def opencore_release_folder(self):
|
||||||
|
return self.build_path / Path(f"OpenCore-Build")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def plist_path(self): return self.oc_folder / Path("config.plist")
|
def opencore_zip_copied(self):
|
||||||
|
return self.build_path / Path(f"OpenCore-{self.opencore_build}.zip")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def acpi_path(self): return self.oc_folder / Path("ACPI")
|
def oc_folder(self):
|
||||||
|
return self.opencore_release_folder / Path("EFI/OC/")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def drivers_path(self): return self.oc_folder / Path("Drivers")
|
def plist_path(self):
|
||||||
|
return self.oc_folder / Path("config.plist")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def kexts_path(self): return self.oc_folder / Path("Kexts")
|
def acpi_path(self):
|
||||||
|
return self.oc_folder / Path("ACPI")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def resources_path(self): return self.oc_folder / Path("Resources")
|
def drivers_path(self):
|
||||||
|
return self.oc_folder / Path("Drivers")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def map_kext_folder(self): return self.kexts_path / Path("USB-Map.kext")
|
def kexts_path(self):
|
||||||
|
return self.oc_folder / Path("Kexts")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def map_contents_folder(self): return self.map_kext_folder / Path("Contents")
|
def resources_path(self):
|
||||||
|
return self.oc_folder / Path("Resources")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def pp_kext_folder(self): return self.kexts_path / Path("CPUFriendDataProvider.kext")
|
def map_kext_folder(self):
|
||||||
|
return self.kexts_path / Path("USB-Map.kext")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def pp_contents_folder(self): return self.pp_kext_folder / Path("Contents")
|
def map_contents_folder(self):
|
||||||
|
return self.map_kext_folder / Path("Contents")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def agdp_kext_folder(self): return self.kexts_path / Path("AGDP-Override.kext")
|
def pp_kext_folder(self):
|
||||||
|
return self.kexts_path / Path("CPUFriendDataProvider.kext")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def agdp_contents_folder(self): return self.agdp_kext_folder / Path("Contents")
|
def pp_contents_folder(self):
|
||||||
|
return self.pp_kext_folder / Path("Contents")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def agpm_kext_folder(self): return self.kexts_path / Path("AGPM-Override.kext")
|
def agdp_kext_folder(self):
|
||||||
|
return self.kexts_path / Path("AGDP-Override.kext")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def agpm_contents_folder(self): return self.agpm_kext_folder / Path("Contents")
|
def agdp_contents_folder(self):
|
||||||
|
return self.agdp_kext_folder / Path("Contents")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def amc_kext_folder(self): return self.kexts_path / Path("AMC-Override.kext")
|
def agpm_kext_folder(self):
|
||||||
|
return self.kexts_path / Path("AGPM-Override.kext")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def amc_contents_folder(self): return self.amc_kext_folder / Path("Contents")
|
def agpm_contents_folder(self):
|
||||||
|
return self.agpm_kext_folder / Path("Contents")
|
||||||
|
|
||||||
|
@property
|
||||||
|
def amc_kext_folder(self):
|
||||||
|
return self.kexts_path / Path("AMC-Override.kext")
|
||||||
|
|
||||||
|
@property
|
||||||
|
def amc_contents_folder(self):
|
||||||
|
return self.amc_kext_folder / Path("Contents")
|
||||||
|
|
||||||
# Tools
|
# Tools
|
||||||
@property
|
@property
|
||||||
def macserial_path(self): return self.payload_path / Path("Tools/macserial")
|
def macserial_path(self):
|
||||||
|
return self.payload_path / Path("Tools/macserial")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def gfxutil_path(self): return self.payload_path / Path("Tools/gfxutil")
|
def gfxutil_path(self):
|
||||||
|
return self.payload_path / Path("Tools/gfxutil")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def vault_path(self): return self.payload_path / Path("Tools/CreateVault/sign.command")
|
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
|
# Icons
|
||||||
@property
|
@property
|
||||||
def app_icon_path(self): return self.current_path / Path("OC-Patcher.icns")
|
def app_icon_path(self):
|
||||||
|
return self.current_path / Path("OC-Patcher.icns")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def icon_path_external(self): return self.payload_path / Path("Icon/External/.VolumeIcon.icns")
|
def icon_path_external(self):
|
||||||
|
return self.payload_path / Path("Icon/External/.VolumeIcon.icns")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def icon_path_internal(self): return self.payload_path / Path("Icon/Internal/.VolumeIcon.icns")
|
def icon_path_internal(self):
|
||||||
|
return self.payload_path / Path("Icon/Internal/.VolumeIcon.icns")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def icon_path_sd(self): return self.payload_path / Path("Icon/SD-Card/.VolumeIcon.icns")
|
def icon_path_sd(self):
|
||||||
|
return self.payload_path / Path("Icon/SD-Card/.VolumeIcon.icns")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def icon_path_ssd(self): return self.payload_path / Path("Icon/SSD/.VolumeIcon.icns")
|
def icon_path_ssd(self):
|
||||||
|
return self.payload_path / Path("Icon/SSD/.VolumeIcon.icns")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def gui_path(self): return self.payload_path / Path("Icon/Resources.zip")
|
def gui_path(self):
|
||||||
|
return self.payload_path / Path("Icon/Resources.zip")
|
||||||
|
|
||||||
# Apple Payloads Paths
|
# Apple Payloads Paths
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def payload_apple_root_path_unzip(self): return self.payload_path / Path(f"Apple-Binaries-OCLP-{self.payload_version}")
|
def payload_apple_root_path_zip(self):
|
||||||
|
return self.payload_path / Path("Apple.zip")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def payload_apple_root_path_zip(self): return self.payload_path / Path("Apple.zip")
|
def payload_apple_root_path(self):
|
||||||
|
return self.payload_path / Path("Apple")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def payload_apple_root_path(self): return self.payload_path / Path("Apple")
|
def payload_apple_kexts_path(self):
|
||||||
|
return self.payload_apple_root_path / Path("Extensions")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def payload_apple_kexts_path(self): return self.payload_apple_root_path / Path("Extensions")
|
def payload_apple_frameworks_path(self):
|
||||||
|
return self.payload_apple_root_path / Path("Frameworks")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def payload_apple_frameworks_path(self): return self.payload_apple_root_path / Path("Frameworks")
|
def payload_apple_frameworks_path_accel(self):
|
||||||
|
return self.payload_apple_frameworks_path / Path("Graphics-Acceleration")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def payload_apple_frameworks_path_accel(self): return self.payload_apple_frameworks_path / Path("Graphics-Acceleration")
|
def payload_apple_frameworks_path_accel_ts2(self):
|
||||||
|
return self.payload_apple_frameworks_path / Path("Graphics-Acceleration-TeraScale-2")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def payload_apple_frameworks_path_accel_ts2(self): return self.payload_apple_frameworks_path / Path("Graphics-Acceleration-TS2")
|
def payload_apple_frameworks_path_accel_ivy(self):
|
||||||
|
return self.payload_apple_frameworks_path / Path("Graphics-Acceleration-Ivy-Bridge")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def payload_apple_lauchd_path(self): return self.payload_apple_root_path / Path("LaunchDaemons")
|
def payload_apple_lauchd_path(self):
|
||||||
|
return self.payload_apple_root_path / Path("LaunchDaemons")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def payload_apple_lauchd_path_accel(self): return self.payload_apple_lauchd_path / Path("Graphics-Acceleration")
|
def payload_apple_lauchd_path_accel(self):
|
||||||
|
return self.payload_apple_lauchd_path / Path("Graphics-Acceleration")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def payload_apple_private_frameworks_path(self): return self.payload_apple_root_path / Path("PrivateFrameworks")
|
def payload_apple_private_frameworks_path(self):
|
||||||
|
return self.payload_apple_root_path / Path("PrivateFrameworks")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def payload_apple_private_frameworks_path_accel(self): return self.payload_apple_private_frameworks_path / Path("Graphics-Acceleration")
|
def payload_apple_private_frameworks_path_accel(self):
|
||||||
|
return self.payload_apple_private_frameworks_path / Path("Graphics-Acceleration")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def payload_apple_private_frameworks_path_accel_ts2(self): return self.payload_apple_private_frameworks_path / Path("Graphics-Acceleration-TS2")
|
def payload_apple_private_frameworks_path_accel_ts2(self):
|
||||||
|
return self.payload_apple_private_frameworks_path / Path("Graphics-Acceleration-TeraScale-2")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def payload_apple_private_frameworks_path_brightness(self): return self.payload_apple_private_frameworks_path / Path("Brightness-Control")
|
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")
|
||||||
|
|
||||||
# Apple Extensions
|
# Apple Extensions
|
||||||
@property
|
@property
|
||||||
def audio_path(self): return self.payload_apple_kexts_path / Path("Audio")
|
def audio_path(self):
|
||||||
|
return self.payload_apple_kexts_path / Path("Audio")
|
||||||
|
|
||||||
# GPU Kexts and Bundles
|
# GPU Kexts and Bundles
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def legacy_graphics(self): return self.payload_apple_kexts_path / Path("Graphics-Acceleration")
|
def legacy_graphics(self):
|
||||||
@property
|
return self.payload_apple_kexts_path / Path("Graphics-Acceleration")
|
||||||
def legacy_graphics_ts2(self): return self.payload_apple_kexts_path / Path("Graphics-Acceleration-TS2")
|
|
||||||
@property
|
|
||||||
def legacy_nvidia_path(self): return self.legacy_graphics / Path("Nvidia-Tesla-Fermi")
|
|
||||||
@property
|
|
||||||
def legacy_nvidia_kepler_path(self): return self.legacy_graphics / Path("Nvidia-Kepler")
|
|
||||||
@property
|
|
||||||
def legacy_amd_path(self): return self.legacy_graphics / Path("AMD-ATI")
|
|
||||||
@property
|
|
||||||
def legacy_amd_path_ts2(self): return self.legacy_graphics / Path("ATI-TS2")
|
|
||||||
@property
|
|
||||||
def legacy_intel_gen1_path(self): return self.legacy_graphics / Path("Intel-Gen5-Ironlake")
|
|
||||||
@property
|
|
||||||
def legacy_intel_gen2_path(self): return self.legacy_graphics / Path("Intel-Gen6-SandyBridge")
|
|
||||||
@property
|
|
||||||
def legacy_intel_gen3_path(self): return self.legacy_graphics / Path("Intel-Gen7-IvyBridge")
|
|
||||||
@property
|
|
||||||
def legacy_general_path(self): return self.legacy_graphics / Path("General-Patches")
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def legacy_brightness(self): return self.payload_apple_kexts_path / Path("Brightness-Control")
|
def legacy_nvidia_path(self):
|
||||||
|
return self.legacy_graphics / Path("Nvidia-Tesla")
|
||||||
|
|
||||||
# Apple Frameworks
|
|
||||||
@property
|
@property
|
||||||
def coredisplay_path(self): return self.payload_apple_frameworks_path_accel / Path("CoreDisplay.framework")
|
def legacy_nvidia_kepler_path(self):
|
||||||
@property
|
return self.legacy_graphics / Path("Nvidia-Kepler")
|
||||||
def iosurface_f_path(self): return self.payload_apple_frameworks_path_accel / Path("IOSurface.framework")
|
|
||||||
@property
|
|
||||||
def opengl_path(self): return self.payload_apple_frameworks_path_accel / Path("OpenGL.framework")
|
|
||||||
|
|
||||||
# Apple LaunchDaemons
|
|
||||||
@property
|
@property
|
||||||
def hiddhack_path(self): return self.payload_apple_lauchd_path_accel / Path("IOHID-Fixup.plist")
|
def legacy_amd_path(self):
|
||||||
@property
|
return self.legacy_graphics / Path("AMD-TeraScale")
|
||||||
def legacy_hiddhack_path(self): return self.payload_apple_lauchd_path_accel / Path("HiddHack.plist")
|
|
||||||
|
|
||||||
# Apple PrivateFrameworks
|
|
||||||
@property
|
@property
|
||||||
def gpusupport_path(self): return self.payload_apple_private_frameworks_path_accel / Path("GPUSupport.framework")
|
def legacy_amd_path_ts2(self):
|
||||||
|
return self.legacy_graphics / Path("AMD-TeraScale-2")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def skylight_path(self): return self.payload_apple_private_frameworks_path_accel / Path("SkyLight.framework")
|
def legacy_intel_gen1_path(self):
|
||||||
|
return self.legacy_graphics / Path("Intel-Gen5-Ironlake")
|
||||||
|
|
||||||
|
@property
|
||||||
|
def legacy_intel_gen2_path(self):
|
||||||
|
return self.legacy_graphics / Path("Intel-Gen6-SandyBridge")
|
||||||
|
|
||||||
|
@property
|
||||||
|
def legacy_intel_gen3_path(self):
|
||||||
|
return self.legacy_graphics / Path("Intel-Gen7-IvyBridge")
|
||||||
|
|
||||||
|
@property
|
||||||
|
def legacy_general_path(self):
|
||||||
|
return self.legacy_graphics / Path("General-Patches")
|
||||||
|
|
||||||
|
@property
|
||||||
|
def legacy_brightness(self):
|
||||||
|
return self.payload_apple_kexts_path / Path("Brightness-Control")
|
||||||
|
|
||||||
csr_values = {
|
csr_values = {
|
||||||
|
# Source: macOS 11.4 (XNU's csr.h)
|
||||||
|
# https://opensource.apple.com/source/xnu/xnu-7195.121.3/bsd/sys/csr.h.auto.html
|
||||||
"CSR_ALLOW_UNTRUSTED_KEXTS": False, # 0x1 - Allows Unsigned Kexts - Introduced in El Capitan # noqa: E241
|
"CSR_ALLOW_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_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_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_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_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_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_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_DEVICE_CONFIGURATION": False, # 0x80 - Allow custom DeviceTree (iOS) - Introduced in El Capitan # noqa: E241
|
||||||
"CSR_ALLOW_ANY_RECOVERY_OS": False, # 0x100 - Disable BaseSystem Verification - Introduced in Sierra # noqa: E241
|
"CSR_ALLOW_ANY_RECOVERY_OS": False, # 0x100 - Skip BaseSystem Verification - Introduced in Sierra # noqa: E241
|
||||||
"CSR_ALLOW_UNAPPROVED_KEXTS": False, # 0x200 - Allow Unapproved Kexts - Introduced in High 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_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
|
||||||
}
|
}
|
||||||
@@ -399,22 +576,31 @@ class Constants:
|
|||||||
]
|
]
|
||||||
|
|
||||||
sbm_values = [
|
sbm_values = [
|
||||||
"j137",
|
"j137", # iMacPro1,1
|
||||||
"j680",
|
"j680", # MacBookPro15,1
|
||||||
"j132",
|
"j132", # MacBookPro15,2
|
||||||
"j174",
|
"j174", # Macmini8,1
|
||||||
"j140k",
|
"j140k", # MacBookAir8,1
|
||||||
"j780",
|
"j780", # MacBookPro15,3
|
||||||
"j213",
|
"j213", # MacBookPro15,4
|
||||||
"j140a",
|
"j140a", # MacBookAir8,2
|
||||||
"j152f",
|
"j152f", # MacBookPro16,1
|
||||||
"j160",
|
"j160", # MacPro7,1
|
||||||
"j230k",
|
"j230k", # MacBookAir9,1
|
||||||
"j214k",
|
"j214k", # MacBookPro16,2
|
||||||
"j223",
|
"j223", # MacBookPro16,3
|
||||||
"j215",
|
"j215", # MacBookPro16,4
|
||||||
"j185",
|
"j185", # iMac20,1
|
||||||
"j185f",
|
"j185f", # iMac20,2
|
||||||
|
]
|
||||||
|
|
||||||
|
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 = {
|
board_id = {
|
||||||
@@ -442,7 +628,7 @@ class Constants:
|
|||||||
"MacBookAir7,1": "Mac-9F18E312C5C2BF0B",
|
"MacBookAir7,1": "Mac-9F18E312C5C2BF0B",
|
||||||
"MacBookAir7,2": "Mac-937CB26E2E02BB01",
|
"MacBookAir7,2": "Mac-937CB26E2E02BB01",
|
||||||
"MacBookAir8,1": "Mac-827FAC58A8FDFA22",
|
"MacBookAir8,1": "Mac-827FAC58A8FDFA22",
|
||||||
"MacBookAir8,1": "Mac-226CB3C6A851A671",
|
"MacBookAir8,2": "Mac-226CB3C6A851A671",
|
||||||
"MacBookAir9,1": "Mac-0CFF9C7C2B63DF8D",
|
"MacBookAir9,1": "Mac-0CFF9C7C2B63DF8D",
|
||||||
"MacBookPro1,1": "Mac-F425BEC8",
|
"MacBookPro1,1": "Mac-F425BEC8",
|
||||||
"MacBookPro1,2": "Mac-F42DBEC8",
|
"MacBookPro1,2": "Mac-F42DBEC8",
|
||||||
@@ -505,14 +691,13 @@ class Constants:
|
|||||||
"iMac8,1": "Mac-F227BEC8",
|
"iMac8,1": "Mac-F227BEC8",
|
||||||
"iMac9,1": "Mac-F2218FA9",
|
"iMac9,1": "Mac-F2218FA9",
|
||||||
"iMac10,1": "Mac-F221DCC8",
|
"iMac10,1": "Mac-F221DCC8",
|
||||||
"iMac10,1": "Mac-F2268CC8",
|
# "iMac10,1": "Mac-F2268CC8",
|
||||||
"iMac11,1": "Mac-F2268DAE",
|
"iMac11,1": "Mac-F2268DAE",
|
||||||
"iMac11,2": "Mac-F2238AC8",
|
"iMac11,2": "Mac-F2238AC8",
|
||||||
"iMac11,3": "Mac-F2238BAE",
|
"iMac11,3": "Mac-F2238BAE",
|
||||||
"iMac12,1": "Mac-942B5BF58194151B",
|
"iMac12,1": "Mac-942B5BF58194151B",
|
||||||
"iMac12,2": "Mac-942B59F58194171B",
|
"iMac12,2": "Mac-942B59F58194171B",
|
||||||
"iMac13,1": "Mac-00BE6ED71E35EB86",
|
"iMac13,1": "Mac-00BE6ED71E35EB86",
|
||||||
"iMac13,1": "Mac-00BE6ED71E35EB86",
|
|
||||||
"iMac13,2": "Mac-FC02E91DDD3FA6A4",
|
"iMac13,2": "Mac-FC02E91DDD3FA6A4",
|
||||||
"iMac13,3": "Mac-7DF2A3B5E5D671ED",
|
"iMac13,3": "Mac-7DF2A3B5E5D671ED",
|
||||||
"iMac14,1": "Mac-031B6874CF7F642A",
|
"iMac14,1": "Mac-031B6874CF7F642A",
|
||||||
|
|||||||
@@ -1,116 +0,0 @@
|
|||||||
# Probe devices, return device entries
|
|
||||||
# Copyright (C) 2021 Mykola Grymalyuk
|
|
||||||
from __future__ import print_function
|
|
||||||
|
|
||||||
import binascii
|
|
||||||
import plistlib
|
|
||||||
import subprocess
|
|
||||||
|
|
||||||
from Resources import Constants, Utilities
|
|
||||||
|
|
||||||
class pci_probe:
|
|
||||||
def __init__(self):
|
|
||||||
self.constants = Constants.Constants()
|
|
||||||
|
|
||||||
# Converts given device IDs to DeviceProperty pathing, requires ACPI pathing as DeviceProperties shouldn't be used otherwise
|
|
||||||
def deviceproperty_probe(self, vendor_id, device_id, acpi_path):
|
|
||||||
gfxutil_output: str = subprocess.run([self.constants.gfxutil_path] + f"-v".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.decode()
|
|
||||||
try:
|
|
||||||
if acpi_path == "":
|
|
||||||
acpi_path = "No ACPI Path Given"
|
|
||||||
raise IndexError
|
|
||||||
device_path = [line.strip().split("= ", 1)[1] for line in gfxutil_output.split("\n") if f'{vendor_id}:{device_id}'.lower() in line.strip() and acpi_path in line.strip()][0]
|
|
||||||
return device_path
|
|
||||||
except IndexError:
|
|
||||||
print(f"- No DevicePath found for {vendor_id}:{device_id} ({acpi_path})")
|
|
||||||
return ""
|
|
||||||
|
|
||||||
# Returns the device path of parent controller
|
|
||||||
def device_property_parent(self, device_path):
|
|
||||||
device_path_parent = "/".join(device_path.split("/")[:-1])
|
|
||||||
return device_path_parent
|
|
||||||
|
|
||||||
def acpi_strip(self, acpi_path_full):
|
|
||||||
# Strip IOACPIPlane:/_SB, remove 000's, convert ffff into 0 and finally make everything upper case
|
|
||||||
# IOReg | gfxutil
|
|
||||||
# IOACPIPlane:/_SB/PC00@0/DMI0@0 -> /PC00@0/DMI0@0
|
|
||||||
# IOACPIPlane:/_SB/PC03@0/BR3A@0/SL09@ffff -> /PC03@0/BR3A@0/SL09@0
|
|
||||||
# IOACPIPlane:/_SB/PC03@0/M2U0@150000 -> /PC03@0/M2U0@15
|
|
||||||
# IOACPIPlane:/_SB/PC01@0/CHA6@100000 -> /PC01@0/CHA6@10
|
|
||||||
# IOACPIPlane:/_SB/PC00@0/RP09@1d0000/PXSX@0 -> /PC00@0/RP09@1D/PXSX@0
|
|
||||||
# IOACPIPlane:/_SB/PCI0@0/P0P2@10000 -> /PCI0@0/P0P2@1
|
|
||||||
acpi_path = acpi_path_full.replace("IOACPIPlane:/_SB", "")
|
|
||||||
acpi_path = acpi_path.replace("0000", "")
|
|
||||||
for entry in ["1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"]:
|
|
||||||
acpi_path = acpi_path.replace(f"000{entry}", f",{entry}")
|
|
||||||
acpi_path = acpi_path.replace("ffff", "0")
|
|
||||||
acpi_path = acpi_path.upper()
|
|
||||||
return acpi_path
|
|
||||||
|
|
||||||
# Note gpu_probe should only be used on IGPU and GFX0 entries
|
|
||||||
def gpu_probe(self, gpu_type):
|
|
||||||
try:
|
|
||||||
devices = plistlib.loads(subprocess.run(f"ioreg -r -n {gpu_type} -a".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode())
|
|
||||||
vendor_id = Utilities.hexswap(binascii.hexlify(devices[0]["vendor-id"]).decode()[:4])
|
|
||||||
device_id = Utilities.hexswap(binascii.hexlify(devices[0]["device-id"]).decode()[:4])
|
|
||||||
try:
|
|
||||||
acpi_path = devices[0]["acpi-path"]
|
|
||||||
acpi_path = self.acpi_strip(acpi_path)
|
|
||||||
return vendor_id, device_id, acpi_path
|
|
||||||
except KeyError:
|
|
||||||
print(f"- No ACPI entry found for {gpu_type}")
|
|
||||||
return vendor_id, device_id, ""
|
|
||||||
except ValueError:
|
|
||||||
print(f"- No IOService entry found for {gpu_type} (V)")
|
|
||||||
return "", "", ""
|
|
||||||
except IndexError:
|
|
||||||
print(f"- No IOService entry found for {gpu_type} (I)")
|
|
||||||
return "", "", ""
|
|
||||||
|
|
||||||
def wifi_probe(self):
|
|
||||||
devices = plistlib.loads(subprocess.run("ioreg -c IOPCIDevice -r -d2 -a".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode())
|
|
||||||
try:
|
|
||||||
devices = [i for i in devices if i["class-code"] == binascii.unhexlify(self.constants.classcode_wifi)]
|
|
||||||
vendor_id = Utilities.hexswap(binascii.hexlify(devices[0]["vendor-id"]).decode()[:4])
|
|
||||||
device_id = Utilities.hexswap(binascii.hexlify(devices[0]["device-id"]).decode()[:4])
|
|
||||||
ioname = devices[0]["IOName"]
|
|
||||||
try:
|
|
||||||
acpi_path = devices[0]["acpi-path"]
|
|
||||||
acpi_path = self.acpi_strip(acpi_path)
|
|
||||||
return vendor_id, device_id, ioname, acpi_path
|
|
||||||
except KeyError:
|
|
||||||
print(f"- No ACPI entry found for {vendor_id}:{device_id}")
|
|
||||||
return vendor_id, device_id, ioname, ""
|
|
||||||
except ValueError:
|
|
||||||
print(f"- No IOService entry found for Wireless Card (V)")
|
|
||||||
return "", "", "", ""
|
|
||||||
except IndexError:
|
|
||||||
print(f"- No IOService entry found for Wireless Card (I)")
|
|
||||||
return "", "", "", ""
|
|
||||||
|
|
||||||
def cpu_feature(self, instruction):
|
|
||||||
cpu_features = subprocess.run("sysctl machdep.cpu.features".split(), stdout=subprocess.PIPE).stdout.decode().partition(": ")[2].strip().split(" ")
|
|
||||||
if instruction in cpu_features:
|
|
||||||
print(f"- Found {instruction} support")
|
|
||||||
return True
|
|
||||||
else:
|
|
||||||
print(f"- Failed to find {instruction} support")
|
|
||||||
return False
|
|
||||||
|
|
||||||
class smbios_probe:
|
|
||||||
def model_detect(self, custom):
|
|
||||||
opencore_model: str = subprocess.run("nvram 4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102:oem-product".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.decode()
|
|
||||||
if not opencore_model.startswith("nvram: Error getting variable") and custom is False:
|
|
||||||
current_model = [line.strip().split(":oem-product ", 1)[1] for line in opencore_model.split("\n") if line.strip().startswith("4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102:")][0]
|
|
||||||
else:
|
|
||||||
current_model = plistlib.loads(subprocess.run("system_profiler -detailLevel mini -xml SPHardwareDataType".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.strip())[0]["_items"][0]["machine_model"]
|
|
||||||
return current_model
|
|
||||||
|
|
||||||
def board_detect(self, custom):
|
|
||||||
opencore_model: str = subprocess.run("nvram 4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102:oem-board".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.decode()
|
|
||||||
if not opencore_model.startswith("nvram: Error getting variable") and custom is False:
|
|
||||||
current_model = [line.strip().split(":oem-board ", 1)[1] for line in opencore_model.split("\n") if line.strip().startswith("4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102:")][0]
|
|
||||||
else:
|
|
||||||
current_model = plistlib.loads(subprocess.run(f"ioreg -p IODeviceTree -r -n / -a".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode())
|
|
||||||
current_model = current_model[0]["board-id"]
|
|
||||||
return current_model
|
|
||||||
@@ -100,32 +100,14 @@ MissingSSE42 = [
|
|||||||
"iMac10,1",
|
"iMac10,1",
|
||||||
"MacPro3,1",
|
"MacPro3,1",
|
||||||
"Xserve2,1",
|
"Xserve2,1",
|
||||||
"Dortania1,1"
|
"Dortania1,1",
|
||||||
]
|
]
|
||||||
|
|
||||||
SSEEmulator = [
|
SSEEmulator = ["MacPro3,1", "Xserve2,1", "Dortania1,1"]
|
||||||
"MacPro3,1",
|
|
||||||
"Xserve2,1",
|
|
||||||
"Dortania1,1"
|
|
||||||
]
|
|
||||||
|
|
||||||
DualSocket = [
|
DualSocket = ["MacPro3,1", "MacPro4,1", "MacPro5,1", "Xserve2,1", "Xserve3,1", "Dortania1,1"]
|
||||||
"MacPro3,1",
|
|
||||||
"MacPro4,1",
|
|
||||||
"MacPro5,1",
|
|
||||||
"Xserve2,1",
|
|
||||||
"Xserve3,1",
|
|
||||||
"Dortania1,1"
|
|
||||||
]
|
|
||||||
|
|
||||||
pciSSDT = [
|
pciSSDT = ["MacBookPro6,1", "MacBookPro6,2", "iMac11,1", "iMac11,2", "iMac11,3", "Dortania1,1"]
|
||||||
"MacBookPro6,1",
|
|
||||||
"MacBookPro6,2",
|
|
||||||
"iMac11,1",
|
|
||||||
"iMac11,2",
|
|
||||||
"iMac11,3",
|
|
||||||
"Dortania1,1"
|
|
||||||
]
|
|
||||||
|
|
||||||
# Ethernet patches
|
# Ethernet patches
|
||||||
|
|
||||||
@@ -142,15 +124,9 @@ EthernetNvidia = [
|
|||||||
"Macmini3,1",
|
"Macmini3,1",
|
||||||
"iMac9,1",
|
"iMac9,1",
|
||||||
"iMac10,1",
|
"iMac10,1",
|
||||||
"Dortania1,1"
|
"Dortania1,1",
|
||||||
]
|
|
||||||
EthernetMarvell = [
|
|
||||||
"MacBook4,1",
|
|
||||||
"MacBookPro4,1",
|
|
||||||
"iMac7,1",
|
|
||||||
"iMac8,1",
|
|
||||||
"Dortania1,1"
|
|
||||||
]
|
]
|
||||||
|
EthernetMarvell = ["MacBook4,1", "MacBookPro4,1", "iMac7,1", "iMac8,1", "Dortania1,1"]
|
||||||
EthernetBroadcom = [
|
EthernetBroadcom = [
|
||||||
"MacBookAir4,1",
|
"MacBookAir4,1",
|
||||||
"MacBookAir4,2",
|
"MacBookAir4,2",
|
||||||
@@ -169,31 +145,14 @@ EthernetBroadcom = [
|
|||||||
"iMac11,3",
|
"iMac11,3",
|
||||||
"iMac12,1",
|
"iMac12,1",
|
||||||
"iMac12,2",
|
"iMac12,2",
|
||||||
"Dortania1,1"
|
"Dortania1,1",
|
||||||
]
|
]
|
||||||
|
|
||||||
# Wifi patches
|
# Wifi patches
|
||||||
|
|
||||||
WifiAtheros = [
|
WifiAtheros = ["iMac10,1", "iMac11,1", "iMac11,2", "iMac11,3", "iMac12,1", "iMac12,2", "MacPro3,1", "MacPro4,1", "Dortania1,1"]
|
||||||
"iMac10,1",
|
|
||||||
"iMac11,1",
|
|
||||||
"iMac11,2",
|
|
||||||
"iMac11,3",
|
|
||||||
"iMac12,1",
|
|
||||||
"iMac12,2",
|
|
||||||
"MacPro3,1",
|
|
||||||
"MacPro4,1",
|
|
||||||
"Dortania1,1"
|
|
||||||
]
|
|
||||||
|
|
||||||
WifiBCM94328 = [
|
WifiBCM94328 = ["MacBook4,1", "MacBookAir2,1", "MacBookPro4,1", "iMac7,1", "iMac8,1", "Dortania1,1"]
|
||||||
"MacBook4,1",
|
|
||||||
"MacBookAir2,1",
|
|
||||||
"MacBookPro4,1",
|
|
||||||
"iMac7,1",
|
|
||||||
"iMac8,1",
|
|
||||||
"Dortania1,1"
|
|
||||||
]
|
|
||||||
|
|
||||||
WifiBCM94322 = [
|
WifiBCM94322 = [
|
||||||
"MacBook5,1",
|
"MacBook5,1",
|
||||||
@@ -209,7 +168,7 @@ WifiBCM94322 = [
|
|||||||
"Macmini3,1",
|
"Macmini3,1",
|
||||||
"iMac9,1",
|
"iMac9,1",
|
||||||
"MacPro5,1",
|
"MacPro5,1",
|
||||||
"Dortania1,1"
|
"Dortania1,1",
|
||||||
]
|
]
|
||||||
|
|
||||||
WifiBCM94331 = [
|
WifiBCM94331 = [
|
||||||
@@ -237,7 +196,7 @@ WifiBCM94331 = [
|
|||||||
"iMac13,1", # PciRoot(0x0)/Pci(0x1C,0x3)/Pci(0x0,0x0)
|
"iMac13,1", # PciRoot(0x0)/Pci(0x1C,0x3)/Pci(0x0,0x0)
|
||||||
"iMac13,2", # PciRoot(0x0)/Pci(0x1C,0x3)/Pci(0x0,0x0)
|
"iMac13,2", # PciRoot(0x0)/Pci(0x1C,0x3)/Pci(0x0,0x0)
|
||||||
"iMac13,3", # PciRoot(0x0)/Pci(0x1C,0x3)/Pci(0x0,0x0)
|
"iMac13,3", # PciRoot(0x0)/Pci(0x1C,0x3)/Pci(0x0,0x0)
|
||||||
"Dortania1,1"
|
"Dortania1,1",
|
||||||
]
|
]
|
||||||
|
|
||||||
# Audio
|
# Audio
|
||||||
@@ -270,8 +229,8 @@ LegacyAudio = [
|
|||||||
"Macmini5,1",
|
"Macmini5,1",
|
||||||
"Macmini5,2",
|
"Macmini5,2",
|
||||||
"Macmini5,3",
|
"Macmini5,3",
|
||||||
#"iMac7,1",
|
# "iMac7,1",
|
||||||
#"iMac8,1",
|
# "iMac8,1",
|
||||||
"iMac9,1",
|
"iMac9,1",
|
||||||
"iMac10,1",
|
"iMac10,1",
|
||||||
"iMac11,1",
|
"iMac11,1",
|
||||||
@@ -280,7 +239,7 @@ LegacyAudio = [
|
|||||||
"iMac12,1",
|
"iMac12,1",
|
||||||
"iMac12,2",
|
"iMac12,2",
|
||||||
"MacPro3,1",
|
"MacPro3,1",
|
||||||
"Dortania1,1"
|
"Dortania1,1",
|
||||||
]
|
]
|
||||||
|
|
||||||
nvidiaHDEF = [
|
nvidiaHDEF = [
|
||||||
@@ -300,7 +259,7 @@ nvidiaHDEF = [
|
|||||||
"Macmini3,1",
|
"Macmini3,1",
|
||||||
"Macmini4,1",
|
"Macmini4,1",
|
||||||
"iMac9,1",
|
"iMac9,1",
|
||||||
"iMac10,1"
|
"iMac10,1",
|
||||||
]
|
]
|
||||||
|
|
||||||
# GPU
|
# GPU
|
||||||
@@ -355,7 +314,7 @@ LegacyGPU = [
|
|||||||
"iMac11,3", # AMD 5000
|
"iMac11,3", # AMD 5000
|
||||||
"iMac12,1", # AMD 6000
|
"iMac12,1", # AMD 6000
|
||||||
"iMac12,2", # AMD 6000
|
"iMac12,2", # AMD 6000
|
||||||
"Dortania1,1" # RTX 3080
|
"Dortania1,1", # RTX 3080
|
||||||
]
|
]
|
||||||
|
|
||||||
LegacyGPUNvidia = [
|
LegacyGPUNvidia = [
|
||||||
@@ -447,15 +406,10 @@ LegacyHID = [
|
|||||||
"iMac9,1",
|
"iMac9,1",
|
||||||
"iMac10,1",
|
"iMac10,1",
|
||||||
"MacPro3,1",
|
"MacPro3,1",
|
||||||
"Dortania1,1"
|
"Dortania1,1",
|
||||||
]
|
]
|
||||||
|
|
||||||
NVMePatch = [
|
NVMePatch = ["MacPro3,1", "MacPro4,1", "Xserve3,1", "Dortania1,1"]
|
||||||
"MacPro3,1",
|
|
||||||
"MacPro4,1",
|
|
||||||
"Xserve3,1",
|
|
||||||
"Dortania1,1"
|
|
||||||
]
|
|
||||||
|
|
||||||
XhciSupport = [
|
XhciSupport = [
|
||||||
"MacBookAir5,1",
|
"MacBookAir5,1",
|
||||||
@@ -487,17 +441,39 @@ XhciSupport = [
|
|||||||
"iMac16,1",
|
"iMac16,1",
|
||||||
"iMac16,2",
|
"iMac16,2",
|
||||||
"MacPro6,1",
|
"MacPro6,1",
|
||||||
"Dortania1,1"
|
"Dortania1,1",
|
||||||
]
|
]
|
||||||
|
|
||||||
SidecarPatch = [
|
SidecarPatch = [
|
||||||
|
"MacBook4,1",
|
||||||
|
"MacBook5,1",
|
||||||
|
"MacBook5,2",
|
||||||
|
"MacBook6,1",
|
||||||
|
"MacBook7,1",
|
||||||
"MacBook8,1",
|
"MacBook8,1",
|
||||||
|
"MacBookAir2,1",
|
||||||
|
"MacBookAir3,1",
|
||||||
|
"MacBookAir3,2",
|
||||||
|
"MacBookAir4,1",
|
||||||
|
"MacBookAir4,2",
|
||||||
"MacBookAir5,1",
|
"MacBookAir5,1",
|
||||||
"MacBookAir5,2",
|
"MacBookAir5,2",
|
||||||
"MacBookAir6,1",
|
"MacBookAir6,1",
|
||||||
"MacBookAir6,2",
|
"MacBookAir6,2",
|
||||||
"MacBookAir7,1",
|
"MacBookAir7,1",
|
||||||
"MacBookAir7,2",
|
"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,1",
|
||||||
"MacBookPro9,2",
|
"MacBookPro9,2",
|
||||||
"MacBookPro10,1",
|
"MacBookPro10,1",
|
||||||
@@ -508,9 +484,30 @@ SidecarPatch = [
|
|||||||
"MacBookPro11,4",
|
"MacBookPro11,4",
|
||||||
"MacBookPro11,5",
|
"MacBookPro11,5",
|
||||||
"MacBookPro12,1",
|
"MacBookPro12,1",
|
||||||
|
"MacBookPro13,1",
|
||||||
|
"MacBookPro13,2",
|
||||||
|
"MacBookPro13,3",
|
||||||
|
"MacBookPro14,1",
|
||||||
|
"MacBookPro14,2",
|
||||||
|
"MacBookPro14,3",
|
||||||
|
"Macmini3,1",
|
||||||
|
"Macmini4,1",
|
||||||
|
"Macmini5,1",
|
||||||
|
"Macmini5,2",
|
||||||
|
"Macmini5,3",
|
||||||
"Macmini6,1",
|
"Macmini6,1",
|
||||||
"Macmini6,2",
|
"Macmini6,2",
|
||||||
"Macmini7,1",
|
"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,1",
|
||||||
"iMac13,2",
|
"iMac13,2",
|
||||||
"iMac13,3",
|
"iMac13,3",
|
||||||
@@ -520,9 +517,15 @@ SidecarPatch = [
|
|||||||
"iMac15,1",
|
"iMac15,1",
|
||||||
"iMac16,1",
|
"iMac16,1",
|
||||||
"iMac16,2",
|
"iMac16,2",
|
||||||
|
"iMac17,1",
|
||||||
|
"iMac18,1",
|
||||||
|
"iMac18,2",
|
||||||
|
"iMac18,3",
|
||||||
|
"MacPro3,1",
|
||||||
|
"MacPro4,1",
|
||||||
"MacPro5,1",
|
"MacPro5,1",
|
||||||
"MacPro6,1",
|
"MacPro6,1",
|
||||||
"Dortania1,1"
|
"Dortania1,1",
|
||||||
]
|
]
|
||||||
|
|
||||||
DualGPUPatch = [
|
DualGPUPatch = [
|
||||||
@@ -540,7 +543,7 @@ DualGPUPatch = [
|
|||||||
"iMac13,2",
|
"iMac13,2",
|
||||||
"iMac14,2",
|
"iMac14,2",
|
||||||
"iMac14,3",
|
"iMac14,3",
|
||||||
"Dortania1,1"
|
"Dortania1,1",
|
||||||
]
|
]
|
||||||
|
|
||||||
DualGPUPatchRetina = [
|
DualGPUPatchRetina = [
|
||||||
@@ -555,29 +558,12 @@ IntelNvidiaDRM = [
|
|||||||
"iMac14,3",
|
"iMac14,3",
|
||||||
]
|
]
|
||||||
|
|
||||||
HiDPIpicker = [
|
HiDPIpicker = ["MacBook8,1", "MacBookPro10,1", "MacBookPro10,2", "MacBookPro11,1", "MacBookPro11,2", "MacBookPro11,3", "iMac15,1", "Dortania1,1"]
|
||||||
"MacBook8,1",
|
|
||||||
"MacBookPro10,1",
|
|
||||||
"MacBookPro10,2",
|
|
||||||
"MacBookPro11,1",
|
|
||||||
"MacBookPro11,2",
|
|
||||||
"MacBookPro11,3",
|
|
||||||
"iMac15,1",
|
|
||||||
"Dortania1,1"
|
|
||||||
]
|
|
||||||
|
|
||||||
IDEPatch = [
|
IDEPatch = ["MacBook4,1", "MacBookPro4,1", "iMac7,1", "iMac8,1", "MacPro3,1", "Xserve2,1", "Dortania1,1"]
|
||||||
"MacBook4,1",
|
|
||||||
"MacBookPro4,1",
|
|
||||||
"iMac7,1",
|
|
||||||
"iMac8,1",
|
|
||||||
"MacPro3,1",
|
|
||||||
"Xserve2,1",
|
|
||||||
"Dortania1,1"
|
|
||||||
]
|
|
||||||
|
|
||||||
# 11" Air
|
# 11" Air
|
||||||
MacBookAir61 = [
|
MacBookAir_11 = [
|
||||||
"MacBookAir3,1",
|
"MacBookAir3,1",
|
||||||
"MacBookAir4,1",
|
"MacBookAir4,1",
|
||||||
"MacBookAir5,1",
|
"MacBookAir5,1",
|
||||||
@@ -585,7 +571,7 @@ MacBookAir61 = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
# Classic MacBook and 13" Air
|
# Classic MacBook and 13" Air
|
||||||
MacBookAir62 = [
|
MacBookAir_13 = [
|
||||||
"MacBook4,1",
|
"MacBook4,1",
|
||||||
"MacBook5,1",
|
"MacBook5,1",
|
||||||
"MacBook5,2",
|
"MacBook5,2",
|
||||||
@@ -599,13 +585,13 @@ MacBookAir62 = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
# Retina MacBook
|
# Retina MacBook
|
||||||
MacBook81 = [
|
MacBook_12 = [
|
||||||
"MacBook8,1",
|
"MacBook8,1",
|
||||||
]
|
]
|
||||||
|
|
||||||
# MacBook Pro 13"
|
# MacBook Pro 13"
|
||||||
|
|
||||||
MacBookPro111 = [
|
MacBookPro_13 = [
|
||||||
"MacBookPro5,5",
|
"MacBookPro5,5",
|
||||||
"MacBookPro7,1",
|
"MacBookPro7,1",
|
||||||
"MacBookPro8,1",
|
"MacBookPro8,1",
|
||||||
@@ -616,13 +602,11 @@ MacBookPro111 = [
|
|||||||
|
|
||||||
# MacBook Pro 15" (iGPU)
|
# MacBook Pro 15" (iGPU)
|
||||||
|
|
||||||
MacBookPro112 = [
|
MacBookPro_15_iGPU = ["MacBookPro11,2"]
|
||||||
"MacBookPro11,2"
|
|
||||||
]
|
|
||||||
|
|
||||||
# MacBook Pro 15" and 17" (dGPU)
|
# MacBook Pro 15" and 17" (dGPU)
|
||||||
|
|
||||||
MacBookPro113 = [
|
MacBookPro_15_dGPU = [
|
||||||
"MacBookPro4,1",
|
"MacBookPro4,1",
|
||||||
"MacBookPro5,1",
|
"MacBookPro5,1",
|
||||||
"MacBookPro5,2",
|
"MacBookPro5,2",
|
||||||
@@ -639,17 +623,9 @@ MacBookPro113 = [
|
|||||||
|
|
||||||
# Mac Mini
|
# Mac Mini
|
||||||
|
|
||||||
Macmini71 = [
|
Macmini = ["Macmini3,1", "Macmini4,1", "Macmini5,1", "Macmini5,2", "Macmini5,3", "Macmini6,1", "Macmini6,2"]
|
||||||
"Macmini3,1",
|
|
||||||
"Macmini4,1",
|
|
||||||
"Macmini5,1",
|
|
||||||
"Macmini5,2",
|
|
||||||
"Macmini5,3",
|
|
||||||
"Macmini6,1",
|
|
||||||
"Macmini6,2"
|
|
||||||
]
|
|
||||||
# iMacPro = dGPU only iMacs
|
# iMacPro = dGPU only iMacs
|
||||||
iMacPro11 = [
|
iMac_iGPUless = [
|
||||||
"iMac7,1",
|
"iMac7,1",
|
||||||
"iMac8,1",
|
"iMac8,1",
|
||||||
"iMac9,1",
|
"iMac9,1",
|
||||||
@@ -662,28 +638,17 @@ iMacPro11 = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
# iMac = AMD and Nvidia GPU with iGPU
|
# iMac = AMD and Nvidia GPU with iGPU
|
||||||
iMac151 = [
|
iMac_dGPU = [
|
||||||
"iMac13,2",
|
"iMac13,2",
|
||||||
"iMac14,2",
|
"iMac14,2",
|
||||||
"iMac14,3",
|
"iMac14,3",
|
||||||
"iMac15,1",
|
"iMac15,1",
|
||||||
]
|
]
|
||||||
# iMac = Intel iGPU
|
# iMac = Intel iGPU
|
||||||
iMac144 = [
|
iMac_iGPU = ["iMac13,1", "iMac13,3", "iMac14,1", "iMac14,4"]
|
||||||
"iMac13,1",
|
|
||||||
"iMac14,1",
|
|
||||||
"iMac14,4"
|
|
||||||
]
|
|
||||||
|
|
||||||
# Mac Pro and Xserve
|
# Mac Pro and Xserve
|
||||||
MacPro71 = [
|
MacPro = ["MacPro3,1", "MacPro4,1", "MacPro5,1", "Xserve2,1", "Xserve3,1", "Dortania1,1"]
|
||||||
"MacPro3,1",
|
|
||||||
"MacPro4,1",
|
|
||||||
"MacPro5,1",
|
|
||||||
"Xserve2,1",
|
|
||||||
"Xserve3,1",
|
|
||||||
"Dortania1,1"
|
|
||||||
]
|
|
||||||
|
|
||||||
XXerve = [
|
XXerve = [
|
||||||
"Xserve3,1",
|
"Xserve3,1",
|
||||||
@@ -778,16 +743,7 @@ ControllerTypes = [
|
|||||||
"-InternalHub",
|
"-InternalHub",
|
||||||
]
|
]
|
||||||
|
|
||||||
upgradableMXMGPUs = [
|
upgradableMXMGPUs = ["iMac10,1", "iMac11,1", "iMac11,2", "iMac11,3", "iMac12,1", "iMac12,2", "Xserve3,1", "Dortania1,1"]
|
||||||
"iMac10,1"
|
|
||||||
"iMac11,1",
|
|
||||||
"iMac11,2",
|
|
||||||
"iMac11,3",
|
|
||||||
"iMac12,1",
|
|
||||||
"iMac12,2",
|
|
||||||
"Xserve3,1",
|
|
||||||
"Dortania1,1"
|
|
||||||
]
|
|
||||||
|
|
||||||
NightShift = [
|
NightShift = [
|
||||||
"MacBook4,1",
|
"MacBook4,1",
|
||||||
@@ -831,7 +787,7 @@ NightShift = [
|
|||||||
"MacPro5,1",
|
"MacPro5,1",
|
||||||
"Xserve2,1",
|
"Xserve2,1",
|
||||||
"Xserve3,1",
|
"Xserve3,1",
|
||||||
"Dortania1,1"
|
"Dortania1,1",
|
||||||
]
|
]
|
||||||
|
|
||||||
UGAtoGOP = [
|
UGAtoGOP = [
|
||||||
@@ -887,7 +843,7 @@ SATAPatch = [
|
|||||||
"MacPro5,1",
|
"MacPro5,1",
|
||||||
"Xserve2,1",
|
"Xserve2,1",
|
||||||
"Xserve3,1",
|
"Xserve3,1",
|
||||||
"Dortania1,1"
|
"Dortania1,1",
|
||||||
]
|
]
|
||||||
|
|
||||||
NoAPFSsupport = [
|
NoAPFSsupport = [
|
||||||
@@ -909,7 +865,7 @@ NoAPFSsupport = [
|
|||||||
"MacPro4,1",
|
"MacPro4,1",
|
||||||
"Xserve2,1",
|
"Xserve2,1",
|
||||||
"Xserve3,1",
|
"Xserve3,1",
|
||||||
"Dortania1,1"
|
"Dortania1,1",
|
||||||
]
|
]
|
||||||
|
|
||||||
NoRootPatch11 = [
|
NoRootPatch11 = [
|
||||||
@@ -959,7 +915,7 @@ NoExFat = [
|
|||||||
"MacPro5,1",
|
"MacPro5,1",
|
||||||
"Xserve2,1",
|
"Xserve2,1",
|
||||||
"Xserve3,1",
|
"Xserve3,1",
|
||||||
"Dortania1,1"
|
"Dortania1,1",
|
||||||
]
|
]
|
||||||
|
|
||||||
SandyIGPU = [
|
SandyIGPU = [
|
||||||
@@ -997,14 +953,7 @@ windows_audio = [
|
|||||||
"iMac13,3",
|
"iMac13,3",
|
||||||
]
|
]
|
||||||
|
|
||||||
NoAGPMSupport = [
|
NoAGPMSupport = ["MacBook4,1", "MacBookPro4,1", "iMac7,1", "iMac8,1", "MacPro3,1", "Xserve2,1", "Dortania1,1"]
|
||||||
"MacBook4,1",
|
|
||||||
"MacBookPro4,1",
|
|
||||||
"iMac7,1",
|
|
||||||
"iMac8,1",
|
|
||||||
"MacPro3,1",
|
|
||||||
"Xserve2,1"
|
|
||||||
]
|
|
||||||
|
|
||||||
AGDPSupport = [
|
AGDPSupport = [
|
||||||
"MacBookPro9,1",
|
"MacBookPro9,1",
|
||||||
@@ -1017,22 +966,22 @@ AGDPSupport = [
|
|||||||
"iMac14,4",
|
"iMac14,4",
|
||||||
"iMac15,1",
|
"iMac15,1",
|
||||||
# TODO: Uncomment when dropped from macOS
|
# TODO: Uncomment when dropped from macOS
|
||||||
#"iMac17,1",
|
# "iMac17,1",
|
||||||
#"iMac18,2",
|
# "iMac18,2",
|
||||||
#"iMac18,3",
|
# "iMac18,3",
|
||||||
#"iMac19,1",
|
# "iMac19,1",
|
||||||
#"iMac19,2",
|
# "iMac19,2",
|
||||||
#"iMac20,1",
|
# "iMac20,1",
|
||||||
#"iMac20,2",
|
# "iMac20,2",
|
||||||
#"iMacPro1,1",
|
# "iMacPro1,1",
|
||||||
#"MacPro6,1",
|
# "MacPro6,1",
|
||||||
]
|
]
|
||||||
|
|
||||||
AMCSupport = [
|
AMCSupport = [
|
||||||
"MacBookPro8,2",
|
"MacBookPro8,2",
|
||||||
"MacBookPro8,3",
|
"MacBookPro8,3",
|
||||||
#"MacBookPro9,1",
|
# "MacBookPro9,1",
|
||||||
#"MacBookPro10,1"
|
# "MacBookPro10,1"
|
||||||
]
|
]
|
||||||
|
|
||||||
NoFireWireSupport = [
|
NoFireWireSupport = [
|
||||||
@@ -1045,9 +994,158 @@ NoFireWireSupport = [
|
|||||||
"MacBookAir3,2",
|
"MacBookAir3,2",
|
||||||
]
|
]
|
||||||
|
|
||||||
RecoveryIgnore = [
|
PCIRaceCondition = [
|
||||||
"Update",
|
"MacBook4,1",
|
||||||
"VM",
|
"MacBook5,1",
|
||||||
"Recovery",
|
"MacBook5,2",
|
||||||
"Preboot"
|
"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",
|
||||||
|
"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",
|
||||||
|
"iMac17,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",
|
||||||
|
"XServer2,1",
|
||||||
|
"XServer3,1",
|
||||||
]
|
]
|
||||||
|
|||||||
260
Resources/ModelExample.py
Normal file
260
Resources/ModelExample.py
Normal file
@@ -0,0 +1,260 @@
|
|||||||
|
# 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:
|
||||||
|
|
||||||
|
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,
|
||||||
|
)
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -6,20 +6,19 @@
|
|||||||
# - Work-around battery throttling on laptops with no battery (IOPlatformPluginFamily.kext/Contents/PlugIns/ACPI_SMC_PlatformPlugin.kext/Contents/Resources/)
|
# - Work-around battery throttling on laptops with no battery (IOPlatformPluginFamily.kext/Contents/PlugIns/ACPI_SMC_PlatformPlugin.kext/Contents/Resources/)
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import plistlib
|
|
||||||
import shutil
|
import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
import zipfile
|
import zipfile
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Any
|
|
||||||
|
|
||||||
from Resources import Constants, DeviceProbe, ModelArray, SysPatchArray, PCIIDArray, Utilities
|
from Resources import Constants, device_probe, ModelArray, SysPatchArray, Utilities
|
||||||
|
|
||||||
|
|
||||||
class PatchSysVolume:
|
class PatchSysVolume:
|
||||||
def __init__(self, model, versions):
|
def __init__(self, model, versions):
|
||||||
self.model = model
|
self.model = model
|
||||||
self.constants: Constants.Constants = versions
|
self.constants: Constants.Constants = versions
|
||||||
|
self.computer = self.constants.computer
|
||||||
self.root_mount_path = None
|
self.root_mount_path = None
|
||||||
self.sip_enabled = True
|
self.sip_enabled = True
|
||||||
self.sbm_enabled = True
|
self.sbm_enabled = True
|
||||||
@@ -31,25 +30,26 @@ class PatchSysVolume:
|
|||||||
self.iron_gpu = False
|
self.iron_gpu = False
|
||||||
self.sandy_gpu = False
|
self.sandy_gpu = False
|
||||||
self.ivy_gpu = False
|
self.ivy_gpu = False
|
||||||
self.nvidia_legacy = False
|
|
||||||
self.brightness_legacy = False
|
self.brightness_legacy = False
|
||||||
self.legacy_audio = False
|
self.legacy_audio = False
|
||||||
self.added_kexts = False
|
self.added_legacy_kexts = False
|
||||||
self.amfi_must_disable = False
|
self.amfi_must_disable = False
|
||||||
|
self.check_board_id = False
|
||||||
|
self.bad_board_id = False
|
||||||
self.no_patch = True
|
self.no_patch = True
|
||||||
|
|
||||||
if self.constants.detected_os > self.constants.catalina:
|
if self.constants.detected_os > self.constants.catalina:
|
||||||
# Big Sur and newer use APFS snapshots
|
# Big Sur and newer use APFS snapshots
|
||||||
self.mount_location = "/System/Volumes/Update/mnt1"
|
self.mount_location = "/System/Volumes/Update/mnt1"
|
||||||
else:
|
else:
|
||||||
self.mount_location = "/"
|
self.mount_location = ""
|
||||||
self.mount_extensions = f"{self.mount_location}/System/Library/Extensions"
|
self.mount_extensions = f"{self.mount_location}/System/Library/Extensions"
|
||||||
self.mount_frameworks = f"{self.mount_location}/System/Library/Frameworks"
|
self.mount_frameworks = f"{self.mount_location}/System/Library/Frameworks"
|
||||||
self.mount_lauchd = f"{self.mount_location}/System/Library/LaunchDaemons"
|
self.mount_lauchd = f"{self.mount_location}/System/Library/LaunchDaemons"
|
||||||
self.mount_private_frameworks = f"{self.mount_location}/System/Library/PrivateFrameworks"
|
self.mount_private_frameworks = f"{self.mount_location}/System/Library/PrivateFrameworks"
|
||||||
|
|
||||||
def elevated(self, *args, **kwargs) -> subprocess.CompletedProcess([Any], returncode=0):
|
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)
|
return subprocess.run(*args, **kwargs)
|
||||||
else:
|
else:
|
||||||
return subprocess.run(["sudo"] + [args[0][0]] + args[0][1:], **kwargs)
|
return subprocess.run(["sudo"] + [args[0][0]] + args[0][1:], **kwargs)
|
||||||
@@ -57,6 +57,9 @@ class PatchSysVolume:
|
|||||||
def find_mount_root_vol(self, patch):
|
def find_mount_root_vol(self, patch):
|
||||||
self.root_mount_path = Utilities.get_disk_path()
|
self.root_mount_path = Utilities.get_disk_path()
|
||||||
if self.root_mount_path.startswith("disk"):
|
if self.root_mount_path.startswith("disk"):
|
||||||
|
if self.constants.detected_os == self.constants.catalina:
|
||||||
|
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}")
|
print(f"- Found Root Volume at: {self.root_mount_path}")
|
||||||
if Path(self.mount_extensions).exists():
|
if Path(self.mount_extensions).exists():
|
||||||
print("- Root Volume is already mounted")
|
print("- Root Volume is already mounted")
|
||||||
@@ -70,9 +73,6 @@ class PatchSysVolume:
|
|||||||
if self.constants.detected_os > self.constants.catalina:
|
if self.constants.detected_os > self.constants.catalina:
|
||||||
print("- Mounting APFS Snapshot as writable")
|
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()
|
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():
|
if Path(self.mount_extensions).exists():
|
||||||
print("- Successfully mounted the Root Volume")
|
print("- Successfully mounted the Root Volume")
|
||||||
if patch is True:
|
if patch is True:
|
||||||
@@ -84,14 +84,28 @@ class PatchSysVolume:
|
|||||||
else:
|
else:
|
||||||
print("- Failed to mount the Root Volume")
|
print("- Failed to mount the Root Volume")
|
||||||
print("- Recommend rebooting the machine and trying to patch again")
|
print("- Recommend rebooting the machine and trying to patch again")
|
||||||
|
if self.constants.gui_mode is False:
|
||||||
input("- Press [ENTER] to exit: ")
|
input("- Press [ENTER] to exit: ")
|
||||||
else:
|
else:
|
||||||
print("- Could not find root volume")
|
print("- Could not find root volume")
|
||||||
|
if self.constants.gui_mode is False:
|
||||||
input("- Press [ENTER] to exit: ")
|
input("- Press [ENTER] to exit: ")
|
||||||
|
|
||||||
def unpatch_root_vol(self):
|
def unpatch_root_vol(self):
|
||||||
|
if self.constants.detected_os > self.constants.catalina:
|
||||||
print("- Reverting to last signed APFS snapshot")
|
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()
|
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.undo_root_patch()
|
||||||
|
else:
|
||||||
|
print("- Unpatching complete")
|
||||||
|
print("\nPlease reboot the machine for patches to take effect")
|
||||||
|
# else:
|
||||||
|
# self.undo_root_patch()
|
||||||
|
|
||||||
def rebuild_snapshot(self):
|
def rebuild_snapshot(self):
|
||||||
if self.constants.gui_mode is False:
|
if self.constants.gui_mode is False:
|
||||||
@@ -100,9 +114,11 @@ class PatchSysVolume:
|
|||||||
if self.constants.detected_os > self.constants.catalina:
|
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)
|
result = self.elevated(["kmutil", "install", "--volume-root", self.mount_location, "--update-all"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||||
else:
|
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
|
self.success_status = False
|
||||||
print("- Unable to build new kernel cache")
|
print("- Unable to build new kernel cache")
|
||||||
print("\nPlease report this to Github")
|
print("\nPlease report this to Github")
|
||||||
@@ -110,20 +126,37 @@ class PatchSysVolume:
|
|||||||
print(result.stdout.decode())
|
print(result.stdout.decode())
|
||||||
print("")
|
print("")
|
||||||
print("\nPlease reboot the machine to avoid potential issues rerunning the patcher")
|
print("\nPlease reboot the machine to avoid potential issues rerunning the patcher")
|
||||||
|
if self.constants.gui_mode is False:
|
||||||
input("Press [ENTER] to continue")
|
input("Press [ENTER] to continue")
|
||||||
else:
|
else:
|
||||||
self.success_status = True
|
self.success_status = True
|
||||||
print("- Successfully built new kernel cache")
|
print("- Successfully built new kernel cache")
|
||||||
if self.constants.gui_mode is False and self.constants.detected_os > self.constants.catalina:
|
if self.constants.gui_mode is False:
|
||||||
|
if self.constants.detected_os > self.constants.catalina:
|
||||||
input("Press [ENTER] to continue with snapshotting")
|
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:
|
if self.constants.detected_os > self.constants.catalina:
|
||||||
print("- Creating new APFS snapshot")
|
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.elevated(["bless", "--folder", f"{self.mount_location}/System/Library/CoreServices", "--bootefi", "--create-snapshot"], stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||||
self.unmount_drive()
|
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("- Patching complete")
|
||||||
print("\nPlease reboot the machine for patches to take effect")
|
print("\nPlease reboot the machine for patches to take effect")
|
||||||
input("Press [ENTER] to continue")
|
if self.amd_ts2 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("\nPress [ENTER] to continue")
|
||||||
|
|
||||||
def unmount_drive(self):
|
def unmount_drive(self):
|
||||||
print("- Unmounting Root Volume (Don't worry if this fails)")
|
print("- Unmounting Root Volume (Don't worry if this fails)")
|
||||||
@@ -134,7 +167,7 @@ class PatchSysVolume:
|
|||||||
delete_path = Path(self.mount_extensions) / Path(delete_current_kext)
|
delete_path = Path(self.mount_extensions) / Path(delete_current_kext)
|
||||||
if Path(delete_path).exists():
|
if Path(delete_path).exists():
|
||||||
print(f"- Deleting {delete_current_kext}")
|
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:
|
else:
|
||||||
print(f"- Couldn't find {delete_current_kext}, skipping")
|
print(f"- Couldn't find {delete_current_kext}, skipping")
|
||||||
|
|
||||||
@@ -143,145 +176,216 @@ class PatchSysVolume:
|
|||||||
existing_path = Path(self.mount_extensions) / Path(add_current_kext)
|
existing_path = Path(self.mount_extensions) / Path(add_current_kext)
|
||||||
if Path(existing_path).exists():
|
if Path(existing_path).exists():
|
||||||
print(f"- Found conflicting kext, Deleting Root Volume's {add_current_kext}")
|
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}")
|
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()
|
Utilities.process_status(self.elevated(["cp", "-R", f"{vendor_location}/{add_current_kext}", self.mount_extensions], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||||
self.elevated(["chmod", "-Rf", "755", f"{self.mount_extensions}/{add_current_kext}"], stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
Utilities.process_status(self.elevated(["chmod", "-Rf", "755", f"{self.mount_extensions}/{add_current_kext}"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||||
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(["chown", "-Rf", "root:wheel", f"{self.mount_extensions}/{add_current_kext}"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||||
|
|
||||||
def add_brightness_patch(self):
|
def add_brightness_patch(self):
|
||||||
self.delete_old_binaries(SysPatchArray.DeleteBrightness)
|
self.delete_old_binaries(SysPatchArray.DeleteBrightness)
|
||||||
self.add_new_binaries(SysPatchArray.AddBrightness, self.constants.legacy_brightness)
|
self.add_new_binaries(SysPatchArray.AddBrightness, self.constants.legacy_brightness)
|
||||||
self.elevated(["ditto", self.constants.payload_apple_private_frameworks_path_brightness, self.mount_private_frameworks], stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
Utilities.process_status(
|
||||||
self.elevated(["chmod", "-Rf", "755", 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)
|
||||||
self.elevated(["chown", "-Rf", "root:wheel", f"{self.mount_private_frameworks}/DisplayServices.framework"], stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
)
|
||||||
|
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):
|
def add_audio_patch(self):
|
||||||
self.delete_old_binaries(SysPatchArray.DeleteVolumeControl)
|
self.delete_old_binaries(SysPatchArray.DeleteVolumeControl)
|
||||||
self.add_new_binaries(SysPatchArray.AddVolumeControl, self.constants.audio_path)
|
self.add_new_binaries(SysPatchArray.AddVolumeControl, self.constants.audio_path)
|
||||||
|
|
||||||
def gpu_accel_legacy_nvidia(self):
|
def gpu_accel_legacy(self):
|
||||||
self.delete_old_binaries(SysPatchArray.DeleteNvidiaAccel11)
|
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 == self.constants.big_sur:
|
||||||
|
print("- Installing General Acceleration Kext patches for Big Sur")
|
||||||
self.add_new_binaries(SysPatchArray.AddGeneralAccel, self.constants.legacy_general_path)
|
self.add_new_binaries(SysPatchArray.AddGeneralAccel, self.constants.legacy_general_path)
|
||||||
self.add_new_binaries(SysPatchArray.AddNvidiaAccel11, self.constants.legacy_nvidia_path)
|
|
||||||
|
|
||||||
def gpu_framebuffer_legacy_nvidia(self):
|
# 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 == self.constants.big_sur:
|
||||||
|
print("- Installing Nvidia Acceleration Kext patches for Big Sur")
|
||||||
|
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)
|
self.add_new_binaries(SysPatchArray.AddNvidiaBrightness, self.constants.legacy_nvidia_path)
|
||||||
|
|
||||||
def gpu_accel_legacy_ts1(self):
|
# 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 == self.constants.big_sur:
|
||||||
|
print("- Installing TeraScale 1 Acceleration Kext patches for Big Sur")
|
||||||
self.delete_old_binaries(SysPatchArray.DeleteAMDAccel11)
|
self.delete_old_binaries(SysPatchArray.DeleteAMDAccel11)
|
||||||
self.add_new_binaries(SysPatchArray.AddGeneralAccel, self.constants.legacy_general_path)
|
self.gpu_accel_legacy()
|
||||||
self.add_new_binaries(SysPatchArray.AddAMDAccel11, self.constants.legacy_amd_path)
|
self.add_new_binaries(SysPatchArray.AddAMDAccel11, self.constants.legacy_amd_path)
|
||||||
|
else:
|
||||||
def gpu_accel_legacy_ts2(self):
|
print("- Installing basic TeraScale 1 Framebuffer Kext patches for generic OS")
|
||||||
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)
|
|
||||||
|
|
||||||
def gpu_framebuffer_legacy_amd(self):
|
|
||||||
self.add_new_binaries(SysPatchArray.AddAMDBrightness, self.constants.legacy_amd_path)
|
self.add_new_binaries(SysPatchArray.AddAMDBrightness, self.constants.legacy_amd_path)
|
||||||
|
|
||||||
def gpu_accel_legacy_ironlake(self):
|
def gpu_accel_legacy_ts2_master(self):
|
||||||
|
if self.constants.detected_os in [self.constants.mojave, self.constants.catalina]:
|
||||||
|
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 == self.constants.big_sur:
|
||||||
|
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)
|
||||||
|
|
||||||
|
# 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 == self.constants.big_sur:
|
||||||
|
print("- Installing Ironlake Acceleration Kext patches for Big Sur")
|
||||||
self.delete_old_binaries(SysPatchArray.DeleteNvidiaAccel11)
|
self.delete_old_binaries(SysPatchArray.DeleteNvidiaAccel11)
|
||||||
self.add_new_binaries(SysPatchArray.AddGeneralAccel, self.constants.legacy_general_path)
|
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)
|
self.add_new_binaries(SysPatchArray.AddIntelGen1Accel, self.constants.legacy_intel_gen1_path)
|
||||||
|
|
||||||
def gpu_framebuffer_legacy_ironlake(self):
|
def gpu_accel_legacy_sandybridge_master(self):
|
||||||
self.add_new_binaries(SysPatchArray.AddIntelGen1Accel, self.constants.legacy_intel_gen1_path)
|
if self.constants.detected_os in [self.constants.mojave, self.constants.catalina]:
|
||||||
|
print("- Installing Sandy Bridge Acceleration Kext patches for Mojave/Catalina")
|
||||||
def gpu_accel_legacy_sandybridge(self):
|
self.gpu_accel_legacy()
|
||||||
|
self.add_new_binaries(SysPatchArray.AddIntelGen2Accel, self.constants.legacy_intel_gen2_path)
|
||||||
|
elif self.constants.detected_os == self.constants.big_sur:
|
||||||
|
print("- Installing Sandy Bridge Acceleration Kext patches for Big Sur")
|
||||||
self.delete_old_binaries(SysPatchArray.DeleteNvidiaAccel11)
|
self.delete_old_binaries(SysPatchArray.DeleteNvidiaAccel11)
|
||||||
self.add_new_binaries(SysPatchArray.AddGeneralAccel, self.constants.legacy_general_path)
|
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)
|
self.add_new_binaries(SysPatchArray.AddIntelGen2Accel, self.constants.legacy_intel_gen2_path)
|
||||||
|
|
||||||
def gpu_framebuffer_legacy_sandybridge(self):
|
def gpu_framebuffer_ivybridge_master(self):
|
||||||
self.add_new_binaries(SysPatchArray.AddIntelGen2Accel, self.constants.legacy_intel_gen1_path)
|
if self.constants.detected_os == self.constants.monterey:
|
||||||
|
print("- Installing IvyBridge Acceleration Kext patches for Monterey")
|
||||||
def gpu_framebuffer_ivybridge(self):
|
self.add_new_binaries(SysPatchArray.AddIntelGen3Accel, self.constants.legacy_intel_gen3_path)
|
||||||
|
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")
|
||||||
|
Utilities.process_status(
|
||||||
|
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")
|
||||||
|
Utilities.process_status(
|
||||||
|
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)
|
self.add_new_binaries(SysPatchArray.AddIntelGen3Accel, self.constants.legacy_intel_gen3_path)
|
||||||
|
|
||||||
def gpu_accel_legacy_extended(self):
|
def gpu_accel_legacy_extended(self):
|
||||||
print("- Merging general legacy Frameworks")
|
print("- Merging general legacy Frameworks")
|
||||||
self.elevated(["ditto", self.constants.payload_apple_frameworks_path_accel, self.mount_frameworks], stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
Utilities.process_status(
|
||||||
if Path(self.mount_lauchd / Path("HiddHack.plist")).exists():
|
self.elevated(["rsync", "-r", "-i", "-a", f"{self.constants.payload_apple_frameworks_path_accel}/", self.mount_frameworks], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||||
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(["ditto", 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()
|
|
||||||
print("- Merging general legacy PrivateFrameworks")
|
print("- Merging general legacy PrivateFrameworks")
|
||||||
self.elevated(["ditto", self.constants.payload_apple_private_frameworks_path_accel, self.mount_private_frameworks], stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
Utilities.process_status(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))
|
||||||
|
|
||||||
def gpu_accel_legacy_extended_ts2(self):
|
def gpu_accel_legacy_extended_ts2(self):
|
||||||
print("- Merging TeraScale 2 legacy Frameworks")
|
print("- Merging TeraScale 2 legacy Frameworks")
|
||||||
self.elevated(["ditto", self.constants.payload_apple_frameworks_path_accel_ts2, self.mount_frameworks], stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
Utilities.process_status(
|
||||||
|
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")
|
print("- Merging TeraScale 2 PrivateFrameworks")
|
||||||
self.elevated(["ditto", self.constants.payload_apple_private_frameworks_path_accel_ts2, self.mount_private_frameworks], stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
Utilities.process_status(
|
||||||
|
self.elevated(["rsync", "-r", "-i", "-a", f"{self.constants.payload_apple_private_frameworks_path_accel_ts2}/", self.mount_private_frameworks], stdout=subprocess.PIPE)
|
||||||
|
)
|
||||||
|
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):
|
def patch_root_vol(self):
|
||||||
print(f"- Running patches for {self.model}")
|
print(f"- Running patches for {self.model}")
|
||||||
# Graphics patches
|
# Graphics patches
|
||||||
if self.nvidia_legacy is True:
|
if self.nvidia_legacy is True:
|
||||||
print("- Installing legacy Nvidia Patches")
|
print("- Installing legacy Nvidia Patches")
|
||||||
if self.constants.detected_os == self.constants.big_sur:
|
if self.constants.detected_os in self.constants.legacy_accel_support:
|
||||||
print("- Detected Big Sur, installing Acceleration patches")
|
print("- Detected supported OS, installing Acceleration Patches")
|
||||||
self.gpu_accel_legacy_nvidia()
|
self.added_legacy_kexts = True
|
||||||
self.added_kexts = True
|
|
||||||
else:
|
else:
|
||||||
print("- Detected unsupported OS, installing Basic Framebuffer")
|
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.amd_ts1 is True:
|
||||||
print("- Installing legacy TeraScale 1 Patches")
|
print("- Installing legacy TeraScale 1 Patches")
|
||||||
if self.constants.detected_os == self.constants.big_sur:
|
if self.constants.detected_os in self.constants.legacy_accel_support:
|
||||||
print("- Detected Big Sur, installing Acceleration patches")
|
print("- Detected supported OS, installing Acceleration Patches")
|
||||||
self.gpu_accel_legacy_ts1()
|
self.added_legacy_kexts = True
|
||||||
self.added_kexts = True
|
|
||||||
else:
|
else:
|
||||||
print("- Detected unsupported OS, installing Basic Framebuffer")
|
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")
|
print("- Installing legacy TeraScale 2 Patches")
|
||||||
if self.constants.detected_os == self.constants.big_sur:
|
if self.constants.detected_os in self.constants.legacy_accel_support:
|
||||||
print("- Detected Big Sur, installing Acceleration patches")
|
print("- Detected supported OS, installing Acceleration Patches")
|
||||||
self.gpu_accel_legacy_ts2()
|
self.added_legacy_kexts = True
|
||||||
self.added_kexts = True
|
|
||||||
else:
|
else:
|
||||||
print("- Detected unsupported OS, installing Basic Framebuffer")
|
print("- Detected unsupported OS, installing Basic Framebuffer")
|
||||||
self.gpu_framebuffer_legacy_amd()
|
self.gpu_accel_legacy_ts2_master()
|
||||||
|
|
||||||
if self.iron_gpu is True:
|
if self.iron_gpu is True:
|
||||||
print("- Installing legacy Ironlake Patches")
|
print("- Installing legacy Ironlake Patches")
|
||||||
if self.constants.detected_os == self.constants.big_sur:
|
if self.constants.detected_os in self.constants.legacy_accel_support:
|
||||||
print("- Detected Big Sur, installing Acceleration patches")
|
print("- Detected supported OS, installing Acceleration Patches")
|
||||||
self.gpu_accel_legacy_ironlake()
|
self.added_legacy_kexts = True
|
||||||
self.added_kexts = True
|
|
||||||
else:
|
else:
|
||||||
print("- Detected unsupported OS, installing Basic Framebuffer")
|
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")
|
print("- Installing legacy Sandy Bridge Patches")
|
||||||
if self.constants.detected_os == self.constants.big_sur:
|
if self.constants.detected_os in self.constants.legacy_accel_support:
|
||||||
print("- Detected Big Sur, installing Acceleration patches")
|
print("- Detected supported OS, installing Acceleration Patches")
|
||||||
self.gpu_accel_legacy_sandybridge()
|
self.added_legacy_kexts = True
|
||||||
self.added_kexts = True
|
|
||||||
else:
|
else:
|
||||||
print("- Detected unsupported OS, installing Basic Framebuffer")
|
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")
|
print("- Installing Ivy Bridge Patches")
|
||||||
self.gpu_framebuffer_ivybridge()
|
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:
|
||||||
# TeraScale 2 patches must be installed after Intel HD3000
|
# TeraScale 2 patches must be installed after Intel HD3000
|
||||||
self.add_new_binaries(SysPatchArray.AddAMDAccel11TS2, self.constants.legacy_amd_path_ts2)
|
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()
|
self.gpu_accel_legacy_extended()
|
||||||
if self.amd_ts2 is True:
|
if self.amd_ts2 is True:
|
||||||
self.gpu_accel_legacy_extended_ts2()
|
self.gpu_accel_legacy_extended_ts2()
|
||||||
@@ -312,74 +416,84 @@ class PatchSysVolume:
|
|||||||
self.download_files()
|
self.download_files()
|
||||||
|
|
||||||
def download_files(self):
|
def download_files(self):
|
||||||
Utilities.cls()
|
if self.constants.detected_os == self.constants.monterey:
|
||||||
print("- Downloading Apple binaries")
|
os_ver = "12-Monterey"
|
||||||
popen_oclp = subprocess.Popen(
|
elif self.constants.detected_os == self.constants.big_sur:
|
||||||
["curl", "-S", "-L", f"{self.constants.url_apple_binaries}{self.constants.payload_version}.zip", "--output", self.constants.payload_apple_root_path_zip],
|
os_ver = "11-Big-Sur"
|
||||||
stdin=subprocess.PIPE,
|
elif self.constants.detected_os == self.constants.catalina:
|
||||||
stdout=subprocess.PIPE,
|
os_ver = "10.15-Catalina"
|
||||||
stderr=subprocess.STDOUT,
|
elif self.constants.detected_os == self.constants.mojave:
|
||||||
universal_newlines=True,
|
os_ver = "10.14-Mojave"
|
||||||
)
|
else:
|
||||||
for stdout_line in iter(popen_oclp.stdout.readline, ""):
|
raise Exception(f"Unsupported OS: {self.constants.detected_os}")
|
||||||
print(stdout_line, end="")
|
link = f"{self.constants.url_patcher_support_pkg}{self.constants.patcher_support_pkg_version}/{os_ver}.zip"
|
||||||
popen_oclp.stdout.close()
|
|
||||||
|
if Path(self.constants.payload_apple_root_path).exists():
|
||||||
|
print("- Removing old Apple Binaries folder")
|
||||||
|
Path(self.constants.payload_apple_root_path).unlink()
|
||||||
|
if Path(self.constants.payload_apple_root_path_zip).exists():
|
||||||
|
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)
|
||||||
|
|
||||||
if self.constants.payload_apple_root_path_zip.exists():
|
if self.constants.payload_apple_root_path_zip.exists():
|
||||||
print("- Download completed")
|
print("- Download completed")
|
||||||
print("- Unzipping download...")
|
print("- Unzipping download...")
|
||||||
try:
|
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")
|
print("- Renaming folder")
|
||||||
os.rename(self.constants.payload_apple_root_path_unzip, self.constants.payload_apple_root_path)
|
os.rename(self.constants.payload_path / Path(os_ver), self.constants.payload_apple_root_path)
|
||||||
|
Path(self.constants.payload_apple_root_path_zip).unlink()
|
||||||
print("- Binaries downloaded to:")
|
print("- Binaries downloaded to:")
|
||||||
print(self.constants.payload_path)
|
print(self.constants.payload_path)
|
||||||
if self.constants.gui_mode is False:
|
if self.constants.gui_mode is False:
|
||||||
input("Press [ENTER] to continue")
|
input("Press [ENTER] to continue")
|
||||||
except zipfile.BadZipFile:
|
except zipfile.BadZipFile:
|
||||||
print("- Couldn't unzip")
|
print("- Couldn't unzip")
|
||||||
os.remove(self.constants.payload_apple_root_path_zip)
|
return
|
||||||
else:
|
else:
|
||||||
print("- Download failed, please verify the below link works:")
|
print("- Download failed, please verify the below link works:")
|
||||||
print(f"{self.constants.url_apple_binaries}{self.constants.payload_version}")
|
print(link)
|
||||||
|
input("Press [ENTER] to continue")
|
||||||
|
|
||||||
def detect_gpus(self):
|
def detect_gpus(self):
|
||||||
igpu_vendor, igpu_device, igpu_acpi = DeviceProbe.pci_probe().gpu_probe("IGPU")
|
dgpu = self.constants.computer.dgpu
|
||||||
dgpu_vendor, dgpu_device, dgpu_acpi = DeviceProbe.pci_probe().gpu_probe("GFX0")
|
igpu = self.constants.computer.igpu
|
||||||
if dgpu_vendor:
|
if self.constants.moj_cat_accel is True:
|
||||||
print(f"- Found GFX0: {dgpu_vendor}:{dgpu_device}")
|
non_metal_os = self.constants.high_sierra
|
||||||
if dgpu_vendor == self.constants.pci_nvidia:
|
else:
|
||||||
if dgpu_device in PCIIDArray.nvidia_ids().tesla_ids or dgpu_device in PCIIDArray.nvidia_ids().fermi_ids:
|
non_metal_os = self.constants.catalina
|
||||||
if self.constants.detected_os > self.constants.catalina:
|
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 > non_metal_os:
|
||||||
self.nvidia_legacy = True
|
self.nvidia_legacy = True
|
||||||
self.amfi_must_disable = True
|
self.amfi_must_disable = True
|
||||||
elif dgpu_vendor == self.constants.pci_amd_ati:
|
elif dgpu.arch == device_probe.AMD.Archs.TeraScale_1:
|
||||||
if dgpu_device in PCIIDArray.amd_ids().terascale_1_ids:
|
if self.constants.detected_os > non_metal_os:
|
||||||
if self.constants.detected_os > self.constants.catalina:
|
|
||||||
self.amd_ts1 = True
|
self.amd_ts1 = True
|
||||||
self.amfi_must_disable = True
|
self.amfi_must_disable = True
|
||||||
# TODO: Enable TS2 support
|
elif dgpu.arch == device_probe.AMD.Archs.TeraScale_2:
|
||||||
elif dgpu_device in PCIIDArray.amd_ids().terascale_2_ids:
|
if self.constants.detected_os > non_metal_os:
|
||||||
# Requires manual permission from user to avoid medical issues
|
|
||||||
if self.constants.detected_os > self.constants.catalina and self.constants.terscale_2_patch is True:
|
|
||||||
self.amd_ts2 = True
|
self.amd_ts2 = True
|
||||||
self.amfi_must_disable = True
|
self.amfi_must_disable = True
|
||||||
if igpu_vendor:
|
if igpu and igpu.class_code != 0xFFFFFF:
|
||||||
print(f"- Found IGPU: {igpu_vendor}:{igpu_device}")
|
print(f"- Found IGPU: {Utilities.friendly_hex(igpu.vendor_id)}:{Utilities.friendly_hex(igpu.device_id)}")
|
||||||
if igpu_vendor == self.constants.pci_intel:
|
if igpu.arch == device_probe.Intel.Archs.Iron_Lake:
|
||||||
if igpu_device in PCIIDArray.intel_ids().iron_ids:
|
if self.constants.detected_os > non_metal_os:
|
||||||
if self.constants.detected_os > self.constants.catalina:
|
|
||||||
self.iron_gpu = True
|
self.iron_gpu = True
|
||||||
self.amfi_must_disable = True
|
self.amfi_must_disable = True
|
||||||
elif igpu_device in PCIIDArray.intel_ids().sandy_ids:
|
elif igpu.arch == device_probe.Intel.Archs.Sandy_Bridge:
|
||||||
if self.constants.detected_os > self.constants.catalina:
|
if self.constants.detected_os > non_metal_os:
|
||||||
self.sandy_gpu = True
|
self.sandy_gpu = True
|
||||||
self.amfi_must_disable = True
|
self.amfi_must_disable = True
|
||||||
elif igpu_device in PCIIDArray.intel_ids().ivy_ids:
|
self.check_board_id = True
|
||||||
|
elif igpu.arch == device_probe.Intel.Archs.Ivy_Bridge:
|
||||||
if self.constants.detected_os > self.constants.big_sur:
|
if self.constants.detected_os > self.constants.big_sur:
|
||||||
self.ivy_gpu = True
|
self.ivy_gpu = True
|
||||||
elif igpu_vendor == self.constants.pci_nvidia:
|
elif isinstance(igpu, device_probe.NVIDIA):
|
||||||
if self.constants.detected_os > self.constants.catalina:
|
if self.constants.detected_os > non_metal_os:
|
||||||
self.nvidia_legacy = True
|
self.nvidia_legacy = True
|
||||||
self.amfi_must_disable = True
|
self.amfi_must_disable = True
|
||||||
|
|
||||||
@@ -412,55 +526,62 @@ class PatchSysVolume:
|
|||||||
if self.legacy_audio is True:
|
if self.legacy_audio is True:
|
||||||
print("- Add legacy Audio Control")
|
print("- Add legacy Audio Control")
|
||||||
|
|
||||||
if self.nvidia_legacy is False and \
|
self.no_patch = not any(
|
||||||
self.amd_ts1 is False and \
|
[
|
||||||
self.amd_ts2 is False and \
|
self.nvidia_legacy,
|
||||||
self.iron_gpu is False and \
|
self.amd_ts1,
|
||||||
self.sandy_gpu is False and \
|
self.amd_ts2,
|
||||||
self.ivy_gpu is False and \
|
self.iron_gpu,
|
||||||
self.brightness_legacy is False and \
|
self.sandy_gpu,
|
||||||
self.legacy_audio is False:
|
self.ivy_gpu,
|
||||||
self.no_patch = True
|
self.brightness_legacy,
|
||||||
else:
|
self.legacy_audio,
|
||||||
self.no_patch = False
|
]
|
||||||
|
)
|
||||||
|
|
||||||
def verify_patch_allowed(self):
|
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 self.sip_enabled is True:
|
if sip == self.constants.root_patch_sip_mojave:
|
||||||
print("\nCannot patch!!! Please disable SIP!!!")
|
sip_value = "For Hackintoshes, please set csr-active-config to '03060000' (0x603)\nFor non-OpenCore Macs, please run 'csrutil disable' in RecoveryOS"
|
||||||
print("Disable SIP in Patcher Settings and Rebuild OpenCore")
|
|
||||||
print("Ensure the following bits are set for csr-active-config:\n")
|
|
||||||
if self.constants.detected_os > self.constants.catalina:
|
|
||||||
sip = self.constants.root_patch_sip_big_sur
|
|
||||||
else:
|
else:
|
||||||
sip = self.constants.root_patch_sip_mojave
|
sip_value = (
|
||||||
|
"For Hackintoshes, please set csr-active-config to '030A0000' (0xA03)\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)
|
||||||
|
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(sip))
|
print("\n".join(sip))
|
||||||
print("For Hackintoshes, please set csr-active-config to 030A0000 (0xA03)")
|
print(sip_value)
|
||||||
print("For non-OpenCore Macs, please run 'csrutil disable' and \n'csrutil authenticated-root disable' in RecoveryOS")
|
|
||||||
if self.sbm_enabled is True:
|
if self.sbm_enabled is True:
|
||||||
print("\nCannot patch!!! Please disable SecureBootModel!!!")
|
print("\nCannot patch! Please disable Apple Secure Boot.")
|
||||||
print("Disable SecureBootModel in Patcher Settings and Rebuild OpenCore")
|
print("Disable SecureBootModel in Patcher Settings and Rebuild OpenCore")
|
||||||
print("For Hackintoshes, set SecureBootModel to Disabled")
|
print("For Hackintoshes, set SecureBootModel to Disabled")
|
||||||
|
|
||||||
if self.fv_enabled is True:
|
if self.fv_enabled is True:
|
||||||
print("\nCannot patch!!! Please disable FileVault!!!")
|
print("\nCannot patch! Please disable FileVault.")
|
||||||
print("Go to System Preferences -> Security and disable FileVault")
|
print("Go to System Preferences -> Security and disable FileVault")
|
||||||
|
|
||||||
if self.amfi_enabled is True and self.amfi_must_disable is True:
|
if self.amfi_enabled is True and self.amfi_must_disable is True:
|
||||||
print("\nCannot patch!!! Please disable AMFI!!!")
|
print("\nCannot patch! Please disable AMFI.")
|
||||||
print("For Hackintoshes, please add amfi_get_out_of_my_way=1 to boot-args")
|
print("For Hackintoshes, please add amfi_get_out_of_my_way=1 to boot-args")
|
||||||
|
|
||||||
if self.amfi_must_disable is True:
|
if self.check_board_id is True and self.computer.reported_board_id not in self.constants.sandy_board_id:
|
||||||
if self.sip_enabled is True or \
|
print("\nCannot patch! Board ID not supported by AppleIntelSNBGraphicsFB")
|
||||||
self.sbm_enabled is True or \
|
print(f"Detected Board ID: {self.computer.reported_board_id}")
|
||||||
self.amfi_enabled is True or \
|
print("Please ensure your Board ID is listed below:")
|
||||||
self.fv_enabled is True:
|
print("\n".join(self.constants.sandy_board_id))
|
||||||
return False
|
self.bad_board_id = True
|
||||||
else:
|
|
||||||
return True
|
if self.dosdude_patched is True:
|
||||||
else:
|
print("\nCannot patch! Detected machine has already been patched by another patcher")
|
||||||
if self.sip_enabled is True or \
|
print("Please ensure your install is either clean or patched with OpenCore Legacy Patcher")
|
||||||
self.sbm_enabled is True or \
|
|
||||||
self.fv_enabled is True:
|
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
|
return False
|
||||||
else:
|
else:
|
||||||
return True
|
return True
|
||||||
@@ -470,12 +591,16 @@ class PatchSysVolume:
|
|||||||
print("- Starting Patch Process")
|
print("- Starting Patch Process")
|
||||||
print(f"- Determinging Required Patch set for Darwin {self.constants.detected_os}")
|
print(f"- Determinging Required Patch set for Darwin {self.constants.detected_os}")
|
||||||
self.detect_patch_set()
|
self.detect_patch_set()
|
||||||
if self.no_patch is False:
|
if self.no_patch is True:
|
||||||
change_menu = input("Would you like to continue with Root Volume Patching?(y/n): ")
|
|
||||||
else:
|
|
||||||
change_menu = None
|
change_menu = None
|
||||||
print("- No Root Patches required for your machine!")
|
print("- No Root Patches required for your machine!")
|
||||||
|
if self.constants.gui_mode is False:
|
||||||
input("\nPress [ENTER] to return to the main menu: ")
|
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"]:
|
if change_menu in ["y", "Y"]:
|
||||||
print("- Continuing with Patching")
|
print("- Continuing with Patching")
|
||||||
print("- Verifying whether Root Patching possible")
|
print("- Verifying whether Root Patching possible")
|
||||||
@@ -483,7 +608,7 @@ class PatchSysVolume:
|
|||||||
print("- Patcher is capable of patching")
|
print("- Patcher is capable of patching")
|
||||||
self.check_files()
|
self.check_files()
|
||||||
self.find_mount_root_vol(True)
|
self.find_mount_root_vol(True)
|
||||||
else:
|
elif self.constants.gui_mode is False:
|
||||||
input("\nPress [ENTER] to return to the main menu: ")
|
input("\nPress [ENTER] to return to the main menu: ")
|
||||||
|
|
||||||
else:
|
else:
|
||||||
@@ -493,5 +618,5 @@ class PatchSysVolume:
|
|||||||
print("- Starting Unpatch Process")
|
print("- Starting Unpatch Process")
|
||||||
if self.verify_patch_allowed() is True:
|
if self.verify_patch_allowed() is True:
|
||||||
self.find_mount_root_vol(False)
|
self.find_mount_root_vol(False)
|
||||||
|
if self.constants.gui_mode is False:
|
||||||
input("\nPress [ENTER] to return to the main menu")
|
input("\nPress [ENTER] to return to the main menu")
|
||||||
|
|
||||||
|
|||||||
@@ -129,8 +129,8 @@ AddAMDBrightness = [
|
|||||||
"AMDLegacySupport.kext",
|
"AMDLegacySupport.kext",
|
||||||
"AMDRadeonVADriver.bundle",
|
"AMDRadeonVADriver.bundle",
|
||||||
"AMDRadeonVADriver2.bundle",
|
"AMDRadeonVADriver2.bundle",
|
||||||
#"AMDRadeonX3000.kext",
|
# "AMDRadeonX3000.kext",
|
||||||
#"AMDRadeonX3000GLDriver.bundle",
|
# "AMDRadeonX3000GLDriver.bundle",
|
||||||
"AMDShared.bundle",
|
"AMDShared.bundle",
|
||||||
"ATIRadeonX2000.kext",
|
"ATIRadeonX2000.kext",
|
||||||
"ATIRadeonX2000GA.plugin",
|
"ATIRadeonX2000GA.plugin",
|
||||||
@@ -140,6 +140,7 @@ AddAMDBrightness = [
|
|||||||
|
|
||||||
AddAMDAccel11TS2 = [
|
AddAMDAccel11TS2 = [
|
||||||
"IOSurface.kext",
|
"IOSurface.kext",
|
||||||
|
"IOAcceleratorFamily2.kext",
|
||||||
]
|
]
|
||||||
|
|
||||||
AddIntelGen1Accel = [
|
AddIntelGen1Accel = [
|
||||||
@@ -169,14 +170,9 @@ AddIntelGen3Accel = [
|
|||||||
"AppleIntelGraphicsShared.bundle",
|
"AppleIntelGraphicsShared.bundle",
|
||||||
]
|
]
|
||||||
|
|
||||||
AddGeneralAccel = [
|
AddGeneralAccel = ["IOAcceleratorFamily2.kext", "IOSurface.kext"]
|
||||||
"IOAcceleratorFamily2.kext",
|
|
||||||
"IOSurface.kext"
|
|
||||||
]
|
|
||||||
|
|
||||||
DeleteBrightness = [
|
DeleteBrightness = ["AppleGraphicsControl.kext/Contents/PlugIns/AGDCBacklightControl.kext"]
|
||||||
"AppleGraphicsControl.kext/Contents/PlugIns/AGDCBacklightControl.kext"
|
|
||||||
]
|
|
||||||
|
|
||||||
AddBrightness = [
|
AddBrightness = [
|
||||||
"AppleBacklight.kext",
|
"AppleBacklight.kext",
|
||||||
@@ -195,3 +191,57 @@ DeleteVolumeControl = [
|
|||||||
"ApplePVPanic.kext",
|
"ApplePVPanic.kext",
|
||||||
"AppleVirtIOStorage.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",
|
||||||
|
]
|
||||||
|
|||||||
@@ -1,12 +1,18 @@
|
|||||||
# Copyright (C) 2020-2021, Dhinak G
|
# Copyright (C) 2020-2021, Dhinak G
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
|
|
||||||
import os
|
import hashlib
|
||||||
import math
|
import math
|
||||||
|
import os
|
||||||
import plistlib
|
import plistlib
|
||||||
import subprocess
|
import subprocess
|
||||||
|
from pathlib import Path
|
||||||
|
import re
|
||||||
|
import os
|
||||||
|
import requests
|
||||||
|
|
||||||
|
from Resources import Constants, ioreg
|
||||||
|
|
||||||
from Resources import Constants
|
|
||||||
|
|
||||||
def hexswap(input_hex: str):
|
def hexswap(input_hex: str):
|
||||||
hex_pairs = [input_hex[i : i + 2] for i in range(0, len(input_hex), 2)]
|
hex_pairs = [input_hex[i : i + 2] for i in range(0, len(input_hex), 2)]
|
||||||
@@ -15,6 +21,21 @@ def hexswap(input_hex: str):
|
|||||||
return hex_str.upper()
|
return hex_str.upper()
|
||||||
|
|
||||||
|
|
||||||
|
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):
|
def header(lines):
|
||||||
lines = [i for i in lines if i is not None]
|
lines = [i for i in lines if i is not None]
|
||||||
total_length = len(max(lines, key=len)) + 4
|
total_length = len(max(lines, key=len)) + 4
|
||||||
@@ -25,12 +46,17 @@ def header(lines):
|
|||||||
print("#" * total_length)
|
print("#" * total_length)
|
||||||
|
|
||||||
|
|
||||||
|
RECOVERY_STATUS = None
|
||||||
|
|
||||||
|
|
||||||
def check_recovery():
|
def check_recovery():
|
||||||
root_partition_info = plistlib.loads(subprocess.run("diskutil info -plist /".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode())
|
global RECOVERY_STATUS # pylint: disable=global-statement # We need to cache the result
|
||||||
if root_partition_info["VolumeName"] == "macOS Base System" and root_partition_info["FilesystemType"] == "apfs" and root_partition_info["BusProtocol"] == "Disk Image":
|
|
||||||
return True
|
if RECOVERY_STATUS is None:
|
||||||
else:
|
RECOVERY_STATUS = Path("/System/Library/BaseSystem").exists()
|
||||||
return False
|
|
||||||
|
return RECOVERY_STATUS
|
||||||
|
|
||||||
|
|
||||||
def get_disk_path():
|
def get_disk_path():
|
||||||
root_partition_info = plistlib.loads(subprocess.run("diskutil info -plist /".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode())
|
root_partition_info = plistlib.loads(subprocess.run("diskutil info -plist /".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode())
|
||||||
@@ -38,70 +64,153 @@ def get_disk_path():
|
|||||||
root_mount_path = root_mount_path[:-2] if root_mount_path.count("s") > 1 else root_mount_path
|
root_mount_path = root_mount_path[:-2] if root_mount_path.count("s") > 1 else root_mount_path
|
||||||
return root_mount_path
|
return root_mount_path
|
||||||
|
|
||||||
def csr_decode(csr_active_config):
|
|
||||||
|
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"
|
||||||
|
if get_nvram("boot-args", decode=False):
|
||||||
|
if "latebloom=" in get_nvram("boot-args", decode=False):
|
||||||
|
lb_delay = re.search(r"(?:[, ])latebloom=(\d+)", get_nvram("boot-args", decode=False))
|
||||||
|
lb_delay = lb_delay[1]
|
||||||
|
if "lb_range=" in get_nvram("boot-args", decode=False):
|
||||||
|
lb_range = re.search(r"(?:[, ])lb_range=(\d+)", get_nvram("boot-args", decode=False))
|
||||||
|
lb_range = lb_range[1]
|
||||||
|
if "lb_debug=" in get_nvram("boot-args", decode=False):
|
||||||
|
lb_debug = re.search(r"(?:[, ])lb_debug=(\d+)", get_nvram("boot-args", decode=False))
|
||||||
|
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:
|
if csr_active_config is None:
|
||||||
csr_active_config = b"\x00\x00\x00\x00"
|
csr_active_config = b"\x00\x00\x00\x00"
|
||||||
sip_int = int.from_bytes(csr_active_config, byteorder="little")
|
sip_int = int.from_bytes(csr_active_config, byteorder="little")
|
||||||
i = 0
|
i = 0
|
||||||
for current_sip_bit in Constants.Constants().csr_values:
|
for current_sip_bit in Constants.Constants.csr_values:
|
||||||
if sip_int & (1 << i):
|
if sip_int & (1 << i):
|
||||||
Constants.Constants().csr_values[current_sip_bit] = True
|
Constants.Constants.csr_values[current_sip_bit] = True
|
||||||
i = i + 1
|
i = i + 1
|
||||||
|
|
||||||
# Can be adjusted to whatever OS needs patching
|
# Can be adjusted to whatever OS needs patching
|
||||||
sip_needs_change = all(
|
sip_needs_change = all(Constants.Constants.csr_values[i] for i in os_sip)
|
||||||
Constants.Constants().csr_values[i]
|
|
||||||
for i in Constants.Constants().root_patch_sip_big_sur
|
|
||||||
)
|
|
||||||
if sip_needs_change is True:
|
if sip_needs_change is True:
|
||||||
return False
|
return False
|
||||||
else:
|
else:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def patching_status():
|
|
||||||
|
def friendly_hex(integer: int):
|
||||||
|
return "{:02X}".format(integer)
|
||||||
|
|
||||||
|
|
||||||
|
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)):
|
||||||
|
return False
|
||||||
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
def patching_status(os_sip):
|
||||||
# Detection for Root Patching
|
# Detection for Root Patching
|
||||||
sip_enabled = True # System Integrity Protection
|
sip_enabled = True # System Integrity Protection
|
||||||
sbm_enabled = True # Secure Boot Status (SecureBootModel)
|
sbm_enabled = True # Secure Boot Status (SecureBootModel)
|
||||||
amfi_enabled = True # Apple Mobile File Integrity
|
amfi_enabled = True # Apple Mobile File Integrity
|
||||||
fv_enabled = True # FileVault
|
fv_enabled = True # FileVault
|
||||||
|
dosdude_patched = True
|
||||||
|
|
||||||
amfi_1 = "amfi_get_out_of_my_way=0x1"
|
gen6_kext = "/System/Library/Extension/AppleIntelHDGraphics.kext"
|
||||||
amfi_2 = "amfi_get_out_of_my_way=1"
|
gen7_kext = "/System/Library/Extension/AppleIntelHD3000Graphics.kext"
|
||||||
|
|
||||||
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)):
|
amfi_enabled = amfi_status()
|
||||||
amfi_enabled = False
|
|
||||||
if get_nvram("HardwareModel", "94B73556-2197-4702-82A8-3E1337DAFBFB", decode=False) not in Constants.Constants().sbm_values:
|
if get_nvram("HardwareModel", "94B73556-2197-4702-82A8-3E1337DAFBFB", decode=False) not in Constants.Constants.sbm_values:
|
||||||
sbm_enabled = False
|
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
|
sip_enabled = False
|
||||||
|
|
||||||
fv_status: str = subprocess.run("fdesetup status".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.decode()
|
fv_status: str = subprocess.run("fdesetup status".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.decode()
|
||||||
if fv_status.startswith("FileVault is Off"):
|
if fv_status.startswith("FileVault is Off"):
|
||||||
fv_enabled = False
|
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
|
||||||
|
|
||||||
|
|
||||||
|
def disable_cls():
|
||||||
|
global clear
|
||||||
|
clear = False
|
||||||
|
|
||||||
|
|
||||||
def cls():
|
def cls():
|
||||||
if check_recovery() == False:
|
global clear
|
||||||
os.system('cls' if os.name == 'nt' else 'clear')
|
if not clear:
|
||||||
|
return
|
||||||
|
if not check_recovery():
|
||||||
|
os.system("cls" if os.name == "nt" else "clear")
|
||||||
else:
|
else:
|
||||||
print("\u001Bc")
|
print("\u001Bc")
|
||||||
|
|
||||||
|
|
||||||
def get_nvram(variable: str, uuid: str = None, *, decode: bool = False):
|
def get_nvram(variable: str, uuid: str = None, *, decode: bool = False):
|
||||||
if uuid != None:
|
# TODO: Properly fix for El Capitan, which does not print the XML representation even though we say to
|
||||||
|
|
||||||
|
if uuid is not None:
|
||||||
uuid += ":"
|
uuid += ":"
|
||||||
else:
|
else:
|
||||||
uuid = ""
|
uuid = ""
|
||||||
result = subprocess.run(f"nvram -x {uuid}{variable}".split(), stdout=subprocess.PIPE, stderr=subprocess.PIPE).stdout.strip()
|
|
||||||
try:
|
nvram = ioreg.IORegistryEntryFromPath(ioreg.kIOMasterPortDefault, "IODeviceTree:/options".encode())
|
||||||
value = plistlib.loads(result)[f"{uuid}{variable}"]
|
|
||||||
except plistlib.InvalidFileException:
|
value = ioreg.IORegistryEntryCreateCFProperty(nvram, f"{uuid}{variable}", ioreg.kCFAllocatorDefault, ioreg.kNilOptions)
|
||||||
|
|
||||||
|
ioreg.IOObjectRelease(nvram)
|
||||||
|
|
||||||
|
if not value:
|
||||||
return None
|
return None
|
||||||
if decode:
|
|
||||||
|
value = ioreg.corefoundation_to_native(value)
|
||||||
|
|
||||||
|
if decode and isinstance(value, bytes):
|
||||||
value = value.strip(b"\0").decode()
|
value = value.strip(b"\0").decode()
|
||||||
return value
|
return value
|
||||||
|
|
||||||
|
|
||||||
|
def download_file(link, location):
|
||||||
|
print("- Attempting download from following link:")
|
||||||
|
print(link)
|
||||||
|
if Path(location).exists():
|
||||||
|
print("- Removing old file")
|
||||||
|
Path(location).unlink()
|
||||||
|
response = requests.get(link, stream=True)
|
||||||
|
with location.open("wb") as file:
|
||||||
|
count = 0
|
||||||
|
for chunk in response.iter_content(1024 * 1024 * 4):
|
||||||
|
file.write(chunk)
|
||||||
|
count += len(chunk)
|
||||||
|
cls()
|
||||||
|
print(f"- Downloading package")
|
||||||
|
print(f"- {count / 1024 / 1024}MB Downloaded")
|
||||||
|
checksum = hashlib.sha256()
|
||||||
|
with location.open("rb") as file:
|
||||||
|
chunk = file.read(1024 * 1024 * 16)
|
||||||
|
while chunk:
|
||||||
|
checksum.update(chunk)
|
||||||
|
chunk = file.read(1024 * 1024 * 16)
|
||||||
|
print(f"- Checksum: {checksum.hexdigest()}")
|
||||||
|
|
||||||
|
|
||||||
# def menu(title, prompt, menu_options, add_quit=True, auto_number=False, in_between=[], top_level=False):
|
# def menu(title, prompt, menu_options, add_quit=True, auto_number=False, in_between=[], top_level=False):
|
||||||
# return_option = ["Q", "Quit", None] if top_level else ["B", "Back", None]
|
# return_option = ["Q", "Quit", None] if top_level else ["B", "Back", None]
|
||||||
# if add_quit: menu_options.append(return_option)
|
# if add_quit: menu_options.append(return_option)
|
||||||
|
|||||||
418
Resources/device_probe.py
Normal file
418
Resources/device_probe.py
Normal file
@@ -0,0 +1,418 @@
|
|||||||
|
# Hardware probing
|
||||||
|
# Copyright (C) 2020-2021, Dhinak G, Mykola Grymalyuk
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import binascii
|
||||||
|
import enum
|
||||||
|
import itertools
|
||||||
|
import subprocess
|
||||||
|
from dataclasses import dataclass, field
|
||||||
|
from typing import Any, ClassVar, Optional, Type, Union
|
||||||
|
|
||||||
|
from Resources import PCIIDArray, Utilities, ioreg
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass
|
||||||
|
class CPU:
|
||||||
|
name: str
|
||||||
|
flags: list[str]
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass
|
||||||
|
class PCIDevice:
|
||||||
|
VENDOR_ID: ClassVar[int] # Default vendor id, for subclasses.
|
||||||
|
|
||||||
|
vendor_id: int # The vendor ID of this PCI device
|
||||||
|
device_id: int # The device ID of this PCI device
|
||||||
|
class_code: int # The class code of this PCI device
|
||||||
|
|
||||||
|
# ioregistryentry: Optional[ioreg.IORegistryEntry] = None
|
||||||
|
name: Optional[str] = None # Name of IORegistryEntry
|
||||||
|
model: Optional[str] = None # model property
|
||||||
|
pci_path: Optional[str] = None
|
||||||
|
|
||||||
|
# def __getstate__(self):
|
||||||
|
# state = self.__dict__.copy()
|
||||||
|
# state.pop("ioregistryentry")
|
||||||
|
# return state
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
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(properties[i][:4], byteorder="little") for i in ["vendor-id", "device-id"]]
|
||||||
|
|
||||||
|
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()
|
||||||
|
device.populate_pci_path(entry)
|
||||||
|
return device
|
||||||
|
|
||||||
|
# @staticmethod
|
||||||
|
# def vendor_detect_old(device):
|
||||||
|
# for i in [NVIDIA, AMD]:
|
||||||
|
# if i.detect(device):
|
||||||
|
# return i
|
||||||
|
# return None
|
||||||
|
|
||||||
|
def vendor_detect(self, *, inherits: ClassVar[Any] = None, classes: list = None):
|
||||||
|
for i in classes or itertools.chain.from_iterable([subclass.__subclasses__() for subclass in PCIDevice.__subclasses__()]):
|
||||||
|
if issubclass(i, inherits or object) and i.detect(self):
|
||||||
|
return i
|
||||||
|
return None
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def detect(cls, device):
|
||||||
|
return device.vendor_id == cls.VENDOR_ID and ((device.class_code == cls.CLASS_CODE) if getattr(cls, "CLASS_CODE", None) else True) # type: ignore # pylint: disable=no-member
|
||||||
|
|
||||||
|
# def acpi_path(self):
|
||||||
|
# # Eventually
|
||||||
|
# raise NotImplementedError
|
||||||
|
|
||||||
|
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 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 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 ioreg.IOObjectConformsTo(entry, "IOPCIBridge".encode()):
|
||||||
|
pass
|
||||||
|
else:
|
||||||
|
# There's something in between that's not PCI! Abort
|
||||||
|
paths = []
|
||||||
|
break
|
||||||
|
parent = ioreg.IORegistryEntryGetParentEntry(entry, "IOService".encode(), None)[1]
|
||||||
|
if entry != original_entry:
|
||||||
|
ioreg.IOObjectRelease(entry)
|
||||||
|
entry = parent
|
||||||
|
self.pci_path = "/".join(reversed(paths))
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass
|
||||||
|
class GPU(PCIDevice):
|
||||||
|
arch: enum.Enum = field(init=False) # The architecture, see subclasses.
|
||||||
|
|
||||||
|
def __post_init__(self):
|
||||||
|
self.detect_arch()
|
||||||
|
|
||||||
|
def detect_arch(self):
|
||||||
|
raise NotImplementedError
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass
|
||||||
|
class WirelessCard(PCIDevice):
|
||||||
|
CLASS_CODE: ClassVar[int] = 0x028000 # 00800200 hexswapped
|
||||||
|
country_code: str = field(init=False)
|
||||||
|
chipset: enum.Enum = field(init=False)
|
||||||
|
|
||||||
|
def __post_init__(self):
|
||||||
|
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
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass
|
||||||
|
class NVMeController(PCIDevice):
|
||||||
|
CLASS_CODE: ClassVar[int] = 0x010802
|
||||||
|
|
||||||
|
aspm: Optional[int] = None
|
||||||
|
# parent_aspm: Optional[int] = None
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass
|
||||||
|
class SATAController(PCIDevice):
|
||||||
|
CLASS_CODE: ClassVar[int] = 0x010601
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass
|
||||||
|
class NVIDIA(GPU):
|
||||||
|
VENDOR_ID: ClassVar[int] = 0x10DE
|
||||||
|
|
||||||
|
class Archs(enum.Enum):
|
||||||
|
# pylint: disable=invalid-name
|
||||||
|
Fermi = "Fermi"
|
||||||
|
Tesla = "Tesla"
|
||||||
|
Kepler = "Kepler"
|
||||||
|
Unknown = "Unknown"
|
||||||
|
|
||||||
|
arch: Archs = field(init=False)
|
||||||
|
|
||||||
|
def detect_arch(self):
|
||||||
|
# G80/G80GL
|
||||||
|
if self.device_id in PCIIDArray.nvidia_ids.tesla_ids:
|
||||||
|
self.arch = NVIDIA.Archs.Tesla
|
||||||
|
elif self.device_id in PCIIDArray.nvidia_ids.fermi_ids:
|
||||||
|
self.arch = NVIDIA.Archs.Fermi
|
||||||
|
elif self.device_id in PCIIDArray.nvidia_ids.kepler_ids:
|
||||||
|
self.arch = NVIDIA.Archs.Kepler
|
||||||
|
else:
|
||||||
|
self.arch = NVIDIA.Archs.Unknown
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass
|
||||||
|
class AMD(GPU):
|
||||||
|
VENDOR_ID: ClassVar[int] = 0x1002
|
||||||
|
|
||||||
|
class Archs(enum.Enum):
|
||||||
|
# pylint: disable=invalid-name
|
||||||
|
Legacy_GCN = "Legacy GCN"
|
||||||
|
TeraScale_1 = "TeraScale 1"
|
||||||
|
TeraScale_2 = "TeraScale 2"
|
||||||
|
Polaris = "Polaris"
|
||||||
|
Vega = "Vega"
|
||||||
|
Navi = "Navi"
|
||||||
|
Unknown = "Unknown"
|
||||||
|
|
||||||
|
arch: Archs = field(init=False)
|
||||||
|
|
||||||
|
def detect_arch(self):
|
||||||
|
if self.device_id in PCIIDArray.amd_ids.legacy_gcn_ids:
|
||||||
|
self.arch = AMD.Archs.Legacy_GCN
|
||||||
|
elif self.device_id in PCIIDArray.amd_ids.terascale_1_ids:
|
||||||
|
self.arch = AMD.Archs.TeraScale_1
|
||||||
|
elif self.device_id in PCIIDArray.amd_ids.terascale_2_ids:
|
||||||
|
self.arch = AMD.Archs.TeraScale_2
|
||||||
|
elif self.device_id in PCIIDArray.amd_ids.polaris_ids:
|
||||||
|
self.arch = AMD.Archs.Polaris
|
||||||
|
elif self.device_id in PCIIDArray.amd_ids.vega_ids:
|
||||||
|
self.arch = AMD.Archs.Vega
|
||||||
|
elif self.device_id in PCIIDArray.amd_ids.navi_ids:
|
||||||
|
self.arch = AMD.Archs.Navi
|
||||||
|
else:
|
||||||
|
self.arch = AMD.Archs.Unknown
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass
|
||||||
|
class Intel(GPU):
|
||||||
|
VENDOR_ID: ClassVar[int] = 0x8086
|
||||||
|
|
||||||
|
class Archs(enum.Enum):
|
||||||
|
# pylint: disable=invalid-name
|
||||||
|
Iron_Lake = "Iron Lake"
|
||||||
|
Sandy_Bridge = "Sandy Bridge"
|
||||||
|
Ivy_Bridge = "Ivy Bridge"
|
||||||
|
Unknown = "Unknown"
|
||||||
|
|
||||||
|
arch: Archs = field(init=False)
|
||||||
|
|
||||||
|
def detect_arch(self):
|
||||||
|
if self.device_id in PCIIDArray.intel_ids.iron_ids:
|
||||||
|
self.arch = Intel.Archs.Iron_Lake
|
||||||
|
elif self.device_id in PCIIDArray.intel_ids.sandy_ids:
|
||||||
|
self.arch = Intel.Archs.Sandy_Bridge
|
||||||
|
elif self.device_id in PCIIDArray.intel_ids.ivy_ids:
|
||||||
|
self.arch = Intel.Archs.Ivy_Bridge
|
||||||
|
else:
|
||||||
|
self.arch = Intel.Archs.Unknown
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass
|
||||||
|
class Broadcom(WirelessCard):
|
||||||
|
VENDOR_ID: ClassVar[int] = 0x14E4
|
||||||
|
|
||||||
|
class Chipsets(enum.Enum):
|
||||||
|
# pylint: disable=invalid-name
|
||||||
|
AirportBrcmNIC = "AirportBrcmNIC supported"
|
||||||
|
AirPortBrcm4360 = "AirPortBrcm4360 supported"
|
||||||
|
AirPortBrcm4331 = "AirPortBrcm4331 supported"
|
||||||
|
AirPortBrcm43224 = "AppleAirPortBrcm43224 supported"
|
||||||
|
Unknown = "Unknown"
|
||||||
|
|
||||||
|
chipset: Chipsets = field(init=False)
|
||||||
|
|
||||||
|
def detect_chipset(self):
|
||||||
|
if self.device_id in PCIIDArray.broadcom_ids.AirPortBrcmNIC:
|
||||||
|
self.chipset = Broadcom.Chipsets.AirportBrcmNIC
|
||||||
|
elif self.device_id in PCIIDArray.broadcom_ids.AirPortBrcm4360:
|
||||||
|
self.chipset = Broadcom.Chipsets.AirPortBrcm4360
|
||||||
|
elif self.device_id in PCIIDArray.broadcom_ids.AirPortBrcm4331:
|
||||||
|
self.chipset = Broadcom.Chipsets.AirPortBrcm4331
|
||||||
|
elif self.device_id in PCIIDArray.broadcom_ids.AppleAirPortBrcm43224:
|
||||||
|
self.chipset = Broadcom.Chipsets.AirPortBrcm43224
|
||||||
|
else:
|
||||||
|
self.chipset = Broadcom.Chipsets.Unknown
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass
|
||||||
|
class Atheros(WirelessCard):
|
||||||
|
VENDOR_ID: ClassVar[int] = 0x168C
|
||||||
|
|
||||||
|
class Chipsets(enum.Enum):
|
||||||
|
# pylint: disable=invalid-name
|
||||||
|
# Well there's only one model but
|
||||||
|
AirPortAtheros40 = "AirPortAtheros40 supported"
|
||||||
|
Unknown = "Unknown"
|
||||||
|
|
||||||
|
chipset: Chipsets = field(init=False)
|
||||||
|
|
||||||
|
def detect_chipset(self):
|
||||||
|
if self.device_id in PCIIDArray.atheros_ids.AtherosWifi:
|
||||||
|
self.chipset = Atheros.Chipsets.AirPortAtheros40
|
||||||
|
else:
|
||||||
|
self.chipset = Atheros.Chipsets.Unknown
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass
|
||||||
|
class Computer:
|
||||||
|
real_model: Optional[str] = None
|
||||||
|
real_board_id: Optional[str] = None
|
||||||
|
reported_model: Optional[str] = None
|
||||||
|
reported_board_id: Optional[str] = None
|
||||||
|
gpus: list[GPU] = field(default_factory=list)
|
||||||
|
igpu: Optional[GPU] = None # Shortcut for IGPU
|
||||||
|
dgpu: Optional[GPU] = None # Shortcut for GFX0
|
||||||
|
storage: list[PCIDevice] = field(default_factory=list)
|
||||||
|
wifi: Optional[WirelessCard] = None
|
||||||
|
cpu: Optional[CPU] = None
|
||||||
|
oclp_version: Optional[str] = None
|
||||||
|
opencore_version: Optional[str] = None
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def probe():
|
||||||
|
computer = Computer()
|
||||||
|
computer.gpu_probe()
|
||||||
|
computer.dgpu_probe()
|
||||||
|
computer.igpu_probe()
|
||||||
|
computer.wifi_probe()
|
||||||
|
computer.storage_probe()
|
||||||
|
computer.smbios_probe()
|
||||||
|
computer.cpu_probe()
|
||||||
|
return computer
|
||||||
|
|
||||||
|
def gpu_probe(self):
|
||||||
|
# Chain together two iterators: one for class code 00000300, the other for class code 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(ioreg.ioiterator_to_list(ioreg.IOServiceGetMatchingServices(ioreg.kIOMasterPortDefault, ioreg.IOServiceNameMatching("GFX0".encode()), None)[1]), None)
|
||||||
|
if not device:
|
||||||
|
# No devices
|
||||||
|
return
|
||||||
|
|
||||||
|
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(ioreg.ioiterator_to_list(ioreg.IOServiceGetMatchingServices(ioreg.kIOMasterPortDefault, ioreg.IOServiceNameMatching("IGPU".encode()), None)[1]), None)
|
||||||
|
if not device:
|
||||||
|
# No devices
|
||||||
|
return
|
||||||
|
|
||||||
|
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 = 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 = 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:
|
||||||
|
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")
|
||||||
|
|
||||||
|
controller = NVMeController.from_ioregistry(parent)
|
||||||
|
controller.aspm = aspm
|
||||||
|
|
||||||
|
if controller.vendor_id != 0x106B:
|
||||||
|
self.storage.append(controller)
|
||||||
|
|
||||||
|
ioreg.IOObjectRelease(parent)
|
||||||
|
|
||||||
|
def smbios_probe(self):
|
||||||
|
# Reported model
|
||||||
|
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?
|
||||||
|
self.real_model = Utilities.get_nvram("oem-product", "4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102", decode=True) or self.reported_model
|
||||||
|
self.real_board_id = Utilities.get_nvram("oem-board", "4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102", decode=True) or self.reported_board_id
|
||||||
|
|
||||||
|
# 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(" "),
|
||||||
|
)
|
||||||
244
Resources/ioreg.py
Normal file
244
Resources/ioreg.py
Normal file
@@ -0,0 +1,244 @@
|
|||||||
|
# Handle misc CLI menu options
|
||||||
|
# Copyright (C) 2020-2021, Dhinak G
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from typing import NewType, Union
|
||||||
|
|
||||||
|
import objc
|
||||||
|
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
|
||||||
|
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
||||||
|
|
||||||
|
# CFMutableDictionaryRef IOServiceMatching(const char * name);
|
||||||
|
def IOServiceMatching(name: bytes) -> dict: # pylint: disable=invalid-name
|
||||||
|
raise NotImplementedError
|
||||||
|
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
||||||
|
|
||||||
|
# io_object_t IOIteratorNext(io_iterator_t iterator);
|
||||||
|
def IOIteratorNext(iterator: io_iterator_t) -> io_object_t: # pylint: disable=invalid-name
|
||||||
|
raise NotImplementedError
|
||||||
|
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
||||||
|
|
||||||
|
# kern_return_t IOObjectRelease(io_object_t object);
|
||||||
|
def IOObjectRelease(object: io_object_t) -> kern_return_t: # pylint: disable=invalid-name
|
||||||
|
raise NotImplementedError
|
||||||
|
|
||||||
|
|
||||||
|
# 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
|
||||||
@@ -41,6 +41,18 @@ chmod +x tccplus
|
|||||||
./tccplus add Microphone com.hnc.Discord
|
./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
|
## 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.
|
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.
|
||||||
@@ -71,4 +83,4 @@ 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
|
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 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 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.
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ With OpenCore Legacy Patcher we recommend users go through the below table to un
|
|||||||
| Supported OSes | <span style="color:#30BCD5">10.7-11</span> | <span style="color:red">10.15-11</span> |
|
| Supported OSes | <span style="color:#30BCD5">10.7-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> |
|
| Firmware Patching | <span style="color:#30BCD5">None required</span> | <span style="color:red">Required for models without native APFS support</span> |
|
||||||
| BootCamp Switching | <span style="color:red">Requires EFI Conversion for Start Disk support, otherwise still supported</span> | <span style="color:#30BCD5">Native</span> |
|
| BootCamp Switching | <span style="color:red">Requires EFI Conversion for Start Disk support, otherwise still supported</span> | <span style="color:#30BCD5">Native</span> |
|
||||||
| 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> |
|
| 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> |
|
| 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> |
|
| 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> |
|
||||||
|
|||||||
@@ -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)
|
* [AirportBrcmFixup](https://github.com/acidanthera/AirportBrcmFixup/blob/master/LICENSE.txt)
|
||||||
* [CPUFriend](https://github.com/acidanthera/CPUFriend/blob/master/LICENSE)
|
* [CPUFriend](https://github.com/acidanthera/CPUFriend/blob/master/LICENSE)
|
||||||
* [RestrictEvents](https://github.com/acidanthera/RestrictEvents/blob/master/LICENSE.txt)
|
* [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)
|
* [Innie](https://github.com/cdf/Innie/blob/master/LICENSE.txt)
|
||||||
* GPL 2.0
|
* GPL 2.0
|
||||||
* [NVMeFix](https://github.com/acidanthera/NVMeFix/blob/master/LICENSE.txt)
|
* [NVMeFix](https://github.com/acidanthera/NVMeFix/blob/master/LICENSE.txt)
|
||||||
* All rights reserved to respective authors
|
* All rights reserved to respective authors
|
||||||
* [AAAMouSSE](https://forums.macrumors.com/threads/mp3-1-others-sse-4-2-emulation-to-enable-amd-metal-driver.2206682/) - Syncretic
|
* [AAAMouSSE](https://forums.macrumors.com/threads/mp3-1-others-sse-4-2-emulation-to-enable-amd-metal-driver.2206682/) - Syncretic
|
||||||
* [telemetrap](https://forums.macrumors.com/threads/mp3-1-others-sse-4-2-emulation-to-enable-amd-metal-driver.2206682/post-28447707) - Syncretic
|
* [telemetrap](https://forums.macrumors.com/threads/mp3-1-others-sse-4-2-emulation-to-enable-amd-metal-driver.2206682/post-28447707) - Syncretic
|
||||||
* [SidecarFixup](https://github.com/khronokernel/SidecarFixup) - Khronokernel
|
|
||||||
* Apple Binaries - Apple Inc.
|
* Apple Binaries - Apple Inc.
|
||||||
|
|
||||||
Remaining files within OpenCore Legacy Patcher are copyrighted 2020-2021 Mykola Grymalyuk & Dhinak G. For integration into other projects, please request written permission.
|
Remaining files within OpenCore Legacy Patcher are copyrighted 2020-2021 Mykola Grymalyuk & Dhinak G. For integration into other projects, please request written permission.
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ Below is a list of hardware that currently has issues with Monterey:
|
|||||||
### Metal GPUs
|
### Metal GPUs
|
||||||
|
|
||||||
* Intel HD4000 iGPUs lost support
|
* Intel HD4000 iGPUs lost support
|
||||||
|
* Re-introduced with OpenCore Legacy Patcher v0.1.7
|
||||||
|
|
||||||
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:
|
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:
|
||||||
|
|
||||||
@@ -36,19 +37,6 @@ By default these machines require root volume patches to gain graphics accelerat
|
|||||||
* MacBookPro9,x
|
* MacBookPro9,x
|
||||||
* MacBookPro10,x
|
* MacBookPro10,x
|
||||||
|
|
||||||
Note: Currently HD 4000 support in Monterey is not perfect, following are broken:
|
|
||||||
|
|
||||||
::: details HD 4000 Issues
|
|
||||||
|
|
||||||
* 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
|
|
||||||
|
|
||||||
:::
|
|
||||||
|
|
||||||
### Non-Metal GPUs
|
### Non-Metal GPUs
|
||||||
|
|
||||||
* Non-Metal GPUs no longer have working acceleration patches:
|
* Non-Metal GPUs no longer have working acceleration patches:
|
||||||
|
|||||||
@@ -28,6 +28,14 @@ Here you can change different patcher settings, however the main interest is:
|
|||||||
|
|
||||||
Once you've toggled them both off, build your OpenCore EFI once again and install to your desired drive. Now to show the OpenCore selector, you can simply hold down the "ESC" key while clicking on EFI boot, then you can release the "ESC" key when you see the cursor arrow at the top left.
|
Once you've toggled them both off, build your OpenCore EFI once again and install to your desired drive. Now to show the OpenCore selector, you can simply hold down the "ESC" key while clicking on EFI boot, then you can release the "ESC" key when you see the cursor arrow at the top left.
|
||||||
|
|
||||||
|
## Enabling SIP
|
||||||
|
|
||||||
|
For many users, SIP will be enabled by default on build. For Intel HD 4000 users, you may have noticed that SIP is disabled. This is to ensure full compatibility with macOS Monterey and allow seamless booting between it and older OSes. However for users who do not plan to boot Monterey, you can re-enable under Patcher Settings.
|
||||||
|
|
||||||
|
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
|
## 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:
|
**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:
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ Term | Description
|
|||||||
**IOKit** | Backbone of how Kernel Extentions (Kexts) probe and attach onto hardware, starts quickly after kernel initates
|
**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
|
**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
|
**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
|
Term | Description
|
||||||
--- | ---
|
--- | ---
|
||||||
|
|||||||
@@ -4,5 +4,7 @@
|
|||||||
<dict>
|
<dict>
|
||||||
<key>com.apple.security.cs.disable-library-validation</key>
|
<key>com.apple.security.cs.disable-library-validation</key>
|
||||||
<true/>
|
<true/>
|
||||||
|
<key>com.apple.security.cs.disable-executable-page-protection</key>
|
||||||
|
<true/>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|||||||
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/>
|
<false/>
|
||||||
<key>ResetLogoStatus</key>
|
<key>ResetLogoStatus</key>
|
||||||
<false/>
|
<false/>
|
||||||
|
<key>SyncTableIds</key>
|
||||||
|
<false/>
|
||||||
</dict>
|
</dict>
|
||||||
</dict>
|
</dict>
|
||||||
<key>Booter</key>
|
<key>Booter</key>
|
||||||
@@ -240,7 +242,7 @@
|
|||||||
<key>MaxKernel</key>
|
<key>MaxKernel</key>
|
||||||
<string></string>
|
<string></string>
|
||||||
<key>MinKernel</key>
|
<key>MinKernel</key>
|
||||||
<string></string>
|
<string>10.0.0</string>
|
||||||
<key>BundlePath</key>
|
<key>BundlePath</key>
|
||||||
<string>Lilu.kext</string>
|
<string>Lilu.kext</string>
|
||||||
<key>ExecutablePath</key>
|
<key>ExecutablePath</key>
|
||||||
@@ -276,7 +278,7 @@
|
|||||||
<key>MaxKernel</key>
|
<key>MaxKernel</key>
|
||||||
<string></string>
|
<string></string>
|
||||||
<key>MinKernel</key>
|
<key>MinKernel</key>
|
||||||
<string></string>
|
<string>10.0.0</string>
|
||||||
<key>BundlePath</key>
|
<key>BundlePath</key>
|
||||||
<string>WhateverGreen.kext</string>
|
<string>WhateverGreen.kext</string>
|
||||||
<key>ExecutablePath</key>
|
<key>ExecutablePath</key>
|
||||||
@@ -294,7 +296,7 @@
|
|||||||
<key>MaxKernel</key>
|
<key>MaxKernel</key>
|
||||||
<string></string>
|
<string></string>
|
||||||
<key>MinKernel</key>
|
<key>MinKernel</key>
|
||||||
<string></string>
|
<string>12.0.0</string>
|
||||||
<key>BundlePath</key>
|
<key>BundlePath</key>
|
||||||
<string>RestrictEvents.kext</string>
|
<string>RestrictEvents.kext</string>
|
||||||
<key>ExecutablePath</key>
|
<key>ExecutablePath</key>
|
||||||
@@ -312,7 +314,7 @@
|
|||||||
<key>MaxKernel</key>
|
<key>MaxKernel</key>
|
||||||
<string></string>
|
<string></string>
|
||||||
<key>MinKernel</key>
|
<key>MinKernel</key>
|
||||||
<string></string>
|
<string>16.0.0</string>
|
||||||
<key>BundlePath</key>
|
<key>BundlePath</key>
|
||||||
<string>AAAMouSSE.kext</string>
|
<string>AAAMouSSE.kext</string>
|
||||||
<key>ExecutablePath</key>
|
<key>ExecutablePath</key>
|
||||||
@@ -590,42 +592,6 @@
|
|||||||
<key>PlistPath</key>
|
<key>PlistPath</key>
|
||||||
<string>Contents/Info.plist</string>
|
<string>Contents/Info.plist</string>
|
||||||
</dict>
|
</dict>
|
||||||
<dict>
|
|
||||||
<key>Arch</key>
|
|
||||||
<string>x86_64</string>
|
|
||||||
<key>Comment</key>
|
|
||||||
<string>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>
|
<dict>
|
||||||
<key>Arch</key>
|
<key>Arch</key>
|
||||||
<string>x86_64</string>
|
<string>x86_64</string>
|
||||||
@@ -636,7 +602,7 @@
|
|||||||
<key>MaxKernel</key>
|
<key>MaxKernel</key>
|
||||||
<string></string>
|
<string></string>
|
||||||
<key>MinKernel</key>
|
<key>MinKernel</key>
|
||||||
<string></string>
|
<string>15.0.0</string>
|
||||||
<key>BundlePath</key>
|
<key>BundlePath</key>
|
||||||
<string>CPUFriend.kext</string>
|
<string>CPUFriend.kext</string>
|
||||||
<key>ExecutablePath</key>
|
<key>ExecutablePath</key>
|
||||||
@@ -654,7 +620,7 @@
|
|||||||
<key>MaxKernel</key>
|
<key>MaxKernel</key>
|
||||||
<string></string>
|
<string></string>
|
||||||
<key>MinKernel</key>
|
<key>MinKernel</key>
|
||||||
<string></string>
|
<string>15.0.0</string>
|
||||||
<key>BundlePath</key>
|
<key>BundlePath</key>
|
||||||
<string>CPUFriendDataProvider.kext</string>
|
<string>CPUFriendDataProvider.kext</string>
|
||||||
<key>ExecutablePath</key>
|
<key>ExecutablePath</key>
|
||||||
@@ -762,7 +728,7 @@
|
|||||||
<key>MaxKernel</key>
|
<key>MaxKernel</key>
|
||||||
<string></string>
|
<string></string>
|
||||||
<key>MinKernel</key>
|
<key>MinKernel</key>
|
||||||
<string></string>
|
<string>12.0.0</string>
|
||||||
<key>BundlePath</key>
|
<key>BundlePath</key>
|
||||||
<string>CpuTscSync.kext</string>
|
<string>CpuTscSync.kext</string>
|
||||||
<key>ExecutablePath</key>
|
<key>ExecutablePath</key>
|
||||||
@@ -780,7 +746,7 @@
|
|||||||
<key>MaxKernel</key>
|
<key>MaxKernel</key>
|
||||||
<string></string>
|
<string></string>
|
||||||
<key>MinKernel</key>
|
<key>MinKernel</key>
|
||||||
<string></string>
|
<string>14.0.0</string>
|
||||||
<key>BundlePath</key>
|
<key>BundlePath</key>
|
||||||
<string>HibernationFixup.kext</string>
|
<string>HibernationFixup.kext</string>
|
||||||
<key>ExecutablePath</key>
|
<key>ExecutablePath</key>
|
||||||
@@ -798,7 +764,7 @@
|
|||||||
<key>MaxKernel</key>
|
<key>MaxKernel</key>
|
||||||
<string></string>
|
<string></string>
|
||||||
<key>MinKernel</key>
|
<key>MinKernel</key>
|
||||||
<string></string>
|
<string>18.0.0</string>
|
||||||
<key>BundlePath</key>
|
<key>BundlePath</key>
|
||||||
<string>NVMeFix.kext</string>
|
<string>NVMeFix.kext</string>
|
||||||
<key>ExecutablePath</key>
|
<key>ExecutablePath</key>
|
||||||
@@ -810,17 +776,17 @@
|
|||||||
<key>Arch</key>
|
<key>Arch</key>
|
||||||
<string>x86_64</string>
|
<string>x86_64</string>
|
||||||
<key>Comment</key>
|
<key>Comment</key>
|
||||||
<string>SidecarFixup</string>
|
<string>FeatureUnlock</string>
|
||||||
<key>Enabled</key>
|
<key>Enabled</key>
|
||||||
<false/>
|
<false/>
|
||||||
<key>MaxKernel</key>
|
<key>MaxKernel</key>
|
||||||
<string></string>
|
<string></string>
|
||||||
<key>MinKernel</key>
|
<key>MinKernel</key>
|
||||||
<string>19.0.0</string>
|
<string>16.0.0</string>
|
||||||
<key>BundlePath</key>
|
<key>BundlePath</key>
|
||||||
<string>SidecarFixup.kext</string>
|
<string>FeatureUnlock.kext</string>
|
||||||
<key>ExecutablePath</key>
|
<key>ExecutablePath</key>
|
||||||
<string>Contents/MacOS/SidecarFixup</string>
|
<string>Contents/MacOS/FeatureUnlock</string>
|
||||||
<key>PlistPath</key>
|
<key>PlistPath</key>
|
||||||
<string>Contents/Info.plist</string>
|
<string>Contents/Info.plist</string>
|
||||||
</dict>
|
</dict>
|
||||||
@@ -938,7 +904,7 @@
|
|||||||
<key>BundlePath</key>
|
<key>BundlePath</key>
|
||||||
<string>DebugEnhancer.kext</string>
|
<string>DebugEnhancer.kext</string>
|
||||||
<key>Comment</key>
|
<key>Comment</key>
|
||||||
<string></string>
|
<string>Enhance DEBUG output in system logs</string>
|
||||||
<key>Enabled</key>
|
<key>Enabled</key>
|
||||||
<false/>
|
<false/>
|
||||||
<key>ExecutablePath</key>
|
<key>ExecutablePath</key>
|
||||||
@@ -946,7 +912,25 @@
|
|||||||
<key>MaxKernel</key>
|
<key>MaxKernel</key>
|
||||||
<string></string>
|
<string></string>
|
||||||
<key>MinKernel</key>
|
<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>
|
<string></string>
|
||||||
|
<key>MinKernel</key>
|
||||||
|
<string>20.4.0</string>
|
||||||
<key>PlistPath</key>
|
<key>PlistPath</key>
|
||||||
<string>Contents/Info.plist</string>
|
<string>Contents/Info.plist</string>
|
||||||
</dict>
|
</dict>
|
||||||
@@ -1076,6 +1060,8 @@
|
|||||||
</dict>
|
</dict>
|
||||||
<key>Scheme</key>
|
<key>Scheme</key>
|
||||||
<dict>
|
<dict>
|
||||||
|
<key>CustomKernel</key>
|
||||||
|
<false/>
|
||||||
<key>FuzzyMatch</key>
|
<key>FuzzyMatch</key>
|
||||||
<true/>
|
<true/>
|
||||||
<key>KernelArch</key>
|
<key>KernelArch</key>
|
||||||
@@ -1087,7 +1073,8 @@
|
|||||||
<key>Misc</key>
|
<key>Misc</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>BlessOverride</key>
|
<key>BlessOverride</key>
|
||||||
<array/>
|
<array>
|
||||||
|
</array>
|
||||||
<key>Boot</key>
|
<key>Boot</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>ConsoleAttributes</key>
|
<key>ConsoleAttributes</key>
|
||||||
@@ -1101,7 +1088,7 @@
|
|||||||
<key>LauncherOption</key>
|
<key>LauncherOption</key>
|
||||||
<string>Full</string>
|
<string>Full</string>
|
||||||
<key>PickerAttributes</key>
|
<key>PickerAttributes</key>
|
||||||
<integer>17</integer>
|
<integer>145</integer>
|
||||||
<key>PickerAudioAssist</key>
|
<key>PickerAudioAssist</key>
|
||||||
<false/>
|
<false/>
|
||||||
<key>PickerMode</key>
|
<key>PickerMode</key>
|
||||||
@@ -1231,8 +1218,6 @@
|
|||||||
</dict>
|
</dict>
|
||||||
<key>7C436110-AB2A-4BBB-A880-FE41995C9F82</key>
|
<key>7C436110-AB2A-4BBB-A880-FE41995C9F82</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>SystemAudioVolume</key>
|
|
||||||
<data>Rg==</data>
|
|
||||||
<key>boot-args</key>
|
<key>boot-args</key>
|
||||||
<string>keepsyms=1 debug=0x100 -lilubetaall</string>
|
<string>keepsyms=1 debug=0x100 -lilubetaall</string>
|
||||||
<key>csr-active-config</key>
|
<key>csr-active-config</key>
|
||||||
|
|||||||
Binary file not shown.
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.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
payloads/Kexts/Misc/latebloom-v0.19.zip
Normal file
BIN
payloads/Kexts/Misc/latebloom-v0.19.zip
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -46,6 +46,7 @@ bad_tools = [
|
|||||||
"ResetSystem.efi",
|
"ResetSystem.efi",
|
||||||
"RtcRw.efi",
|
"RtcRw.efi",
|
||||||
"CsrUtil.efi",
|
"CsrUtil.efi",
|
||||||
|
"TpmInfo.efi",
|
||||||
]
|
]
|
||||||
|
|
||||||
for version in build_types:
|
for version in build_types:
|
||||||
@@ -68,8 +69,7 @@ for version in build_types:
|
|||||||
else:
|
else:
|
||||||
print(f"- Unable to find {delete_tools}, skipping")
|
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.
2
requirements.txt
Normal file
2
requirements.txt
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
requests
|
||||||
|
pyobjc
|
||||||
Reference in New Issue
Block a user