Compare commits
250 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e76ceb7cf4 | ||
|
|
22b9853452 | ||
|
|
8c7e991779 | ||
|
|
b2fcb77c24 | ||
|
|
2ac80fda32 | ||
|
|
31e48c7d96 | ||
|
|
18bbe60088 | ||
|
|
5a0ad4379e | ||
|
|
8971a3c4a9 | ||
|
|
37cd66265b | ||
|
|
faad02a7fa | ||
|
|
06d4c86ad8 | ||
|
|
a5998cb226 | ||
|
|
e86b48e0fc | ||
|
|
53a59c0ce3 | ||
|
|
fe5045edbe | ||
|
|
6a357d8cdf | ||
|
|
5005d1f1eb | ||
|
|
b801afcff0 | ||
|
|
758c1d9649 | ||
|
|
9e6d742c6d | ||
|
|
de1b893049 | ||
|
|
0483b5651a | ||
|
|
7680c20221 | ||
|
|
349bdb2936 | ||
|
|
60dc7c4490 | ||
|
|
7aaaa79571 | ||
|
|
b83495702b | ||
|
|
d482443f0e | ||
|
|
d4b55ad0e4 | ||
|
|
77cff8a6f3 | ||
|
|
2e62f1f65c | ||
|
|
87359ee642 | ||
|
|
0b8c4b20b6 | ||
|
|
3049d1adef | ||
|
|
e3e9be01a2 | ||
|
|
f178b22423 | ||
|
|
797b56b9f9 | ||
|
|
d08807e301 | ||
|
|
c78f7d0bdb | ||
|
|
bd4564f98e | ||
|
|
25a5a3d168 | ||
|
|
4b54711434 | ||
|
|
6eec2e95b8 | ||
|
|
03ed8ed1f0 | ||
|
|
9720d90493 | ||
|
|
d0eada1d85 | ||
|
|
06b3cf2e90 | ||
|
|
bbd379a584 | ||
|
|
2b04a06adc | ||
|
|
703e926b96 | ||
|
|
3d10404da5 | ||
|
|
41a189444b | ||
|
|
6ae572f74f | ||
|
|
fa045e96e7 | ||
|
|
2a12e861ac | ||
|
|
31c0845667 | ||
|
|
a97c6c9baa | ||
|
|
e4c433730f | ||
|
|
30be583a3d | ||
|
|
bbed0b4921 | ||
|
|
3e784c0ae5 | ||
|
|
182b6c4291 | ||
|
|
b1f16fca1d | ||
|
|
9787645542 | ||
|
|
af3d4c4af5 | ||
|
|
bdc8c2a4fc | ||
|
|
be89e2ae11 | ||
|
|
55f3905dd4 | ||
|
|
6f0048814f | ||
|
|
7895413ce2 | ||
|
|
9254e67fc9 | ||
|
|
d815ece3c4 | ||
|
|
14bad15df4 | ||
|
|
d830e72b62 | ||
|
|
70b5399126 | ||
|
|
1d8d3ef757 | ||
|
|
9f3ee178a5 | ||
|
|
91335ab271 | ||
|
|
8320355925 | ||
|
|
0b225fbbbd | ||
|
|
6a18334663 | ||
|
|
af940152a1 | ||
|
|
66f5e8d969 | ||
|
|
b3b7508237 | ||
|
|
361f9767dd | ||
|
|
f20c9808ed | ||
|
|
b6ac9f3a6f | ||
|
|
8365144834 | ||
|
|
85b422b0fb | ||
|
|
6ebc9a08ae | ||
|
|
b04e396351 | ||
|
|
1ec23e9ebb | ||
|
|
44637967bc | ||
|
|
7d93c96343 | ||
|
|
58a9f4dd0e | ||
|
|
d2c673d9e1 | ||
|
|
0048559acb | ||
|
|
88d7bf373b | ||
|
|
28861ca1a8 | ||
|
|
86ae43dc1c | ||
|
|
24d96c1d37 | ||
|
|
f62e9f5d21 | ||
|
|
d23965f1c0 | ||
|
|
e9397b0237 | ||
|
|
8bf7c25f69 | ||
|
|
0a693806d4 | ||
|
|
12e8b8e0a9 | ||
|
|
33d95fc237 | ||
|
|
b0ff0204bd | ||
|
|
7704488e24 | ||
|
|
bf2bd694bc | ||
|
|
200f6d17f9 | ||
|
|
580f35bfce | ||
|
|
a6eda09158 | ||
|
|
a93da6cf9e | ||
|
|
e715970b63 | ||
|
|
1b6d29d19b | ||
|
|
e219ff809e | ||
|
|
a521667e54 | ||
|
|
7a41b0c4a5 | ||
|
|
cc5d522cb9 | ||
|
|
57713ab195 | ||
|
|
548dad7743 | ||
|
|
a5989e88a3 | ||
|
|
f91e7dc10d | ||
|
|
c889f97a6c | ||
|
|
ff8b2eff2c | ||
|
|
23acd5b6cd | ||
|
|
50256b92c8 | ||
|
|
4731c2c346 | ||
|
|
122aec5ec3 | ||
|
|
e62ca075e8 | ||
|
|
e4d5c62ada | ||
|
|
9db76b5cca | ||
|
|
df4f165122 | ||
|
|
8331c23045 | ||
|
|
bb1132301a | ||
|
|
f6dcc35b48 | ||
|
|
9f583eb590 | ||
|
|
5a700c729e | ||
|
|
4e40da79bb | ||
|
|
53582efd02 | ||
|
|
9b4c66f3d3 | ||
|
|
5c6dcc3485 | ||
|
|
898b10f932 | ||
|
|
5bcc6d58c3 | ||
|
|
eb907d17a0 | ||
|
|
5e3f476884 | ||
|
|
21cc355b03 | ||
|
|
a22531e1d9 | ||
|
|
324188c039 | ||
|
|
ef06f096d0 | ||
|
|
afeff753ef | ||
|
|
bf8892878d | ||
|
|
1f6dfbfd30 | ||
|
|
eeeb222896 | ||
|
|
41733124db | ||
|
|
c9d7267280 | ||
|
|
bb3a7eccc7 | ||
|
|
a73d5c70d4 | ||
|
|
c48711c4c3 | ||
|
|
eebb098aed | ||
|
|
06ae5350cb | ||
|
|
69a41b2951 | ||
|
|
19e43d2850 | ||
|
|
c32a3d89e9 | ||
|
|
b227480e6c | ||
|
|
fbae80ec26 | ||
|
|
299bb0be73 | ||
|
|
7e22a0fe46 | ||
|
|
f1d5adff7a | ||
|
|
9b4fbdfb9a | ||
|
|
e1a8cdc1d5 | ||
|
|
d13f96a454 | ||
|
|
b6599a1357 | ||
|
|
ce09ccf115 | ||
|
|
04a039caf3 | ||
|
|
f006ee4569 | ||
|
|
c1b7e62a02 | ||
|
|
cf11a9e7a9 | ||
|
|
ed14fbfff0 | ||
|
|
ebc39a58eb | ||
|
|
6475b3f055 | ||
|
|
bd86a8cc04 | ||
|
|
de2166915a | ||
|
|
bab6faac97 | ||
|
|
16b9cb44c2 | ||
|
|
3d9f3a1147 | ||
|
|
0b5c244a2e | ||
|
|
c94aebc369 | ||
|
|
8fc015a108 | ||
|
|
f5ba7816d9 | ||
|
|
37c0bf1e22 | ||
|
|
e699b6f2cb | ||
|
|
2904ca702c | ||
|
|
8f10f1938e | ||
|
|
b7f7489c5d | ||
|
|
691c462bba | ||
|
|
e51ec8eb8e | ||
|
|
ee7bf05780 | ||
|
|
3223854cdd | ||
|
|
a35384e0b1 | ||
|
|
faa0456ff7 | ||
|
|
5d0d1968f5 | ||
|
|
21277e5738 | ||
|
|
4f8748932d | ||
|
|
1b1ca79374 | ||
|
|
97ae6b587c | ||
|
|
d22588b3cd | ||
|
|
8041dca103 | ||
|
|
6c304402dd | ||
|
|
ec3ecdca38 | ||
|
|
0fe707637a | ||
|
|
77b19688ae | ||
|
|
0d6e159b72 | ||
|
|
1afb953f05 | ||
|
|
ee07dc9936 | ||
|
|
254267f1be | ||
|
|
b78247f9e8 | ||
|
|
5bfee53d99 | ||
|
|
5154492c97 | ||
|
|
5c97527038 | ||
|
|
3fd08803d6 | ||
|
|
de5cf6f93d | ||
|
|
60b9d9d811 | ||
|
|
8405a8162f | ||
|
|
95558ab31e | ||
|
|
256bd8dd71 | ||
|
|
c960153442 | ||
|
|
c712f33cf3 | ||
|
|
4e659ebdbb | ||
|
|
ed55cc3bbd | ||
|
|
df61370b7c | ||
|
|
79ab028b0a | ||
|
|
444819b6a0 | ||
|
|
079a1ac2ff | ||
|
|
9113dab049 | ||
|
|
377b29f317 | ||
|
|
be9bb8bef1 | ||
|
|
51c3921cf8 | ||
|
|
6f5d5922dc | ||
|
|
fa5266b069 | ||
|
|
d619f15d36 | ||
|
|
3e9ec51ef5 | ||
|
|
0ac54c7ec4 | ||
|
|
6220d21a7b | ||
|
|
7661b52a0a | ||
|
|
8c9b47b4d5 | ||
|
|
92c02996ae |
34
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help notify of issues
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the issue is.
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
1. Open app or .command '...'
|
||||
2. Enter '....'
|
||||
3. See error
|
||||
|
||||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Build Folder**
|
||||
If applicable, add the generated OpenCore Build to help explain your problem.
|
||||
|
||||
**Hardware (please complete the following information):**
|
||||
- OS Running (ie. macOS 10.15.7, Catalina)
|
||||
- OS Patching (ie. macOS 11.2.3, Big Sur)
|
||||
- Model Patching (ie. MacPro5,1)
|
||||
|
||||
For in-depth hardware logs, we highly encourage users to run [IORegistryExplorer](https://github.com/khronokernel/IORegistryClone/blob/master/ioreg-210.zip?raw=true) and send the output
|
||||
* ie. `File -> SaveAs`
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
||||
@@ -1,8 +1,7 @@
|
||||
name: CI
|
||||
name: CI - Build App
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
release:
|
||||
types: [published]
|
||||
@@ -10,24 +9,21 @@ on:
|
||||
jobs:
|
||||
build:
|
||||
name: Build App
|
||||
runs-on: macos-latest
|
||||
runs-on: self-hosted
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Python 3
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: "3.x"
|
||||
- name: Install Python Dependencies
|
||||
run: |
|
||||
python3 -m pip install -U pip
|
||||
pip3 install pyinstaller
|
||||
# - name: Install Python Dependencies
|
||||
# run: |
|
||||
# python3 -m pip install -U pip
|
||||
# pip3 install pyinstaller
|
||||
|
||||
- run: pyinstaller Opencore-Patcher.spec
|
||||
- run: pyinstaller OpenCore-Patcher.spec
|
||||
- run: ./after_pyinstaller.sh
|
||||
- run: 'codesign -s "Developer ID Application: Mykola Grymalyuk (S74BDJXQMD)" -v --deep --timestamp --entitlements entitlements.plist -o runtime "dist/OpenCore-Patcher.app"'
|
||||
|
||||
- run: cd dist; zip ../OpenCore-Patcher.zip OpenCore-Patcher; zip -r ../OpenCore-Patcher.app.zip OpenCore-Patcher.app
|
||||
|
||||
- run: ./../sign-app.sh
|
||||
- name: Upload Binary to Artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
29
.github/workflows/build-cli.yml
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
name: CI - Build CLI
|
||||
|
||||
on:
|
||||
push:
|
||||
workflow_dispatch:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build CLI
|
||||
runs-on: self-hosted
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- run: pyinstaller OCLP-CLI.spec
|
||||
- run: cd dist; zip ../OCLP-CLI.zip OCLP-CLI
|
||||
- name: Upload Binary to Artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: OCLP-CLI
|
||||
path: OCLP-CLI.zip
|
||||
- name: Upload to Release
|
||||
if: github.event_name == 'release'
|
||||
uses: svenstaro/upload-release-action@e74ff71f7d8a4c4745b560a485cc5fdb9b5b999d
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: OCLP-CLI.zip
|
||||
tag: ${{ github.ref }}
|
||||
file_glob: true
|
||||
@@ -1,4 +1,4 @@
|
||||
name: Build/Test/Deploy
|
||||
name: CI - Build Site
|
||||
on:
|
||||
push:
|
||||
branches-ignore:
|
||||
3
.gitignore
vendored
@@ -1,4 +1,7 @@
|
||||
.DS_Store
|
||||
OCLP-GUI.command
|
||||
/payloads/Apple
|
||||
/payloads/__MACOSX
|
||||
/App
|
||||
/Build-Folder
|
||||
/build
|
||||
|
||||
100
CHANGELOG.md
@@ -1,5 +1,103 @@
|
||||
# OpenCore Legacy Patcher changelog
|
||||
|
||||
## 0.1.1
|
||||
- Fix iMac11,3 GFX0 pathing
|
||||
- Add MouSSE support to iMac10,1 with Metal AMD GPU
|
||||
- Fix iMac11,1 and iMac11,3 Nvidia boot issues after PRAM reset
|
||||
- Fix DRM support on Nvidia-only configurations
|
||||
- Support optional setting between DRM and QuickSync support on iMacs13,x and iMac14,x
|
||||
- Add public beta support for Legacy GPU Acceleration (v0.0.4)
|
||||
- Note ATI/AMD TeraScale 2 unsupported (HD 5/6000)
|
||||
- Add better kmutil crash handling
|
||||
- Fix build crashing when no wifi card is present
|
||||
- Allow Legacy Acceleration Patches on Mac Pros and Xserves
|
||||
- Fix USB kernel panics on iMac7,1
|
||||
- Fix AppleALC support in Mojave
|
||||
- Fix TeraScale 1 GPU detection
|
||||
- Enable Graphics Acceleration on legacy GPUs by default
|
||||
- Fix incorrectly disabling SIP/SMB on Metal GPUs
|
||||
- Fix error output when rebuilding kernel cache fails
|
||||
- Fix Acceleration Linking for Intel Ironlake iGPUs
|
||||
|
||||
## 0.1.0
|
||||
- Fix crash on iMacs with Metal GPUs
|
||||
|
||||
## 0.0.23
|
||||
- Fix MacBookPro4,1 15" and 17" audio support
|
||||
- Fix iMac7,1 24" and iMac9,1 24" audio support
|
||||
- Fix Macmini4,1 audio support
|
||||
- Increment binaries
|
||||
- AppleALC 1a3e5cb (1.6.0 rolling - 04-14-2021)
|
||||
- Enhance Wifi model detection
|
||||
- Hide OpenShell.efi by default
|
||||
- Add Brightness Control patches for legacy Nvidia, AMD and Intel GPUs
|
||||
- Models with brightness control issues in Catalina partially supported
|
||||
- Add user configurable Bootstrap setting
|
||||
- Enhance GPU Detection logic
|
||||
- Increment AppleBackLightFixup v1.0.1
|
||||
- Add panel type F10T9cde
|
||||
- Enhance HDMI audio support on Mac Pros and Xserves
|
||||
- Strip unused kext entries during build
|
||||
- Add gfxutil support for better DeviceProperty path detection
|
||||
- Add basic CLI support
|
||||
- Disable SIP and SecureBootModel by default on legacy GPUs
|
||||
|
||||
## 0.0.22
|
||||
- Add ExFat support for models missing driver
|
||||
- Aids BootCamp support for EFI based installs on 2010 and older Macs
|
||||
- Fix CPU Boosting on 2011 and older Macs
|
||||
- Add basic support for Xserve2,1
|
||||
- Add AppleALC support(99b3662 - 1.6.0 rolling - 04-09-2021), remove AppleHDA patching requirement
|
||||
- Add BCM94322 and BCM94321 chipset support
|
||||
|
||||
## 0.0.21
|
||||
- Fix botched images in OpenCanopy
|
||||
- Add support for 3rd party OpenCore usage detection during building
|
||||
- Mainly for users transitioning from Ausdauersportler's OpenCore configuration
|
||||
|
||||
## 0.0.20
|
||||
- Fix CPU Calculation on early MCP79 chipsets (ie. iMac9,1, MacBook5,x)
|
||||
- Increment binaries
|
||||
- OpenCore c528597 (0.6.8 release - 2021-04-05)
|
||||
- Lilu 3ef7ca1 (1.5.2 release - 2021-04-05)
|
||||
- WhateverGreen afcd687 (1.4.9 release - 2021-04-05)
|
||||
- Move Apple binaries to dedicated repo and allow custom repos
|
||||
- Reduces App size 1/5th compared to 0.0.19
|
||||
- Fix OpenCanopy support on iMac7,1 and 8,1
|
||||
- Set iGPU-less iMacs to iMacPro1,1
|
||||
- Additionally fixes Bluetooth on older iMacs with BRCM2046 modules
|
||||
- Add MacBook4,1 support
|
||||
- Create dedicated RestrictEvents build for MacBookPro9,1
|
||||
- Fix Mac Pro and Xserve output issues
|
||||
|
||||
## 0.0.19
|
||||
- Add SMC-Spoof.kext to avoid triggering `smcupdater`
|
||||
- Add Root Volume patching for older machines
|
||||
- AppleHDA Patch for 2011 and older (Excluding MacPro4,1+)
|
||||
- Fix CPU Speed reporting
|
||||
- Increment binaries
|
||||
- OpenCore 9cd61bb (0.6.8 rolling - 2021-03-27)
|
||||
- Add Mavericks and newer .app support
|
||||
- Refactor USB map building, fixes USB 3.0 displaying as USB 2.0
|
||||
- Fix blackscreen on MacBookPro9,1
|
||||
- Update RestrictEvents with custom build (1.0.1)
|
||||
- Blocks `/usr/libexec/displaypolicyd` on MacBookPro9,1 to ensure smooth GPU switching
|
||||
- Add custom SD Card icon
|
||||
- Add automatic codesiging and notarization
|
||||
- Fix crashing when CD is present
|
||||
- Add custom SSD icon
|
||||
- Fix Broadcom Ethernet on older 2009-2011 Macs
|
||||
|
||||
## 0.0.18
|
||||
- Disable Vault by default due to breaking installations
|
||||
- Move BOOTx64.efi to System/Library/CoreServices/ to support GPT BootCamp installs
|
||||
- Disable verbose by default, still configurable by end-user
|
||||
- Remove `AppleInternal`(0x10) from SIP value
|
||||
- Add Mac Pro DRM patches for Metal GPUs
|
||||
- Force `Moderate` SMBIOS replacement for models without native APFS support
|
||||
- Re-enable legacy BCM94322 networking patches
|
||||
- Add custom drive icons for external drives
|
||||
|
||||
## 0.0.17
|
||||
- Fix build detection breaking on older OS
|
||||
|
||||
@@ -102,4 +200,4 @@
|
||||
- Add El Capitan era wireless cards
|
||||
|
||||
## 0.0.1
|
||||
- Inital developer preview
|
||||
- Initial developer preview
|
||||
|
||||
179
OCLP-CLI.command
Executable file
@@ -0,0 +1,179 @@
|
||||
#!/usr/bin/env python3
|
||||
# Copyright (C) 2020-2021 Mykola Grymalyuk
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import binascii
|
||||
import plistlib
|
||||
import subprocess
|
||||
import sys
|
||||
import time
|
||||
import platform
|
||||
import argparse
|
||||
from pathlib import Path
|
||||
|
||||
from Resources import Build, ModelArray, Constants, SysPatch, Utilities, CliMenu
|
||||
|
||||
|
||||
class OpenCoreLegacyPatcher():
|
||||
def __init__(self):
|
||||
self.constants = Constants.Constants()
|
||||
self.current_model: str = None
|
||||
opencore_model: str = subprocess.run("nvram 4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102:oem-product".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.decode()
|
||||
if not opencore_model.startswith("nvram: Error getting variable"):
|
||||
opencore_model = [line.strip().split(":oem-product ", 1)[1] for line in opencore_model.split("\n") if line.strip().startswith("4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102:")][0]
|
||||
self.current_model = opencore_model
|
||||
else:
|
||||
self.current_model = subprocess.run("system_profiler SPHardwareDataType".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
self.current_model = [line.strip().split(": ", 1)[1] for line in self.current_model.stdout.decode().split("\n") if line.strip().startswith("Model Identifier")][0]
|
||||
self.constants.detected_os = int(platform.uname().release.partition(".")[0])
|
||||
if self.current_model in ModelArray.NoAPFSsupport:
|
||||
self.constants.serial_settings = "Moderate"
|
||||
if self.current_model in ModelArray.LegacyGPU:
|
||||
try:
|
||||
dgpu_devices = plistlib.loads(subprocess.run("ioreg -r -n GFX0 -a".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode())
|
||||
dgpu_vendor = self.hexswap(binascii.hexlify(dgpu_devices[0]["vendor-id"]).decode()[:4])
|
||||
dgpu_device = self.hexswap(binascii.hexlify(dgpu_devices[0]["device-id"]).decode()[:4])
|
||||
except ValueError:
|
||||
dgpu_vendor = ""
|
||||
dgpu_device = ""
|
||||
|
||||
if (dgpu_vendor == self.constants.pci_amd_ati and dgpu_device in ModelArray.AMDMXMGPUs) or (dgpu_vendor == self.constants.pci_nvidia and dgpu_device in ModelArray.NVIDIAMXMGPUs):
|
||||
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
|
||||
# Note: This logic currently only applies for iMacPro1,1 users, see below threads on the culprits:
|
||||
# - https://forums.macrumors.com/threads/2011-imac-graphics-card-upgrade.1596614/post-17425857
|
||||
# - https://forums.macrumors.com/threads/opencore-on-the-mac-pro.2207814/
|
||||
# PLEASE FOR THE LOVE OF GOD JUST SET ExposeSensitiveData CORRECTLY!!!
|
||||
if self.current_model == "iMacPro1,1":
|
||||
serial: str = subprocess.run("system_profiler SPHardwareDataType | grep Serial".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.decode()
|
||||
serial = [line.strip().split("Number (system): ", 1)[1] for line in serial.split("\n") if line.strip().startswith("Serial")][0]
|
||||
true_model = subprocess.run([str(self.constants.macserial_path), "--info", str(serial)], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
true_model = [i.partition(" - ")[2] for i in true_model.stdout.decode().split("\n") if "Model: " in i][0]
|
||||
print(f"True Model: {true_model}")
|
||||
if not true_model.startswith("Unknown"):
|
||||
self.current_model = true_model
|
||||
|
||||
parser = argparse.ArgumentParser()
|
||||
|
||||
# Generic building args
|
||||
parser.add_argument('--build', help='Build OpenCore', action='store_true', required=False)
|
||||
parser.add_argument('--verbose', help='Enable verbose boot', action='store_true', required=False)
|
||||
parser.add_argument('--debug_oc', help='Enable OpenCore DEBUG', action='store_true', required=False)
|
||||
parser.add_argument('--debug_kext', help='Enable kext DEBUG', action='store_true', required=False)
|
||||
parser.add_argument('--skip_wifi', help='Skip wifi patches', action='store_true', required=False)
|
||||
parser.add_argument('--hide_picker', help='Hide OpenCore picker', action='store_true', required=False)
|
||||
parser.add_argument('--disable_sip', help='Disable SIP', action='store_true', required=False)
|
||||
parser.add_argument('--disable_smb', help='Disable SecureBootModel', action='store_true', required=False)
|
||||
parser.add_argument('--vault', help='Enable OpenCore Vaulting', action='store_true', required=False)
|
||||
|
||||
# Building args requiring value values
|
||||
parser.add_argument('--model', action='store', help='Set custom model', required=False)
|
||||
parser.add_argument('--metal_gpu', action='store', help='Set Metal GPU Vendor', required=False)
|
||||
parser.add_argument('--smbios_spoof', action='store', help='Set SMBIOS patching mode', required=False)
|
||||
|
||||
# SysPatch args
|
||||
parser.add_argument('--patch_sys_vol', help='Patches root volume', action='store_true', required=False)
|
||||
parser.add_argument('--unpatch_sys_vol', help='Unpatches root volume, EXPERIMENTAL', action='store_true', required=False)
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
self.constants.gui_mode = True
|
||||
self.constants.current_path = Path.cwd()
|
||||
|
||||
if getattr(sys, "frozen", False) and hasattr(sys, "_MEIPASS"):
|
||||
print("- Rerouting payloads location")
|
||||
self.constants.payload_path = sys._MEIPASS / Path("payloads")
|
||||
else:
|
||||
print("- Using default payloads location")
|
||||
|
||||
if args.verbose:
|
||||
print("- Set verbose configuration")
|
||||
self.constants.verbose_debug = True
|
||||
if args.debug_oc:
|
||||
print("- Set OpenCore DEBUG configuration")
|
||||
self.constants.opencore_debug = True
|
||||
self.constants.opencore_build = "DEBUG"
|
||||
if args.debug_kext:
|
||||
print("- Set kext DEBUG configuration")
|
||||
self.constants.kext_debug = True
|
||||
if args.skip_wifi:
|
||||
print("- Set wifi skip configuration")
|
||||
self.constants.wifi_build = True
|
||||
if args.hide_picker:
|
||||
print("- Set HidePicker configuration")
|
||||
self.constants.showpicker = False
|
||||
if args.disable_sip:
|
||||
print("- Set Disable SIP configuration")
|
||||
self.constants.sip_status = False
|
||||
if args.disable_smb:
|
||||
print("- Set Disable SecureBootModel configuration")
|
||||
self.constants.secure_status = False
|
||||
if args.vault:
|
||||
print("- Set Vault configuration")
|
||||
self.constants.vault = True
|
||||
if args.metal_gpu:
|
||||
if args.metal_gpu == "Nvidia":
|
||||
print("- Set Metal GPU patches to Nvidia")
|
||||
self.constants.metal_build = True
|
||||
self.constants.imac_vendor = "Nvidia"
|
||||
elif args.metal_gpu == "AMD":
|
||||
print("- Set Metal GPU patches to AMD")
|
||||
self.constants.metal_build = True
|
||||
self.constants.imac_vendor = "AMD"
|
||||
else:
|
||||
print(f"- Unknown GPU arg passed: {args.metal_gpu}")
|
||||
self.constants.metal_build = False
|
||||
self.constants.imac_vendor = "None"
|
||||
if args.smbios_spoof:
|
||||
if args.smbios_spoof == "Minimal":
|
||||
self.constants.serial_settings = "Minimal"
|
||||
elif args.smbios_spoof == "Moderate":
|
||||
self.constants.serial_settings = "Moderate"
|
||||
elif args.smbios_spoof == "Advanced":
|
||||
self.constants.serial_settings = "Advanced"
|
||||
else:
|
||||
print(f"- Unknown SMBIOS arg passed: {args.smbios_spoof}")
|
||||
|
||||
if args.build:
|
||||
if args.model:
|
||||
print(f"- Using custom model: {args.model}")
|
||||
self.constants.custom_model = args.model
|
||||
self.build_opencore()
|
||||
else:
|
||||
print(f"- Using detected model: {self.current_model}")
|
||||
self.build_opencore()
|
||||
if args.patch_sys_vol:
|
||||
print("- Set System Volume patching")
|
||||
self.patch_vol()
|
||||
elif args.unpatch_sys_vol:
|
||||
print("- Set System Volume unpatching")
|
||||
self.unpatch_vol()
|
||||
|
||||
def hexswap(self, input_hex: str):
|
||||
hex_pairs = [input_hex[i:i + 2] for i in range(0, len(input_hex), 2)]
|
||||
hex_rev = hex_pairs[::-1]
|
||||
hex_str = "".join(["".join(x) for x in hex_rev])
|
||||
return hex_str.upper()
|
||||
|
||||
def patch_vol(self):
|
||||
SysPatch.PatchSysVolume(self.constants.custom_model or self.current_model, self.constants).start_patch()
|
||||
|
||||
def unpatch_vol(self):
|
||||
SysPatch.PatchSysVolume(self.constants.custom_model or self.current_model, self.constants).start_unpatch()
|
||||
|
||||
def build_opencore(self):
|
||||
Build.BuildOpenCore(self.constants.custom_model or self.current_model, self.constants).build_opencore()
|
||||
|
||||
def install_opencore(self):
|
||||
Build.BuildOpenCore(self.constants.custom_model or self.current_model, self.constants).copy_efi()
|
||||
|
||||
OpenCoreLegacyPatcher()
|
||||
|
||||
# Example arg for OCLP command line
|
||||
# ./OCLP-CLI --build --verbose --debug_oc --debug_kext --model iMac11,2
|
||||
34
OCLP-CLI.spec
Normal file
@@ -0,0 +1,34 @@
|
||||
# -*- mode: python ; coding: utf-8 -*-
|
||||
import sys, os
|
||||
sys.path.append(os.path.abspath(os.getcwd()))
|
||||
from Resources import Constants
|
||||
block_cipher = None
|
||||
|
||||
|
||||
a = Analysis(['OCLP-CLI.command'],
|
||||
binaries=[],
|
||||
datas=[('payloads', 'payloads'), ('Resources', 'Resources')],
|
||||
hiddenimports=[],
|
||||
hookspath=[],
|
||||
runtime_hooks=[],
|
||||
excludes=[],
|
||||
win_no_prefer_redirects=False,
|
||||
win_private_assemblies=False,
|
||||
cipher=block_cipher,
|
||||
noarchive=False)
|
||||
pyz = PYZ(a.pure, a.zipped_data,
|
||||
cipher=block_cipher)
|
||||
exe = EXE(pyz,
|
||||
a.scripts,
|
||||
a.binaries,
|
||||
a.zipfiles,
|
||||
a.datas,
|
||||
[],
|
||||
name='OCLP-CLI',
|
||||
debug=False,
|
||||
bootloader_ignore_signals=False,
|
||||
strip=False,
|
||||
upx=True,
|
||||
upx_exclude=[],
|
||||
runtime_tmpdir=None,
|
||||
console=True )
|
||||
@@ -1,10 +1,16 @@
|
||||
#!/usr/bin/env python3
|
||||
# Copyright (C) 2020-2021, Dhinak G, Mykola Grymalyuk
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import subprocess, sys, time, platform
|
||||
import binascii
|
||||
import plistlib
|
||||
import subprocess
|
||||
import sys
|
||||
import time
|
||||
import platform
|
||||
|
||||
from Resources import build, ModelArray, Constants, utilities
|
||||
from Resources import Build, ModelArray, Constants, SysPatch, Utilities, CliMenu
|
||||
|
||||
|
||||
class OpenCoreLegacyPatcher():
|
||||
@@ -18,18 +24,53 @@ class OpenCoreLegacyPatcher():
|
||||
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, _, _ = platform.mac_ver()
|
||||
self.constants.detected_os = float('.'.join(self.constants.detected_os.split('.')[:2]))
|
||||
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:
|
||||
try:
|
||||
dgpu_devices = plistlib.loads(subprocess.run("ioreg -r -n GFX0 -a".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode())
|
||||
dgpu_vendor = self.hexswap(binascii.hexlify(dgpu_devices[0]["vendor-id"]).decode()[:4])
|
||||
dgpu_device = self.hexswap(binascii.hexlify(dgpu_devices[0]["device-id"]).decode()[:4])
|
||||
except ValueError:
|
||||
dgpu_vendor = ""
|
||||
dgpu_device = ""
|
||||
|
||||
if (dgpu_vendor == self.constants.pci_amd_ati and dgpu_device in ModelArray.AMDMXMGPUs) or (dgpu_vendor == self.constants.pci_nvidia and dgpu_device in ModelArray.NVIDIAMXMGPUs):
|
||||
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
|
||||
# Note: This logic currently only applies for iMacPro1,1 users, see below threads on the culprits:
|
||||
# - https://forums.macrumors.com/threads/2011-imac-graphics-card-upgrade.1596614/post-17425857
|
||||
# - https://forums.macrumors.com/threads/opencore-on-the-mac-pro.2207814/
|
||||
# PLEASE FOR THE LOVE OF GOD JUST SET ExposeSensitiveData CORRECTLY!!!
|
||||
if self.current_model == "iMacPro1,1":
|
||||
serial: str = subprocess.run("system_profiler SPHardwareDataType | grep Serial".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.decode()
|
||||
serial = [line.strip().split("Number (system): ", 1)[1] for line in serial.split("\n") if line.strip().startswith("Serial")][0]
|
||||
true_model = subprocess.run([str(self.constants.macserial_path), "--info", str(serial)], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
true_model = [i.partition(" - ")[2] for i in true_model.stdout.decode().split("\n") if "Model: " in i][0]
|
||||
print(f"True Model: {true_model}")
|
||||
if not true_model.startswith("Unknown"):
|
||||
self.current_model = true_model
|
||||
def hexswap(self, input_hex: str):
|
||||
hex_pairs = [input_hex[i:i + 2] for i in range(0, len(input_hex), 2)]
|
||||
hex_rev = hex_pairs[::-1]
|
||||
hex_str = "".join(["".join(x) for x in hex_rev])
|
||||
return hex_str.upper()
|
||||
|
||||
def 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.current_model, self.constants).build_opencore()
|
||||
|
||||
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.current_model, self.constants).copy_efi()
|
||||
|
||||
def change_model(self):
|
||||
utilities.cls()
|
||||
utilities.header(["Select Different Model"])
|
||||
Utilities.cls()
|
||||
Utilities.header(["Select Different Model"])
|
||||
print("""
|
||||
Tip: Run the following command on the target machine to find the model identifier:
|
||||
|
||||
@@ -44,208 +85,8 @@ system_profiler SPHardwareDataType | grep 'Model Identifier'
|
||||
if print_models in {"y", "Y", "yes", "Yes"}:
|
||||
print("\n".join(ModelArray.SupportedSMBIOS))
|
||||
input("Press any key to continue...")
|
||||
|
||||
def change_os(self):
|
||||
utilities.cls()
|
||||
utilities.header(["Select Patcher's Target OS"])
|
||||
print(f"""
|
||||
Minimum Target:\t{self.constants.min_os_support}
|
||||
Maximum Target:\t{self.constants.max_os_support}
|
||||
Current target:\t{self.constants.os_support}
|
||||
""")
|
||||
temp_os_support = float(input("Please enter OS target: "))
|
||||
if (self.constants.max_os_support < temp_os_support) or (temp_os_support < self.constants.min_os_support):
|
||||
print("Unsupported entry")
|
||||
else:
|
||||
self.constants.os_support = temp_os_support
|
||||
if temp_os_support == 11.0:
|
||||
ModelArray.SupportedSMBIOS = ModelArray.SupportedSMBIOS11
|
||||
elif temp_os_support == 12.0:
|
||||
ModelArray.SupportedSMBIOS = ModelArray.SupportedSMBIOS12
|
||||
|
||||
def change_verbose(self):
|
||||
utilities.cls()
|
||||
utilities.header(["Set Verbose mode"])
|
||||
verbose_menu = input("Enable Verbose mode(y/n): ")
|
||||
if verbose_menu in {"y", "Y", "yes", "Yes"}:
|
||||
self.constants.verbose_debug = True
|
||||
elif verbose_menu in {"n", "N", "no", "No"}:
|
||||
self.constants.verbose_debug = False
|
||||
else:
|
||||
print("Invalid option")
|
||||
|
||||
def change_oc(self):
|
||||
utilities.cls()
|
||||
utilities.header(["Set OpenCore DEBUG mode"])
|
||||
change_oc_menu = input("Enable OpenCore DEBUG mode(y/n): ")
|
||||
if change_oc_menu in {"y", "Y", "yes", "Yes"}:
|
||||
self.constants.opencore_debug = True
|
||||
self.constants.opencore_build = "DEBUG"
|
||||
elif change_oc_menu in {"n", "N", "no", "No"}:
|
||||
self.constants.opencore_debug = False
|
||||
self.constants.opencore_build = "RELEASE"
|
||||
else:
|
||||
print("Invalid option")
|
||||
def change_kext(self):
|
||||
utilities.cls()
|
||||
utilities.header(["Set Kext DEBUG mode"])
|
||||
change_kext_menu = input("Enable Kext DEBUG mode(y/n): ")
|
||||
if change_kext_menu in {"y", "Y", "yes", "Yes"}:
|
||||
self.constants.kext_debug = True
|
||||
elif change_kext_menu in {"n", "N", "no", "No"}:
|
||||
self.constants.kext_debug = False
|
||||
else:
|
||||
print("Invalid option")
|
||||
|
||||
def change_metal(self):
|
||||
utilities.cls()
|
||||
utilities.header(["Assume Metal GPU Always in iMac"])
|
||||
print("""This is for iMacs that have upgraded Metal GPUs, otherwise
|
||||
Patcher assumes based on stock configuration (ie. iMac10,x-12,x)
|
||||
|
||||
Valid Options:
|
||||
|
||||
1. None(stock GPU)
|
||||
2. Nvidia GPU
|
||||
3. AMD GPU
|
||||
|
||||
Note: Patcher will detect whether hardware has been upgraded regardless, this
|
||||
option is for those patching on a different machine or OCLP cannot detect.
|
||||
""")
|
||||
change_kext_menu = input("Set GPU Patch type(ie. 1): ")
|
||||
if change_kext_menu == "1":
|
||||
self.constants.metal_build = False
|
||||
self.constants.imac_vendor = "None"
|
||||
elif change_kext_menu == "2":
|
||||
self.constants.metal_build = True
|
||||
self.constants.imac_vendor = "Nvidia"
|
||||
elif change_kext_menu == "3":
|
||||
self.constants.metal_build = True
|
||||
self.constants.imac_vendor = "AMD"
|
||||
else:
|
||||
print("Invalid option")
|
||||
|
||||
def change_wifi(self):
|
||||
utilities.cls()
|
||||
utilities.header(["Assume Upgraded Wifi Always"])
|
||||
print("""This is for Macs with upgraded wifi cards(ie. BCM94360/2)
|
||||
|
||||
Note: Patcher will detect whether hardware has been upgraded regardless, this
|
||||
option is for those patching on a different machine or cannot detect.
|
||||
""")
|
||||
change_kext_menu = input("Enable Upgraded Wifi build algorithm?(y/n): ")
|
||||
if change_kext_menu in {"y", "Y", "yes", "Yes"}:
|
||||
self.constants.wifi_build = True
|
||||
elif change_kext_menu in {"n", "N", "no", "No"}:
|
||||
self.constants.wifi_build = False
|
||||
else:
|
||||
print("Invalid option")
|
||||
|
||||
def change_serial(self):
|
||||
utilities.cls()
|
||||
utilities.header(["Set SMBIOS Mode"])
|
||||
print("""This section is for setting how OpenCore generates the SMBIOS
|
||||
Recommended for adanced users who want control how serials are handled
|
||||
|
||||
Valid options:
|
||||
|
||||
1. Minimal:\tUse original serials and minimally update SMBIOS
|
||||
2. Moderate:\tReplave entire SMBIOS but keep original serials
|
||||
3. Advanced:\tReplace entire SMBIOS and generate new serials
|
||||
|
||||
Note: For new users we recommend leaving as default(1. Minimal)
|
||||
""")
|
||||
change_serial_menu = input("Set SMBIOS Mode(ie. 1): ")
|
||||
if change_serial_menu == "1":
|
||||
self.constants.serial_settings = "Minimal"
|
||||
elif change_serial_menu == "2":
|
||||
if self.constants.custom_model in ModelArray.NoAPFSsupport:
|
||||
self.constants.serial_settings = "Moderate"
|
||||
elif change_serial_menu == "3":
|
||||
self.constants.serial_settings = "Advanced"
|
||||
else:
|
||||
print("Invalid option")
|
||||
def change_showpicker(self):
|
||||
utilities.cls()
|
||||
utilities.header(["Set OpenCore Picker mode"])
|
||||
print("""By default, OpenCore will show its boot picker each time on boot up,
|
||||
however this can be disabled by default and be shown on command by repeatedly
|
||||
pressing the "Esc" key
|
||||
""")
|
||||
change_kext_menu = input("Show OpenCore Picker by default(y/n): ")
|
||||
if change_kext_menu in {"y", "Y", "yes", "Yes"}:
|
||||
self.constants.showpicker = True
|
||||
elif change_kext_menu in {"n", "N", "no", "No"}:
|
||||
self.constants.showpicker = False
|
||||
else:
|
||||
print("Invalid option")
|
||||
|
||||
def change_vault(self):
|
||||
utilities.cls()
|
||||
utilities.header(["Set OpenCore Vaulting"])
|
||||
print("""By default, this patcher will sign all your files and ensure none of the
|
||||
contents can be tampered with. However for more advanced users, you may
|
||||
want to be able to freely edit the config.plist and files.
|
||||
|
||||
Note: For secuirty reasons, OpenShell will be disabled when Vault is set.
|
||||
|
||||
""")
|
||||
change_kext_menu = input("Enable Vault(y/n): ")
|
||||
if change_kext_menu in {"y", "Y", "yes", "Yes"}:
|
||||
self.constants.vault = True
|
||||
elif change_kext_menu in {"n", "N", "no", "No"}:
|
||||
self.constants.vault = False
|
||||
else:
|
||||
print("Invalid option")
|
||||
|
||||
def change_sip(self):
|
||||
utilities.cls()
|
||||
utilities.header(["Set SIP and SecureBootModel"])
|
||||
print("""SIP and SecureBootModel are used to ensure proper OTA functionality,
|
||||
however to patch the root volume both of these must be disabled.
|
||||
Only disable is absolutely necessary.
|
||||
|
||||
Note: for minor changes, SIP can be adjusted in recovery like normal.
|
||||
Additionally, when disabling SIP via the patcher amfi_get_out_of_my_way=1
|
||||
will be added to boot-args.
|
||||
|
||||
Valid options:
|
||||
|
||||
1. Enable Both
|
||||
2. Disable SIP only
|
||||
3. Disable SecureBootModel Only
|
||||
4. Disable Both
|
||||
|
||||
""")
|
||||
change_kext_menu = input("Set SIP and SecureBootModel(ie. 1): ")
|
||||
if change_kext_menu == "1":
|
||||
self.constants.sip_status = True
|
||||
self.constants.secure_status = True
|
||||
elif change_kext_menu == "2":
|
||||
self.constants.sip_status = False
|
||||
self.constants.secure_status = True
|
||||
elif change_kext_menu == "3":
|
||||
self.constants.sip_status = True
|
||||
self.constants.secure_status = False
|
||||
elif change_kext_menu == "4":
|
||||
self.constants.sip_status = False
|
||||
self.constants.secure_status = False
|
||||
else:
|
||||
print("Invalid option")
|
||||
|
||||
def change_imac_nvidia(self):
|
||||
utilities.cls()
|
||||
utilities.header(["Force iMac Nvidia Patches"])
|
||||
print("""Specifically for iMac10,x-12,x with Metal Nvidia GPU upgrades
|
||||
By default the patcher will try to detect what hardware is
|
||||
running, however this will enforce iMac Nvidia Build Patches.
|
||||
""")
|
||||
change_kext_menu = input("Assume iMac Nvidia patches(y/n): ")
|
||||
if change_kext_menu in {"y", "Y", "yes", "Yes"}:
|
||||
self.constants.imac_nvidia_build = True
|
||||
elif change_kext_menu in {"n", "N", "no", "No"}:
|
||||
self.constants.imac_nvidia_build = False
|
||||
else:
|
||||
print("Invalid option")
|
||||
|
||||
def patcher_settings(self):
|
||||
response = None
|
||||
@@ -253,19 +94,23 @@ running, however this will enforce iMac Nvidia Build Patches.
|
||||
title = [
|
||||
"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 = [
|
||||
# TODO: Enable setting OS target when more OSes become supported by the patcher
|
||||
#[f"Change OS version:\t\t\tCurrently macOS {self.constants.os_support}", self.change_os],
|
||||
[f"Enable Verbose Mode:\t\tCurrently {self.constants.verbose_debug}", self.change_verbose],
|
||||
[f"Enable OpenCore DEBUG:\t\tCurrently {self.constants.opencore_debug}", self.change_oc],
|
||||
[f"Enable Kext DEBUG:\t\t\tCurrently {self.constants.kext_debug}", self.change_kext],
|
||||
[f"Force iMac Metal Patch:\t\tCurrently {self.constants.imac_vendor}", self.change_metal],
|
||||
[f"Assume Upgraded Wifi Always:\tCurrently {self.constants.wifi_build}", self.change_wifi],
|
||||
[f"Set ShowPicker Mode:\t\tCurrently {self.constants.showpicker}", self.change_showpicker],
|
||||
[f"Set Vault Mode:\t\t\tCurrently {self.constants.vault}", self.change_vault],
|
||||
[f"Set SIP and SecureBootModel:\tSIP: {self.constants.sip_status} SBM: {self.constants.secure_status}", self.change_sip],
|
||||
[f"Set SMBIOS Mode:\t\t\tCurrently {self.constants.serial_settings}", self.change_serial],
|
||||
[f"Enable Verbose Mode:\t\tCurrently {self.constants.verbose_debug}", CliMenu.MenuOptions(self.constants.custom_model or self.current_model, self.constants).change_verbose],
|
||||
[f"Enable OpenCore DEBUG:\t\tCurrently {self.constants.opencore_debug}", CliMenu.MenuOptions(self.constants.custom_model or self.current_model, self.constants).change_oc],
|
||||
[f"Enable Kext DEBUG:\t\t\tCurrently {self.constants.kext_debug}", CliMenu.MenuOptions(self.constants.custom_model or self.current_model, self.constants).change_kext],
|
||||
[f"Force iMac Metal Patch:\t\tCurrently {self.constants.imac_vendor}", CliMenu.MenuOptions(self.constants.custom_model or self.current_model, self.constants).change_metal],
|
||||
[f"Assume Upgraded Wifi Always:\tCurrently {self.constants.wifi_build}", CliMenu.MenuOptions(self.constants.custom_model or self.current_model, self.constants).change_wifi],
|
||||
[f"Set ShowPicker Mode:\t\tCurrently {self.constants.showpicker}", CliMenu.MenuOptions(self.constants.custom_model or self.current_model, self.constants).change_showpicker],
|
||||
[f"Set Vault Mode:\t\t\tCurrently {self.constants.vault}", CliMenu.MenuOptions(self.constants.custom_model or self.current_model, self.constants).change_vault],
|
||||
[f"Set SIP and SecureBootModel:\tSIP: {self.constants.sip_status} SBM: {self.constants.secure_status}", CliMenu.MenuOptions(self.constants.custom_model or self.current_model, self.constants).change_sip],
|
||||
[f"Set SMBIOS Mode:\t\t\tCurrently {self.constants.serial_settings}", CliMenu.MenuOptions(self.constants.custom_model or self.current_model, self.constants).change_serial],
|
||||
[f"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\t{self.constants.boot_efi}", CliMenu.MenuOptions(self.constants.custom_model or self.current_model, self.constants).bootstrap_setting],
|
||||
[f"Set Acceleration Patches:\t\t{self.constants.legacy_acceleration_patch}", CliMenu.MenuOptions(self.constants.custom_model or self.current_model, self.constants).accel_setting],
|
||||
[f"Assume Legacy GPU:\t\t\t{self.constants.assume_legacy}", CliMenu.MenuOptions(self.constants.custom_model or self.current_model, self.constants).force_accel_setting],
|
||||
]
|
||||
|
||||
for option in options:
|
||||
@@ -274,16 +119,43 @@ running, however this will enforce iMac Nvidia Build Patches.
|
||||
response = menu.start()
|
||||
|
||||
def credits(self):
|
||||
utilities.TUIOnlyPrint(["Credits"], "Press [Enter] to go back.\n",
|
||||
Utilities.TUIOnlyPrint(["Credits"], "Press [Enter] to go back.\n",
|
||||
["""Many thanks to the following:
|
||||
|
||||
- Acidanthera:\tOpenCore, kexts and other tools
|
||||
- Khronokernel:\tWriting and maintaining this patcher
|
||||
- DhinakG:\t\tWriting and maintaining this patcher
|
||||
- ASentientBot:\tLegacy Acceleration Patches
|
||||
- Ausdauersportler:\tLinking fixes for SNBGraphicsFB and AMDX3000
|
||||
- Syncretic:\t\tAAAMouSSE and telemetrap
|
||||
- Slice:\t\tVoodooHDA
|
||||
- cdf:\t\tNightShiftEnabler"""]).start()
|
||||
|
||||
def PatchVolume(self):
|
||||
Utilities.cls()
|
||||
Utilities.header(["Patching System Volume"])
|
||||
print("""Patches Root volume to fix misc issues such as:
|
||||
|
||||
- Brightness control for non-Metal GPUs
|
||||
|
||||
WARNING: Root Volume Patching is still in active development, please
|
||||
have all important user data backed up. Note when the system volume
|
||||
is patched, you can no longer have Delta updates or have FileVault
|
||||
enabled.
|
||||
|
||||
Supported Options:
|
||||
|
||||
1. Patch System Volume
|
||||
2. Unpatch System Volume (Experimental)
|
||||
B. Exit
|
||||
""")
|
||||
change_menu = input("Patch System Volume?: ")
|
||||
if change_menu == "1":
|
||||
SysPatch.PatchSysVolume(self.constants.custom_model or self.current_model, self.constants).start_patch()
|
||||
elif change_menu == "2":
|
||||
SysPatch.PatchSysVolume(self.constants.custom_model or self.current_model, self.constants).start_unpatch()
|
||||
else:
|
||||
print("Returning to main menu")
|
||||
|
||||
def main_menu(self):
|
||||
response = None
|
||||
ModelArray.SupportedSMBIOS = ModelArray.SupportedSMBIOS11
|
||||
@@ -300,24 +172,26 @@ running, however this will enforce iMac Nvidia Build Patches.
|
||||
'',
|
||||
'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 in ("MacPro3,1", "iMac7,1") and \
|
||||
elif not self.constants.custom_model and self.current_model == "iMac7,1" and \
|
||||
"SSE4.1" not in subprocess.run("sysctl machdep.cpu.features".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.decode():
|
||||
in_between = [
|
||||
'Your model requires a CPU upgrade to a CPU supporting SSE4.1+ to be supported by this patcher!',
|
||||
'',
|
||||
f'If you plan to create the USB for another {self.current_model} with SSE4.1+, please select the "Change Model" option in the menu.'
|
||||
]
|
||||
elif self.constants.custom_model in ("MacPro3,1", "iMac7,1"):
|
||||
elif self.constants.custom_model == "iMac7,1":
|
||||
in_between = ["This model is supported",
|
||||
"However please ensure the CPU has been upgraded to support SSE4.1+"
|
||||
]
|
||||
else:
|
||||
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 = (
|
||||
[["Build OpenCore", self.build_opencore]] if ((self.constants.custom_model or self.current_model) in ModelArray.SupportedSMBIOS) else []) + ([["Install OpenCore to USB/internal drive", self.install_opencore]] if (self.constants.detected_os > 10.12) else []) + [
|
||||
[["Build OpenCore", self.build_opencore]] if ((self.constants.custom_model or self.current_model) in ModelArray.SupportedSMBIOS) else []) + [
|
||||
["Install OpenCore to USB/internal drive", self.install_opencore],
|
||||
["Post-Install Volume Patch", self.PatchVolume],
|
||||
["Change Model", self.change_model],
|
||||
["Patcher Settings", self.patcher_settings],
|
||||
["Credits", self.credits]
|
||||
|
||||
39
README.md
@@ -2,23 +2,31 @@
|
||||
|
||||
<img src="images/OC-Patcher.png" width="256">
|
||||
|
||||
A python program for building and booting OpenCore on legacy Macs, see [Supported SMBIOS](https://dortania.github.io/OpenCore-Legacy-Patcher/MODELS.html) on whether your model is supported.
|
||||
A python program for building and booting [OpenCore](https://github.com/acidanthera/OpenCorePkg) on legacy Macs, see [Supported SMBIOS](https://dortania.github.io/OpenCore-Legacy-Patcher/MODELS.html) on whether your model is supported. Designed around Big Sur support, however can be used on older OSes.
|
||||
|
||||
| Support Entry | Supported OSes | Description | Comment |
|
||||
| :--- | :--- | :--- | :--- |
|
||||
| HostOS | macOS 10.9 - macOS 11 | Refers to OSes where running OpenCore-Patcher.app are supported | Supports 10.7+ if [Python 3.6 or higher](https://www.python.org/downloads/) is manually installed, simply run the `OpenCore-Patcher.command` located in the repo |
|
||||
| TargetOS | macOS 11 | Refers to OSes that can be patched to run with OpenCore | May support 10.4 and newer (in a potentially broken state). No support provided. |
|
||||
|
||||
Supported features:
|
||||
|
||||
* System Integrity Protection, FileVault 2, .im4m Secure Boot and Vaulting
|
||||
* Native OTA OS DELTA updates on all Macs
|
||||
* Recovery OS, Safe Mode and Single-user Mode booting
|
||||
* Zero firmware patching required(ie. APFS ROM patching)
|
||||
* GPU Switching on MacBook Pro models(2012 and newer)
|
||||
* Zero firmware patching required (ie. APFS ROM patching)
|
||||
* GPU Switching on MacBook Pro models (2012 and newer)
|
||||
|
||||
Note: Only clean-installs and upgrades are supported, installs already patched with [Patched-Sur](https://github.com/BenSova/Patched-Sur) or [bigmac](https://github.com/StarPlayrX/bigmac) cannot be used due to broken file integrity with APFS snapshots and SIP.
|
||||
Note: Only clean-installs and upgrades are supported, installs already patched with other patchers, such as [Patched Sur](https://github.com/BenSova/Patched-Sur) or [bigmac](https://github.com/StarPlayrX/bigmac), cannot be used due to broken file integrity with APFS snapshots and SIP.
|
||||
|
||||
* You can however reinstall macOS with this patcher and retain your original data
|
||||
|
||||
Note 2: Currently OpenCore Legacy Patcher only supports macOS 11, Big Sur installs. For older OSes, please use [Dosdude1's patchers](http://dosdude1.com)
|
||||
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)
|
||||
|
||||
## How to use
|
||||
|
||||
See the online guide on how:
|
||||
|
||||
* [OpenCore Legacy Patcher Guide](https://dortania.github.io/OpenCore-Legacy-Patcher/)
|
||||
@@ -30,6 +38,23 @@ Since this patcher tricks macOS into thinking you're running a newer Mac, certai
|
||||
* Boot Camp Assistant.app
|
||||
* We recommend running the assistant on a natively supported OS, running via the patcher may result in unforeseen issues
|
||||
* Legacy Windows Booting
|
||||
* Currently OpenCore cannot boot MBR-based installs, so Ivy Bridge and older Machines may not be able to see Windows in OpenCore's Boot Picker
|
||||
* Currently OpenCore cannot boot MBR-based installs, so Ivy Bridge and older Machines may [not be able to see Windows in OpenCore's Boot Picker](https://github.com/acidanthera/bugtracker/issues/912)
|
||||
* [Solution is to convert install to UEFI](https://docs.microsoft.com/en-us/mem/configmgr/osd/deploy-use/task-sequence-steps-to-manage-bios-to-uefi-conversion), see MacRumors thread for more examples: [Installing Windows 10](https://forums.macrumors.com/threads/opencore-on-the-mac-pro.2207814/)
|
||||
* Boot Buddy support
|
||||
* Due to how OpenCore overwrites NVRAM , the usage of Boot Buddy and such tools are **highly** in-advised
|
||||
* Due to how OpenCore overwrites NVRAM, the usage of Boot Buddy and such tools are **highly** in-advised
|
||||
|
||||
## Support
|
||||
|
||||
To get aid with the patcher, we recommend joining the [OpenCore Patcher Paradise Discord Server](https://discord.gg/UbM8U75E). We're actively there and is the quickest way to receive help. For bigger issues such as patcher crashing on build and such, we recommend opening an issue right here on GitHub:
|
||||
|
||||
* [OpenCore Legacy Patcher's Issue's tab](https://github.com/dortania/OpenCore-Legacy-Patcher/issues)
|
||||
|
||||
Regarding how to debug OpenCore Patcher, we recommend seeing the below:
|
||||
|
||||
* [How to debug with OpenCore](https://dortania.github.io/OpenCore-Legacy-Patcher/DEBUG.html)
|
||||
|
||||
## Supporting us!
|
||||
|
||||
To help support this patcher, we recommend checking this page:
|
||||
|
||||
* [Supporting the patcher](https://dortania.github.io/OpenCore-Legacy-Patcher/DONATE.html)
|
||||
|
||||
752
Resources/Build.py
Normal file
@@ -0,0 +1,752 @@
|
||||
# Commands for building the EFI and SMBIOS
|
||||
# Copyright (C) 2020-2021, Dhinak G, Mykola Grymalyuk
|
||||
from __future__ import print_function
|
||||
|
||||
import binascii
|
||||
import plistlib
|
||||
import shutil
|
||||
import subprocess
|
||||
import uuid
|
||||
import zipfile
|
||||
import os
|
||||
import sys
|
||||
import platform
|
||||
from pathlib import Path
|
||||
from datetime import date
|
||||
|
||||
from Resources import Constants, ModelArray, Utilities
|
||||
|
||||
|
||||
def human_fmt(num):
|
||||
for unit in ["B", "KB", "MB", "GB", "TB", "PB"]:
|
||||
if abs(num) < 1000.0:
|
||||
return "%3.1f %s" % (num, unit)
|
||||
num /= 1000.0
|
||||
return "%.1f %s" % (num, "EB")
|
||||
|
||||
|
||||
def rmtree_handler(func, path, exc_info):
|
||||
if exc_info[0] == FileNotFoundError:
|
||||
return
|
||||
raise # pylint: disable=misplaced-bare-raise
|
||||
|
||||
|
||||
class BuildOpenCore:
|
||||
def __init__(self, model, versions):
|
||||
self.model = model
|
||||
self.config = None
|
||||
self.constants: Constants.Constants = versions
|
||||
|
||||
def hexswap(self, input_hex: str):
|
||||
hex_pairs = [input_hex[i:i + 2] for i in range(0, len(input_hex), 2)]
|
||||
hex_rev = hex_pairs[::-1]
|
||||
hex_str = "".join(["".join(x) for x in hex_rev])
|
||||
return hex_str.upper()
|
||||
|
||||
def check_pciid(self, print_status):
|
||||
try:
|
||||
self.constants.igpu_devices = plistlib.loads(subprocess.run("ioreg -r -n IGPU -a".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode())
|
||||
self.constants.igpu_vendor = self.hexswap(binascii.hexlify(self.constants.igpu_devices[0]["vendor-id"]).decode()[:4])
|
||||
self.constants.igpu_device = self.hexswap(binascii.hexlify(self.constants.igpu_devices[0]["device-id"]).decode()[:4])
|
||||
if print_status is True:
|
||||
print(f"- Detected iGPU: {self.constants.igpu_vendor}:{self.constants.igpu_device}")
|
||||
except ValueError:
|
||||
if print_status is True:
|
||||
print("- No iGPU detected")
|
||||
self.constants.igpu_devices = ""
|
||||
|
||||
try:
|
||||
self.constants.dgpu_devices = plistlib.loads(subprocess.run("ioreg -r -n GFX0 -a".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode())
|
||||
self.constants.dgpu_vendor = self.hexswap(binascii.hexlify(self.constants.dgpu_devices[0]["vendor-id"]).decode()[:4])
|
||||
self.constants.dgpu_device = self.hexswap(binascii.hexlify(self.constants.dgpu_devices[0]["device-id"]).decode()[:4])
|
||||
if print_status is True:
|
||||
print(f"- Detected dGPU: {self.constants.dgpu_vendor}:{self.constants.dgpu_device}")
|
||||
except ValueError:
|
||||
if print_status is True:
|
||||
print("- No dGPU detected")
|
||||
self.constants.dgpu_devices = ""
|
||||
|
||||
def build_efi(self):
|
||||
Utilities.cls()
|
||||
print(f"Building Configuration for model: {self.model}")
|
||||
if not Path(self.constants.build_path).exists():
|
||||
Path(self.constants.build_path).mkdir()
|
||||
print("Created build folder")
|
||||
else:
|
||||
print("Build folder already present, skipping")
|
||||
|
||||
if Path(self.constants.opencore_zip_copied).exists():
|
||||
print("Deleting old copy of OpenCore zip")
|
||||
Path(self.constants.opencore_zip_copied).unlink()
|
||||
if Path(self.constants.opencore_release_folder).exists():
|
||||
print("Deleting old copy of OpenCore folder")
|
||||
shutil.rmtree(self.constants.opencore_release_folder, onerror=rmtree_handler)
|
||||
|
||||
print()
|
||||
print(f"- Adding OpenCore v{self.constants.opencore_version} {self.constants.opencore_build}")
|
||||
shutil.copy(self.constants.opencore_zip_source, self.constants.build_path)
|
||||
zipfile.ZipFile(self.constants.opencore_zip_copied).extractall(self.constants.build_path)
|
||||
|
||||
print("- Adding config.plist for OpenCore")
|
||||
# Setup config.plist for editing
|
||||
shutil.copy(self.constants.plist_template, self.constants.oc_folder)
|
||||
self.config = plistlib.load(Path(self.constants.plist_path).open("rb"))
|
||||
|
||||
# Set revision in config
|
||||
self.config["#Revision"]["Build-Version"] = f"{self.constants.patcher_version} - {date.today()}"
|
||||
self.config["#Revision"]["OpenCore-Version"] = f"{self.constants.opencore_version} - {self.constants.opencore_build} - {self.constants.opencore_commit}"
|
||||
self.config["#Revision"]["Original-Model"] = self.model
|
||||
self.config["NVRAM"]["Add"]["4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102"]["OCLP-Version"] = f"{self.constants.patcher_version}"
|
||||
|
||||
for name, version, path, check in [
|
||||
# Essential kexts
|
||||
("Lilu.kext", self.constants.lilu_version, self.constants.lilu_path, lambda: True),
|
||||
("WhateverGreen.kext", self.constants.whatevergreen_version, self.constants.whatevergreen_path, lambda: True),
|
||||
("RestrictEvents.kext", self.constants.restrictevents_version, self.constants.restrictevents_path, lambda: self.model in ModelArray.MacPro71),
|
||||
("RestrictEvents.kext", self.constants.restrictevents_mbp_version, self.constants.restrictevents_mbp_path, lambda: self.model == "MacBookPro9,1"),
|
||||
("NightShiftEnabler.kext", self.constants.nightshift_version, self.constants.nightshift_path, lambda: self.model not in ModelArray.NightShiftExclude),
|
||||
("SMC-Spoof.kext", self.constants.smcspoof_version, self.constants.smcspoof_path, lambda: True),
|
||||
# CPU patches
|
||||
("AppleMCEReporterDisabler.kext", self.constants.mce_version, self.constants.mce_path, lambda: self.model in ModelArray.DualSocket),
|
||||
("AAAMouSSE.kext", self.constants.mousse_version, self.constants.mousse_path, lambda: self.model in ModelArray.SSEEmulator),
|
||||
("telemetrap.kext", self.constants.telemetrap_version, self.constants.telemetrap_path, lambda: self.model in ModelArray.MissingSSE42),
|
||||
("CPUFriend.kext", self.constants.cpufriend_version, self.constants.cpufriend_path, lambda: self.model not in ModelArray.NoAPFSsupport),
|
||||
# Ethernet patches
|
||||
("nForceEthernet.kext", self.constants.nforce_version, self.constants.nforce_path, lambda: self.model in ModelArray.EthernetNvidia),
|
||||
("MarvelYukonEthernet.kext", self.constants.marvel_version, self.constants.marvel_path, lambda: self.model in ModelArray.EthernetMarvell),
|
||||
("CatalinaBCM5701Ethernet.kext", self.constants.bcm570_version, self.constants.bcm570_path, lambda: self.model in ModelArray.EthernetBroadcom),
|
||||
# Legacy audio
|
||||
("AppleALC.kext", self.constants.applealc_version, self.constants.applealc_path, lambda: self.model in ModelArray.LegacyAudio or self.model in ModelArray.MacPro71),
|
||||
# IDE patch
|
||||
("AppleIntelPIIXATA.kext", self.constants.piixata_version, self.constants.piixata_path, lambda: self.model in ModelArray.IDEPatch),
|
||||
]:
|
||||
self.enable_kext(name, version, path, check)
|
||||
|
||||
def wifi_fake_id(self):
|
||||
default_path = True
|
||||
self.enable_kext("AirportBrcmFixup.kext", self.constants.airportbcrmfixup_version, self.constants.airportbcrmfixup_path)
|
||||
self.get_kext_by_bundle_path("AirportBrcmFixup.kext/Contents/PlugIns/AirPortBrcmNIC_Injector.kext")["Enabled"] = True
|
||||
if not self.constants.custom_model:
|
||||
arpt_path: str = subprocess.run([self.constants.gfxutil_path] + f"-v".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.decode()
|
||||
try:
|
||||
arpt_path = [line.strip().split("= ", 1)[1] for line in arpt_path.split("\n") if f"{wifi_vendor}:{wifi_device}".lower() in line.strip()][0]
|
||||
print(f"- Found ARPT device at {arpt_path}")
|
||||
default_path = False
|
||||
except IndexError:
|
||||
print("- Failed to find Device path")
|
||||
default_path = True
|
||||
if default_path is True:
|
||||
if self.model in ModelArray.nvidiaHDEF:
|
||||
# Nvidia chipsets all have the same path to ARPT
|
||||
arpt_path = "PciRoot(0x0)/Pci(0x15,0x0)/Pci(0x0,0x0)"
|
||||
elif self.model in ("iMac7,1", "iMac8,1", "MacPro3,1", "MacBookPro4,1"):
|
||||
arpt_path = "PciRoot(0x0)/Pci(0x1C,0x4)/Pci(0x0,0x0)"
|
||||
elif self.model in ("iMac13,1", "iMac13,2"):
|
||||
arpt_path = "PciRoot(0x0)/Pci(0x1C,0x3)/Pci(0x0,0x0)"
|
||||
elif self.model in ("MacPro4,1", "MacPro5,1"):
|
||||
arpt_path = "PciRoot(0x0)/Pci(0x1C,0x5)/Pci(0x0,0x0)"
|
||||
else:
|
||||
# Assumes we have a laptop with Intel chipset
|
||||
# iMac11,x-12,x also apply
|
||||
arpt_path = "PciRoot(0x0)/Pci(0x1C,0x1)/Pci(0x0,0x0)"
|
||||
print(f"- Using known DevicePath {arpt_path}")
|
||||
print("- Applying fake ID for WiFi")
|
||||
self.config["DeviceProperties"]["Add"][arpt_path] = {"device-id": binascii.unhexlify("ba430000"), "compatible": "pci14e4,43ba"}
|
||||
|
||||
# WiFi patches
|
||||
# TODO: -a is not supported in Lion and older, need to add proper fix
|
||||
if self.constants.detected_os > self.constants.lion:
|
||||
try:
|
||||
wifi_devices = plistlib.loads(subprocess.run("ioreg -r -n ARPT -a".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode())
|
||||
except ValueError:
|
||||
# Work-around Mac Pros where Wifi card may not be named ARPT (ie. installed in dedicated PCIe card slot)
|
||||
wifi_devices = plistlib.loads(subprocess.run("ioreg -c IOPCIDevice -r -d2 -a".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode())
|
||||
vendor_atheros = binascii.unhexlify("E4140000")
|
||||
vendor_broadcom = binascii.unhexlify("8C160000")
|
||||
wifi_devices = [i for i in wifi_devices if i["vendor-id"] == vendor_atheros or i["vendor-id"] == vendor_broadcom and i["class-code"] == binascii.unhexlify("00800200")]
|
||||
try:
|
||||
wifi_vendor = self.hexswap(binascii.hexlify(wifi_devices[0]["vendor-id"]).decode()[:4])
|
||||
wifi_device = self.hexswap(binascii.hexlify(wifi_devices[0]["device-id"]).decode()[:4])
|
||||
wifi_ioname = wifi_devices[0]["IOName"]
|
||||
if not self.constants.custom_model:
|
||||
print(f"- Detected Wifi Card: {wifi_vendor}:{wifi_device}")
|
||||
except IndexError:
|
||||
wifi_devices = ""
|
||||
|
||||
else:
|
||||
wifi_devices = ""
|
||||
print("- Can't run Wifi hardware detection on Snow Leopard and older")
|
||||
if self.constants.wifi_build is True:
|
||||
print("- Skipping Wifi patches on request")
|
||||
elif not self.constants.custom_model and wifi_devices:
|
||||
if wifi_vendor == self.constants.pci_broadcom:
|
||||
if wifi_device in ModelArray.BCM4360Wifi and wifi_ioname not in ["pci14e4,4353", "pci14e4,4331"]:
|
||||
print("- Found supported WiFi card, skipping wifi patches")
|
||||
elif wifi_ioname in ["pci14e4,4353", "pci14e4,4331"] or wifi_device in ModelArray.BCM94331Wifi:
|
||||
wifi_fake_id(self)
|
||||
elif wifi_device in ModelArray.BCM94322Wifi:
|
||||
self.enable_kext("IO80211Mojave.kext", self.constants.io80211mojave_version, self.constants.io80211mojave_path)
|
||||
self.get_kext_by_bundle_path("IO80211Mojave.kext/Contents/PlugIns/AirPortBrcm4331.kext")["Enabled"] = True
|
||||
elif wifi_device in ModelArray.BCM94328Wifi:
|
||||
self.enable_kext("corecaptureElCap.kext", self.constants.corecaptureelcap_version, self.constants.corecaptureelcap_path)
|
||||
self.enable_kext("IO80211ElCap.kext", self.constants.io80211elcap_version, self.constants.io80211elcap_path)
|
||||
self.get_kext_by_bundle_path("IO80211ElCap.kext/Contents/PlugIns/AppleAirPortBrcm43224.kext")["Enabled"] = True
|
||||
elif wifi_vendor == self.constants.pci_atheros and wifi_device in ModelArray.AtherosWifi:
|
||||
self.enable_kext("IO80211HighSierra.kext", self.constants.io80211high_sierra_version, self.constants.io80211high_sierra_path)
|
||||
self.get_kext_by_bundle_path("IO80211HighSierra.kext/Contents/PlugIns/AirPortAtheros40.kext")["Enabled"] = True
|
||||
else:
|
||||
if self.model in ModelArray.WifiBCM94331:
|
||||
wifi_fake_id(self)
|
||||
elif self.model in ModelArray.WifiBCM94322:
|
||||
self.enable_kext("IO80211Mojave.kext", self.constants.io80211mojave_version, self.constants.io80211mojave_path)
|
||||
self.get_kext_by_bundle_path("IO80211Mojave.kext/Contents/PlugIns/AirPortBrcm4331.kext")["Enabled"] = True
|
||||
elif self.model in ModelArray.WifiBCM94328:
|
||||
self.enable_kext("corecaptureElCap.kext", self.constants.corecaptureelcap_version, self.constants.corecaptureelcap_path)
|
||||
self.enable_kext("IO80211ElCap.kext", self.constants.io80211elcap_version, self.constants.io80211elcap_path)
|
||||
self.get_kext_by_bundle_path("IO80211ElCap.kext/Contents/PlugIns/AppleAirPortBrcm43224.kext")["Enabled"] = True
|
||||
elif self.model in ModelArray.WifiAtheros:
|
||||
self.enable_kext("IO80211HighSierra.kext", self.constants.io80211high_sierra_version, self.constants.io80211high_sierra_path)
|
||||
self.get_kext_by_bundle_path("IO80211HighSierra.kext/Contents/PlugIns/AirPortAtheros40.kext")["Enabled"] = True
|
||||
|
||||
# CPUFriend
|
||||
pp_map_path = Path(self.constants.platform_plugin_plist_path) / Path(f"{self.model}/Info.plist")
|
||||
if self.model not in ModelArray.NoAPFSsupport:
|
||||
Path(self.constants.pp_kext_folder).mkdir()
|
||||
Path(self.constants.pp_contents_folder).mkdir()
|
||||
shutil.copy(pp_map_path, self.constants.pp_contents_folder)
|
||||
self.get_kext_by_bundle_path("CPUFriendDataProvider.kext")["Enabled"] = True
|
||||
|
||||
# HID patches
|
||||
if self.model in ModelArray.LegacyHID:
|
||||
print("- Adding IOHIDFamily patch")
|
||||
self.get_item_by_kv(self.config["Kernel"]["Patch"], "Identifier", "com.apple.iokit.IOHIDFamily")["Enabled"] = True
|
||||
|
||||
# SSDT patches
|
||||
if self.model in ModelArray.pciSSDT:
|
||||
print("- Adding SSDT-CPBG.aml")
|
||||
self.get_item_by_kv(self.config["ACPI"]["Add"], "Path", "SSDT-CPBG.aml")["Enabled"] = True
|
||||
shutil.copy(self.constants.pci_ssdt_path, self.constants.acpi_path)
|
||||
|
||||
# USB Map
|
||||
usb_map_path = Path(self.constants.plist_folder_path) / Path("AppleUSBMaps/Info.plist")
|
||||
# iMac7,1 kernel panics with USB map installed, remove for time being until properly debugged
|
||||
if usb_map_path.exists():
|
||||
print(f"- Adding USB-Map.kext")
|
||||
Path(self.constants.map_kext_folder).mkdir()
|
||||
Path(self.constants.map_contents_folder).mkdir()
|
||||
shutil.copy(usb_map_path, self.constants.map_contents_folder)
|
||||
self.get_kext_by_bundle_path("USB-Map.kext")["Enabled"] = True
|
||||
|
||||
agdp_map_path = Path(self.constants.plist_folder_path) / Path("AppleGraphicsDevicePolicy/Info.plist")
|
||||
agpm_map_path = Path(self.constants.plist_folder_path) / Path("AppleGraphicsPowerManagement/Info.plist")
|
||||
amc_map_path = Path(self.constants.plist_folder_path) / Path("AppleMuxControl/Info.plist")
|
||||
|
||||
if self.model == "MacBookPro9,1":
|
||||
print(f"- Adding Display Map Overrides")
|
||||
self.config["DeviceProperties"]["Add"]["PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)"] = {"agdpmod": "vit9696"}
|
||||
Path(self.constants.agdp_kext_folder).mkdir()
|
||||
Path(self.constants.agdp_contents_folder).mkdir()
|
||||
Path(self.constants.agpm_kext_folder).mkdir()
|
||||
Path(self.constants.agpm_contents_folder).mkdir()
|
||||
Path(self.constants.amc_kext_folder).mkdir()
|
||||
Path(self.constants.amc_contents_folder).mkdir()
|
||||
|
||||
shutil.copy(agdp_map_path, self.constants.agdp_contents_folder)
|
||||
shutil.copy(agpm_map_path, self.constants.agpm_contents_folder)
|
||||
shutil.copy(amc_map_path, self.constants.amc_contents_folder)
|
||||
self.get_kext_by_bundle_path("AGDP-Override.kext")["Enabled"] = True
|
||||
self.get_kext_by_bundle_path("AGPM-Override.kext")["Enabled"] = True
|
||||
self.get_kext_by_bundle_path("AMC-Override.kext")["Enabled"] = True
|
||||
|
||||
# AGPM Patch
|
||||
if self.model in ModelArray.DualGPUPatch:
|
||||
print("- Adding dual GPU patch")
|
||||
if self.model in ModelArray.IntelNvidiaDRM and self.constants.drm_support is True:
|
||||
print("- Prioritizing DRM support over Intel QuickSync")
|
||||
self.config["DeviceProperties"]["Add"]["PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)"] = {"agdpmod": "pikera", "shikigva": 256}
|
||||
self.config["DeviceProperties"]["Add"]["PciRoot(0x0)/Pci(0x2,0x0)"] = {"disable-gpu-min": "20.0.0"}
|
||||
else:
|
||||
self.config["DeviceProperties"]["Add"]["PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)"] = {"agdpmod": "pikera"}
|
||||
|
||||
# HiDPI OpenCanopy and FileVault
|
||||
if self.model in ModelArray.HiDPIpicker:
|
||||
print("- Setting HiDPI picker")
|
||||
self.config["NVRAM"]["Add"]["4D1EDE05-38C7-4A6A-9CC6-4BCCA8B38C14"]["UIScale"] = binascii.unhexlify("02")
|
||||
|
||||
# Audio Patch
|
||||
if self.model in ModelArray.LegacyAudio:
|
||||
print("- Adding audio properties")
|
||||
hdef_path = "PciRoot(0x0)/Pci(0x8,0x0)" if self.model in ModelArray.nvidiaHDEF else "PciRoot(0x0)/Pci(0x1b,0x0)"
|
||||
# In AppleALC, MacPro3,1's original layout is already in use, forcing layout 13 instead
|
||||
if self.model == "MacPro3,1":
|
||||
self.config["DeviceProperties"]["Add"][hdef_path] = {"apple-layout-id": 90, "use-apple-layout-id": 1, "alc-layout-id": 13, }
|
||||
else:
|
||||
self.config["DeviceProperties"]["Add"][hdef_path] = {"apple-layout-id": 90, "use-apple-layout-id": 1, "use-layout-id": 1, }
|
||||
|
||||
|
||||
def nvidia_patch(self):
|
||||
self.constants.custom_mxm_gpu = True
|
||||
if self.model == "iMac11,1":
|
||||
print("- Adding Nvidia Brightness Control and DRM patches")
|
||||
backlight_path = "PciRoot(0x0)/Pci(0x3,0x0)/Pci(0x0,0x0)"
|
||||
self.config["DeviceProperties"]["Add"][backlight_path] = {"@0,backlight-control": binascii.unhexlify("01000000"), "@0,built-in": binascii.unhexlify("01000000"), "shikigva": 256, "agdpmod": "vit9696"}
|
||||
shutil.copy(self.constants.backlight_path, self.constants.kexts_path)
|
||||
self.get_kext_by_bundle_path("AppleBacklightFixup.kext")["Enabled"] = True
|
||||
elif self.model == "iMac11,3":
|
||||
print("- Adding Nvidia Brightness Control and DRM patches")
|
||||
backlight_path = "PciRoot(0x0)/Pci(0x3,0x0)/Pci(0x0,0x0)"
|
||||
self.config["DeviceProperties"]["Add"][backlight_path] = {"@0,backlight-control": binascii.unhexlify("01000000"), "@0,built-in": binascii.unhexlify("01000000"), "shikigva": 256, "agdpmod": "vit9696"}
|
||||
shutil.copy(self.constants.backlight_path, self.constants.kexts_path)
|
||||
self.get_kext_by_bundle_path("AppleBacklightFixup.kext")["Enabled"] = True
|
||||
elif self.model in ["iMac11,2", "iMac12,1", "iMac12,2"]:
|
||||
print("- Adding Nvidia Brightness Control and DRM patches")
|
||||
backlight_path = "PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)"
|
||||
self.config["DeviceProperties"]["Add"][backlight_path] = {"@0,backlight-control": binascii.unhexlify("01000000"), "@0,built-in": binascii.unhexlify("01000000"), "shikigva": 256}
|
||||
print("- Disabling unsupported iGPU")
|
||||
self.config["DeviceProperties"]["Add"]["PciRoot(0x0)/Pci(0x2,0x0)"] = {"name": binascii.unhexlify("23646973706C6179"), "IOName": "#display", "class-code": binascii.unhexlify("FFFFFFFF")}
|
||||
shutil.copy(self.constants.backlight_path, self.constants.kexts_path)
|
||||
self.get_kext_by_bundle_path("AppleBacklightFixup.kext")["Enabled"] = True
|
||||
|
||||
def amd_patch(self):
|
||||
self.constants.custom_mxm_gpu = True
|
||||
print("- Adding AMD DRM patches")
|
||||
if self.model == "iMac11,1":
|
||||
self.config["DeviceProperties"]["Add"]["PciRoot(0x0)/Pci(0x3,0x0)/Pci(0x0,0x0)"] = {"shikigva": 80, "unfairgva": 1, "agdpmod": "vit9696"}
|
||||
elif self.model == "iMac11,3":
|
||||
self.config["DeviceProperties"]["Add"]["PciRoot(0x0)/Pci(0x3,0x0)/Pci(0x0,0x0)"] = {"shikigva": 80, "unfairgva": 1}
|
||||
elif self.model in ["iMac11,2", "iMac12,1", "iMac12,2"]:
|
||||
self.config["DeviceProperties"]["Add"]["PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)"] = {"shikigva": 80, "unfairgva": 1}
|
||||
print("- Disabling unsupported iGPU")
|
||||
self.config["DeviceProperties"]["Add"]["PciRoot(0x0)/Pci(0x2,0x0)"] = {"name": binascii.unhexlify("23646973706C6179"), "IOName": "#display", "class-code": binascii.unhexlify("FFFFFFFF")}
|
||||
elif self.model == "iMac10,1":
|
||||
self.enable_kext("AAAMouSSE.kext", self.constants.mousse_version, self.constants.mousse_path)
|
||||
|
||||
# Check GPU Vendor
|
||||
if self.constants.metal_build is True:
|
||||
print("- Adding Metal GPU patches on request")
|
||||
if self.constants.imac_vendor == "AMD":
|
||||
amd_patch(self)
|
||||
elif self.constants.imac_vendor == "Nvidia":
|
||||
nvidia_patch(self)
|
||||
else:
|
||||
print("- Failed to find vendor")
|
||||
elif not self.constants.custom_model:
|
||||
self.check_pciid(True)
|
||||
if self.constants.dgpu_vendor == self.constants.pci_amd_ati and self.constants.dgpu_device in ModelArray.AMDMXMGPUs:
|
||||
amd_patch(self)
|
||||
elif self.constants.dgpu_vendor == self.constants.pci_nvidia and self.constants.dgpu_device in ModelArray.NVIDIAMXMGPUs:
|
||||
nvidia_patch(self)
|
||||
if self.model in ModelArray.MacPro71:
|
||||
print("- Adding Mac Pro, Xserve DRM patches")
|
||||
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " shikigva=128 unfairgva=1 -wegtree"
|
||||
|
||||
# Add OpenCanopy
|
||||
print("- Adding OpenCanopy GUI")
|
||||
shutil.rmtree(self.constants.resources_path, onerror=rmtree_handler)
|
||||
shutil.copy(self.constants.gui_path, self.constants.oc_folder)
|
||||
self.config["UEFI"]["Drivers"] = ["OpenCanopy.efi", "OpenRuntime.efi"]
|
||||
# Exfat check
|
||||
if self.model in ModelArray.NoExFat:
|
||||
print("- Adding ExFatDxeLegacy.efi")
|
||||
shutil.copy(self.constants.exfat_legacy_driver_path, self.constants.drivers_path)
|
||||
self.config["UEFI"]["Drivers"] += ["ExFatDxeLegacy.efi"]
|
||||
|
||||
# Add UGA to GOP layer
|
||||
if self.model in ModelArray.UGAtoGOP:
|
||||
print("- Adding UGA to GOP Patch")
|
||||
self.config["UEFI"]["Output"]["GopPassThrough"] = True
|
||||
|
||||
# ThridPartDrives Check
|
||||
if self.model not in ModelArray.NoSATAPatch:
|
||||
print("- Adding SATA Hibernation Patch")
|
||||
self.config["Kernel"]["Quirks"]["ThirdPartyDrives"] = True
|
||||
|
||||
# DEBUG Settings
|
||||
if self.constants.verbose_debug is True:
|
||||
print("- Enabling Verbose boot")
|
||||
self.config["Kernel"]["Quirks"]["PanicNoKextDump"] = True
|
||||
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " -v debug=0x100"
|
||||
if self.constants.kext_debug is True:
|
||||
print("- Enabling DEBUG Kexts")
|
||||
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " -liludbgall"
|
||||
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " msgbuf=1048576"
|
||||
if self.constants.opencore_debug is True:
|
||||
print("- Enabling DEBUG OpenCore")
|
||||
self.config["Misc"]["Debug"]["Target"] = 67
|
||||
self.config["Misc"]["Debug"]["DisplayLevel"] = 672151678018
|
||||
if self.constants.showpicker is True:
|
||||
print("- Enabling ShowPicker")
|
||||
self.config["Misc"]["Boot"]["ShowPicker"] = True
|
||||
else:
|
||||
print("- Hiding picker and enabling PollAppleHotKeys")
|
||||
self.config["Misc"]["Boot"]["ShowPicker"] = False
|
||||
if self.constants.vault is True:
|
||||
print("- Setting Vault configuration")
|
||||
self.config["Misc"]["Security"]["Vault"] = "Secure"
|
||||
self.get_tool_by__path("OpenShell.efi")["Enabled"] = False
|
||||
if self.constants.sip_status is False:
|
||||
print("- Disabling SIP")
|
||||
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["csr-active-config"] = binascii.unhexlify("EF0F0000")
|
||||
self.config["NVRAM"]["Delete"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"] += ["csr-active-config"]
|
||||
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " amfi_get_out_of_my_way=1"
|
||||
if self.constants.secure_status is False:
|
||||
print("- Disabling SecureBootModel")
|
||||
self.config["Misc"]["Security"]["SecureBootModel"] = "Disabled"
|
||||
|
||||
def set_smbios(self):
|
||||
spoofed_model = self.model
|
||||
# TODO: Set check as global variable
|
||||
if self.model in ModelArray.MacBookAir61:
|
||||
print("- Spoofing to MacBookAir6,1")
|
||||
spoofed_model = "MacBookAir6,1"
|
||||
spoofed_board = "Mac-35C1E88140C3E6CF"
|
||||
elif self.model in ModelArray.MacBookAir62:
|
||||
print("- Spoofing to MacBookAir6,2")
|
||||
spoofed_model = "MacBookAir6,2"
|
||||
spoofed_board = "Mac-7DF21CB3ED6977E5"
|
||||
elif self.model in ModelArray.MacBookPro111:
|
||||
print("- Spoofing to MacBookPro11,1")
|
||||
spoofed_model = "MacBookPro11,1"
|
||||
spoofed_board = "Mac-189A3D4F975D5FFC"
|
||||
elif self.model in ModelArray.MacBookPro113:
|
||||
print("- Spoofing to MacBookPro11,3")
|
||||
spoofed_model = "MacBookPro11,3"
|
||||
spoofed_board = "Mac-2BD1B31983FE1663"
|
||||
elif self.model in ModelArray.Macmini71:
|
||||
print("- Spoofing to Macmini7,1")
|
||||
spoofed_model = "Macmini7,1"
|
||||
spoofed_board = "Mac-35C5E08120C7EEAF"
|
||||
elif self.model in ModelArray.iMacPro11:
|
||||
print("- Spoofing to iMacPro1,1")
|
||||
spoofed_model = "iMacPro1,1"
|
||||
spoofed_board = "Mac-7BA5B2D9E42DDD94"
|
||||
elif self.model in ModelArray.iMac151:
|
||||
# Check for upgraded GPUs on iMacs
|
||||
if self.constants.drm_support is True:
|
||||
print("- Spoofing to iMacPro1,1")
|
||||
spoofed_model = "iMacPro1,1"
|
||||
spoofed_board = "Mac-7BA5B2D9E42DDD94"
|
||||
else:
|
||||
print("- Spoofing to iMac15,1")
|
||||
spoofed_model = "iMac15,1"
|
||||
spoofed_board = "Mac-42FD25EABCABB274"
|
||||
elif self.model in ModelArray.iMac144:
|
||||
print("- Spoofing to iMac14,4")
|
||||
spoofed_model = "iMac14,4"
|
||||
spoofed_board = "Mac-81E3E92DD6088272"
|
||||
elif self.model in ModelArray.MacPro71:
|
||||
print("- Spoofing to MacPro7,1")
|
||||
spoofed_model = "MacPro7,1"
|
||||
spoofed_board = "Mac-27AD2F918AE68F61"
|
||||
self.spoofed_model = spoofed_model
|
||||
self.spoofed_board = spoofed_board
|
||||
self.config["#Revision"]["Spoofed-Model"] = self.spoofed_model
|
||||
|
||||
# Setup menu
|
||||
def minimal_serial_patch(self):
|
||||
self.config["PlatformInfo"]["PlatformNVRAM"]["BID"] = self.spoofed_board
|
||||
self.config["PlatformInfo"]["SMBIOS"]["BoardProduct"] = self.spoofed_board
|
||||
self.config["PlatformInfo"]["UpdateNVRAM"] = True
|
||||
|
||||
def moderate_serial_patch(self):
|
||||
self.config["PlatformInfo"]["Automatic"] = True
|
||||
self.config["PlatformInfo"]["UpdateDataHub"] = True
|
||||
self.config["PlatformInfo"]["UpdateNVRAM"] = True
|
||||
self.config["UEFI"]["ProtocolOverrides"]["DataHub"] = True
|
||||
self.config["PlatformInfo"]["Generic"]["SystemProductName"] = self.spoofed_model
|
||||
|
||||
def adanced_serial_patch(self):
|
||||
macserial_output = subprocess.run([self.constants.macserial_path] + f"-g -m {self.spoofed_model} -n 1".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
macserial_output = macserial_output.stdout.decode().strip().split(" | ")
|
||||
self.config["PlatformInfo"]["Automatic"] = True
|
||||
self.config["PlatformInfo"]["UpdateDataHub"] = True
|
||||
self.config["PlatformInfo"]["UpdateNVRAM"] = True
|
||||
self.config["UEFI"]["ProtocolOverrides"]["DataHub"] = True
|
||||
self.config["PlatformInfo"]["Generic"]["ROM"] = binascii.unhexlify("0016CB445566")
|
||||
self.config["PlatformInfo"]["Generic"]["SystemProductName"] = self.spoofed_model
|
||||
self.config["PlatformInfo"]["Generic"]["SystemSerialNumber"] = macserial_output[0]
|
||||
self.config["PlatformInfo"]["Generic"]["MLB"] = macserial_output[1]
|
||||
self.config["PlatformInfo"]["Generic"]["SystemUUID"] = str(uuid.uuid4()).upper()
|
||||
|
||||
if self.constants.serial_settings == "Moderate":
|
||||
print("- Using Moderate SMBIOS patching")
|
||||
moderate_serial_patch(self)
|
||||
elif self.constants.serial_settings == "Advanced":
|
||||
print("- Using Advanced SMBIOS patching")
|
||||
adanced_serial_patch(self)
|
||||
else:
|
||||
print("- Using Minimal SMBIOS patching")
|
||||
self.spoofed_model = self.model
|
||||
minimal_serial_patch(self)
|
||||
|
||||
# USB Map Patching
|
||||
new_map_ls = Path(self.constants.map_contents_folder) / Path("Info.plist")
|
||||
map_config = plistlib.load(Path(new_map_ls).open("rb"))
|
||||
|
||||
for model_controller in ModelArray.ControllerTypes:
|
||||
model_patch = f"{self.model}{model_controller}"
|
||||
try:
|
||||
# Avoid erroring out when specific identity not found
|
||||
map_config["IOKitPersonalities_x86_64"][model_patch]["model"] = self.spoofed_model
|
||||
except KeyError:
|
||||
continue
|
||||
|
||||
plistlib.dump(map_config, Path(new_map_ls).open("wb"), sort_keys=True)
|
||||
|
||||
if self.model == "MacBookPro9,1":
|
||||
new_agdp_ls = Path(self.constants.agdp_contents_folder) / Path("Info.plist")
|
||||
new_agpm_ls = Path(self.constants.agpm_contents_folder) / Path("Info.plist")
|
||||
new_amc_ls = Path(self.constants.amc_contents_folder) / Path("Info.plist")
|
||||
|
||||
agdp_config = plistlib.load(Path(new_agdp_ls).open("rb"))
|
||||
agpm_config = plistlib.load(Path(new_agpm_ls).open("rb"))
|
||||
amc_config = plistlib.load(Path(new_amc_ls).open("rb"))
|
||||
|
||||
agdp_config["IOKitPersonalities"]["AppleGraphicsDevicePolicy"]["ConfigMap"][self.spoofed_board] = agdp_config["IOKitPersonalities"]["AppleGraphicsDevicePolicy"]["ConfigMap"].pop(self.model)
|
||||
agpm_config["IOKitPersonalities"]["AGPM"]["Machines"][self.spoofed_board] = agpm_config["IOKitPersonalities"]["AGPM"]["Machines"].pop(self.model)
|
||||
amc_config["IOKitPersonalities"]["AppleMuxControl"]["ConfigMap"][self.spoofed_board] = amc_config["IOKitPersonalities"]["AppleMuxControl"]["ConfigMap"].pop(self.model)
|
||||
|
||||
plistlib.dump(agdp_config, Path(new_agdp_ls).open("wb"), sort_keys=True)
|
||||
plistlib.dump(agpm_config, Path(new_agpm_ls).open("wb"), sort_keys=True)
|
||||
plistlib.dump(amc_config, Path(new_amc_ls).open("wb"), sort_keys=True)
|
||||
|
||||
#if self.model in ["MacBookPro8,2", "MacBookPro8,3"]:
|
||||
# print("- Disabling unsupported TeraScale 2 dGPU")
|
||||
# self.config["NVRAM"]["Add"]["FA4CE28D-B62F-4C99-9CC3-6815686E30F9"]["gpu-power-prefs"] = binascii.unhexlify("01000000")
|
||||
# self.config["NVRAM"]["Delete"]["FA4CE28D-B62F-4C99-9CC3-6815686E30F9"] += ["gpu-power-prefs"]
|
||||
# self.config["DeviceProperties"]["Add"]["PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)"] = {"name": binascii.unhexlify("23646973706C6179"), "IOName": "#display", "class-code": binascii.unhexlify("FFFFFFFF")}
|
||||
|
||||
@staticmethod
|
||||
def get_item_by_kv(iterable, key, value):
|
||||
item = None
|
||||
for i in iterable:
|
||||
if i[key] == value:
|
||||
item = i
|
||||
break
|
||||
return item
|
||||
|
||||
def get_kext_by_bundle_path(self, bundle_path):
|
||||
kext = self.get_item_by_kv(self.config["Kernel"]["Add"], "BundlePath", bundle_path)
|
||||
if not kext:
|
||||
print(f"- Could not find kext {bundle_path}!")
|
||||
raise IndexError
|
||||
return kext
|
||||
|
||||
def get_tool_by__path(self, bundle_path):
|
||||
tool = self.get_item_by_kv(self.config["Misc"]["Tools"], "Path", bundle_path)
|
||||
if not tool:
|
||||
print(f"- Could not find Tool {bundle_path}!")
|
||||
raise IndexError
|
||||
return tool
|
||||
|
||||
def enable_kext(self, kext_name, kext_version, kext_path, check=False):
|
||||
kext = self.get_kext_by_bundle_path(kext_name)
|
||||
|
||||
if callable(check) and not check():
|
||||
# Check failed
|
||||
return
|
||||
|
||||
print(f"- Adding {kext_name} {kext_version}")
|
||||
shutil.copy(kext_path, self.constants.kexts_path)
|
||||
kext["Enabled"] = True
|
||||
|
||||
def cleanup(self):
|
||||
print("- Cleaning up files")
|
||||
# Remove unused kexts
|
||||
for kext in list(self.config["Kernel"]["Add"]):
|
||||
if not kext["Enabled"]:
|
||||
self.config["Kernel"]["Add"].remove(kext)
|
||||
plistlib.dump(self.config, Path(self.constants.plist_path).open("wb"), sort_keys=True)
|
||||
for kext in self.constants.kexts_path.rglob("*.zip"):
|
||||
with zipfile.ZipFile(kext) as zip_file:
|
||||
zip_file.extractall(self.constants.kexts_path)
|
||||
kext.unlink()
|
||||
|
||||
for item in self.constants.oc_folder.rglob("*.zip"):
|
||||
with zipfile.ZipFile(item) as zip_file:
|
||||
zip_file.extractall(self.constants.oc_folder)
|
||||
item.unlink()
|
||||
|
||||
for i in self.constants.build_path.rglob("__MACOSX"):
|
||||
shutil.rmtree(i)
|
||||
|
||||
Path(self.constants.opencore_zip_copied).unlink()
|
||||
|
||||
def sign_files(self):
|
||||
if self.constants.vault is True:
|
||||
print("- Vaulting EFI")
|
||||
subprocess.run([self.constants.vault_path] + f"{self.constants.oc_folder}/".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
|
||||
def build_opencore(self):
|
||||
self.build_efi()
|
||||
self.set_smbios()
|
||||
self.cleanup()
|
||||
self.sign_files()
|
||||
print("")
|
||||
print(f"Your OpenCore EFI for {self.model} has been built at:")
|
||||
print(f" {self.constants.opencore_release_folder}")
|
||||
print("")
|
||||
if self.constants.gui_mode is False:
|
||||
input("Press [Enter] to go back.\n")
|
||||
|
||||
def copy_efi(self):
|
||||
Utilities.cls()
|
||||
Utilities.header(["Installing OpenCore to Drive"])
|
||||
|
||||
if not self.constants.opencore_release_folder.exists():
|
||||
Utilities.TUIOnlyPrint(
|
||||
["Installing OpenCore to Drive"],
|
||||
"Press [Enter] to go back.\n",
|
||||
[
|
||||
"""OpenCore folder missing!
|
||||
Please build OpenCore first!"""
|
||||
],
|
||||
).start()
|
||||
return
|
||||
|
||||
print("\nDisk picker is loading...")
|
||||
|
||||
all_disks = {}
|
||||
# TODO: AllDisksAndPartitions is not supported in Snow Leopard and older
|
||||
try:
|
||||
# High Sierra and newer
|
||||
disks = plistlib.loads(subprocess.run("diskutil list -plist physical".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode())
|
||||
except ValueError:
|
||||
# Sierra and older
|
||||
disks = plistlib.loads(subprocess.run("diskutil list -plist".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode())
|
||||
for disk in disks["AllDisksAndPartitions"]:
|
||||
disk_info = plistlib.loads(subprocess.run(f"diskutil info -plist {disk['DeviceIdentifier']}".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode())
|
||||
try:
|
||||
all_disks[disk["DeviceIdentifier"]] = {"identifier": disk_info["DeviceNode"], "name": disk_info["MediaName"], "size": disk_info["TotalSize"], "partitions": {}}
|
||||
for partition in disk["Partitions"]:
|
||||
partition_info = plistlib.loads(subprocess.run(f"diskutil info -plist {partition['DeviceIdentifier']}".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode())
|
||||
all_disks[disk["DeviceIdentifier"]]["partitions"][partition["DeviceIdentifier"]] = {
|
||||
"fs": partition_info.get("FilesystemType", partition_info["Content"]),
|
||||
"type": partition_info["Content"],
|
||||
"name": partition_info.get("VolumeName", ""),
|
||||
"size": partition_info["TotalSize"],
|
||||
}
|
||||
except KeyError:
|
||||
# Avoid crashing with CDs installed
|
||||
continue
|
||||
# TODO: Advanced mode
|
||||
menu = Utilities.TUIMenu(
|
||||
["Select Disk"],
|
||||
"Please select the disk you would like to install OpenCore to: ",
|
||||
in_between=["Missing disks? Ensure they have an EFI or FAT32 partition."],
|
||||
return_number_instead_of_direct_call=True,
|
||||
loop=True,
|
||||
)
|
||||
for disk in all_disks:
|
||||
if not any(all_disks[disk]["partitions"][partition]["fs"] in ("msdos", "EFI") for partition in all_disks[disk]["partitions"]):
|
||||
continue
|
||||
menu.add_menu_option(f"{disk}: {all_disks[disk]['name']} ({human_fmt(all_disks[disk]['size'])})", key=disk[4:])
|
||||
|
||||
response = menu.start()
|
||||
|
||||
if response == -1:
|
||||
return
|
||||
|
||||
disk_identifier = "disk" + response
|
||||
selected_disk = all_disks[disk_identifier]
|
||||
|
||||
menu = Utilities.TUIMenu(
|
||||
["Select Partition"],
|
||||
"Please select the partition you would like to install OpenCore to: ",
|
||||
return_number_instead_of_direct_call=True,
|
||||
loop=True,
|
||||
in_between=["Missing partitions? Ensure they are formatted as an EFI or FAT32.", "", "* denotes likely candidate."],
|
||||
)
|
||||
for partition in selected_disk["partitions"]:
|
||||
if selected_disk["partitions"][partition]["fs"] not in ("msdos", "EFI"):
|
||||
continue
|
||||
text = f"{partition}: {selected_disk['partitions'][partition]['name']} ({human_fmt(selected_disk['partitions'][partition]['size'])})"
|
||||
if selected_disk["partitions"][partition]["type"] == "EFI" or (
|
||||
selected_disk["partitions"][partition]["type"] == "Microsoft Basic Data" and selected_disk["partitions"][partition]["size"] < 1024 * 1024 * 512
|
||||
): # 512 megabytes:
|
||||
text += " *"
|
||||
menu.add_menu_option(text, key=partition[len(disk_identifier) + 1:])
|
||||
|
||||
response = menu.start()
|
||||
|
||||
if response == -1:
|
||||
return
|
||||
|
||||
# TODO: Apple Script fails in Yosemite(?) and older
|
||||
args = [
|
||||
"osascript",
|
||||
"-e",
|
||||
f'''do shell script "diskutil mount {disk_identifier}s{response}"'''
|
||||
' with prompt "OpenCore Legacy Patcher needs administrator privileges to mount your EFI."'
|
||||
" with administrator privileges"
|
||||
" without altering line endings",
|
||||
]
|
||||
|
||||
if self.constants.detected_os > self.constants.yosemite:
|
||||
result = subprocess.run(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
else:
|
||||
result = subprocess.run(f"diskutil mount {disk_identifier}s{response}".split(), stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
|
||||
if result.returncode != 0:
|
||||
if "execution error" in result.stderr.decode() and result.stderr.decode().strip()[-5:-1] == "-128":
|
||||
# cancelled prompt
|
||||
return
|
||||
else:
|
||||
Utilities.TUIOnlyPrint(
|
||||
["Copying OpenCore"], "Press [Enter] to go back.\n", ["An error occurred!"] + result.stderr.decode().split("\n") + ["", "Please report this to the devs at GitHub."]
|
||||
).start()
|
||||
return
|
||||
|
||||
# TODO: Remount if readonly
|
||||
drive_host_info = plistlib.loads(subprocess.run(f"diskutil info -plist {disk_identifier}".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode())
|
||||
partition_info = plistlib.loads(subprocess.run(f"diskutil info -plist {disk_identifier}s{response}".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode())
|
||||
sd_type = drive_host_info["MediaName"]
|
||||
try:
|
||||
ssd_type = drive_host_info["SolidState"]
|
||||
except KeyError:
|
||||
ssd_type = False
|
||||
mount_path = Path(partition_info["MountPoint"])
|
||||
disk_type = partition_info["BusProtocol"]
|
||||
Utilities.cls()
|
||||
Utilities.header(["Copying OpenCore"])
|
||||
|
||||
if mount_path.exists():
|
||||
if (mount_path / Path("EFI/OC")).exists():
|
||||
print("- Removing preexisting EFI/OC folder")
|
||||
shutil.rmtree(mount_path / Path("EFI/OC"), onerror=rmtree_handler)
|
||||
if (mount_path / Path("System")).exists():
|
||||
print("- Removing preexisting System folder")
|
||||
shutil.rmtree(mount_path / Path("System"), onerror=rmtree_handler)
|
||||
print("- Copying OpenCore onto EFI partition")
|
||||
shutil.copytree(self.constants.opencore_release_folder / Path("EFI/OC"), mount_path / Path("EFI/OC"))
|
||||
shutil.copytree(self.constants.opencore_release_folder / Path("System"), mount_path / Path("System"))
|
||||
if self.constants.boot_efi is True:
|
||||
print("- Converting Bootstrap to BOOTx64.efi")
|
||||
if (mount_path / Path("EFI/BOOT")).exists():
|
||||
shutil.rmtree(mount_path / Path("EFI/BOOT"), onerror=rmtree_handler)
|
||||
Path(mount_path / Path("EFI/BOOT")).mkdir()
|
||||
shutil.move(mount_path / Path("System/Library/CoreServices/boot.efi"), mount_path / Path("EFI/BOOT/BOOTx64.efi"))
|
||||
shutil.rmtree(mount_path / Path("System"), onerror=rmtree_handler)
|
||||
# Array filled with common SD Card names
|
||||
# Note most USB-based SD Card readers generally report as "Storage Device", and no reliable way to detect further
|
||||
if sd_type in ["SD Card Reader", "SD/MMC"]:
|
||||
print("- Adding SD Card icon")
|
||||
shutil.copy(self.constants.icon_path_sd, mount_path)
|
||||
elif ssd_type is True:
|
||||
print("- Adding SSD icon")
|
||||
shutil.copy(self.constants.icon_path_ssd, mount_path)
|
||||
elif disk_type == "USB":
|
||||
print("- Adding External USB Drive icon")
|
||||
shutil.copy(self.constants.icon_path_external, mount_path)
|
||||
else:
|
||||
print("- Adding Internal Drive icon")
|
||||
shutil.copy(self.constants.icon_path_internal, mount_path)
|
||||
print("- Cleaning install location")
|
||||
subprocess.run(f"dot_clean {mount_path}".split(), stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
print("- Unmounting EFI partition")
|
||||
subprocess.run(f"diskutil umount {mount_path}".split(), stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
print("- OpenCore transfer complete")
|
||||
print("\nPress [Enter] to continue.\n")
|
||||
input()
|
||||
else:
|
||||
Utilities.TUIOnlyPrint(["Copying OpenCore"], "Press [Enter] to go back.\n", ["EFI failed to mount!", "Please report this to the devs at GitHub."]).start()
|
||||
314
Resources/CliMenu.py
Normal file
@@ -0,0 +1,314 @@
|
||||
# Handle misc CLI menu options
|
||||
# Copyright (C) 2020-2021, Dhinak G, Mykola Grymalyuk
|
||||
from __future__ import print_function
|
||||
|
||||
import subprocess
|
||||
import sys
|
||||
import time
|
||||
import platform
|
||||
|
||||
from Resources import Build, ModelArray, Constants, SysPatch, Utilities
|
||||
|
||||
|
||||
class MenuOptions:
|
||||
def __init__(self, model, versions):
|
||||
self.model = model
|
||||
self.constants: Constants.Constants = versions
|
||||
|
||||
def change_os(self):
|
||||
Utilities.cls()
|
||||
Utilities.header(["Select Patcher's Target OS"])
|
||||
print(f"""
|
||||
Minimum Target:\t{self.constants.min_os_support}
|
||||
Maximum Target:\t{self.constants.max_os_support}
|
||||
Current target:\t{self.constants.os_support}
|
||||
""")
|
||||
temp_os_support = float(input("Please enter OS target: "))
|
||||
if (self.constants.max_os_support < temp_os_support) or (temp_os_support < self.constants.min_os_support):
|
||||
print("Unsupported entry")
|
||||
else:
|
||||
self.constants.os_support = temp_os_support
|
||||
if temp_os_support == 11.0:
|
||||
ModelArray.SupportedSMBIOS = ModelArray.SupportedSMBIOS11
|
||||
elif temp_os_support == 12.0:
|
||||
ModelArray.SupportedSMBIOS = ModelArray.SupportedSMBIOS12
|
||||
|
||||
def change_verbose(self):
|
||||
Utilities.cls()
|
||||
Utilities.header(["Set Verbose mode"])
|
||||
change_menu = input("Enable Verbose mode(y/n): ")
|
||||
if change_menu in {"y", "Y", "yes", "Yes"}:
|
||||
self.constants.verbose_debug = True
|
||||
elif change_menu in {"n", "N", "no", "No"}:
|
||||
self.constants.verbose_debug = False
|
||||
else:
|
||||
print("Invalid option")
|
||||
|
||||
def change_oc(self):
|
||||
Utilities.cls()
|
||||
Utilities.header(["Set OpenCore DEBUG mode"])
|
||||
change_menu = input("Enable OpenCore DEBUG mode(y/n): ")
|
||||
if change_menu in {"y", "Y", "yes", "Yes"}:
|
||||
self.constants.opencore_debug = True
|
||||
self.constants.opencore_build = "DEBUG"
|
||||
elif change_menu in {"n", "N", "no", "No"}:
|
||||
self.constants.opencore_debug = False
|
||||
self.constants.opencore_build = "RELEASE"
|
||||
else:
|
||||
print("Invalid option")
|
||||
|
||||
def change_kext(self):
|
||||
Utilities.cls()
|
||||
Utilities.header(["Set Kext DEBUG mode"])
|
||||
change_menu = input("Enable Kext DEBUG mode(y/n): ")
|
||||
if change_menu in {"y", "Y", "yes", "Yes"}:
|
||||
self.constants.kext_debug = True
|
||||
elif change_menu in {"n", "N", "no", "No"}:
|
||||
self.constants.kext_debug = False
|
||||
else:
|
||||
print("Invalid option")
|
||||
|
||||
def change_metal(self):
|
||||
Utilities.cls()
|
||||
Utilities.header(["Assume Metal GPU Always in iMac"])
|
||||
print("""This is for iMacs that have upgraded Metal GPUs, otherwise
|
||||
Patcher assumes based on stock configuration (ie. iMac10,x-12,x)
|
||||
|
||||
Valid Options:
|
||||
|
||||
1. None(stock GPU)
|
||||
2. Nvidia GPU
|
||||
3. AMD GPU
|
||||
|
||||
Note: Patcher will detect whether hardware has been upgraded regardless, this
|
||||
option is for those patching on a different machine or OCLP cannot detect.
|
||||
""")
|
||||
change_menu = input("Set GPU Patch type(ie. 1): ")
|
||||
if change_menu == "1":
|
||||
self.constants.metal_build = False
|
||||
self.constants.imac_vendor = "None"
|
||||
elif change_menu == "2":
|
||||
self.constants.metal_build = True
|
||||
self.constants.imac_vendor = "Nvidia"
|
||||
elif change_menu == "3":
|
||||
self.constants.metal_build = True
|
||||
self.constants.imac_vendor = "AMD"
|
||||
else:
|
||||
print("Invalid option")
|
||||
|
||||
def change_wifi(self):
|
||||
Utilities.cls()
|
||||
Utilities.header(["Assume Upgraded Wifi Always"])
|
||||
print("""This is for Macs with upgraded wifi cards(ie. BCM94360/2)
|
||||
|
||||
Note: Patcher will detect whether hardware has been upgraded regardless, this
|
||||
option is for those patching on a different machine or cannot detect.
|
||||
""")
|
||||
change_menu = input("Enable Upgraded Wifi build algorithm?(y/n): ")
|
||||
if change_menu in {"y", "Y", "yes", "Yes"}:
|
||||
self.constants.wifi_build = True
|
||||
elif change_menu in {"n", "N", "no", "No"}:
|
||||
self.constants.wifi_build = False
|
||||
else:
|
||||
print("Invalid option")
|
||||
|
||||
def change_serial(self):
|
||||
Utilities.cls()
|
||||
Utilities.header(["Set SMBIOS Mode"])
|
||||
print("""This section is for setting how OpenCore generates the SMBIOS
|
||||
Recommended for adanced users who want control how serials are handled
|
||||
|
||||
Valid options:
|
||||
|
||||
1. Minimal:\tUse original serials and minimally update SMBIOS
|
||||
2. Moderate:\tReplace entire SMBIOS but keep original serials
|
||||
3. Advanced:\tReplace entire SMBIOS and generate new serials
|
||||
|
||||
Note: For new users we recommend leaving as default(1. Minimal)
|
||||
""")
|
||||
change_menu = input("Set SMBIOS Mode(ie. 1): ")
|
||||
if change_menu == "1":
|
||||
self.constants.serial_settings = "Minimal"
|
||||
elif change_menu == "2":
|
||||
self.constants.serial_settings = "Moderate"
|
||||
elif change_menu == "3":
|
||||
self.constants.serial_settings = "Advanced"
|
||||
else:
|
||||
print("Invalid option")
|
||||
|
||||
def change_showpicker(self):
|
||||
Utilities.cls()
|
||||
Utilities.header(["Set OpenCore Picker mode"])
|
||||
print("""By default, OpenCore will show its boot picker each time on boot up,
|
||||
however this can be disabled by default and be shown on command by repeatedly
|
||||
pressing the "Esc" key
|
||||
""")
|
||||
change_menu = input("Show OpenCore Picker by default(y/n): ")
|
||||
if change_menu in {"y", "Y", "yes", "Yes"}:
|
||||
self.constants.showpicker = True
|
||||
elif change_menu in {"n", "N", "no", "No"}:
|
||||
self.constants.showpicker = False
|
||||
else:
|
||||
print("Invalid option")
|
||||
|
||||
def change_vault(self):
|
||||
Utilities.cls()
|
||||
Utilities.header(["Set OpenCore Vaulting"])
|
||||
print("""By default, this patcher will sign all your files and ensure none of the
|
||||
contents can be tampered with. However for more advanced users, you may
|
||||
want to be able to freely edit the config.plist and files.
|
||||
|
||||
Note: For security reasons, OpenShell will be disabled when Vault is set.
|
||||
|
||||
""")
|
||||
change_menu = input("Enable Vault(y/n): ")
|
||||
if change_menu in {"y", "Y", "yes", "Yes"}:
|
||||
self.constants.vault = True
|
||||
elif change_menu in {"n", "N", "no", "No"}:
|
||||
self.constants.vault = False
|
||||
else:
|
||||
print("Invalid option")
|
||||
|
||||
def change_sip(self):
|
||||
Utilities.cls()
|
||||
Utilities.header(["Set SIP and SecureBootModel"])
|
||||
print("""SIP and SecureBootModel are used to ensure proper OTA functionality,
|
||||
however to patch the root volume both of these must be disabled.
|
||||
Only disable is absolutely necessary. SIP value = 0xFEF
|
||||
|
||||
Note: for minor changes, SIP can be adjusted in recovery like normal.
|
||||
Additionally, when disabling SIP via the patcher amfi_get_out_of_my_way=1
|
||||
will be added to boot-args.
|
||||
|
||||
Valid options:
|
||||
|
||||
1. Enable Both
|
||||
2. Disable SIP only
|
||||
3. Disable SecureBootModel Only
|
||||
4. Disable Both
|
||||
|
||||
""")
|
||||
change_menu = input("Set SIP and SecureBootModel(ie. 1): ")
|
||||
if change_menu == "1":
|
||||
self.constants.sip_status = True
|
||||
self.constants.secure_status = True
|
||||
elif change_menu == "2":
|
||||
self.constants.sip_status = False
|
||||
self.constants.secure_status = True
|
||||
elif change_menu == "3":
|
||||
self.constants.sip_status = True
|
||||
self.constants.secure_status = False
|
||||
elif change_menu == "4":
|
||||
self.constants.sip_status = False
|
||||
self.constants.secure_status = False
|
||||
else:
|
||||
print("Invalid option")
|
||||
|
||||
def change_imac_nvidia(self):
|
||||
Utilities.cls()
|
||||
Utilities.header(["Force iMac Nvidia Patches"])
|
||||
print("""Specifically for iMac10,x-12,x with Metal Nvidia GPU upgrades
|
||||
By default the patcher will try to detect what hardware is
|
||||
running, however this will enforce iMac Nvidia Build Patches.
|
||||
""")
|
||||
change_menu = input("Assume iMac Nvidia patches(y/n): ")
|
||||
if change_menu in {"y", "Y", "yes", "Yes"}:
|
||||
self.constants.imac_nvidia_build = True
|
||||
elif change_menu in {"n", "N", "no", "No"}:
|
||||
self.constants.imac_nvidia_build = False
|
||||
else:
|
||||
print("Invalid option")
|
||||
|
||||
def bootstrap_setting(self):
|
||||
Utilities.cls()
|
||||
Utilities.header(["Set Bootstrap method"])
|
||||
print("""Sets OpenCore's bootstrap method, currently the patcher supports the
|
||||
following options.
|
||||
|
||||
Valid options:
|
||||
|
||||
1. System/Library/CoreServices/boot.efi (default)
|
||||
2. EFI/BOOT/BOOTx64.efi
|
||||
3. Exit
|
||||
|
||||
Note: S*/L*/C*/boot.efi method is only installed to the EFI partition only
|
||||
and not to macOS itself.
|
||||
|
||||
Recommended to set to BOOTx64.efi in situations where your Mac cannot
|
||||
see the EFI Boot entry in the boot picker.
|
||||
|
||||
""")
|
||||
change_menu = input("Set Bootstrap method: ")
|
||||
if change_menu == "1":
|
||||
self.constants.boot_efi = False
|
||||
elif change_menu == "2":
|
||||
self.constants.boot_efi = True
|
||||
else:
|
||||
print("Invalid option")
|
||||
|
||||
|
||||
def drm_setting(self):
|
||||
Utilities.cls()
|
||||
Utilities.header(["Set DRM preferences"])
|
||||
print("""Sets OpenCore's DRM preferences for iMac13,x and iMac14,x.
|
||||
In Big Sur, some DRM based content may be broken by
|
||||
default in AppleTV, Photobooth, etc.
|
||||
|
||||
To resolve, you can opt to disable Intel QuickSync support in
|
||||
favor of Nvidia's Software rendering. This can aid in DRM however
|
||||
greatly hampers Video rendering performance in Final Cut Pro and
|
||||
other programs relying on such features.
|
||||
|
||||
Recommend only disabling if absolutely required.
|
||||
""")
|
||||
change_menu = input("Enable Nvidia's Software DRM rendering(y/n): ")
|
||||
if change_menu in {"y", "Y", "yes", "Yes"}:
|
||||
self.constants.drm_support = True
|
||||
elif change_menu in {"n", "N", "no", "No"}:
|
||||
self.constants.drm_support = False
|
||||
else:
|
||||
print("Invalid option")
|
||||
|
||||
def accel_setting(self):
|
||||
Utilities.cls()
|
||||
Utilities.header(["Enable Beta Acceleration Patches"])
|
||||
print("""Enables OCLP's experimental GPU Acceleration Patches
|
||||
Note these are still in beta and we highly recommend users
|
||||
not run them daily or expect stable performance.
|
||||
|
||||
Currently the following are supported:
|
||||
|
||||
- Nvidia: Tesla and Fermi (8000-500)
|
||||
- AMD/ATI: TeraScale 1 (2000-4000)
|
||||
- Intel: Ironlake and Sandy Bridge
|
||||
|
||||
For reliability, please consider running macOS Catalina or
|
||||
older via Dosdude1's patchers
|
||||
|
||||
Note: These patches may break Big Sur booting, please have any
|
||||
important data backed up in case of emergencies
|
||||
""")
|
||||
change_menu = input("Enable Beta Acceleration Patches(y/n): ")
|
||||
if change_menu in {"y", "Y", "yes", "Yes"}:
|
||||
self.constants.legacy_acceleration_patch = True
|
||||
elif change_menu in {"n", "N", "no", "No"}:
|
||||
self.constants.legacy_acceleration_patch = False
|
||||
else:
|
||||
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")
|
||||
@@ -1,5 +1,6 @@
|
||||
# pylint: disable=multiple-statements
|
||||
# Define Files
|
||||
# Copyright (C) 2020-2021, Dhinak G, Mykola Grymalyuk
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
@@ -8,26 +9,33 @@ from pathlib import Path
|
||||
|
||||
class Constants:
|
||||
def __init__(self):
|
||||
self.patcher_version = "0.0.17"
|
||||
self.opencore_commit = "7bb41aa - 2021-03-06"
|
||||
self.patcher_version = "0.1.1"
|
||||
self.opencore_commit = "c528597 - 2021-04-05"
|
||||
self.opencore_version = "0.6.8"
|
||||
self.lilu_version = "1.5.1"
|
||||
self.whatevergreen_version = "1.4.8"
|
||||
self.lilu_version = "1.5.2"
|
||||
self.whatevergreen_version = "1.4.9"
|
||||
self.airportbcrmfixup_version = "2.1.2"
|
||||
self.bcm570_version = "1.0.0"
|
||||
self.bcm570_version = "1.0.1"
|
||||
self.marvel_version = "1.0.0"
|
||||
self.nforce_version = "1.0.0"
|
||||
self.mce_version = "1.0.0"
|
||||
self.mousse_version = "0.93"
|
||||
self.telemetrap_version = "1.0.0"
|
||||
self.corecaptureelcap_version = "1.0.0"
|
||||
self.io80211elcap_version = "1.0.0"
|
||||
self.io80211high_sierra_version = "1.0.0"
|
||||
self.io80211mojave_version = "1.0.0"
|
||||
self.voodoohda_version = "296"
|
||||
self.applealc_version = "1.6.0"
|
||||
self.restrictevents_version = "1.0.0"
|
||||
self.restrictevents_mbp_version = "1.0.1"
|
||||
self.piixata_version = "1.0.0"
|
||||
self.backlight_version = "1.0.0"
|
||||
self.backlight_version = "1.0.1"
|
||||
self.cpufriend_version = "1.2.3"
|
||||
self.nightshift_version = "1.1.0"
|
||||
self.smcspoof_version = "1.0.0"
|
||||
self.cputscsync = "1.0.3"
|
||||
self.hibernationfixup = "1.3.9"
|
||||
self.payload_version = "0.0.4"
|
||||
|
||||
# Get resource path
|
||||
self.current_path = Path(__file__).parent.parent.resolve()
|
||||
@@ -37,12 +45,16 @@ class Constants:
|
||||
self.custom_mxm_gpu: str = None
|
||||
self.current_gpuv: str = None
|
||||
self.current_gpud: str = None
|
||||
self.igpu_vendor = ""
|
||||
self.igpu_device = ""
|
||||
self.dgpu_vendor = ""
|
||||
self.dgpu_device = ""
|
||||
|
||||
# Patcher Settings
|
||||
self.opencore_debug = False
|
||||
self.opencore_build = "RELEASE"
|
||||
self.kext_debug = False
|
||||
self.verbose_debug = True
|
||||
self.verbose_debug = False
|
||||
self.os_support = 11.0
|
||||
self.min_os_support = 11.0
|
||||
self.max_os_support = 11.0
|
||||
@@ -52,17 +64,51 @@ class Constants:
|
||||
self.gui_mode = False
|
||||
self.serial_settings = "Minimal"
|
||||
self.showpicker = True
|
||||
self.vault = True
|
||||
self.vault = False
|
||||
self.sip_status = True
|
||||
self.secure_status = True
|
||||
self.detected_os = 0.0
|
||||
self.detected_os = 0
|
||||
self.boot_efi = False
|
||||
self.drm_support = False
|
||||
self.legacy_acceleration_patch = True
|
||||
self.assume_legacy = False
|
||||
|
||||
# OS Versions
|
||||
self.tiger = 8
|
||||
self.leopard = 9
|
||||
self.snow_leopard = 10
|
||||
self.lion = 11
|
||||
self.mountain_lion = 12
|
||||
self.mavericks = 13
|
||||
self.yosemite = 14
|
||||
self.el_capitan = 15
|
||||
self.sierra = 16
|
||||
self.high_sierra = 17
|
||||
self.mojave = 18
|
||||
self.catalina = 19
|
||||
self.big_sur = 20
|
||||
|
||||
# Vendor IDs
|
||||
self.pci_nvidia = "10DE"
|
||||
self.pci_amd_ati = "1002"
|
||||
self.pci_intel = "8086"
|
||||
self.pci_broadcom = "14E4"
|
||||
self.pci_atheros = "168C"
|
||||
|
||||
# Nvidia GPU Architecture
|
||||
self.arch_tesla = "NV50"
|
||||
self.arch_fermi = "GF100"
|
||||
self.arch_kepler = "GK100"
|
||||
|
||||
# External Files
|
||||
self.url_apple_binaries = "https://github.com/dortania/Apple-Binaries-OCLP/archive/refs/tags/"
|
||||
|
||||
# Payload Location
|
||||
# OpenCore
|
||||
@property
|
||||
def opencore_zip_source(self): return self.payload_path / Path(f"OpenCore/OpenCore-{self.opencore_build}-v{self.opencore_version}.zip")
|
||||
def opencore_zip_source(self): return self.payload_path / Path(f"OpenCore/OpenCore-{self.opencore_build}.zip")
|
||||
@property
|
||||
def plist_template(self): return self.payload_path / Path(f"Config/v{self.opencore_version}/config.plist")
|
||||
def plist_template(self): return self.payload_path / Path(f"Config/config.plist")
|
||||
|
||||
# ACPI
|
||||
@property
|
||||
@@ -71,6 +117,8 @@ class Constants:
|
||||
# Drivers
|
||||
@property
|
||||
def nvme_driver_path(self): return self.payload_path / Path("Drivers/NvmExpressDxe.efi")
|
||||
@property
|
||||
def exfat_legacy_driver_path(self): return self.payload_path / Path("Drivers/ExFatDxeLegacy.efi")
|
||||
|
||||
# Kexts
|
||||
@property
|
||||
@@ -84,6 +132,8 @@ class Constants:
|
||||
@property
|
||||
def restrictevents_path(self): return self.payload_kexts_path / Path(f"Acidanthera/RestrictEvents-v{self.restrictevents_version}.zip")
|
||||
@property
|
||||
def restrictevents_mbp_path(self): return self.payload_kexts_path / Path(f"Acidanthera/RestrictEvents-MBP91-v{self.restrictevents_mbp_version}.zip")
|
||||
@property
|
||||
def bcm570_path(self): return self.payload_kexts_path / Path(f"Ethernet/CatalinaBCM5701Ethernet-v{self.bcm570_version}.zip")
|
||||
@property
|
||||
def marvel_path(self): return self.payload_kexts_path / Path(f"Ethernet/MarvelYukonEthernet-v{self.marvel_version}.zip")
|
||||
@@ -96,11 +146,15 @@ class Constants:
|
||||
@property
|
||||
def telemetrap_path(self): return self.payload_kexts_path / Path(f"SSE/telemetrap-v{self.telemetrap_version}.zip")
|
||||
@property
|
||||
def corecaptureelcap_path(self): return self.payload_kexts_path / Path(f"Wifi/corecaptureElCap-v{self.corecaptureelcap_version}.zip")
|
||||
@property
|
||||
def io80211elcap_path(self): return self.payload_kexts_path / Path(f"Wifi/IO80211ElCap-v{self.io80211elcap_version}.zip")
|
||||
@property
|
||||
def io80211high_sierra_path(self): return self.payload_kexts_path / Path(f"Wifi/IO80211HighSierra-v{self.io80211high_sierra_version}.zip")
|
||||
@property
|
||||
def io80211mojave_path(self): return self.payload_kexts_path / Path(f"Wifi/IO80211Mojave-v{self.io80211mojave_version}.zip")
|
||||
@property
|
||||
def voodoohda_path(self): return self.payload_kexts_path / Path(f"Audio/VoodooHDA-v{self.voodoohda_version}.zip")
|
||||
def applealc_path(self): return self.payload_kexts_path / Path(f"Acidanthera/AppleALC-v{self.applealc_version}.zip")
|
||||
@property
|
||||
def piixata_path(self): return self.payload_kexts_path / Path(f"Misc/AppleIntelPIIXATA-v{self.piixata_version}.zip")
|
||||
@property
|
||||
@@ -109,14 +163,24 @@ class Constants:
|
||||
def cpufriend_path(self): return self.payload_kexts_path / Path(f"Acidanthera/CPUFriend-v{self.cpufriend_version}.zip")
|
||||
@property
|
||||
def nightshift_path(self): return self.payload_kexts_path / Path(f"Misc/NightShiftEnabler-v{self.nightshift_version}.zip")
|
||||
@property
|
||||
def smcspoof_path(self): return self.payload_kexts_path / Path(f"Misc/SMC-Spoof-v{self.smcspoof_version}.zip")
|
||||
@property
|
||||
def cputscsync_path(self): return self.payload_kexts_path / Path(f"Acidanthera/CpuTscSync-v{self.cputscsync}.zip")
|
||||
@property
|
||||
def hibernationfixup_path(self): return self.payload_kexts_path / Path(f"Acidanthera/HibernationFixup-v{self.hibernationfixup}.zip")
|
||||
@property
|
||||
def plist_folder_path(self): return self.payload_kexts_path / Path(f"Plists")
|
||||
@property
|
||||
def platform_plugin_plist_path(self): return self.plist_folder_path / Path(f"PlatformPlugin")
|
||||
|
||||
# Build Location
|
||||
@property
|
||||
def build_path(self): return self.current_path / Path("Build-Folder/")
|
||||
@property
|
||||
def opencore_release_folder(self): return self.build_path / Path(f"OpenCore-{self.opencore_build}-v{self.opencore_version}")
|
||||
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}-v{self.opencore_version}.zip")
|
||||
def opencore_zip_copied(self): return self.build_path / Path(f"OpenCore-{self.opencore_build}.zip")
|
||||
|
||||
@property
|
||||
def oc_folder(self): return self.opencore_release_folder / Path("EFI/OC/")
|
||||
@@ -138,17 +202,139 @@ class Constants:
|
||||
def pp_kext_folder(self): return self.kexts_path / Path("CPUFriendDataProvider.kext")
|
||||
@property
|
||||
def pp_contents_folder(self): return self.pp_kext_folder / Path("Contents")
|
||||
@property
|
||||
def agdp_kext_folder(self): return self.kexts_path / Path("AGDP-Override.kext")
|
||||
@property
|
||||
def agdp_contents_folder(self): return self.agdp_kext_folder / Path("Contents")
|
||||
@property
|
||||
def agpm_kext_folder(self): return self.kexts_path / Path("AGPM-Override.kext")
|
||||
@property
|
||||
def agpm_contents_folder(self): return self.agpm_kext_folder / Path("Contents")
|
||||
@property
|
||||
def amc_kext_folder(self): return self.kexts_path / Path("AMC-Override.kext")
|
||||
@property
|
||||
def amc_contents_folder(self): return self.amc_kext_folder / Path("Contents")
|
||||
|
||||
# Tools
|
||||
@property
|
||||
def macserial_path(self): return self.payload_path / Path("Tools/macserial")
|
||||
@property
|
||||
def gfxutil_path(self): return self.payload_path / Path("Tools/gfxutil")
|
||||
@property
|
||||
def vault_path(self): return self.payload_path / Path("Tools/CreateVault/sign.command")
|
||||
|
||||
# Icons
|
||||
@property
|
||||
def app_icon_path(self): return self.current_path / Path("OC-Patcher.icns")
|
||||
@property
|
||||
def icon_path(self): return self.payload_path / Path("Icon/.VolumeIcon.icns")
|
||||
def icon_path_external(self): return self.payload_path / Path("Icon/External/.VolumeIcon.icns")
|
||||
@property
|
||||
def icon_path_internal(self): return self.payload_path / Path("Icon/Internal/.VolumeIcon.icns")
|
||||
@property
|
||||
def icon_path_sd(self): return self.payload_path / Path("Icon/SD-Card/.VolumeIcon.icns")
|
||||
@property
|
||||
def icon_path_ssd(self): return self.payload_path / Path("Icon/SSD/.VolumeIcon.icns")
|
||||
@property
|
||||
def gui_path(self): return self.payload_path / Path("Icon/Resources.zip")
|
||||
|
||||
# Apple Payloads Paths
|
||||
@property
|
||||
def payload_apple_root_path_unzip(self): return self.payload_path / Path(f"Apple-Binaries-OCLP-{self.payload_version}")
|
||||
@property
|
||||
def payload_apple_root_path_zip(self): return self.payload_path / Path("Apple.zip")
|
||||
@property
|
||||
def payload_apple_root_path(self): return self.payload_path / Path("Apple")
|
||||
@property
|
||||
def payload_apple_kexts_path(self): return self.payload_apple_root_path / Path("Extensions")
|
||||
@property
|
||||
def payload_apple_frameworks_path(self): return self.payload_apple_root_path / Path("Frameworks")
|
||||
@property
|
||||
def payload_apple_frameworks_path_accel(self): return self.payload_apple_frameworks_path / Path("Graphics-Acceleration")
|
||||
@property
|
||||
def payload_apple_lauchd_path(self): return self.payload_apple_root_path / Path("LaunchDaemons")
|
||||
@property
|
||||
def payload_apple_lauchd_path_accel(self): return self.payload_apple_lauchd_path / Path("Graphics-Acceleration")
|
||||
@property
|
||||
def payload_apple_private_frameworks_path(self): return self.payload_apple_root_path / Path("PrivateFrameworks")
|
||||
@property
|
||||
def payload_apple_private_frameworks_path_accel(self): return self.payload_apple_private_frameworks_path / Path("Graphics-Acceleration")
|
||||
@property
|
||||
def payload_apple_private_frameworks_path_brightness(self): return self.payload_apple_private_frameworks_path / Path("Brightness-Control")
|
||||
|
||||
# Apple Extensions
|
||||
@property
|
||||
def applehda_path(self): return self.payload_apple_kexts_path / Path("Audio/AppleHDA.kext")
|
||||
|
||||
# GPU Kexts and Bundles
|
||||
|
||||
@property
|
||||
def legacy_graphics(self): return self.payload_apple_kexts_path / Path("Graphics-Acceleration")
|
||||
@property
|
||||
def legacy_nvidia_path(self): return self.legacy_graphics / Path("Nvidia-Tesla-Fermi")
|
||||
@property
|
||||
def legacy_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_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_brightness(self): return self.payload_apple_kexts_path / Path("Brightness-Control")
|
||||
|
||||
# Apple Frameworks
|
||||
@property
|
||||
def coredisplay_path(self): return self.payload_apple_frameworks_path_accel / Path("CoreDisplay.framework")
|
||||
@property
|
||||
def iosurface_f_path(self): return self.payload_apple_frameworks_path_accel / Path("IOSurface.framework")
|
||||
@property
|
||||
def opengl_path(self): return self.payload_apple_frameworks_path_accel / Path("OpenGL.framework")
|
||||
|
||||
# Apple LaunchDaemons
|
||||
@property
|
||||
def hiddhack_path(self): return self.payload_apple_lauchd_path_accel / Path("IOHID-Fixup.plist")
|
||||
@property
|
||||
def legacy_hiddhack_path(self): return self.payload_apple_lauchd_path_accel / Path("HiddHack.plist")
|
||||
|
||||
# Apple PrivateFrameworks
|
||||
@property
|
||||
def gpusupport_path(self): return self.payload_apple_private_frameworks_path_accel / Path("GPUSupport.framework")
|
||||
@property
|
||||
def skylight_path(self): return self.payload_apple_private_frameworks_path_accel / Path("SkyLight.framework")
|
||||
|
||||
csr_values = {
|
||||
"CSR_ALLOW_UNTRUSTED_KEXTS ": False, # 0x1 - Introduced in El Capitan
|
||||
"CSR_ALLOW_UNRESTRICTED_FS ": False, # 0x2 - Introduced in El Capitan
|
||||
"CSR_ALLOW_TASK_FOR_PID ": False, # 0x4 - Introduced in El Capitan
|
||||
"CSR_ALLOW_KERNEL_DEBUGGER ": False, # 0x8 - Introduced in El Capitan
|
||||
"CSR_ALLOW_APPLE_INTERNAL ": False, # 0x10 - Introduced in El Capitan
|
||||
"CSR_ALLOW_UNRESTRICTED_DTRACE ": False, # 0x20 - Introduced in El Capitan
|
||||
"CSR_ALLOW_UNRESTRICTED_NVRAM ": False, # 0x40 - Introduced in El Capitan
|
||||
"CSR_ALLOW_DEVICE_CONFIGURATION ": False, # 0x80 - Introduced in El Capitan
|
||||
"CSR_ALLOW_ANY_RECOVERY_OS ": False, # 0x100 - Introduced in Sierra
|
||||
"CSR_ALLOW_UNAPPROVED_KEXTS ": False, # 0x200 - Introduced in High Sierra
|
||||
"CSR_ALLOW_EXECUTABLE_POLICY_OVERRIDE": False, # 0x400 - Introduced in Mojave
|
||||
"CSR_ALLOW_UNAUTHENTICATED_ROOT ": False, # 0x800 - Introduced in Big Sur
|
||||
}
|
||||
|
||||
sbm_values = [
|
||||
"j137",
|
||||
"j680",
|
||||
"j132",
|
||||
"j174",
|
||||
"j140k",
|
||||
"j780",
|
||||
"j213",
|
||||
"j140a",
|
||||
"j152f",
|
||||
"j160",
|
||||
"j230k",
|
||||
"j214k",
|
||||
"j223",
|
||||
"j215",
|
||||
"j185",
|
||||
"j185f",
|
||||
]
|
||||
|
||||
403
Resources/SysPatch.py
Normal file
@@ -0,0 +1,403 @@
|
||||
# Framework for mounting and patching macOS root volume
|
||||
# Copyright (C) 2020-2021, Dhinak G, Mykola Grymalyuk
|
||||
# Missing Features:
|
||||
# - Full System/Library Snapshotting (need to research how Apple achieves this)
|
||||
# - Temporary Work-around: sudo bless --mount /System/Volumes/Update/mnt1 --bootefi --last-sealed-snapshot
|
||||
# - Work-around battery throttling on laptops with no battery (IOPlatformPluginFamily.kext/Contents/PlugIns/ACPI_SMC_PlatformPlugin.kext/Contents/Resources/)
|
||||
from __future__ import print_function
|
||||
|
||||
import binascii
|
||||
import plistlib
|
||||
import shutil
|
||||
import signal
|
||||
import subprocess
|
||||
import sys
|
||||
import uuid
|
||||
import zipfile
|
||||
import os
|
||||
from pathlib import Path
|
||||
from datetime import date
|
||||
|
||||
from Resources import Constants, ModelArray, Utilities
|
||||
|
||||
|
||||
class PatchSysVolume:
|
||||
def __init__(self, model, versions):
|
||||
self.model = model
|
||||
self.constants: Constants.Constants = versions
|
||||
|
||||
def hexswap(self, input_hex: str):
|
||||
hex_pairs = [input_hex[i:i + 2] for i in range(0, len(input_hex), 2)]
|
||||
hex_rev = hex_pairs[::-1]
|
||||
hex_str = "".join(["".join(x) for x in hex_rev])
|
||||
return hex_str.upper()
|
||||
|
||||
def csr_decode(self, sip_raw, print_status):
|
||||
sip_int = int.from_bytes(sip_raw, byteorder='little')
|
||||
i = 0
|
||||
for current_sip_bit in self.constants.csr_values:
|
||||
if sip_int & (1 << i):
|
||||
temp = True
|
||||
self.constants.csr_values[current_sip_bit] = True
|
||||
else:
|
||||
temp = False
|
||||
if print_status is True:
|
||||
print(f"- {current_sip_bit}\t {temp}")
|
||||
i = i + 1
|
||||
if ((self.constants.csr_values["CSR_ALLOW_UNTRUSTED_KEXTS "] is True) \
|
||||
and (self.constants.csr_values["CSR_ALLOW_UNRESTRICTED_FS "] is True) \
|
||||
and (self.constants.csr_values["CSR_ALLOW_UNRESTRICTED_DTRACE "] is True) \
|
||||
and (self.constants.csr_values["CSR_ALLOW_UNRESTRICTED_NVRAM "] is True) \
|
||||
and (self.constants.csr_values["CSR_ALLOW_DEVICE_CONFIGURATION "] is True) \
|
||||
and (self.constants.csr_values["CSR_ALLOW_UNAPPROVED_KEXTS "] is True) \
|
||||
and (self.constants.csr_values["CSR_ALLOW_EXECUTABLE_POLICY_OVERRIDE"] is True) \
|
||||
and (self.constants.csr_values["CSR_ALLOW_UNAUTHENTICATED_ROOT "] is True)):
|
||||
self.sip_patch_status = False
|
||||
else:
|
||||
self.sip_patch_status = True
|
||||
|
||||
def find_mount_root_vol(self, patch):
|
||||
root_partition_info = plistlib.loads(subprocess.run("diskutil info -plist /".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode())
|
||||
self.root_mount_path = root_partition_info["DeviceIdentifier"]
|
||||
self.mount_location = "/System/Volumes/Update/mnt1"
|
||||
self.mount_extensions = f"{self.mount_location}/System/Library/Extensions"
|
||||
self.mount_frameworks = f"{self.mount_location}/System/Library/Frameworks"
|
||||
self.mount_lauchd = f"{self.mount_location}/System/Library/LaunchDaemons"
|
||||
self.mount_private_frameworks = f"{self.mount_location}/System/Library/PrivateFrameworks"
|
||||
|
||||
if self.root_mount_path.startswith("disk"):
|
||||
self.root_mount_path = self.root_mount_path[:-2] if self.root_mount_path.endswith('s1') else self.root_mount_path
|
||||
print(f"- Found Root Volume at: {self.root_mount_path}")
|
||||
if Path(self.mount_extensions).exists():
|
||||
print("- Root Volume is already mounted")
|
||||
if patch is True:
|
||||
self.patch_root_vol()
|
||||
else:
|
||||
self.unpatch_root_vol()
|
||||
else:
|
||||
print("- Mounting drive as writable")
|
||||
subprocess.run(f"sudo mount -o nobrowse -t apfs /dev/{self.root_mount_path} {self.mount_location}".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
if Path(self.mount_extensions).exists():
|
||||
print("- Successfully mounted the Root Volume")
|
||||
if patch is True:
|
||||
self.patch_root_vol()
|
||||
else:
|
||||
self.unpatch_root_vol()
|
||||
else:
|
||||
print("- Failed to mount the Root Volume")
|
||||
else:
|
||||
print("- Could not find root volume")
|
||||
|
||||
def delete_old_binaries(self, vendor_patch):
|
||||
for delete_current_kext in vendor_patch:
|
||||
delete_path = Path(self.mount_extensions) / Path(delete_current_kext)
|
||||
if Path(delete_path).exists():
|
||||
print(f"- Deleting {delete_current_kext}")
|
||||
subprocess.run(f"sudo rm -R {delete_path}".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
else:
|
||||
print(f"- Couldn't find {delete_current_kext}, skipping")
|
||||
|
||||
def add_new_binaries(self, vendor_patch, vendor_location):
|
||||
for add_current_kext in vendor_patch:
|
||||
existing_path = Path(self.mount_extensions) / Path(add_current_kext)
|
||||
if Path(existing_path).exists():
|
||||
print(f"- Found conflicting kext, Deleting Root Volume's {add_current_kext}")
|
||||
subprocess.run(f"sudo rm -R {existing_path}".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
print(f"- Adding {add_current_kext}")
|
||||
subprocess.run(f"sudo cp -R {vendor_location}/{add_current_kext} {self.mount_extensions}".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
subprocess.run(f"sudo chmod -Rf 755 {self.mount_extensions}/{add_current_kext}".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
subprocess.run(f"sudo chown -Rf root:wheel {self.mount_extensions}/{add_current_kext}".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
else:
|
||||
print(f"- Adding {add_current_kext}")
|
||||
subprocess.run(f"sudo cp -R {vendor_location}/{add_current_kext} {self.mount_extensions}".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
subprocess.run(f"sudo chmod -Rf 755 {self.mount_extensions}/{add_current_kext}".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
subprocess.run(f"sudo chown -Rf root:wheel {self.mount_extensions}/{add_current_kext}".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
|
||||
def add_brightness_patch(self):
|
||||
print("- Merging legacy Brightness Control Patches")
|
||||
self.delete_old_binaries(ModelArray.DeleteBrightness)
|
||||
self.add_new_binaries(ModelArray.AddBrightness, self.constants.legacy_brightness)
|
||||
subprocess.run(f"sudo ditto {self.constants.payload_apple_private_frameworks_path_brightness} {self.mount_private_frameworks}".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
subprocess.run(f"sudo chmod -R 755 {self.mount_private_frameworks}/DisplayServices.framework".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
subprocess.run(f"sudo chown -R root:wheel {self.mount_private_frameworks}/DisplayServices.framework".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
|
||||
def check_pciid(self):
|
||||
try:
|
||||
self.igpu_devices = plistlib.loads(subprocess.run("ioreg -r -n IGPU -a".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode())
|
||||
self.igpu_devices = [i for i in self.igpu_devices if i["class-code"] == binascii.unhexlify("00000300")]
|
||||
self.igpu_vendor = self.hexswap(binascii.hexlify(self.igpu_devices[0]["vendor-id"]).decode()[:4])
|
||||
self.igpu_device = self.hexswap(binascii.hexlify(self.igpu_devices[0]["device-id"]).decode()[:4])
|
||||
print(f"- Detected iGPU: {self.igpu_vendor}:{self.igpu_device}")
|
||||
except ValueError:
|
||||
print("- No iGPU detected")
|
||||
self.igpu_devices = ""
|
||||
|
||||
try:
|
||||
self.dgpu_devices = plistlib.loads(subprocess.run("ioreg -r -n GFX0 -a".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode())
|
||||
self.dgpu_devices = [i for i in self.dgpu_devices if i["class-code"] == binascii.unhexlify("00000300")]
|
||||
self.dgpu_vendor = self.hexswap(binascii.hexlify(self.dgpu_devices[0]["vendor-id"]).decode()[:4])
|
||||
self.dgpu_device = self.hexswap(binascii.hexlify(self.dgpu_devices[0]["device-id"]).decode()[:4])
|
||||
try:
|
||||
self.nvidia_arch = self.dgpu_devices[0]["NVArch"]
|
||||
except KeyError:
|
||||
self.nvidia_arch = ""
|
||||
print(f"- Detected dGPU: {self.dgpu_vendor}:{self.dgpu_device}")
|
||||
except ValueError:
|
||||
print("- No dGPU detected")
|
||||
self.dgpu_devices = ""
|
||||
|
||||
def gpu_accel_patches_11(self):
|
||||
if self.dgpu_devices:
|
||||
if self.dgpu_vendor == self.constants.pci_nvidia:
|
||||
if self.nvidia_arch == self.constants.arch_kepler and self.constants.assume_legacy is True and self.constants.detected_os > self.constants.big_sur:
|
||||
print("- Merging legacy Nvidia Kepler Kexts and Bundles")
|
||||
self.add_new_binaries(ModelArray.AddNvidiaKeplerAccel11, self.constants.legacy_nvidia_kepler_path)
|
||||
else:
|
||||
print("- Merging legacy Nvidia Telsa and Fermi Kexts and Bundles")
|
||||
self.delete_old_binaries(ModelArray.DeleteNvidiaAccel11)
|
||||
self.add_new_binaries(ModelArray.AddNvidiaAccel11, self.constants.legacy_nvidia_path)
|
||||
elif self.dgpu_vendor == self.constants.pci_amd_ati:
|
||||
print("- Merging legacy AMD Kexts and Bundles")
|
||||
self.delete_old_binaries(ModelArray.DeleteAMDAccel11)
|
||||
self.add_new_binaries(ModelArray.AddAMDAccel11, self.constants.legacy_amd_path)
|
||||
if self.igpu_devices:
|
||||
if self.igpu_vendor == self.constants.pci_intel:
|
||||
if self.igpu_device in ModelArray.IronLakepciid:
|
||||
print("- Merging legacy Intel 1st Gen Kexts and Bundles")
|
||||
self.delete_old_binaries(ModelArray.DeleteNvidiaAccel11)
|
||||
self.add_new_binaries(ModelArray.AddIntelGen1Accel, self.constants.legacy_intel_gen1_path)
|
||||
elif self.igpu_device in ModelArray.SandyBridgepiciid:
|
||||
print("- Merging legacy Intel 2nd Gen Kexts and Bundles")
|
||||
self.delete_old_binaries(ModelArray.DeleteNvidiaAccel11)
|
||||
self.add_new_binaries(ModelArray.AddIntelGen2Accel, self.constants.legacy_intel_gen2_path)
|
||||
#if self.model in ModelArray.LegacyGPUAMDIntelGen2:
|
||||
# Swap custom AppleIntelSNBGraphicsFB-AMD.kext, required to fix linking
|
||||
# subprocess.run(f"sudo rm -R {self.mount_extensions}/AppleIntelSNBGraphicsFB.kext".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
# subprocess.run(f"sudo cp -R {self.constants.legacy_amd_path}/AMD-Link/AppleIntelSNBGraphicsFB.kext {self.mount_extensions}".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
|
||||
# Code for when Ivy Bridge binares are presumably removed from macOS 12, code currently
|
||||
#elif self.igpu_device in ModelArray.IvyBridgepciid:
|
||||
# print("- Merging legacy Intel 3rd Gen Kexts and Bundles")
|
||||
# self.add_new_binaries(ModelArray.AddIntelGen3Accel, self.constants.legacy_intel_gen3_path)
|
||||
elif self.igpu_vendor == self.constants.pci_nvidia:
|
||||
if not self.dgpu_devices:
|
||||
# Avoid patching twice, as Nvidia iGPUs will only have Nvidia dGPUs
|
||||
print("- Merging legacy Nvidia Kexts and Bundles")
|
||||
self.delete_old_binaries(ModelArray.DeleteNvidiaAccel11)
|
||||
self.add_new_binaries(ModelArray.AddNvidiaAccel11, self.constants.legacy_nvidia_path)
|
||||
|
||||
# Frameworks
|
||||
print("- Merging legacy Frameworks")
|
||||
subprocess.run(f"sudo ditto {self.constants.payload_apple_frameworks_path_accel} {self.mount_frameworks}".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
|
||||
if self.model in ModelArray.LegacyBrightness:
|
||||
self.add_brightness_patch()
|
||||
|
||||
# LaunchDaemons
|
||||
if Path(self.mount_lauchd / Path("HiddHack.plist")).exists():
|
||||
print("- Removing legacy HiddHack")
|
||||
subprocess.run(f"sudo rm {self.mount_lauchd}/HiddHack.plist".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
print("- Adding IOHID-Fixup.plist")
|
||||
subprocess.run(f"sudo ditto {self.constants.payload_apple_lauchd_path_accel} {self.mount_lauchd}".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
subprocess.run(f"sudo chmod 755 {self.mount_lauchd}/IOHID-Fixup.plist".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
subprocess.run(f"sudo chown root:wheel {self.mount_lauchd}/IOHID-Fixup.plist".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
|
||||
# PrivateFrameworks
|
||||
print("- Merging legacy PrivateFrameworks")
|
||||
subprocess.run(f"sudo ditto {self.constants.payload_apple_private_frameworks_path_accel} {self.mount_private_frameworks}".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
|
||||
# Sets AppKit to Catalina Window Drawing codepath
|
||||
# Disabled upon ASentientBot request
|
||||
print("- Enabling NSDefenestratorModeEnabled")
|
||||
subprocess.run("defaults write -g NSDefenestratorModeEnabled -bool true".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
|
||||
def patch_root_vol(self):
|
||||
print(f"- Detecting patches for {self.model}")
|
||||
rebuild_required = False
|
||||
# TODO: Create Backup of S*/L*/Extensions, Frameworks and PrivateFramework to easily revert changes
|
||||
# APFS snapshotting seems to ignore System Volume changes inconsistently, would like a backup to avoid total brick
|
||||
# Perhaps a basic py2 script to run in recovery to restore
|
||||
# Ensures no .DS_Stores got in
|
||||
print("- Preparing Files")
|
||||
subprocess.run(f"sudo find {self.constants.payload_apple_root_path} -name '.DS_Store' -delete".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
|
||||
if self.model in ModelArray.LegacyGPU or self.constants.assume_legacy is True:
|
||||
self.check_pciid()
|
||||
if self.dgpu_devices and self.dgpu_vendor == self.constants.pci_amd_ati and self.dgpu_device in ModelArray.AMDMXMGPUs:
|
||||
print("- Detected Metal-based AMD GPU, skipping legacy patches")
|
||||
elif self.dgpu_devices and self.dgpu_vendor == self.constants.pci_nvidia and self.dgpu_device in ModelArray.NVIDIAMXMGPUs:
|
||||
print("- Detected Metal-based Nvidia GPU, skipping legacy patches")
|
||||
else:
|
||||
print("- Detected legacy GPU, attempting legacy acceleration patches")
|
||||
self.gpu_accel_patches_11()
|
||||
rebuild_required = True
|
||||
|
||||
if rebuild_required is True:
|
||||
self.rebuild_snapshot()
|
||||
|
||||
def unpatch_root_vol(self):
|
||||
print("- Reverting to last signed APFS snapshot")
|
||||
subprocess.run(f"sudo bless --mount {self.mount_location} --bootefi --last-sealed-snapshot".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
|
||||
def rebuild_snapshot(self):
|
||||
if self.constants.gui_mode is False:
|
||||
input("Press [ENTER] to continue with cache rebuild")
|
||||
print("- Rebuilding Kernel Cache (This may take some time)")
|
||||
result = subprocess.run(f"sudo kmutil install --volume-root {self.mount_location} --update-all".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
|
||||
if result.returncode != 0:
|
||||
self.sucess_status = False
|
||||
print("- Unable to build new kernel cache")
|
||||
print("\nPlease report this to Github")
|
||||
print("Reason for Patch Failure:")
|
||||
print(result.stdout.decode())
|
||||
print("")
|
||||
else:
|
||||
self.sucess_status = True
|
||||
print("- Successfully built new kernel cache")
|
||||
if self.constants.gui_mode is False:
|
||||
input("Press [ENTER] to continue with snapshotting")
|
||||
print("- Creating new APFS snapshot")
|
||||
subprocess.run(f"sudo bless --folder {self.mount_location}/System/Library/CoreServices --bootefi --create-snapshot".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
|
||||
def unmount_drive(self):
|
||||
print("- Unmounting Root Volume (Don't worry if this fails)")
|
||||
subprocess.run(f"sudo diskutil unmount {self.root_mount_path}".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
|
||||
def check_status(self):
|
||||
nvram_dump = plistlib.loads(subprocess.run("nvram -x -p".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode())
|
||||
try:
|
||||
self.sip_status = nvram_dump["csr-active-config"]
|
||||
except KeyError:
|
||||
self.sip_status = b'\x00\x00\x00\x00'
|
||||
|
||||
self.smb_model: str = subprocess.run("nvram 94B73556-2197-4702-82A8-3E1337DAFBFB:HardwareModel ".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.decode()
|
||||
if not self.smb_model.startswith("nvram: Error getting variable"):
|
||||
self.smb_model = [line.strip().split(":HardwareModel ", 1)[1] for line in self.smb_model.split("\n") if line.strip().startswith("94B73556-2197-4702-82A8-3E1337DAFBFB:")][0]
|
||||
if self.smb_model.startswith("j137"):
|
||||
self.smb_status = True
|
||||
else:
|
||||
self.smb_status = False
|
||||
else:
|
||||
self.smb_status = False
|
||||
self.fv_status = True
|
||||
self.fv_status: str = subprocess.run("fdesetup status".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.decode()
|
||||
if self.fv_status.startswith("FileVault is Off"):
|
||||
self.fv_status = False
|
||||
else:
|
||||
self.fv_status = True
|
||||
self.sip_patch_status = True
|
||||
self.csr_decode(self.sip_status, False)
|
||||
|
||||
def check_files(self):
|
||||
if Path(self.constants.payload_apple_root_path).exists():
|
||||
print("- Found Apple Binaries")
|
||||
if self.constants.gui_mode is False:
|
||||
patch_input = input("Would you like to redownload?(y/n): ")
|
||||
if patch_input in {"y", "Y", "yes", "Yes"}:
|
||||
shutil.rmtree(Path(self.constants.payload_apple_root_path))
|
||||
self.download_files()
|
||||
else:
|
||||
self.download_files()
|
||||
else:
|
||||
print("- Apple binaries missing")
|
||||
self.download_files()
|
||||
|
||||
def download_files(self):
|
||||
Utilities.cls()
|
||||
print("- Downloading Apple binaries")
|
||||
popen_oclp = subprocess.Popen(f"curl -S -L {self.constants.url_apple_binaries}{self.constants.payload_version}.zip --output {self.constants.payload_apple_root_path_zip}".split(), stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, universal_newlines=True)
|
||||
for stdout_line in iter(popen_oclp.stdout.readline, ""):
|
||||
print(stdout_line, end="")
|
||||
popen_oclp.stdout.close()
|
||||
if self.constants.payload_apple_root_path_zip.exists():
|
||||
print("- Download completed")
|
||||
print("- Unzipping download...")
|
||||
try:
|
||||
subprocess.run(f"unzip {self.constants.payload_apple_root_path_zip}".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT, cwd=self.constants.payload_path).stdout.decode()
|
||||
print("- Renaming folder")
|
||||
os.rename(self.constants.payload_apple_root_path_unzip, self.constants.payload_apple_root_path)
|
||||
print("- Binaries downloaded to:")
|
||||
print(self.constants.payload_path)
|
||||
if self.constants.gui_mode is False:
|
||||
input("Press [ENTER] to continue")
|
||||
except zipfile.BadZipFile:
|
||||
print("- Couldn't unzip")
|
||||
os.remove(self.constants.payload_apple_root_path_zip)
|
||||
else:
|
||||
print("- Download failed, please verify the below link works:")
|
||||
print(self.constants.url_apple_binaries)
|
||||
|
||||
def start_patch(self):
|
||||
# Check SIP
|
||||
if self.constants.custom_model is not None:
|
||||
print("Root Patching must be done on target machine!")
|
||||
elif self.model in ModelArray.NoRootPatch11 and self.constants.assume_legacy is False:
|
||||
print("Root Patching not required for this machine!")
|
||||
elif self.model not in ModelArray.SupportedSMBIOS11:
|
||||
print("Cannot run on this machine, model is unsupported!")
|
||||
elif self.constants.detected_os < self.constants.big_sur:
|
||||
print(f"Cannot run on this OS, requires macOS 11!")
|
||||
else:
|
||||
self.check_status()
|
||||
Utilities.cls()
|
||||
if (self.sip_patch_status is False) and (self.smb_status is False):
|
||||
print("- Detected SIP and SecureBootModel are disabled, continuing")
|
||||
if self.constants.gui_mode is False:
|
||||
input("\nPress [ENTER] to continue")
|
||||
self.check_files()
|
||||
if self.constants.payload_apple_root_path.exists():
|
||||
self.find_mount_root_vol(True)
|
||||
self.unmount_drive()
|
||||
print("- Patching complete")
|
||||
if self.sucess_status is True:
|
||||
print("\nPlease reboot the machine for patches to take effect")
|
||||
else:
|
||||
print("\nPlease reboot the machine to avoid potential issues rerunning the patcher")
|
||||
if self.sip_patch_status is True:
|
||||
print("SIP set incorrectly, cannot patch on this machine!")
|
||||
print("Please disable SIP and SecureBootModel in Patcher Settings")
|
||||
self.csr_decode(self.sip_status, True)
|
||||
print("")
|
||||
if self.smb_status is True:
|
||||
print("SecureBootModel set incorrectly, unable to patch!")
|
||||
print("Please disable SecureBootModel in Patcher Settings")
|
||||
print("")
|
||||
if self.fv_status is True:
|
||||
print("FileVault enabled, unable to patch!")
|
||||
print("Please disable FileVault in System Preferences")
|
||||
print("")
|
||||
if self.constants.gui_mode is False:
|
||||
input("Press [Enter] to go exit.")
|
||||
|
||||
def start_unpatch(self):
|
||||
if self.constants.custom_model is not None:
|
||||
print("Unpatching must be done on target machine!")
|
||||
elif self.constants.detected_os < self.constants.big_sur:
|
||||
print(f"Cannot run on this OS, requires macOS 11!")
|
||||
else:
|
||||
self.check_status()
|
||||
Utilities.cls()
|
||||
if (self.sip_patch_status is False) and (self.smb_status is False):
|
||||
print("- Detected SIP and SecureBootModel are disabled, continuing")
|
||||
if self.constants.gui_mode is False:
|
||||
input("\nPress [ENTER] to continue")
|
||||
self.find_mount_root_vol(False)
|
||||
self.unmount_drive()
|
||||
print("- Unpatching complete")
|
||||
print("\nPlease reboot the machine for patches to take effect")
|
||||
if self.sip_patch_status is True:
|
||||
print("SIP set incorrectly, cannot unpatch on this machine!")
|
||||
print("Please disable SIP and SecureBootModel in Patcher Settings")
|
||||
self.csr_decode(self.sip_status, True)
|
||||
print("")
|
||||
if self.smb_status is True:
|
||||
print("SecureBootModel set incorrectly, unable to unpatch!")
|
||||
print("Please disable SecureBootModel in Patcher Settings")
|
||||
print("")
|
||||
if self.fv_status is True:
|
||||
print("FileVault enabled, unable to unpatch!")
|
||||
print("Please disable FileVault in System Preferences")
|
||||
print("")
|
||||
if self.constants.gui_mode is False:
|
||||
input("Press [Enter] to go exit.")
|
||||
@@ -1,3 +1,4 @@
|
||||
# Copyright (C) 2020-2021, Dhinak G
|
||||
from __future__ import print_function
|
||||
|
||||
import os
|
||||
@@ -1,562 +0,0 @@
|
||||
# Commands for building the EFI and SMBIOS
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import binascii
|
||||
import plistlib
|
||||
import shutil
|
||||
import subprocess
|
||||
import uuid
|
||||
import zipfile
|
||||
from pathlib import Path
|
||||
from datetime import date
|
||||
|
||||
from Resources import Constants, ModelArray, utilities
|
||||
|
||||
|
||||
def human_fmt(num):
|
||||
for unit in ["B", "KB", "MB", "GB", "TB", "PB"]:
|
||||
if abs(num) < 1000.0:
|
||||
return "%3.1f %s" % (num, unit)
|
||||
num /= 1000.0
|
||||
return "%.1f %s" % (num, "EB")
|
||||
|
||||
|
||||
def rmtree_handler(func, path, exc_info):
|
||||
if exc_info[0] == FileNotFoundError:
|
||||
return
|
||||
raise # pylint: disable=misplaced-bare-raise
|
||||
|
||||
|
||||
class BuildOpenCore:
|
||||
def __init__(self, model, versions):
|
||||
self.model = model
|
||||
self.config = None
|
||||
self.constants: Constants.Constants = versions
|
||||
|
||||
def hexswap(self, input_hex: str):
|
||||
hex_pairs = [input_hex[i:i + 2] for i in range(0, len(input_hex), 2)]
|
||||
hex_rev = hex_pairs[::-1]
|
||||
hex_str = "".join(["".join(x) for x in hex_rev])
|
||||
return hex_str.upper()
|
||||
|
||||
def build_efi(self):
|
||||
utilities.cls()
|
||||
if not Path(self.constants.build_path).exists():
|
||||
Path(self.constants.build_path).mkdir()
|
||||
print("Created build folder")
|
||||
else:
|
||||
print("Build folder already present, skipping")
|
||||
|
||||
if Path(self.constants.opencore_zip_copied).exists():
|
||||
print("Deleting old copy of OpenCore zip")
|
||||
Path(self.constants.opencore_zip_copied).unlink()
|
||||
if Path(self.constants.opencore_release_folder).exists():
|
||||
print("Deleting old copy of OpenCore folder")
|
||||
shutil.rmtree(self.constants.opencore_release_folder, onerror=rmtree_handler)
|
||||
|
||||
print()
|
||||
print(f"- Adding OpenCore v{self.constants.opencore_version} {self.constants.opencore_build}")
|
||||
shutil.copy(self.constants.opencore_zip_source, self.constants.build_path)
|
||||
zipfile.ZipFile(self.constants.opencore_zip_copied).extractall(self.constants.build_path)
|
||||
|
||||
print("- Adding config.plist for OpenCore")
|
||||
# Setup config.plist for editing
|
||||
shutil.copy(self.constants.plist_template, self.constants.oc_folder)
|
||||
self.config = plistlib.load(Path(self.constants.plist_path).open("rb"))
|
||||
|
||||
# Set revision in config
|
||||
self.config["#Revision"]["Build-Version"] = f"{self.constants.patcher_version} - {date.today()}"
|
||||
self.config["#Revision"]["OpenCore-Version"] = f"{self.constants.opencore_version} - {self.constants.opencore_build} - {self.constants.opencore_commit}"
|
||||
self.config["#Revision"]["Original-Model"] = self.model
|
||||
self.config["NVRAM"]["Add"]["4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102"]["OCLP-Version"] = f"{self.constants.patcher_version}"
|
||||
|
||||
for name, version, path, check in [
|
||||
# Essential kexts
|
||||
("Lilu.kext", self.constants.lilu_version, self.constants.lilu_path, lambda: True),
|
||||
("WhateverGreen.kext", self.constants.whatevergreen_version, self.constants.whatevergreen_path, lambda: True),
|
||||
("RestrictEvents.kext", self.constants.restrictevents_version, self.constants.restrictevents_path, lambda: self.model in ModelArray.MacPro71),
|
||||
("NightShiftEnabler.kext", self.constants.nightshift_version, self.constants.nightshift_path, lambda: self.model not in ModelArray.NightShiftExclude),
|
||||
# CPU patches
|
||||
("AppleMCEReporterDisabler.kext", self.constants.mce_version, self.constants.mce_path, lambda: self.model in ModelArray.DualSocket),
|
||||
("AAAMouSSE.kext", self.constants.mousse_version, self.constants.mousse_path, lambda: self.model in ModelArray.SSEEmulator),
|
||||
("telemetrap.kext", self.constants.telemetrap_version, self.constants.telemetrap_path, lambda: self.model in ModelArray.MissingSSE42),
|
||||
("CPUFriend.kext", self.constants.cpufriend_version, self.constants.cpufriend_path, lambda: self.model in ModelArray.X86PP),
|
||||
# Ethernet patches
|
||||
("nForceEthernet.kext", self.constants.nforce_version, self.constants.nforce_path, lambda: self.model in ModelArray.EthernetNvidia),
|
||||
("MarvelYukonEthernet.kext", self.constants.marvel_version, self.constants.marvel_path, lambda: self.model in ModelArray.EthernetMarvell),
|
||||
("CatalinaBCM5701Ethernet.kext", self.constants.bcm570_version, self.constants.bcm570_path, lambda: self.model in ModelArray.EthernetBroadcom),
|
||||
# Legacy audio
|
||||
("VoodooHDA.kext", self.constants.voodoohda_version, self.constants.voodoohda_path, lambda: self.model in ModelArray.LegacyAudio),
|
||||
# IDE patch
|
||||
("AppleIntelPIIXATA.kext", self.constants.piixata_version, self.constants.piixata_path, lambda: self.model in ModelArray.IDEPatch),
|
||||
]:
|
||||
self.enable_kext(name, version, path, check)
|
||||
|
||||
# WiFi patches
|
||||
# TODO: -a is not supported in Lion and older, need to add proper fix
|
||||
wifi_devices = plistlib.loads(subprocess.run("ioreg -c IOPCIDevice -r -d2 -a".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode())
|
||||
wifi_devices = [i for i in wifi_devices if i["vendor-id"] == binascii.unhexlify("E4140000") and i["class-code"] == binascii.unhexlify("00800200")]
|
||||
if self.constants.wifi_build is True:
|
||||
print("- Skipping Wifi patches on request")
|
||||
elif not self.constants.custom_model and wifi_devices and self.hexswap(binascii.hexlify(wifi_devices[0]["device-id"]).decode()[:4]) in ModelArray.nativeWifi:
|
||||
print("- Found supported WiFi card, skipping wifi patches")
|
||||
else:
|
||||
if self.model in ModelArray.WifiAtheros:
|
||||
self.enable_kext("IO80211HighSierra.kext", self.constants.io80211high_sierra_version, self.constants.io80211high_sierra_path)
|
||||
self.get_kext_by_bundle_path("IO80211HighSierra.kext/Contents/PlugIns/AirPortAtheros40.kext")["Enabled"] = True
|
||||
|
||||
if self.model in ModelArray.WifiBCM94331:
|
||||
self.enable_kext("AirportBrcmFixup.kext", self.constants.airportbcrmfixup_version, self.constants.airportbcrmfixup_path)
|
||||
self.get_kext_by_bundle_path("AirportBrcmFixup.kext/Contents/PlugIns/AirPortBrcmNIC_Injector.kext")["Enabled"] = True
|
||||
|
||||
if self.model in ModelArray.EthernetNvidia:
|
||||
# Nvidia chipsets all have the same path to ARPT
|
||||
property_path = "PciRoot(0x0)/Pci(0x15,0x0)/Pci(0x0,0x0)"
|
||||
if self.model in ("MacBookAir2,1", "MacBookAir3,1", "MacBookAir3,2"):
|
||||
property_path = "PciRoot(0x0)/Pci(0x15,0x0)/Pci(0x0,0x0)"
|
||||
elif self.model in ("iMac7,1", "iMac8,1"):
|
||||
property_path = "PciRoot(0x0)/Pci(0x1C,0x4)/Pci(0x0,0x0)"
|
||||
elif self.model in ("iMac13,1", "iMac13,2"):
|
||||
property_path = "PciRoot(0x0)/Pci(0x1C,0x3)/Pci(0x0,0x0)"
|
||||
elif self.model == "MacPro5,1":
|
||||
property_path = "PciRoot(0x0)/Pci(0x1C,0x5)/Pci(0x0,0x0)"
|
||||
else:
|
||||
# Assumes we have a laptop with Intel chipset
|
||||
property_path = "PciRoot(0x0)/Pci(0x1C,0x1)/Pci(0x0,0x0)"
|
||||
print("- Applying fake ID for WiFi")
|
||||
self.config["DeviceProperties"]["Add"][property_path] = {"device-id": binascii.unhexlify("ba430000"), "compatible": "pci14e4,43ba"}
|
||||
|
||||
# CPUFriend
|
||||
pp_map_path = Path(self.constants.current_path) / Path(f"payloads/Kexts/PlatformPlugin/{self.model}/Info.plist")
|
||||
if self.model in ModelArray.X86PP:
|
||||
Path(self.constants.pp_kext_folder).mkdir()
|
||||
Path(self.constants.pp_contents_folder).mkdir()
|
||||
shutil.copy(pp_map_path, self.constants.pp_contents_folder)
|
||||
self.get_kext_by_bundle_path("CPUFriendDataProvider.kext")["Enabled"] = True
|
||||
|
||||
# HID patches
|
||||
if self.model in ModelArray.LegacyHID:
|
||||
print("- Adding IOHIDFamily patch")
|
||||
self.get_item_by_kv(self.config["Kernel"]["Patch"], "Identifier", "com.apple.iokit.IOHIDFamily")["Enabled"] = True
|
||||
|
||||
# SSDT patches
|
||||
if self.model in ModelArray.pciSSDT:
|
||||
print("- Adding SSDT-CPBG.aml")
|
||||
self.get_item_by_kv(self.config["ACPI"]["Add"], "Path", "SSDT-CPBG.aml")["Enabled"] = True
|
||||
|
||||
# USB Map
|
||||
usb_map_path = Path(self.constants.current_path) / Path(f"payloads/Kexts/Maps/Universal/Info.plist")
|
||||
if usb_map_path.exists():
|
||||
print(f"- Adding USB-Map.kext")
|
||||
Path(self.constants.map_kext_folder).mkdir()
|
||||
Path(self.constants.map_contents_folder).mkdir()
|
||||
shutil.copy(usb_map_path, self.constants.map_contents_folder)
|
||||
self.get_kext_by_bundle_path("USB-Map.kext")["Enabled"] = True
|
||||
|
||||
# AGPM Patch
|
||||
if self.model in ModelArray.DualGPUPatch:
|
||||
print("- Adding dual GPU patch")
|
||||
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " agdpmod=pikera"
|
||||
|
||||
# HiDPI OpenCanopy and FileVault
|
||||
if self.model in ModelArray.HiDPIpicker:
|
||||
print("- Setting HiDPI picker")
|
||||
self.config["NVRAM"]["Add"]["4D1EDE05-38C7-4A6A-9CC6-4BCCA8B38C14"]["UIScale"] = binascii.unhexlify("02")
|
||||
|
||||
|
||||
def nvidia_patch(self):
|
||||
self.constants.custom_mxm_gpu = True
|
||||
print("- Adding Nvidia Brightness Control patches")
|
||||
if self.model in ["iMac11,1", "iMac11,2", "iMac11,3"]:
|
||||
backlight_path = "PciRoot(0x0)/Pci(0x3,0x0)/Pci(0x0,0x0)"
|
||||
self.config["DeviceProperties"]["Add"][backlight_path] = {"@0,backlight-control": binascii.unhexlify("01000000"), "@0,built-in": binascii.unhexlify("01000000")}
|
||||
shutil.copy(self.constants.backlight_path, self.constants.kexts_path)
|
||||
self.get_kext_by_bundle_path("AppleBacklightFixup.kext")["Enabled"] = True
|
||||
elif self.model in ["iMac12,1", "iMac12,2"]:
|
||||
backlight_path = "PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)"
|
||||
self.config["DeviceProperties"]["Add"][backlight_path] = {"@0,backlight-control": binascii.unhexlify("01000000"), "@0,built-in": binascii.unhexlify("01000000")}
|
||||
print("- Disabling unsupported iGPU")
|
||||
self.config["DeviceProperties"]["Add"]["PciRoot(0x0)/Pci(0x2,0x0)"] = {"name": binascii.unhexlify("23646973706C6179"), "IOName": "#display", "class-code": binascii.unhexlify("FFFFFFFF")}
|
||||
else:
|
||||
print("- Failed to determine model")
|
||||
|
||||
def amd_patch(self):
|
||||
self.constants.custom_mxm_gpu = True
|
||||
print("- Adding AMD DRM patches")
|
||||
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " shikigva=80 unfairgva=1"
|
||||
if self.model in ["iMac12,1", "iMac12,2"]:
|
||||
print("- Disabling unsupported iGPU")
|
||||
self.config["DeviceProperties"]["Add"]["PciRoot(0x0)/Pci(0x2,0x0)"] = {"name": binascii.unhexlify("23646973706C6179"), "IOName": "#display", "class-code": binascii.unhexlify("FFFFFFFF")}
|
||||
|
||||
|
||||
# Check GPU Vendor
|
||||
if self.constants.metal_build is True:
|
||||
print("- Adding Metal GPU patches on request")
|
||||
if self.constants.imac_vendor == "AMD":
|
||||
amd_patch(self)
|
||||
elif self.constants.imac_vendor == "Nvidia":
|
||||
nvidia_patch(self)
|
||||
else:
|
||||
print("- Failed to find vendor")
|
||||
elif self.constants.custom_model == "None":
|
||||
current_gpu: str = subprocess.run("system_profiler SPDisplaysDataType".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.decode()
|
||||
self.constants.current_gpuv = [line.strip().split(": ", 1)[1] for line in current_gpu.split("\n") if line.strip().startswith(("Vendor"))][0]
|
||||
self.constants.current_gpud = [line.strip().split(": ", 1)[1] for line in current_gpu.split("\n") if line.strip().startswith(("Device ID"))][0]
|
||||
print(f"- Detected GPU: {self.constants.current_gpuv} {self.constants.current_gpud}")
|
||||
if (self.constants.current_gpuv == "AMD (0x1002)") & (self.constants.current_gpud in ModelArray.AMDMXMGPUs):
|
||||
amd_patch(self)
|
||||
elif (self.constants.current_gpuv == "NVIDIA (0x10de)") & (self.constants.current_gpud in ModelArray.NVIDIAMXMGPUs):
|
||||
nvidia_patch(self)
|
||||
|
||||
# Add OpenCanopy
|
||||
print("- Adding OpenCanopy GUI")
|
||||
shutil.rmtree(self.constants.resources_path, onerror=rmtree_handler)
|
||||
shutil.copy(self.constants.gui_path, self.constants.oc_folder)
|
||||
self.config["UEFI"]["Drivers"] = ["OpenCanopy.efi", "OpenRuntime.efi"]
|
||||
|
||||
# Add UGA to GOP layer
|
||||
if self.model in ModelArray.UGAtoGOP:
|
||||
print("- Adding UGA to GOP Patch")
|
||||
self.config["UEFI"]["ProtocolOverrides"]["GopPassThrough"] = True
|
||||
|
||||
# ThridPartDrives Check
|
||||
if self.model not in ModelArray.NoSATAPatch:
|
||||
print("- Adding SATA Hibernation Patch")
|
||||
self.config["Kernel"]["Quirks"]["ThirdPartyDrives"] = True
|
||||
|
||||
#DEBUG Settings
|
||||
if self.constants.verbose_debug is True:
|
||||
print("- Enabling Verbose boot")
|
||||
self.config["Kernel"]["Quirks"]["PanicNoKextDump"] = True
|
||||
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " -v"
|
||||
if self.constants.kext_debug is True:
|
||||
print("- Enabling DEBUG Kexts")
|
||||
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " -liludbgall"
|
||||
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " msgbuf=1048576"
|
||||
if self.constants.opencore_debug is True:
|
||||
print("- Enabling DEBUG OpenCore")
|
||||
self.config["Misc"]["Debug"]["Target"] = 67
|
||||
if self.constants.showpicker is True:
|
||||
print("- Enabling ShowPicker")
|
||||
self.config["Misc"]["Boot"]["ShowPicker"] = True
|
||||
else:
|
||||
print("- Hiding picker and enabling PollAppleHotKeys")
|
||||
self.config["Misc"]["Boot"]["ShowPicker"] = False
|
||||
self.config["Misc"]["Boot"]["PollAppleHotKeys"] = True
|
||||
if self.constants.vault is True:
|
||||
print("- Setting Vault configuration")
|
||||
self.config["Misc"]["Security"]["Vault"] = "Secure"
|
||||
self.get_tool_by__path("OpenShell.efi")["Enabled"] = False
|
||||
if self.constants.sip_status is False:
|
||||
print("- Disabling SIP")
|
||||
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["csr-active-config"] = binascii.unhexlify("FF0F0000")
|
||||
self.config["NVRAM"]["Delete"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"] += ["csr-active-config"]
|
||||
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " amfi_get_out_of_my_way=1"
|
||||
if self.constants.secure_status is False:
|
||||
print("- Disabling SecureBootModel")
|
||||
self.config["Misc"]["Security"]["SecureBootModel"] = "Disabled"
|
||||
|
||||
def set_smbios(self):
|
||||
spoofed_model = self.model
|
||||
# TODO: Set check as global variable
|
||||
if self.model in ModelArray.MacBookAir61:
|
||||
print("- Spoofing to MacBookAir6,1")
|
||||
spoofed_model = "MacBookAir6,1"
|
||||
spoofed_board = "Mac-35C1E88140C3E6CF"
|
||||
elif self.model in ModelArray.MacBookAir62:
|
||||
print("- Spoofing to MacBookAir6,2")
|
||||
spoofed_model = "MacBookAir6,2"
|
||||
spoofed_board = "Mac-7DF21CB3ED6977E5"
|
||||
elif self.model in ModelArray.MacBookPro111:
|
||||
print("- Spoofing to MacBookPro11,1")
|
||||
spoofed_model = "MacBookPro11,1"
|
||||
spoofed_board = "Mac-189A3D4F975D5FFC"
|
||||
elif self.model in ModelArray.MacBookPro113:
|
||||
print("- Spoofing to MacBookPro11,3")
|
||||
spoofed_model = "MacBookPro11,3"
|
||||
spoofed_board = "Mac-2BD1B31983FE1663"
|
||||
elif self.model in ModelArray.Macmini71:
|
||||
print("- Spoofing to Macmini7,1")
|
||||
spoofed_model = "Macmini7,1"
|
||||
spoofed_board = "Mac-35C5E08120C7EEAF"
|
||||
elif self.model in ModelArray.iMac151:
|
||||
# Check for upgraded GPUs on iMacs
|
||||
if self.constants.metal_build is True:
|
||||
print("- Spoofing to iMacPro1,1")
|
||||
spoofed_model = "iMacPro1,1"
|
||||
spoofed_board = "Mac-7BA5B2D9E42DDD94"
|
||||
elif (self.constants.current_gpuv == "AMD (0x1002)") & (self.constants.current_gpud in ModelArray.AMDMXMGPUs) & (self.constants.custom_model == "None"):
|
||||
print("- Spoofing to iMacPro1,1")
|
||||
spoofed_model = "iMacPro1,1"
|
||||
spoofed_board = "Mac-7BA5B2D9E42DDD94"
|
||||
elif (self.constants.current_gpuv == "NVIDIA (0x10de)") & (self.constants.current_gpud in ModelArray.NVIDIAMXMGPUs) & (self.constants.custom_model == "None"):
|
||||
print("- Spoofing to iMacPro1,1")
|
||||
spoofed_model = "iMacPro1,1"
|
||||
spoofed_board = "Mac-7BA5B2D9E42DDD94"
|
||||
else:
|
||||
print("- Spoofing to iMac15,1")
|
||||
spoofed_model = "iMac15,1"
|
||||
spoofed_board = "Mac-42FD25EABCABB274"
|
||||
elif self.model in ModelArray.iMac144:
|
||||
print("- Spoofing to iMac14,4")
|
||||
spoofed_model = "iMac14,4"
|
||||
spoofed_board = "Mac-81E3E92DD6088272"
|
||||
elif self.model in ModelArray.MacPro71:
|
||||
print("- Spoofing to MacPro7,1")
|
||||
spoofed_model = "MacPro7,1"
|
||||
spoofed_board = "Mac-27AD2F918AE68F61"
|
||||
self.spoofed_model = spoofed_model
|
||||
self.spoofed_board = spoofed_board
|
||||
self.config["#Revision"]["Spoofed-Model"] = self.spoofed_model
|
||||
|
||||
# Setup menu
|
||||
def minimal_serial_patch(self):
|
||||
self.config["PlatformInfo"]["PlatformNVRAM"]["BID"] = self.spoofed_board
|
||||
self.config["PlatformInfo"]["SMBIOS"]["BoardProduct"] = self.spoofed_board
|
||||
self.config["PlatformInfo"]["UpdateNVRAM"] = True
|
||||
def moderate_serial_patch(self):
|
||||
self.config["PlatformInfo"]["Automatic"] = True
|
||||
self.config["PlatformInfo"]["UpdateDataHub"] = True
|
||||
self.config["PlatformInfo"]["UpdateNVRAM"] = True
|
||||
self.config["UEFI"]["ProtocolOverrides"]["DataHub"] = True
|
||||
self.config["PlatformInfo"]["Generic"]["SystemProductName"] = self.spoofed_model
|
||||
def adanced_serial_patch(self):
|
||||
macserial_output = subprocess.run([self.constants.macserial_path] + f"-g -m {self.spoofed_model} -n 1".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
macserial_output = macserial_output.stdout.decode().strip().split(" | ")
|
||||
self.config["PlatformInfo"]["Automatic"] = True
|
||||
self.config["PlatformInfo"]["UpdateDataHub"] = True
|
||||
self.config["PlatformInfo"]["UpdateNVRAM"] = True
|
||||
self.config["UEFI"]["ProtocolOverrides"]["DataHub"] = True
|
||||
self.config["PlatformInfo"]["Generic"]["ROM"] = binascii.unhexlify("112233445566")
|
||||
self.config["PlatformInfo"]["Generic"]["SystemProductName"] = self.spoofed_model
|
||||
self.config["PlatformInfo"]["Generic"]["SystemSerialNumber"] = macserial_output[0]
|
||||
self.config["PlatformInfo"]["Generic"]["MLB"] = macserial_output[1]
|
||||
self.config["PlatformInfo"]["Generic"]["SystemUUID"] = str(uuid.uuid4()).upper()
|
||||
|
||||
if self.constants.serial_settings == "Moderate":
|
||||
moderate_serial_patch(self)
|
||||
elif self.constants.serial_settings == "Advanced":
|
||||
adanced_serial_patch(self)
|
||||
else:
|
||||
self.spoofed_model = self.model
|
||||
minimal_serial_patch(self)
|
||||
|
||||
# USB Map Patching
|
||||
self.new_map_ls = Path(self.constants.map_contents_folder) / Path("Info.plist")
|
||||
self.map_config = plistlib.load(Path(self.new_map_ls).open("rb"))
|
||||
|
||||
self.map_config["IOKitPersonalities_x86_64"][self.model]["model"] = self.spoofed_model
|
||||
if self.model in ModelArray.EHCI:
|
||||
model_ehci = f"{self.model}-EHCI"
|
||||
self.map_config["IOKitPersonalities_x86_64"][model_ehci]["model"] = self.spoofed_model
|
||||
if self.model in ModelArray.EHC1:
|
||||
model_ehc1 = f"{self.model}-EHC1"
|
||||
self.map_config["IOKitPersonalities_x86_64"][model_ehc1]["model"] = self.spoofed_model
|
||||
if self.model in ModelArray.EHC2:
|
||||
model_ehc2 = f"{self.model}-EHC2"
|
||||
self.map_config["IOKitPersonalities_x86_64"][model_ehc2]["model"] = self.spoofed_model
|
||||
if self.model in ModelArray.OHC1:
|
||||
model_ohc1 = f"{self.model}-OHC1"
|
||||
model_ohc2 = f"{self.model}-OHC2"
|
||||
self.map_config["IOKitPersonalities_x86_64"][model_ohc1]["model"] = self.spoofed_model
|
||||
self.map_config["IOKitPersonalities_x86_64"][model_ohc2]["model"] = self.spoofed_model
|
||||
if self.model in ModelArray.IHEHC1:
|
||||
model_ihehc1 = f"{self.model}-InternalHub-EHC1"
|
||||
model_ihehc1ih = f"{self.model}-InternalHub-EHC1-InternalHub"
|
||||
self.map_config["IOKitPersonalities_x86_64"][model_ihehc1]["model"] = self.spoofed_model
|
||||
self.map_config["IOKitPersonalities_x86_64"][model_ihehc1ih]["model"] = self.spoofed_model
|
||||
if self.model in ModelArray.IHEHC2:
|
||||
model_ihehc2 = f"{self.model}-InternalHub-EHC2"
|
||||
self.map_config["IOKitPersonalities_x86_64"][model_ihehc2]["model"] = self.spoofed_model
|
||||
if self.model in ModelArray.IH:
|
||||
model_ih = f"{self.model}-InternalHub"
|
||||
self.map_config["IOKitPersonalities_x86_64"][model_ih]["model"] = self.spoofed_model
|
||||
plistlib.dump(self.map_config, Path(self.new_map_ls).open("wb"), sort_keys=True)
|
||||
|
||||
@staticmethod
|
||||
def get_item_by_kv(iterable, key, value):
|
||||
item = None
|
||||
for i in iterable:
|
||||
if i[key] == value:
|
||||
item = i
|
||||
break
|
||||
return item
|
||||
|
||||
def get_kext_by_bundle_path(self, bundle_path):
|
||||
kext = self.get_item_by_kv(self.config["Kernel"]["Add"], "BundlePath", bundle_path)
|
||||
if not kext:
|
||||
print(f"- Could not find kext {bundle_path}!")
|
||||
raise IndexError
|
||||
return kext
|
||||
|
||||
def get_tool_by__path(self, bundle_path):
|
||||
tool = self.get_item_by_kv(self.config["Misc"]["Tools"], "Path", bundle_path)
|
||||
if not tool:
|
||||
print(f"- Could not find Tool {bundle_path}!")
|
||||
raise IndexError
|
||||
return tool
|
||||
|
||||
def enable_kext(self, kext_name, kext_version, kext_path, check=False):
|
||||
kext = self.get_kext_by_bundle_path(kext_name)
|
||||
|
||||
if callable(check) and not check():
|
||||
# Check failed
|
||||
return
|
||||
|
||||
print(f"- Adding {kext_name} {kext_version}")
|
||||
shutil.copy(kext_path, self.constants.kexts_path)
|
||||
kext["Enabled"] = True
|
||||
|
||||
def cleanup(self):
|
||||
print("- Cleaning up files")
|
||||
plistlib.dump(self.config, Path(self.constants.plist_path).open("wb"), sort_keys=True)
|
||||
for kext in self.constants.kexts_path.rglob("*.zip"):
|
||||
with zipfile.ZipFile(kext) as zip_file:
|
||||
zip_file.extractall(self.constants.kexts_path)
|
||||
kext.unlink()
|
||||
|
||||
for item in self.constants.oc_folder.rglob("*.zip"):
|
||||
with zipfile.ZipFile(item) as zip_file:
|
||||
zip_file.extractall(self.constants.oc_folder)
|
||||
item.unlink()
|
||||
|
||||
for i in self.constants.build_path.rglob("__MACOSX"):
|
||||
shutil.rmtree(i)
|
||||
|
||||
Path(self.constants.opencore_zip_copied).unlink()
|
||||
|
||||
def sign_files(self):
|
||||
if self.constants.vault is True:
|
||||
print("- Vaulting EFI")
|
||||
subprocess.run([self.constants.vault_path] + f"{self.constants.oc_folder}/".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
|
||||
def build_opencore(self):
|
||||
self.build_efi()
|
||||
self.set_smbios()
|
||||
self.cleanup()
|
||||
self.sign_files()
|
||||
print("")
|
||||
print("Your OpenCore EFI has been built at:")
|
||||
print(f" {self.constants.opencore_release_folder}")
|
||||
print("")
|
||||
if self.constants.gui_mode is False:
|
||||
input("Press [Enter] to go back.\n")
|
||||
|
||||
def copy_efi(self):
|
||||
utilities.cls()
|
||||
utilities.header(["Installing OpenCore to Drive"])
|
||||
|
||||
if not self.constants.opencore_release_folder.exists():
|
||||
utilities.TUIOnlyPrint(
|
||||
["Installing OpenCore to Drive"],
|
||||
"Press [Enter] to go back.\n",
|
||||
[
|
||||
"""OpenCore folder missing!
|
||||
Please build OpenCore first!"""
|
||||
],
|
||||
).start()
|
||||
return
|
||||
|
||||
print("\nDisk picker is loading...")
|
||||
|
||||
all_disks = {}
|
||||
# TODO: physical is not supported in Sierra and older
|
||||
# AllDisksAndPartitions is not supported in Yosemite(?) and older
|
||||
disks = plistlib.loads(subprocess.run("diskutil list -plist physical".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode())
|
||||
for disk in disks["AllDisksAndPartitions"]:
|
||||
disk_info = plistlib.loads(subprocess.run(f"diskutil info -plist {disk['DeviceIdentifier']}".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode())
|
||||
|
||||
all_disks[disk["DeviceIdentifier"]] = {"identifier": disk_info["DeviceNode"], "name": disk_info["MediaName"], "size": disk_info["Size"], "partitions": {}}
|
||||
|
||||
for partition in disk["Partitions"]:
|
||||
partition_info = plistlib.loads(subprocess.run(f"diskutil info -plist {partition['DeviceIdentifier']}".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode())
|
||||
all_disks[disk["DeviceIdentifier"]]["partitions"][partition["DeviceIdentifier"]] = {
|
||||
"fs": partition_info.get("FilesystemType", partition_info["Content"]),
|
||||
"type": partition_info["Content"],
|
||||
"name": partition_info.get("VolumeName", ""),
|
||||
"size": partition_info["Size"],
|
||||
}
|
||||
# TODO: Advanced mode
|
||||
menu = utilities.TUIMenu(
|
||||
["Select Disk"],
|
||||
"Please select the disk you would like to install OpenCore to: ",
|
||||
in_between=["Missing disks? Ensure they have an EFI or FAT32 partition."],
|
||||
return_number_instead_of_direct_call=True,
|
||||
loop=True,
|
||||
)
|
||||
for disk in all_disks:
|
||||
if not any(all_disks[disk]["partitions"][partition]["fs"] == "msdos" for partition in all_disks[disk]["partitions"]):
|
||||
continue
|
||||
menu.add_menu_option(f"{disk}: {all_disks[disk]['name']} ({human_fmt(all_disks[disk]['size'])})", key=disk[4:])
|
||||
|
||||
response = menu.start()
|
||||
|
||||
if response == -1:
|
||||
return
|
||||
|
||||
disk_identifier = "disk" + response
|
||||
selected_disk = all_disks[disk_identifier]
|
||||
|
||||
menu = utilities.TUIMenu(
|
||||
["Select Partition"],
|
||||
"Please select the partition you would like to install OpenCore to: ",
|
||||
return_number_instead_of_direct_call=True,
|
||||
loop=True,
|
||||
in_between=["Missing partitions? Ensure they are formatted as an EFI or FAT32.", "", "* denotes likely candidate."],
|
||||
)
|
||||
for partition in selected_disk["partitions"]:
|
||||
if selected_disk["partitions"][partition]["fs"] != "msdos":
|
||||
continue
|
||||
text = f"{partition}: {selected_disk['partitions'][partition]['name']} ({human_fmt(selected_disk['partitions'][partition]['size'])})"
|
||||
if selected_disk["partitions"][partition]["type"] == "EFI" or (
|
||||
selected_disk["partitions"][partition]["type"] == "Microsoft Basic Data" and selected_disk["partitions"][partition]["size"] < 1024 * 1024 * 512
|
||||
): # 512 megabytes:
|
||||
text += " *"
|
||||
menu.add_menu_option(text, key=partition[len(disk_identifier) + 1:])
|
||||
|
||||
response = menu.start()
|
||||
|
||||
if response == -1:
|
||||
return
|
||||
|
||||
args = [
|
||||
"osascript",
|
||||
"-e",
|
||||
f'''do shell script "diskutil mount {disk_identifier}s{response}"'''
|
||||
' with prompt "OpenCore Legacy Patcher needs administrator privileges to mount your EFI."'
|
||||
" with administrator privileges"
|
||||
" without altering line endings",
|
||||
]
|
||||
|
||||
result = subprocess.run(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
|
||||
if result.returncode != 0:
|
||||
if "execution error" in result.stderr.decode() and result.stderr.decode()[-5:-1] == "-128":
|
||||
# cancelled prompt
|
||||
return
|
||||
else:
|
||||
utilities.TUIOnlyPrint(
|
||||
["Copying OpenCore"], "Press [Enter] to go back.\n", ["An error occurred!"] + result.stderr.decode().split("\n") + ["", "Please report this to the devs at GitHub."]
|
||||
).start()
|
||||
return
|
||||
|
||||
# TODO: Remount if readonly
|
||||
partition_info = plistlib.loads(subprocess.run(f"diskutil info -plist {disk_identifier}s{response}".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode())
|
||||
mount_path = Path(partition_info["MountPoint"])
|
||||
|
||||
utilities.cls()
|
||||
utilities.header(["Copying OpenCore"])
|
||||
|
||||
if mount_path.exists():
|
||||
if (mount_path / Path("EFI")).exists():
|
||||
print("- Removing preexisting EFI folder")
|
||||
shutil.rmtree(mount_path / Path("EFI"), onerror=rmtree_handler)
|
||||
print("- Coping OpenCore onto EFI partition")
|
||||
shutil.copytree(self.constants.opencore_release_folder / Path("EFI"), mount_path / Path("EFI"))
|
||||
shutil.copy(self.constants.icon_path, mount_path)
|
||||
print("OpenCore transfer complete")
|
||||
print("\nPress [Enter] to continue.\n")
|
||||
input()
|
||||
else:
|
||||
utilities.TUIOnlyPrint(["Copying OpenCore"], "Press [Enter] to go back.\n", ["EFI failed to mount!", "Please report this to the devs at GitHub."]).start()
|
||||
@@ -55,7 +55,9 @@ module.exports = {
|
||||
|
||||
themeConfig: {
|
||||
lastUpdated: true,
|
||||
repo: 'https://github.com/dortania/OpenCore-Legacy-Patcher',
|
||||
repo: 'https://github.com/dortania/OpenCore-Legacy-Patcher/',
|
||||
docsDir: 'docs',
|
||||
docsBranch: 'main',
|
||||
editLinks: true,
|
||||
editLinkText: 'Help us improve this page!',
|
||||
logo: 'homepage.png',
|
||||
@@ -67,6 +69,7 @@ module.exports = {
|
||||
children: [
|
||||
'START',
|
||||
'MODELS',
|
||||
['BENIFITS', 'Benefits and drawbacks'],
|
||||
]
|
||||
|
||||
},
|
||||
@@ -96,7 +99,32 @@ module.exports = {
|
||||
sidebarDepth: 1,
|
||||
children: [
|
||||
'TROUBLESHOOTING',
|
||||
'DEBUG',
|
||||
'UPDATE',
|
||||
'UNINSTALL',
|
||||
'ICNS',
|
||||
]
|
||||
},
|
||||
{
|
||||
title: 'Credit',
|
||||
collapsable: false,
|
||||
sidebarDepth: 1,
|
||||
children: [
|
||||
'DONATE',
|
||||
'LICENSE',
|
||||
]
|
||||
|
||||
},
|
||||
{
|
||||
title: 'Documentation',
|
||||
collapsable: false,
|
||||
sidebarDepth: 1,
|
||||
children: [
|
||||
'TESTED',
|
||||
'TERMS',
|
||||
'HOW',
|
||||
'PATCHEXPLAIN',
|
||||
'CLI',
|
||||
]
|
||||
|
||||
},
|
||||
|
||||
21
docs/BENIFITS.md
Normal file
@@ -0,0 +1,21 @@
|
||||
# Benefits and Drawbacks between OpenCore Legacy Patcher and other patchers
|
||||
|
||||
With OpenCore Legacy Patcher we recommend users go through the below table to understand what the benefits and drawbacks are compared to other patchers. There are positive and negatives to each and we feel transparency is most important when patching another users machine. There should be no grey areas where users may be mislead.
|
||||
|
||||
| Features | [OpenCore Legacy Patcher](https://github.com/dortania/OpenCore-Legacy-Patcher/) | [Patched Sur](https://github.com/BenSova/Patched-Sur) |
|
||||
| :--- | :--- | :--- |
|
||||
| Over The Air Updates | <span style="color:#30BCD5">Native System Preferences, additionally supports Deltas (~2GB) for Metal GPUs</span> | <span style="color:red">Inside Patcher Sur app (~12GB), only available when InstallAssistants release</span> |
|
||||
| FileVault | <span style="color:#30BCD5">Supported on Metal GPUs</span> | <span style="color:red">Not supported</span> |
|
||||
| System Integrity Protection | <span style="color:#30BCD5">Fully enabled on Metal GPUs</span> | <span style="color:red">Disabled for early 2013 and older</span> |
|
||||
| APFS Snapshots | <span style="color:#30BCD5">Fully enabled</span> | <span style="color:red">Disabled</span> |
|
||||
| User facing | <span style="color:red">TUI interface</span> | <span style="color:#30BCD5">SwiftUI interface, more user friendly</span> |
|
||||
| Supported OSes | <span style="color:#30BCD5">10.7-11</span> | <span style="color:red">10.15-11</span> |
|
||||
| Firmware Patching | <span style="color:#30BCD5">None required</span> | <span style="color:red">Required for models without native APFS support</span> |
|
||||
| BootCamp Switching | <span style="color:red">Requires EFI Conversion for Start Disk support, otherwise still supported</span> | <span style="color:#30BCD5">Native</span> |
|
||||
| Brightness Control on Legacy GPUs | <span style="color:#30BCD5">Supported</span> | <span style="color:#30BCD5">Supported</span> |
|
||||
| Legacy GPU Acceleration | <span style="color:#30BCD5">In active development</span>, see Acceleration Progress Tracker: [Link](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108) | <span style="color:red">Currently not researching</span> |
|
||||
| WPA Wifi Support | <span style="color:#30BCD5">Native, stable</span> | <span style="color:red">Unstable</span> |
|
||||
| HEVC/H.265 Support for Mac Pros and iMacs with Polaris+ GPUs | <span style="color:#30BCD5">Supported</span> | <span style="color:red">Not supported</span> |
|
||||
| Big Sur-styled Boot Picker | <span style="color:#30BCD5">Available</span> | <span style="color:red">Not available</span> |
|
||||
| El Capitan-era Wifi cards | <span style="color:#30BCD5">Supported</span> | <span style="color:red">Not supported</span> |
|
||||
| Hibernation Support | <span style="color:#30BCD5">Supports 3rd party SATA SSDs in addition to stock models</span> | <span style="color:red">Only supports stock drives</span> |
|
||||
@@ -15,6 +15,8 @@ Now that you've loaded OpenCore, now select Install macOS!:
|
||||

|
||||
|
||||
|
||||
After plenty of verbose booting, you will reach the installer screen! From there it's just like any normal macOS install.
|
||||
After plenty of verbose booting, you will reach the installer screen! From there it's just like any normal macOS install. For an example of how the boot process looks, see the following video:
|
||||
|
||||
* [OpenCore Legacy Patcher Boot Process](https://www.youtube.com/watch?v=AN3zsbQV_n4)
|
||||
|
||||
# Once installed and booting, head to [Post-Installation](./POST-INSTALL.md)
|
||||
41
docs/CLI.md
Normal file
@@ -0,0 +1,41 @@
|
||||
# Command Line Args
|
||||
|
||||
With OpenCore Legacy Patcher, we include an extra binary called [OCLP-CLI](https://github.com/dortania/OpenCore-Legacy-Patcher/releases/). The purpose of this binary is to easily run our OpenCore build process for other programs to hook onto. Below is documentation on currently supported arguments.
|
||||
|
||||
### Build Arguments
|
||||
|
||||
* **--build**: Build OpenCore
|
||||
* **--model xxxx**: override default model detection
|
||||
* ex. **--model iMac11,2**
|
||||
* **--metal_gpu xxxx**: override default GPU detection (ie. Nvidia, AMD)
|
||||
* **--metal_gpu Nvidia**
|
||||
* **--smbios_spoof xxxx**: set spoofing mode, defaults to Minimal if no arg provided (ie. Minimal, Moderate, Advanced)
|
||||
* ex. **--smbios_spoof Moderate**
|
||||
* **--verbose**: enable verbose booting
|
||||
* **--debug_oc**: enable debug OpenCore
|
||||
* **--debug_kext**: enable debug kexts
|
||||
* **--skip_wifi**: skip wifi patch
|
||||
* **--hide_picker**: hide OpenCore's picker
|
||||
* **--disable_sip**: disables SIP
|
||||
* **--disable_smb**: disables SecureBootModel
|
||||
* **--vault**: enable OpenCore vaulting
|
||||
|
||||
Example usage:
|
||||
|
||||
```bash
|
||||
./OCLP-CLI --build --verbose --debug_oc --debug_kext --model iMac11,2
|
||||
```
|
||||
|
||||
Note, when building OpenCore the output folder will be next to the OCLP binary as OpenCore-RELEASE or OpenCore-DEBUG folder.
|
||||
|
||||
### Patch System Arguments
|
||||
|
||||
* **--patch_sys_vol**: patches root volume with detected hardware
|
||||
|
||||
Example usage:
|
||||
|
||||
```bash
|
||||
sudo ./OCLP-CLI --patch_sys_vol
|
||||
```
|
||||
|
||||
Note, root volume patching needs to be run as sudo
|
||||
49
docs/DEBUG.md
Normal file
@@ -0,0 +1,49 @@
|
||||
# How to debug with OpenCore
|
||||
|
||||
For those who've hit an odd bug and unsure if it's user error or patcher, the below will tell you how to get more verbose debug information as well as logs to help [file issues with us](https://github.com/dortania/OpenCore-Legacy-Patcher/issues)
|
||||
|
||||
* For users who are less experienced, we recommend asking on the [OpenCore Patcher Paradise Discord Server](https://discord.gg/UbM8U75E) for help.
|
||||
|
||||
## Debugging yourself
|
||||
|
||||
The easiest way to debug yourself is via Patcher Settings. Here there are many different settings however the 3 main options that will help are:
|
||||
|
||||
* "Enable Verbose Mode"
|
||||
* "Enable OpenCore DEBUG"
|
||||
* "Enable Kext DEBUG"
|
||||
|
||||
|
||||
When you've enabled these 3 options, rebuild OpenCore and install to your drive. This will provide much greater debug information as well as write logs to the EFI Partition.
|
||||
|
||||
## Obtaining OpenCore logs from disk
|
||||
|
||||
With "Enable OpenCore DEBUG" set, every boot there will be a .txt file generated in your disk. To grab these logs, [download and run MountEFI](https://github.com/corpnewt/MountEFI):
|
||||
|
||||

|
||||
|
||||
Once you've mounted the EFI Partition of the drive you have macOS on, you should see some nice logs:
|
||||
|
||||

|
||||
|
||||
## Obtaining Kernel logs from macOS
|
||||
|
||||
With "Enable Kext DEBUG" set, every boot will now have much more detailed logs stored in the OS. To get these logs, simply run the below command:
|
||||
|
||||
```sh
|
||||
sudo dmesg > ~/Desktop/DMESG.txt
|
||||
```
|
||||
|
||||
From there, you'll have a log on your desktop.
|
||||
|
||||
## Filing an issue with us
|
||||
|
||||
Now that you have proper logs, you can now [file issues with us](https://github.com/dortania/OpenCore-Legacy-Patcher/issues). Reminder we want the following info:
|
||||
|
||||
* Model patching for (ie. MacBookPro10,1)
|
||||
* Target OS (ie. macOS 11.2.3)
|
||||
* Host OS (ie. macOS 10.15.7)
|
||||
* Upload of your OpenCore Build Folder
|
||||
* Upload of your OpenCore log (if applicable)
|
||||
* Upload of your Kernel log (if applicable)
|
||||
|
||||
Additionally, please search whether the issue has been reported before. This avoids having duplicate issues.
|
||||
32
docs/DONATE.md
Normal file
@@ -0,0 +1,32 @@
|
||||
# Supporting the patcher
|
||||
|
||||
OpenCore Legacy Patcher is a hobby project for us developers, and while we love helping out the community it's very difficult for us to troubleshoot issues remotely. The best way for us to get to work on the patcher, fix issues and add enhancements is having the hardware in-hand. As a hobby project, neither of the main developers can afford to buy every legacy Mac to test on.
|
||||
|
||||
The best way to support us in all honesty is to donate any old hardware you no longer need, as this allows us to have machines to test locally and push fixes much faster. While we appreciate cash donations, this makes it much more difficult for us to handle as an organization.
|
||||
|
||||
Main hardware we'd appreciate:
|
||||
|
||||
* Any Mac you own
|
||||
* Does require SSE4,1 CPU to test on Sierra and newer however
|
||||
|
||||
Additionally, hardware info dumps are greatly beneficial for us to determine what patches a machine might need:
|
||||
|
||||
* [IORegistryExplorer](https://github.com/khronokernel/IORegistryClone/blob/master/ioreg-210.zip?raw=true)
|
||||
* `File -> SaveAs` and open an issue on Github
|
||||
* Note: We want IOReg dumps of hardware not running on OpenCore, instead running a clean, supported OS
|
||||
|
||||
If you have any legacy hardware you're willing to donate, please contact us at the following email:
|
||||
|
||||
* khronokernel@icloud.com
|
||||
|
||||
Current hardware we own:
|
||||
|
||||
| Model | CPU | GPU | Owner | Notes |
|
||||
| :--- | :--- | :--- | :--- | :--- |
|
||||
| MacBook7,1 | Penryn | GT320M | Dhinak | N/A |
|
||||
| MacBook7,1 | Penryn | GT320M | Mykola | N/A |
|
||||
| iMac11,2 | Clarksdale | HD4670 | Mykola | N/A |
|
||||
|
||||
|
||||
<!-- | MacBookPro5,3 | Penryn | 9400M + 9600M | Dhinak | Display's partially broken | -->
|
||||
<!-- | Macmini4,1 | Penryn | GT320M | Dhinak | N/A | -->
|
||||
9
docs/HOW.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# Boot Process with OpenCore Legacy Patcher
|
||||
|
||||
OpenCore Legacy Patcher itself is actually quite a "dumb" program, and essentially edits a config.plist file and moves files around, it actually has little logic regarding the boot process. The real magic of OCLP is [OpenCorePkg](https://github.com/acidanthera/OpenCorePkg), our back-end and what makes this patcher so powerful.
|
||||
|
||||
## Boot Process with OpenCore
|
||||
|
||||
To understand a bit more of how OpenCore is able revive older Macs in such a native-like way, we need to go over *how* OpenCore works with your Mac:
|
||||
|
||||

|
||||
105
docs/ICNS.md
Normal file
@@ -0,0 +1,105 @@
|
||||
# Creating custom icons for OpenCore and Mac Boot Picker
|
||||
|
||||
For users who want to customize your setup to be more personal, OpenCore does allow for custom icons and images in the boot picker.
|
||||
|
||||
|
||||
* [Custom OpenCore icons](#custom-opencore-icons)
|
||||
* [Custom Mac Boot Picker icons](#custom-mac-boot-picker-icons)
|
||||
* [Installing updated icons](#installing-updated-icons)
|
||||
|
||||
|
||||
# Custom OpenCore icons
|
||||
|
||||
To generate custom OpenCore icons, you'll need the following:
|
||||
|
||||
* Images in PNG format
|
||||
* Each image, with the following res:
|
||||
* Cursor — Mouse cursor (mandatory, up to 144x144).
|
||||
* Selected — Selected item (mandatory, 144x144).
|
||||
* Selector — Selecting item (mandatory, up to 144x40).
|
||||
* Left — Scrolling left (mandatory, 40x40).
|
||||
* Right — Scrolling right (mandatory, 40x40).
|
||||
* HardDrive — Generic OS (mandatory, 128x128).
|
||||
* Background — Centred background image. (Recommended max size 1920x1080)
|
||||
* Apple — Apple OS (128x128).
|
||||
* AppleRecv — Apple Recovery OS (128x128).
|
||||
* AppleTM — Apple Time Machine (128x128).
|
||||
* Windows — Windows (128x128).
|
||||
* Other — Custom entry (see [Entries](https://dortania.github.io/docs/latest/Configuration.html), 128x128).
|
||||
* ResetNVRAM — Reset NVRAM system action or tool (128x128).
|
||||
* Shell — Entry with UEFI Shell name for e.g. OpenShell (128x128).
|
||||
* Tool — Any other tool (128x128).
|
||||
|
||||
Note, for each image we recommend having one of double the size. This ensures that icons are scaled correctly since .icns support dedicated images depending on HiDPI or not.
|
||||
|
||||
|
||||
Once you have a custom image you want to use(for example, as a background), download the [latest release of OpenCorePkg](https://github.com/acidanthera/OpenCorePkg/releases) and enter the `Utilities/icnspack/` folder:
|
||||
|
||||

|
||||
|
||||
Now `cd` this folder in terminal and run the following:
|
||||
|
||||
```sh
|
||||
./icnspack Background.icns <insert_x1_image> <insert_x2_image>
|
||||
```
|
||||
Once done, you'll see your custom icon generated in `icnspack`'s folder:
|
||||
|
||||

|
||||
|
||||
# Custom Mac Boot Picker icons
|
||||
|
||||
Custom boot picker icons is much more complicated on Legacy Macs, on late 2013+ Macs the [Custom OpenCore icons](#custom-opencore-icons) method will work just fine. However on many 2012 and older Macs, the icons generated will be incompatible with the firmware.
|
||||
|
||||
To generate legacy icons, you'll need the following:
|
||||
|
||||
* A machine running macOS 10.4 through 10.11
|
||||
* Icon Composer.app (Requires Apple Developer Account for official download)
|
||||
* Users without the developer account can find a mirrors here:
|
||||
* [Icon Composer 10.6](https://github.com/dortania/OpenCore-Legacy-Patcher/blob/main/docs/Icon-Composer-10.6.zip)
|
||||
* [Icon Composer 10.11](https://github.com/dortania/OpenCore-Legacy-Patcher/blob/main/docs/Icon-Composer-10.11.zip)
|
||||
* PNG Image you wish to convert
|
||||
|
||||
Head to [developer.apple's More Downloads page](https://developer.apple.com/download/more/) and search for `Graphics Tools` that is supported by your OS(note for 10.6 and older, the app is hidden inside `Developer Tools`):
|
||||
|
||||

|
||||
|
||||
Once downloaded, open the disk image and you'll find Icon Composer.app:
|
||||
|
||||

|
||||
|
||||
Now run the app and simply drag the images to each section as so:
|
||||
|
||||

|
||||
|
||||
Now save and export the new icns
|
||||
|
||||
# Installing updated icons
|
||||
|
||||
To install, please ensure that Vault is disabled when you built OpenCore. If you're unsure, simply rebuild OpenCore with the Patcher setting "Vault" set to false.
|
||||
|
||||
* <span style="color:red"> Warning</span>: Editing your OpenCore EFI incorrectly can result in a bricked install. Please ensure you have a natively supported version of macOS installed to boot into in case of issues.
|
||||
|
||||
Now that you've verified you can edit OpenCore safely, you'll need to mount the drive that OpenCore is stored on. To do this, download [MountEFI](https://github.com/corpnewt/MountEFI) and run it:
|
||||
|
||||

|
||||
|
||||
Select the drive you installed OpenCore to and mount it.
|
||||
|
||||
* [Updating OpenCore icons](#updating-opencore-icons)
|
||||
* [Updating Mac Boot Picker icons](#updating-mac-boot-picker-icons)
|
||||
|
||||
### Updating OpenCore icons
|
||||
|
||||
Head to `EFI/OC/Resources/Image/` on your drive and you'll see all the custom icons. For Background.icns, we need to ensure the file matches the theme OpenCore has set so we add the prefix `Modern` to it:
|
||||
|
||||

|
||||
|
||||
Now reboot and you should see your updated icon(s)!
|
||||
|
||||
### Updating Mac Boot Picker icons
|
||||
|
||||
To update the Mac Boot Picker icons is actually quite simple, on the root of your drive simply drop the icon onto the root of the drive with the name `.VolumeIcon.icns`
|
||||
|
||||

|
||||
|
||||
Now reboot and you'll see the new icon!
|
||||
@@ -12,7 +12,12 @@ This doc is centered around downloading and writing the macOS installer to a USB
|
||||
The simplest way to download macOS installs would be to use installinstallmacos:
|
||||
|
||||
```sh
|
||||
mkdir ~/macOS-installer && cd ~/macOS-installer && curl -O https://raw.githubusercontent.com/munki/macadmin-scripts/main/installinstallmacos.py && sudo python installinstallmacos.py
|
||||
[ ! -d ~/macOS-installer/ ] && mkdir ~/macOS-installer; cd ~/macOS-installer; [ ! -f ~/macOS-installer/installinstallmacos.py ] && curl -O https://raw.githubusercontent.com/munki/macadmin-scripts/main/installinstallmacos.py; sudo python installinstallmacos.py
|
||||
```
|
||||
* Note: On El Capitan (10.11) and older, you'll need to specify a catalog at the end of the command:
|
||||
|
||||
```
|
||||
--catalogurl https://swscan.apple.com/content/catalogs/others/index-11-10.15-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog
|
||||
```
|
||||
|
||||

|
||||
@@ -34,7 +39,7 @@ Once finished, you'll find in your `~/macOS-Installer/` folder a DMG containing
|
||||
|
||||
## Building
|
||||
|
||||
Now we'll be formatting the USB to prep for both the macOS installer and OpenCore. We'll want to use macOS Extended (HFS+) with a GUID partition map(Using GUID is important for the patcher). This will create two partitions: the main `MyVolume` and a second called `EFI` which is used as a boot partition where your Mac's firmware will check for boot files.
|
||||
Now we'll be formatting the USB to prep for both the macOS installer and OpenCore. We'll want to use macOS Extended (HFS+) with a GUID partition map(Using GUID is important for the patcher). This will create two partitions: the main `MyVolume` and a second called `EFI` which is used as a boot partition where your Mac's firmware will check for boot files. `EFI` partitions will be hidden by default, so don't worry if you don't immediately see them.
|
||||
|
||||
* Note: By default, Disk Utility only shows partitions – press Cmd/Win+2 to show all devices (alternatively you can press the View button)
|
||||
|
||||
|
||||
BIN
docs/Icon-Composer-10.11.zip
Normal file
BIN
docs/Icon-Composer-10.6.zip
Normal file
35
docs/LICENSE.md
Normal file
@@ -0,0 +1,35 @@
|
||||
# OpenCore Legacy Patcher Licence
|
||||
|
||||
This patcher is made of multiple external applications from different people and organizations. See each program for their licensing:
|
||||
|
||||
* BSD 3-Clause "New" or "Revised" License
|
||||
* [OpenCorePkg](https://github.com/acidanthera/OpenCorePkg/blob/master/LICENSE.txt)
|
||||
* [Lilu](https://github.com/acidanthera/Lilu/blob/master/LICENSE.txt)
|
||||
* [WhateverGreen](https://github.com/acidanthera/WhateverGreen/blob/master/LICENSE.txt)
|
||||
* [AirportBrcmFixup](https://github.com/acidanthera/AirportBrcmFixup/blob/master/LICENSE.txt)
|
||||
* [CPUFriend](https://github.com/acidanthera/CPUFriend/blob/master/LICENSE)
|
||||
* [RestrictEvents](https://github.com/acidanthera/RestrictEvents/blob/master/LICENSE.txt)
|
||||
* [NightShiftEnabler](https://github.com/cdf/NightShiftEnabler/blob/master/LICENSE.txt)
|
||||
* All rights reserved to respective authors
|
||||
* [AAAMouSSE](https://forums.macrumors.com/threads/mp3-1-others-sse-4-2-emulation-to-enable-amd-metal-driver.2206682/) - Syncretic
|
||||
* [telemetrap](https://forums.macrumors.com/threads/mp3-1-others-sse-4-2-emulation-to-enable-amd-metal-driver.2206682/post-28447707) - Syncretic
|
||||
* Apple Binaries - Apple Inc.
|
||||
|
||||
Remaining files within OpenCore Legacy Patcher are copyrighted 2020-2021 Mykola Grymalyuk & Dhinak G, under the BSD-3 Clause license:
|
||||
|
||||
```
|
||||
Copyright (c) 2020-2021, Dhinak G
|
||||
Copyright (c) 2020-2021, Mykola Grymalyuk
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
```
|
||||
@@ -1,6 +1,6 @@
|
||||
# Supported Models
|
||||
|
||||
Any hardware supporting SSE4.1 CPU and 64-Bit firmware work on this patcher. To check your hardware model, run the below command on the applicable machine:
|
||||
Any hardware supporting SSE4.1 CPU and 64-Bit firmware work on this patcher. To check your hardware model, run the below command on the applicable machine in terminal:
|
||||
|
||||
```bash
|
||||
system_profiler SPHardwareDataType | grep 'Model Identifier'
|
||||
@@ -16,6 +16,13 @@ The below table will list all supported and unsupported functions of the patcher
|
||||
* [Mac Pro](#mac-pro)
|
||||
* [Xserve](#xserve)
|
||||
|
||||
Regarding OS support, see below:
|
||||
|
||||
| Support Entry | Supported OSes | Description | Comment |
|
||||
| :--- | :--- | :--- | :--- |
|
||||
| HostOS | macOS 10.9 - macOS 11 | Refers to OSes where running OpenCore-Patcher.app are supported | Supports 10.7+ if [Python 3.6 or higher](https://www.python.org/downloads/) is manually installed, simply run the `OpenCore-Patcher.command` located in the repo |
|
||||
| TargetOS | macOS 11 | Refers to OSes that can be patched to run with OpenCore | May support 10.4 and newer (in a potentially broken state). No support provided. |
|
||||
|
||||
### MacBook
|
||||
|
||||
| SMBIOS | Year | Supported | Comment |
|
||||
@@ -23,10 +30,10 @@ The below table will list all supported and unsupported functions of the patcher
|
||||
| MacBook1,1 | Mid-2006 | <span style="color:red"> NO </span> | 32-Bit CPU limitation |
|
||||
| MacBook2,1 | Late 2006 | ^^ | 32-Bit Firmware limitation |
|
||||
| MacBook3,1 | Late 2007 | ^^ | ^^ |
|
||||
| MacBook4,1 | Early 2008 | ^^ | ^^ |
|
||||
| MacBook5,1 | Late 2008 | <span style="color:#30BCD5"> YES </span> | - No GPU Acceleration in Big Sur<br/>- No AppleHDA(Audio) Patching implemented(yet) |
|
||||
| MacBook5,2 | Early 2009 | ^^ | ^^ |
|
||||
| MacBook6,1 | Late 2009 | ^^ | ^^ |
|
||||
| MacBook4,1 | Early 2008 | <span style="color:#30BCD5"> YES </span> | - No GPU Acceleration in Mavericks and newer<br/>- No Keyboard and Trackpad<br/>- No USB<br/>- No Ethernet) |
|
||||
| MacBook5,1 | Late 2008 | ^^ | - No GPU Acceleration in Big Sur([#108](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108))<br/> |
|
||||
| MacBook5,2 | Early 2009 | ^^ | - No GPU Acceleration in Big Sur([#108](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108))<br/>- Trackpad is recognized as mouse<br/>- Brightness control partially supported |
|
||||
| MacBook6,1 | Late 2009 | ^^ | - No GPU Acceleration in Big Sur([#108](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108))<br/> |
|
||||
| MacBook7,1 | Mid-2010 | ^^ | ^^ |
|
||||
|
||||
### MacBook Air
|
||||
@@ -34,8 +41,8 @@ The below table will list all supported and unsupported functions of the patcher
|
||||
| SMBIOS | Year | Supported | Comment |
|
||||
| :--- | :--- | :--- | :--- |
|
||||
| MacBookAir1,1 | Early 2008 | <span style="color:red"> NO </span> | Requires SSE4.1 CPU |
|
||||
| MacBookAir2,1 | Late 2008 |<span style="color:#30BCD5"> YES </span> | - No GPU Acceleration in Big Sur<br/>- No AppleHDA(Audio) Patching implemented(yet)<br/>- No Wifi Patches implemented(yet) |
|
||||
| MacBookAir3,1 | Late 2010 | ^^ | - No GPU Acceleration in Big Sur<br/>- No AppleHDA(Audio) Patching implemented(yet) |
|
||||
| MacBookAir2,1 | Late 2008 |<span style="color:#30BCD5"> YES </span> | No GPU Acceleration in Big Sur([#108](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108)) |
|
||||
| MacBookAir3,1 | Late 2010 | ^^ | ^^ |
|
||||
| MacBookAir3,2 | ^^ | ^^ | ^^ |
|
||||
| MacBookAir4,1 | Mid-2011 | ^^ | ^^ |
|
||||
| MacBookAir4,2 | ^^ | ^^ | ^^ |
|
||||
@@ -50,9 +57,9 @@ The below table will list all supported and unsupported functions of the patcher
|
||||
| MacBookPro1,2 | ^^ | ^^ | ^^ |
|
||||
| MacBookPro2,1 | Late 2006 | ^^ | 32-Bit Firmware limitation |
|
||||
| MacBookPro2,2 | Late 2006 | ^^ | ^^ |
|
||||
| MacBookPro3,1 | Mid-2007 | ^^ | - Requires SSE4.1 CPU |
|
||||
| MacBookPro4,1 | Early 2008 | <span style="color:#30BCD5"> YES </span> | - No GPU Acceleration in Big Sur<br/>- No AppleHDA(Audio) Patching implemented(yet)<br/>- No Wifi Patches implemented(yet) |
|
||||
| MacBookPro5,1 | Late 2008 | ^^ | - No GPU Acceleration in Big Sur<br/>- No AppleHDA(Audio) Patching implemented(yet) |
|
||||
| MacBookPro3,1 | Mid-2007 | ^^ | Requires SSE4.1 CPU |
|
||||
| MacBookPro4,1 | Early 2008 | <span style="color:#30BCD5"> YES </span> | No GPU Acceleration in Big Sur([#108](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108)) |
|
||||
| MacBookPro5,1 | Late 2008 | ^^ | ^^ |
|
||||
| MacBookPro5,2 | Early 2009 | ^^ | ^^ |
|
||||
| MacBookPro5,3 | Mid-2009 | ^^ | ^^ |
|
||||
| MacBookPro5,4 | ^^ | ^^ | ^^ |
|
||||
@@ -60,13 +67,13 @@ The below table will list all supported and unsupported functions of the patcher
|
||||
| MacBookPro6,1 | Mid-2010 | ^^ | ^^ |
|
||||
| MacBookPro6,2 | ^^ | ^^ | ^^ |
|
||||
| MacBookPro7,1 | ^^ | ^^ | ^^ |
|
||||
| MacBookPro8,1 | Early 2011 | ^^ | - No GPU Acceleration in Big Sur<br/>- No AppleHDA(Audio) Patching implemented(yet)<br/>- Ethernet Connection Issues |
|
||||
| MacBookPro8,1 | Early 2011 | ^^ | ^^ |
|
||||
| MacBookPro8,2 | ^^ | ^^ | ^^ |
|
||||
| MacBookPro8,3 | ^^ | ^^ | ^^ |
|
||||
| MacBookPro9,1 | Mid-2012 | ^^ | <span style="color:green"> Everything is supported</span> |
|
||||
| MacBookPro9,2 | ^^ | ^^ | ^^ |
|
||||
| MacBookPro10,1 | ^^ | ^^ | ^^ |
|
||||
| MacBookPro10,2 | Late 2012 | ^^ | ^^ |
|
||||
| MacBookPro9,2 | ^^ | ^^ | ^^ |
|
||||
| MacBookPro10,1 | Mid-2012, Early 2013 | ^^ | ^^ |
|
||||
| MacBookPro10,2 | Late 2012, Early 2013 | ^^ | ^^ |
|
||||
|
||||
### Mac mini
|
||||
|
||||
@@ -74,9 +81,9 @@ The below table will list all supported and unsupported functions of the patcher
|
||||
| :--- | :--- | :--- | :--- |
|
||||
| Macmini1,1 | Early 2006 | <span style="color:red"> NO </span> | 32-Bit CPU limitation |
|
||||
| Macmini2,1 | Mid-2007 | ^^ | 32-Bit Firmware limitation |
|
||||
| Macmini3,1 | Early 2009 | <span style="color:#30BCD5"> YES </span> | - No GPU Acceleration in Big Sur<br/>- No AppleHDA(Audio) Patching implemented(yet) |
|
||||
| Macmini3,1 | Early 2009 | <span style="color:#30BCD5"> YES </span> | No GPU Acceleration in Big Sur([#108](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108)) |
|
||||
| Macmini4,1 | Mid-2010 | ^^ | ^^ |
|
||||
| Macmini5,1 | Mid-2011 | ^^ | - No GPU Acceleration in Big Sur<br/>- No AppleHDA(Audio) Patching implemented(yet)<br/>- Ethernet Connection Issues |
|
||||
| Macmini5,1 | Mid-2011 | ^^ | ^^ |
|
||||
| Macmini5,2 | ^^ | ^^ | ^^ |
|
||||
| Macmini5,3 | ^^ | ^^ | ^^ |
|
||||
| Macmini6,1 | Late 2012 | ^^ | <span style="color:green"> Everything is supported</span> |
|
||||
@@ -91,37 +98,41 @@ The below table will list all supported and unsupported functions of the patcher
|
||||
| iMac5,1 | Late 2006 | ^^ | 32-Bit Firmware limitation |
|
||||
| iMac5,2 | ^^ | ^^ | ^^ |
|
||||
| iMac6,1 | ^^ | ^^ | ^^ |
|
||||
| iMac7,1 | Mid-2007 | <span style="color:#30BCD5"> YES </span> | - Requires an SSE4.1 CPU Upgrade<br/>- No GPU Acceleration in Big Sur<br/>- No AppleHDA(Audio) Patching implemented(yet)<br/>- No Wifi Patches implemented (yet) |
|
||||
| iMac8,1 | Early 2008 | ^^ | - No GPU Acceleration in Big Sur<br/>- No AppleHDA(Audio) Patching implemented(yet)<br/>- No Wifi Patches implemented (yet) |
|
||||
| iMac9,1 | Early 2009 | ^^ | - No GPU Acceleration in Big Sur<br/>- No AppleHDA(Audio) Patching implemented(yet) |
|
||||
| iMac10,1 | Late 2009 | ^^ | ^^ |
|
||||
| iMac11,1 | ^^ | ^^ | - No GPU Acceleration in Big Sur<br/>- No AppleHDA(Audio) Patching implemented(yet)<br/>- Ethernet Connection Issues |
|
||||
| iMac7,1 | Mid-2007 | <span style="color:#30BCD5"> YES </span> | - Requires an SSE4.1 CPU Upgrade<br/>- No GPU Acceleration in Big Sur([#108](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108))<br/>- Brightness control partially supported on Nvidia GPUs, AMD unsupported<br/>- Stock Bluetooth 2.0 card non-functional |
|
||||
| iMac8,1 | Early 2008 | ^^ | - No GPU Acceleration in Big Sur([#108](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108)))<br/>- Brightness control partially supported on Nvidia GPUs, AMD unsupported |
|
||||
| iMac9,1 | Early 2009 | ^^ | ^^ |
|
||||
| iMac10,1 | Late 2009 | ^^ | GPU is socketed, [recommend upgrading to Metal GPU](https://forums.macrumors.com/threads/2011-imac-graphics-card-upgrade.1596614/?post=17425857#post-17425857) |
|
||||
| iMac11,1 | ^^ | ^^ | ^^ |
|
||||
| iMac11,2 | Mid-2010 | ^^ | ^^ |
|
||||
| iMac11,3 | ^^ | ^^ | ^^ |
|
||||
| iMac12,1 | Mid-2011 | ^^ | ^^ |
|
||||
| iMac12,2 | ^^ | ^^ | ^^ |
|
||||
| iMac13,1 | Late 2012 | ^^ | <span style="color:green"> Everything is supported</span> |
|
||||
| iMac13,2 | ^^ | ^^ | ^^ |
|
||||
| iMac13,3 | ^^ | ^^ | ^^ |
|
||||
| iMac14,1 | Late 2013 | ^^ | ^^ |
|
||||
| iMac14,2 | ^^ | ^^ | ^^ |
|
||||
| iMac14,3 | ^^ | ^^ | ^^ |
|
||||
|
||||
* For iMac10,1 through iMac12,x, we highly recommend users upgrade the GPU to a Metal supported model. See here for more information: [iMac late 2009 to mid-2012 Graphics Card Upgrade Guide](https://forums.macrumors.com/threads/2011-imac-graphics-card-upgrade.1596614/?post=17425857#post-17425857)
|
||||
|
||||
### Mac Pro
|
||||
|
||||
| SMBIOS | Year | Supported | Comment |
|
||||
| :--- | :--- | :--- | :--- |
|
||||
| MacPro1,1 | Mid-2006 | <span style="color:red"> NO </span> | 32-Bit Firmware limitation |
|
||||
| MacPro2,1 | Mid-2007 | ^^ | ^^ |
|
||||
| MacPro3,1 | Early 2008 | <span style="color:#30BCD5"> YES </span> | - Requires an SSE4.1 CPU Upgrade<br/>- No AppleHDA(Audio) Patching implemented(yet) |
|
||||
| MacPro3,1 | Early 2008 | <span style="color:#30BCD5"> YES </span> | - Potential boot issues with built-in USB 1.1 ports (recommend using a USB 2.0 hub or dedicated USB PCIe controller)<br/>- Potential boot issues with stock Bluetooth card, recommend removing to avoid kernel panics |
|
||||
| MacPro4,1 | Early 2009 | ^^ | <span style="color:green"> Everything is supported as long as GPU is Metal capable </span> |
|
||||
| MacPro5,1 | Mid-2010 | ^^ | ^^ |
|
||||
| MacPro5,1 | Mid-2010, Mid-2012 | ^^ | ^^ |
|
||||
|
||||
|
||||
### Xserve
|
||||
|
||||
| SMBIOS | Year | Supported | Comment |
|
||||
| :--- | :--- | :--- | :--- |
|
||||
| Xserve1,1 | Mid-2006 | <span style="color:red"> NO </span> | 32-Bit Firmware limitation |
|
||||
| Xserve2,1 | Early 2008 | ^^ | ^^ |
|
||||
| Xserve3,1 | Early 2009 | <span style="color:#30BCD5"> YES </span> | <span style="color:green"> Everything is supported as long as GPU is Metal capable </span> |
|
||||
| Xserve2,1 | Early 2008 | <span style="color:#30BCD5"> YES </span> | <span style="color:green"> Everything is supported as long as GPU is Metal capable </span> |
|
||||
| Xserve3,1 | Early 2009 | ^^ | ^^ |
|
||||
|
||||
# Once you've verified your hardware is supported, head to [Download and build macOS Installers](./INSTALLER.md)
|
||||
# Once you've verified your hardware is supported, head to [Download and build macOS Installers](./INSTALLER.md)
|
||||
|
||||
297
docs/PATCHEXPLAIN.md
Normal file
@@ -0,0 +1,297 @@
|
||||
# Explaining the patches in OpenCore Legacy Patcher
|
||||
|
||||
In our patcher, there are numerous patches used to ensure a stable system. Here we're going to go over what patches are used and why we recommend or even require them.
|
||||
|
||||
* [OpenCore Settings](#opencore-settings)
|
||||
* [Injected Kexts](#injected-kexts)
|
||||
* [On-Disk Patches](#on-disk-patches)
|
||||
|
||||
## OpenCore Settings
|
||||
|
||||
Below is a run down of the main logic OpenCore Legacy Patcher uses to gain native support in macOS. Note OpenCore's configuration is documented within [OpenCorePkg](https://github.com/acidanthera/OpenCorePkg) as well as an online version provided by us:
|
||||
|
||||
* [OpenCorePkg Online Docs](https://dortania.github.io/docs/latest/Configuration.html)
|
||||
|
||||
::: details Configuration Explanation
|
||||
|
||||
### ACPI -> Patch
|
||||
|
||||
* EHCx and XHC1 Patches
|
||||
* Reason: Required for proper USB operation
|
||||
* Logic: Avoids USB maps of newer models attaching and breaking USB port functionality
|
||||
* Models: All models require
|
||||
|
||||
### Booter -> Quirks
|
||||
|
||||
* ForceBooterSignature
|
||||
* Reason: Required to ensure Hibernation support
|
||||
* Logic: Tricks boot.efi into thinking OpenCore is Apple's firmware
|
||||
* Models: All models require
|
||||
|
||||
### DeviceProperties -> Add
|
||||
|
||||
* `PciRoot(0x0)/Pci(0x15,0x0)/Pci(0x0,0x0)`
|
||||
* `PciRoot(0x0)/Pci(0x1C,0x4)/Pci(0x0,0x0)`
|
||||
* `PciRoot(0x0)/Pci(0x1C,0x3)/Pci(0x0,0x0)`
|
||||
* `PciRoot(0x0)/Pci(0x1C,0x5)/Pci(0x0,0x0)`
|
||||
* `PciRoot(0x0)/Pci(0x1C,0x1)/Pci(0x0,0x0)`
|
||||
* Reason: Required to ensure Wifi works with full, native support
|
||||
* Logic: Tricks AirPortBrcmNIC.kext into thinking our device is a BCM94360 (`14e4,43ba`)
|
||||
* Models: Machines with BCM943224 and BCM94331 chipsets
|
||||
* `PciRoot(0x0)/Pci(0x3,0x0)/Pci(0x0,0x0)`
|
||||
* `PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)`
|
||||
* Reason: Required to ensure Brightness Control works on upgraded iMacs
|
||||
* Logic: Sets AppleBackLight properties
|
||||
* Models: iMac11,x and iMac12,x with upgraded Nvidia Metal GPUs
|
||||
* `PciRoot(0x0)/Pci(0x2,0x0)`
|
||||
* Reason: Disables internal GPU to fix sleep issues on upgrades iMacs
|
||||
* Logic: Tricks macOS into thinking iGPU is a generic PCI device
|
||||
* Models: iMac12,x with upgraded Metal GPUs
|
||||
|
||||
### Kernel -> Patch
|
||||
|
||||
* SMC Patch
|
||||
* Reason: Required to avoid SMC Firmware updates
|
||||
* Logic: Patches out `smc-version` in AppleSMC.kext, requires SMC-Spoof.kext for full functionality
|
||||
* Models: All models require
|
||||
* IOHIDFamily Patch
|
||||
* Reason: Required for HID peripheral support in macOS on older hardware
|
||||
* Logic: Tricks IOHIDFamily into thinking it's always booting recovery
|
||||
* Models: [2010 and older](https://github.com/dortania/OpenCore-Legacy-Patcher/blob/79ab028b0a039e97a528e0b99c876d95d9c2d41d/Resources/ModelArray.py#L310-L332)
|
||||
|
||||
### Kernel -> Quirks
|
||||
|
||||
* ThridPartyDrives
|
||||
* Reason: Required to avoid Hibernation wake issues on 3rd party drives
|
||||
* Logic: Patches AppleAHCIPort.kext into support
|
||||
* Models: All models with standard SATA ports
|
||||
* PanicNoKextDump
|
||||
* Reason: Avoids kext dump on kernel panics, easier kernel debugging
|
||||
* Logic: Patches Kernel to not dump dump unnecessary info
|
||||
* Models: Only set when Verbose Boot is enabled by the user
|
||||
|
||||
### Misc -> Security
|
||||
|
||||
* SecureBootModel
|
||||
* Reason: Required to ensure seamless OS updates with Big Sur
|
||||
* Logic: Sets iMacPro1,1's Secure Enclave Identifier (j137)
|
||||
* Models: All models require
|
||||
|
||||
### NVRAM -> Add
|
||||
|
||||
* `-v debug=0x100`
|
||||
* Reason: Used to see debug info of macOS's kernel and kexts, and avoids reboots on panic
|
||||
* Logic: Adds args to NVRAM
|
||||
* Models: Only set when Verbose Boot is enabled by the user
|
||||
* `-liludbgall`
|
||||
* Reason: Enables Lilu and plugin debug logging
|
||||
* Logic: Adds args to NVRAM
|
||||
* Models: Only set when Kext DEBUG is enabled by the user
|
||||
* `msgbuf=1048576`
|
||||
* Reason: Sets message buffer size to 1MB, ensures boot logs are retained
|
||||
* Logic: Adds args to NVRAM
|
||||
* Models: Only set when Kext DEBUG is enabled by the user
|
||||
* `agdpmod=pikera`
|
||||
* Reason: Fixes GPU switching on MacBookPro9,x
|
||||
* Logic: Adds args to NVRAM
|
||||
* Models: MacBookPro9,x
|
||||
* `shikigva=80 unfairgva=1`
|
||||
* `shikigva=128 unfairgva=1 -wegtree`
|
||||
* Reason: Fixes DRM support on models with upgraded AMD Metal GPUs
|
||||
* Logic: Adds args to NVRAM
|
||||
* Models: Models with upgraded AMD Metal GPUs
|
||||
### UEFI -> ProtocolOverrides
|
||||
|
||||
* GopPassThrough
|
||||
* Reason: Used for proper output on machines with UGA firmware but GOP GPU
|
||||
* Logic: Provide GOP protocol instances on top of UGA protocol instances
|
||||
* Models: MacPro3,1, MacBook4,1 iMac7,1-8,1
|
||||
|
||||
:::
|
||||
|
||||
## Injected Kext
|
||||
|
||||
Below is an explanation of what Kexts OpenCore Legacy Patcher will inject into memory on boot-up.
|
||||
|
||||
::: details Injected Kext Explanation
|
||||
|
||||
### Acidanthera
|
||||
|
||||
* Lilu
|
||||
* Reason: Patching engine for other kexts
|
||||
* Models: All models require
|
||||
* WhateverGreen
|
||||
* Reason: Patches GPU Frameworks and kext to ensure proper support
|
||||
* Models: All models require
|
||||
* CPUFriend
|
||||
* Reason: Patches IOx86PlatformPlugin to restore previous CPU profiles
|
||||
* Models: 2012 and newer models
|
||||
* AirportBrcmFixup
|
||||
* Reason: Patches IO80211 and co to fix networking support for unsupported cards
|
||||
* Models: BCM943224 and BCM94331
|
||||
* RestrictEvents
|
||||
* Reason: Disables memory errors on MacPro7,1
|
||||
* Models: Mac Pros and Xserves
|
||||
|
||||
### Ethernet
|
||||
|
||||
* nForceEthernet
|
||||
* Reason: Inject old Nvidia Ethernet kext to resolve networking in Catalina and newer
|
||||
* Models: 2010 and older Nvidia Ethernet require
|
||||
* MarvelYukonEthernet
|
||||
* Reason: Inject old Marvel Ethernet kext to resolve networking in Catalina and newer
|
||||
* Models: 2008 and older Marvel Ethernet require
|
||||
* CatalinaBCM5701Ethernet
|
||||
* Reason: Inject old Broadcom Ethernet kext to resolve networking in Big Sur
|
||||
* Logic: Patch out conflicting symbols to not colide existing BCM5701Ethernet
|
||||
* Models: 2011 and older Broadcom Ethernet require
|
||||
|
||||
### Maps
|
||||
|
||||
* USBMap
|
||||
* Reason: Inject old USB map profiles to fix USB
|
||||
* Models: All models require
|
||||
|
||||
### SSE
|
||||
|
||||
* AAMouSSE
|
||||
* Reason: Translates SSE4.2 instructions to compatible code for SSE4,1 CPUs, required for AMD Metal drives
|
||||
* Models: MacPro3,1
|
||||
* telemetrap
|
||||
* Reason: Ensures temelemtry.plugin doesn't run, required for SSE4,1 CPUs
|
||||
* Models: Penryn CPUs
|
||||
|
||||
### Wifi
|
||||
|
||||
* IO80211HighSierra
|
||||
* Reason: Re-inject Atheros wifi drivers from High Sierra
|
||||
* Logic: Patch out conflicting symbols to not colide existing IO80211Family
|
||||
* Models: Atheros cards
|
||||
* IO80211Mojave
|
||||
* Reason: Re-inject Broadcom wifi drivers from Mojave
|
||||
* Logic: Patch out conflicting symbols to not colide existing IO80211Family
|
||||
* Models: BCM94322
|
||||
|
||||
### Misc
|
||||
|
||||
* AppleBackLightFixup
|
||||
* Reason: Patch AppleBacklight for iMacs with Nvidia Metal GPU upgrades
|
||||
* Models: iMac11,x, iMac12,x with upgraded Nvidia Metal GPUs
|
||||
* AppleIntelPIIXATA
|
||||
* Reason: Fix IDE support on MacPro3,1
|
||||
* Models: MacPro3,1
|
||||
* AppleIntelMCEDisabler
|
||||
* Reason: Fix dual socket support in Catalina and newer
|
||||
* Models: Mac Pros and Xserves
|
||||
* NightShiftEnabler
|
||||
* Reason: Enables NightShift support on unsupported models
|
||||
* Models: 2011 and older, MacBookPro9,x included
|
||||
* SMC-Spoof
|
||||
* Reason: Spoofs SMC version to 9.9999
|
||||
* Models: All models require
|
||||
:::
|
||||
|
||||
|
||||
## On-Disk Patches
|
||||
|
||||
Unfortunately certain on-disk patches are required to achieve full functionality. Below is a breakdown of patches supported
|
||||
|
||||
Note, GPU Acceleration Patches are not public yet, the below section is simply documentation for easier research with new aids.
|
||||
|
||||
::: details Audio Patches
|
||||
|
||||
### Extensions
|
||||
|
||||
* AppleHDA
|
||||
* Reason: Re-add High Sierra's AppleHDA to achieve audio support
|
||||
* Models: 2011 and older Macs (excluding MacPro4,1+)
|
||||
|
||||
:::
|
||||
|
||||
::: details Acceleration Patches
|
||||
|
||||
### Extensions
|
||||
|
||||
#### General Patches
|
||||
|
||||
* IOSurface.kext
|
||||
* Reason: Fixes immediate logout on login
|
||||
* Logic: Downgrade to Catalina IOSurface
|
||||
* Note: For AMD and Intel, additional `addMemoryRegion/removeMemoryRegion` patch added changing the first conditional jump to non conditional jump
|
||||
* At Offset `0xdb52` and `0xdbc6`, replace following bytes with `0xeb`
|
||||
|
||||
#### Dropped Acceleration Binaries
|
||||
|
||||
* Nvidia Binaries
|
||||
* GeForceGA.bundle
|
||||
* GeForceTesla.kext
|
||||
* Skip IOFree Panic - Mojave+
|
||||
* At Offset `0x5CF9A` replace following bytes with `0xEB`
|
||||
* Avoids `addMemoryRegion/removeMemoryRegion` calls
|
||||
* At Offset `0x5527` and `0x77993`, replace following bytes with `0x909090909090`
|
||||
* GeForceTeslaGLDriver.bundle
|
||||
* GeForceTeslaVADriver.bundle
|
||||
* NVDANV50HalTesla.kext
|
||||
* NVDAResmanTesla.kext
|
||||
|
||||
* AMD/ATI Binaries
|
||||
* AMD2400Controller.kext
|
||||
* AMD2600Controller.kext
|
||||
* AMD3800Controller.kext
|
||||
* AMD4600Controller.kext
|
||||
* AMD4800Controller.kext
|
||||
* AMD5000Controller.kext
|
||||
* AMD6000Controller.kext
|
||||
* AMDFramebuffer.kext
|
||||
* AMDLegacyFramebuffer.kext
|
||||
* AMDLegacySupport.kext
|
||||
* AMDRadeonVADriver.bundle
|
||||
* AMDRadeonVADriver2.bundle
|
||||
* AMDRadeonX3000.kext
|
||||
* AMDRadeonX3000GLDriver.bundle
|
||||
* AMDShared.bundle
|
||||
* AMDSupport.kext
|
||||
* ATIRadeonX2000.kext
|
||||
* ATIRadeonX2000GA.plugin
|
||||
* ATIRadeonX2000GLDriver.bundle
|
||||
* ATIRadeonX2000VADriver.bundle
|
||||
|
||||
* Intel 5th Gen Binaries
|
||||
* AppleIntelFramebufferAzul.kext
|
||||
* AppleIntelFramebufferCapri.kext
|
||||
* AppleIntelHDGraphics.kext
|
||||
* AppleIntelHDGraphicsFB.kext
|
||||
* AppleIntelHDGraphicsGA.plugin
|
||||
* AppleIntelHDGraphicsGLDriver.bundle
|
||||
* AppleIntelHDGraphicsVADriver.bundle
|
||||
|
||||
* Intel 6th Gen Binaries
|
||||
* AppleIntelHD3000Graphics.kext
|
||||
* AppleIntelHD3000GraphicsGA.plugin
|
||||
* AppleIntelHD3000GraphicsGLDriver.bundle
|
||||
* AppleIntelHD3000GraphicsVADriver.bundle
|
||||
* AppleIntelSNBGraphicsFB.kext
|
||||
* AppleIntelSNBVA.bundle
|
||||
|
||||
### Frameworks
|
||||
|
||||
* CoreDisplay.framework
|
||||
* Logic: Copied from Mojave, heavy modifications/shims
|
||||
* IOSurface.framework
|
||||
* OpenGL.framework
|
||||
* Logic: Copied from Mojave
|
||||
|
||||
### PrivateFrameworks
|
||||
|
||||
* GPUSupport.framework
|
||||
* Logic: Copied from Mojave
|
||||
* SkyLight.framework
|
||||
* Logic: Copied from Mojave, heavy modifications/shims
|
||||
|
||||
### LaunchDaemons
|
||||
|
||||
* HiddHack.plist
|
||||
* Reason: Fixes unresponsive input when patching Skylight
|
||||
* Logic: Forces `hidd` to register events, as Skylight handles them by default in Big Sur
|
||||
|
||||
:::
|
||||
@@ -21,9 +21,15 @@ To do this, run the OpenCore Patcher and head to Patcher Settings:
|
||||
|
||||

|
||||
|
||||
Here you can change different patcher settings, however the main 2 of interest are:
|
||||
Here you can change different patcher settings, however the main interest is:
|
||||
|
||||
* Enable Verbose Mode
|
||||
* Set ShowPicker Mode
|
||||
|
||||
Once you've toggled them both off, build your OpenCore EFI once again and install to your desired drive. Now to show OpenCore picker, you can simply press "Esc" key repeatedly.
|
||||
Once you've toggled them both off, build your OpenCore EFI once again and install to your desired drive. Now to show the OpenCore selector, you can simply hold down the "ESC" key while clicking on EFI boot, then you can release the "ESC" key when you see the cursor arrow at the top left.
|
||||
|
||||
**Note**: For users who need Post-Install Volume patches for Audio support, you **must** disable the following settings in "Patcher Settings" when building and installing your new OpenCore:
|
||||
|
||||
* SIP: Disabled
|
||||
* SecureBootModel: Disabled
|
||||
|
||||
Once set, rebuild OpenCore, install to drive and reboot. Then, Post-Install Volume patches will run just fine
|
||||
@@ -13,7 +13,7 @@ features:
|
||||
- title: Built with security in mind
|
||||
details: Supporting System Integrity Protection(SIP), FileVault 2, .im4m Secure Boot and Vaulting. You're just as secure as a supported Mac
|
||||
- title: Native OTA updates
|
||||
details: Install updates the moment the come out just like on a supported Mac, and no more 12GB+ updates.
|
||||
details: Install updates the moment they come out just like on a supported Mac, and no more 12GB+ updates.
|
||||
- title: Zero firmware patching
|
||||
details: No need to patch APFS ROM support, all protocol upgrades are done in memory and never permanent.
|
||||
footer: Copyright © Dortania 2020-2021
|
||||
|
||||
@@ -8,6 +8,10 @@ This is a sophisticated boot loader used to inject and patch data in memory, ins
|
||||
|
||||
While many PC users from the Hackintosh community are familiar with OpenCore, OpenCore was designed as Mac and PC agnostic ensuring both platforms can use it easily. And with OpenCore Legacy Patcher, we help automate the process making running with OpenCore that much easier.
|
||||
|
||||
For advanced troubleshooting, we highly recommend users check out the [OpenCore Patcher Paradise Discord Server](https://discord.gg/UbM8U75E) as this is generally the quickest way to get a hold of us developers and get help from the community.
|
||||
|
||||
For those who wish to support this patcher, please see the [Supporting the Patcher page](./DONATE.md)
|
||||
|
||||
## How do I get started?
|
||||
|
||||
1. The first step of ensuring whether your model is support is checking here:
|
||||
|
||||
39
docs/TERMS.md
Normal file
@@ -0,0 +1,39 @@
|
||||
# OpenCore Patcher Terminology
|
||||
|
||||
With OpenCore Legacy Patcher, we use a lot of different terms to refer to hardware including `SSE4.1`, `32-Bit Firmware`, etc. This page is to help users understand what all these confusing words mean.
|
||||
|
||||
# Terminology
|
||||
|
||||
Term | Description
|
||||
--- | ---
|
||||
**macOS** | Apple's own UNIX based OS used for Mac machines and "What makes a Mac a Mac".
|
||||
**Windows** | Microsoft's proprietary OS that is used and supported on a wide range of devices
|
||||
**Linux** | Family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically packaged in a Linux distribution. Note that while macOS and Linux may be UNIX-based, they're vastly different.
|
||||
**Bootloader** | Piece of software that loads an OS, usually made by the OS creators. OpenCore is technically not a bootloader per se (see boot manager explanation down below). Apple's Boot.efi would be the actual boot loader in a Mac.
|
||||
**Boot Manager** | Piece of software that manages bootloaders – we have many of these: Clover, systemd-boot, OpenCore, rEFInd, rEFIt... These are generally seen as prepping the system for the actual boot loader.
|
||||
---
|
||||
Term | Description
|
||||
--- | ---
|
||||
**OpenCore** | The new hotness on the scene, made with security in mind by the [Acidanthera team](https://github.com/acidanthera), has faster booting and lighter weight than previous boot managers. Supports many native Mac features such as SIP, FileVault, Secure Boot, etc
|
||||
**ACPI** | Tables defined in your firmware defining your hardware and different methods, tied directly to how IOKit/IOService handles device setup
|
||||
**NVRAM** | Non-volitile storage, where many variables are stored including default boot options, Hibernation keys, Secure Boot information, etc
|
||||
---
|
||||
Term | Description
|
||||
--- | ---
|
||||
**XNU** | Also known as **X** is **N**ot **U**nix, XNU is referred to as macOS's "kernel" and the heart of what makes macOS tick
|
||||
**Kexts** | Also known as **K**ernel **Ext**ensions, are macOS's drivers. They're used to perform different tasks like device drivers or for a different purpose (in this patcher) like patching the OS, injecting information or running tasks.
|
||||
**KernelCollection** | Also known as the ImmutableKernel and PrelinkedKernel, this is a bundle of the kernel(XNU) and kernel extensions(Kexts) that we use to boot macOS. This is also what OpenCore patches in memory to allow us to have a seamless experience <br/>- PrelinkedKernel: Default caching system since 10.7 <br/>- ImmutableKernel: Secure Boot based caching system since 10.13 <br/>- KernelCollection: Merge of both Prelinked and ImmutableKernel's since macOS 11, Big Sur
|
||||
**IOKit** | Backbone of how Kernel Extentions (Kexts) probe and attach onto hardware, starts quickly after kernel initates
|
||||
**WindowServer** | Backbone of the GUI interface in macOS, one of the first userfacing userspace programs to kick-in
|
||||
**OTA** | Short for **O**ver **T**he **A**ir, refers to native OS updates via System Preferences like a supported Mac
|
||||
**DELTA** | Often used with OTA, refers to OS updates that much smaller than full installers (generally ~3GB), note Deltas require the root volume to be unmotified otherwise ~12GB updates will occur.
|
||||
---
|
||||
Term | Description
|
||||
--- | ---
|
||||
**EFI** | It can denote two things: <br/>- Mac's firmware, which is the same as UEFI, but pretty modified for Macs only, so not so "Universal" <br/>- The partition on your hard drive that stores software read by the UEFI to load OSes (like the Windows bootloader) or UEFI Applications (like OpenCore), it's FAT32 formatted and has an ID type of EF00 (in hex). It can be named ESP or SYSTEM, and it's usually from 100MB to 400MB in size but the size doesn't reflect upon anything.
|
||||
**HFS+** | Also known as MacOS Journaled, this was the default macOS drive format up until macOS 10.13, format was designed around spinning disks
|
||||
**APFS** | This was the default macOS drive from macOS 10.13 and onwards for SSDs, and standard for all drives in Mojave. Format was designed around SSDs primarily.
|
||||
**32 and 64-Bit CPU** | The bit number of a CPU determines how much data a CPU can address. <br/>- 32-Bit CPUs were only supported up-to Mac OS X 10.6, Snow Leopard.
|
||||
**32-Bit Firmware** | The bit number of a Firmware determines how much data the firmware can address. In some older Macs, it's common to have a 64-Bit CPU can have a 32-Bit firmware<br/>- 32-Bit Firmwares were only supported up-to Mac OS X 10.7, Lion.
|
||||
**SSE Instructions** | Also known as **S**IMD **S**ingle-Precision Floating-Point **I**nstructions, these are defined as instruction sets supported by your CPU. In macOS, there are a certain number of instruction sets required for normal operation: <br/>- SSE3: Required for all Intel CPUs since Mac OS X 10.4, Tiger <br/>- SSSE3: Required for all Intel 64-Bit CPUs since Mac OS X 10.6, Snow Leopard <br/>- SSE4.1: Required for all Intel CPUs since macOS 10.12, Sierra
|
||||
---
|
||||
118
docs/TESTED.md
Normal file
@@ -0,0 +1,118 @@
|
||||
# Tested Models on OpenCore Legacy Patcher
|
||||
|
||||
To aid users in troubleshooting, we've compiled a list of users who've reported success with OpenCore Legacy patcher as well as the version used. This should aid users in verifying whether issues with the patcher are regression-related with newer versions.
|
||||
|
||||
|
||||
### MacBook
|
||||
|
||||
| SMBIOS | Tested | Tester | Comment |
|
||||
| :--- | :--- | :--- | :--- |
|
||||
| MacBook4,1 | <span style="color:#30BCD5"> YES </span> | Mami | - Stock Model<br/>- Couldn't install due to broke USB support |
|
||||
| MacBook5,1 | ^^ | air.man | - Stock Model<br/>- Patcher version 0.0.19 |
|
||||
| MacBook5,2 | ^^ | Finder352 | ^^ |
|
||||
| MacBook6,1 | ^^ | Finder352 | ^^ |
|
||||
| MacBook7,1 | ^^ | MykolaG | ^^ |
|
||||
| ^^ | ^^ | Jazzzny | ^^ |
|
||||
| ^^ | ^^ | AlexSakha67 | - Stock Model<br/>- Patcher version 0.0.20 |
|
||||
|
||||
### MacBook Air
|
||||
|
||||
| SMBIOS | Year | Supported | Comment |
|
||||
| :--- | :--- | :--- | :--- |
|
||||
| MacBookAir2,1 | No reports | N/A | N/A |
|
||||
| MacBookAir3,1 | ^^ | ^^ | ^^ |
|
||||
| MacBookAir3,2 | ^^ | ^^ | ^^ |
|
||||
| MacBookAir4,1 | ^^ | ^^ | ^^ |
|
||||
| MacBookAir4,2 | ^^ | ^^ | ^^ |
|
||||
| MacBookAir5,1 | <span style="color:#30BCD5"> YES </span> | Ausdauersportler | - Stock Model<br/>- Patcher version 0.0.9 |
|
||||
| ^^ | ^^ | webg3 | Stock Model |
|
||||
| MacBookAir5,2 | ^^ | Bab-droid | - Stock Model<br/>- Patcher version 0.0.19 |
|
||||
| ^^ | ^^ | K-Hobert | - Stock model <br/>- Patcher version unknown |
|
||||
| ^^ | ^^ | cboukouv | - Stock model <br/>- Patcher version 0.0.21 |
|
||||
|
||||
### MacBook Pro
|
||||
|
||||
| SMBIOS | Tested | Tester | Comment |
|
||||
| :--- | :--- | :--- | :--- |
|
||||
| MacBookPro4,1 | <span style="color:#30BCD5"> YES </span> | cboukouv | - Stock model <br/>- Patcher version 0.0.19 |
|
||||
| MacBookPro5,1 | ^^ | GURU_Jasho#5736 | - Stock model <br/>- Patcher version 0.0.21 |
|
||||
| MacBookPro5,2 | ^^ | hvds | ^^ |
|
||||
| MacBookPro5,3 | ^^ | kommtzeitkonrad | - Stock model <br/>- Patcher version 0.0.22 |
|
||||
| MacBookPro5,4 | No reports | N/A | N/A |
|
||||
| MacBookPro5,5 | ^^ | ^^ | ^^ |
|
||||
| MacBookPro6,1 | ^^ | ^^ | ^^ |
|
||||
| MacBookPro6,2 | <span style="color:#30BCD5"> YES </span> | Jakeluke | - Stock model, dGPU broken <br/>- Patcher version unknown |
|
||||
| MacBookPro7,1 | No reports | N/A | N/A |
|
||||
| MacBookPro8,1 | <span style="color:#30BCD5"> YES </span> | AvaQueen | - Stock model <br/>- Patcher version 0.0.19 |
|
||||
| MacBookPro8,2 | ^^ | air.man | - Stock model, dGPU disabled <br/>- Patcher version 0.0.22 |
|
||||
| ^^ | ^^ | cboukouv | - Stock model <br/>- Patcher version 0.0.19 |
|
||||
| MacBookPro8,3 | No reports | N/A | N/A |
|
||||
| MacBookPro9,1 | <span style="color:#30BCD5"> YES </span> | jbdamiano | - Stock model <br/>- Patcher version 0.0.19 |
|
||||
| ^^ | ^^ | dennes544 | ^^|
|
||||
| ^^ | ^^ | cgrazy | ^^ |
|
||||
| ^^ | ^^ | LIPA85 | ^^ |
|
||||
| MacBookPro9,2 | ^^ | alexx17xx | - Stock model <br/>- Patcher version 0.0.19 |
|
||||
| ^^ | ^^ | Arvxistanx | ^^ |
|
||||
| ^^ | ^^ | CyberDroid1 | - Stock model<br/>- Patcher version 0.0.16 |
|
||||
| ^^ | ^^ | woefi | - BCM94331CAX upgrade<br/>- Patcher version 0.0.13 |
|
||||
| ^^ | ^^ | whgmkeller | - Stock model<br/>- Patcher version 0.0.11 |
|
||||
| ^^ | ^^ | vinaypundith | - Patcher version 0.0.7 |
|
||||
| MacBookPro10,1 | ^^ | traviswparker | - Stock model <br/>- Patcher version 0.0.14 |
|
||||
| ^^ | ^^ | il-rollino | - Upgraded BCM94360CSAX <br/>- Patcher version 0.0.21 |
|
||||
| MacBookPro10,2 | No reports | N/A | N/A |
|
||||
|
||||
### Mac mini
|
||||
|
||||
| SMBIOS | Tested | Tester | Comment |
|
||||
| :--- | :--- | :--- | :--- |
|
||||
| Macmini3,1 | No reports | N/A | N/A |
|
||||
| Macmini4,1 | ^^ | ^^ | ^^ |
|
||||
| Macmini5,1 | ^^ | ^^ | ^^ |
|
||||
| Macmini5,2 | ^^ | ^^ | ^^ |
|
||||
| Macmini5,3 | ^^ | ^^ | ^^ |
|
||||
| Macmini6,1 | <span style="color:#30BCD5"> YES </span> | cicofz | - Stock model <br/>- Patcher version 0.0.21 |
|
||||
| ^^ | ^^ | Stig124 | - Stock model <br/>- Patcher version 0.0.19 |
|
||||
| ^^ | ^^ | mwidjaya | - Stock model <br/>- Patcher version 0.0.18 |
|
||||
| Macmini6,2 | ^^ | Shelbs | - Stock model <br/>- Patcher version 0.0.16 |
|
||||
|
||||
### iMac
|
||||
|
||||
| SMBIOS | Tested | Tester | Comment |
|
||||
| :--- | :--- | :--- | :--- |
|
||||
| iMac7,1 | No reports | N/A | N/A |
|
||||
| iMac8,1 | <span style="color:#30BCD5"> YES </span> | EduCovas | - Stock Model<br/>- Patcher version 0.0.21 |
|
||||
| iMac9,1 | ^^ | Allanrfox | ^^ |
|
||||
| ^^ | ^^ | Jakeluke | ^^ |
|
||||
| iMac10,1 | ^^ | Ausdauersportler | - Upgraded with WX4150 |
|
||||
| iMac11,1 | ^^ | internetzel | - Upgraded with RX580 mobile |
|
||||
| iMac11,2 | ^^ | MykolaG | - Stock Model<br/>- Patcher version 0.0.21 |
|
||||
| ^^ | ^^ | iMac-iPad | - Stock Model<br/>- Patcher version 0.0.21 |
|
||||
| ^^ | ^^ | vinaypundith | - Patcher version 0.0.19 |
|
||||
| iMac11,3 | ^^ | Ausdauersportler | - Upgraded with Polaris GPU<br/>- Upgraded BCM943602CDP<br/>- Patcher version 0.0.21 |
|
||||
| iMac12,1 | ^^ | shnockdu | - Upgraded with Kepler GPU<br/>- Patcher version 0.0.21 |
|
||||
| ^^ | ^^ | StephN999 | - Upgraded WX4150 GPU<br/>- Upgraded BCM94360CD<br/>- Patcher version 0.0.21 |
|
||||
| iMac12,2 | ^^ | Ausdauersportler | - Upgraded with Polaris GPU<br/>- Upgraded BCM943602CDP<br/>- Patcher version 0.0.21 |
|
||||
| iMac13,1 | ^^ | alexx17xx | - Stock Model<br/>- Patcher version 0.0.19 |
|
||||
| iMac13,2 | ^^ | Alain13 | ^^ |
|
||||
| ^^ | ^^ | algernonpule | - Stock Model<br/>- Patcher version 0.0.19 |
|
||||
| iMac13,3 | No reports | N/A | N/A |
|
||||
| iMac14,1 | <span style="color:#30BCD5"> YES </span> | woefi | - Upgraded NVMe<br/>- Patcher version 0.0.21 |
|
||||
| ^^ | ^^ | mikeboss | - Stock Model<br/>- Patcher version 0.0.19 |
|
||||
| iMac14,2 | ^^ | OKonnel | - Stock Model<br/>- Patcher version 0.0.22 |
|
||||
| ^^ | ^^ | mibaxx | - Stock Model<br/>- Patcher version 0.0.21 |
|
||||
| iMac14,3 | No reports | N/A | N/A |
|
||||
|
||||
### Mac Pro
|
||||
|
||||
| SMBIOS | Tested | Tester | Comment |
|
||||
| :--- | :--- | :--- | :--- |
|
||||
| MacPro3,1 | <span style="color:#30BCD5"> YES </span> | christiann | - Upgraded with RX 560 and BCM94322<br/>- Stock Bluetooth card removed<br/>- Patcher version 0.0.21 |
|
||||
| ^^ | ^^ | gw463 | - Upgraded GTX 680<br/>- Upgraded BCM94360<br/>- Patcher version 0.0.22 |
|
||||
| ^^ | ^^ | AlexSakha67 | - Upgraded R9 280<br/>- Patcher version 0.0.20 |
|
||||
| ^^ | ^^ | nekton1 | - Upgraded GTX 680<br/>- Patcher version 0.0.20 |
|
||||
| ^^ | ^^ | Pri-est | - Patcher version 0.0.9 |
|
||||
| ^^ | ^^ | vinaypundith | - Upgraded GTX 680<br/>- Upgraded BCM94360CD<br/>- Patcher version 0.0.6 |
|
||||
| MacPro4,1 | ^^ | ^^ | - Patcher version 0.0.9 |
|
||||
| MacPro5,1 | ^^ | woefi | - Upgraded with RX 580<br/>- Patcher version 0.0.21 |
|
||||
| ^^ | ^^ | Mabrouk Oscar | - Patcher version 0.0.21 |
|
||||
| ^^ | ^^ | astuffedtiger | - MacPro4,1 flashed to 5,1<br/>- Patcher version 0.0.18 |
|
||||
@@ -8,6 +8,8 @@ Here are some common errors users may experience while using this patcher:
|
||||
* [Reboot when entering Hibernation (`Sleep Wake Failure`)](#reboot-when-entering-hibernation-sleep-wake-failure)
|
||||
* [Booting with a non-flashed GPU](#booting-with-a-non-flashed-gpu)
|
||||
* [How to Boot Big Sur Recovery](#how-to-boot-big-sur-recovery)
|
||||
* [Stuck on "Your Mac needs a firmware update"](#stuck-on-your-mac-needs-a-firmware-update)
|
||||
* [No Brightness Control](#no-brightness-control)
|
||||
|
||||
## Stuck on `This version of Mac OS X is not supported on this platform`
|
||||
|
||||
@@ -45,9 +47,25 @@ sudo bless --verbose --file /Volumes/VOLNAME/EFI/OC/OpenCore.efi --folder /Volum
|
||||
|
||||
* Note you will need to replace `VOLNAME` with the Volume name of your USB or hard drive with OpenCore
|
||||
* Note 2: Once done, you can re-enable SIP
|
||||
* Note 3: The EFI partition OpenCore was installed on must be mounted, if it's unmounted simply rerun "Install OpenCore to drive"
|
||||
|
||||
Once you boot OpenCore for the first time, LauncherOption will install itself as the top boot priority making OpenCore always launch. Combined with `RequestBootVar`, all boot options must go through OpenCore ensuring seamless usage even with OS installation and updates.
|
||||
|
||||
## How to Boot Big Sur Recovery
|
||||
|
||||
By default, the patcher will try to hide extra boot options such as recovery from the user. To make them appear, simply press the "Spacebar" inside OpenCore's Picker to list all boot options.
|
||||
By default, the patcher will try to hide extra boot options such as recovery from the user. To make them appear, simply press the "Spacebar" inside OpenCore's Picker to list all boot options.
|
||||
|
||||
## Stuck on "Your Mac needs a firmware update"
|
||||
|
||||
Full error: "Your Mac needs a firmware update in order to install to this Volume. Please select a Mac OS Extended (Journaled) volume instead."
|
||||
|
||||
|
||||
This error occurs when macOS determines the firmware to not have full APFS support. To resolve is quite simple, when building OpenCore head to "Patcher Settings" and enable "Moderate SMBIOS Patching" or higher. This will ensure that the firmware reported will show as supporting full APFS capabilities.
|
||||
|
||||
## No Brightness Control
|
||||
|
||||
With OCLP v0.0.22, we've added support for brightness control on many models. However some users may have noticed that their brightness keys do not work.
|
||||
|
||||
To work-around, we recommend user try out the below app:
|
||||
|
||||
* [Brightness Slider](https://actproductions.net/free-apps/brightness-slider/)
|
||||
@@ -3,7 +3,8 @@
|
||||
To remove OpenCore is actually quite simply:
|
||||
|
||||
1. Remove OpenCore either from the USB or internal drive
|
||||
* You'll need to mount the drive's EFI partition, and delete the EFI folder
|
||||
* You'll need to mount the drive's EFI partition, and delete the EFI/OC folder as well as the System folder
|
||||
* Note **do not** delete the entire EFI folder, this will likely break any existing Windows and Linux installations
|
||||
* [See here for example how to mount](https://dortania.github.io/OpenCore-Post-Install/universal/oc2hdd.html)
|
||||
2. Reset NVRAM
|
||||
* [Reset NVRAM or PRAM on your Mac](https://support.apple.com/HT204063)
|
||||
|
||||
22
docs/UPDATE.md
Normal file
@@ -0,0 +1,22 @@
|
||||
# Updating OpenCore and Co.
|
||||
|
||||
With OpenCore Legacy Patcher, generally there's very little reason for users to update the OpenCore installed on their machine unless you feel there's a benefit with new versions for your setup.
|
||||
|
||||
For those who do wish to update, it's actually quite easy. Simply [download the latest release](https://github.com/dortania/OpenCore-Legacy-Patcher/releases) and rerun the patcher:
|
||||
|
||||

|
||||
|
||||
Then simply rebuild your OpenCore build and install again. Then voila, OpenCore is updated!
|
||||
|
||||
To check what version of OpenCore and Patcher version you're currently running, you can run the following in terminal:
|
||||
|
||||
```bash
|
||||
# OpenCore Version
|
||||
nvram 4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102:opencore-version
|
||||
# Patcher Version
|
||||
nvram 4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102:OCLP-Version
|
||||
```
|
||||
|
||||

|
||||
|
||||
From this, we can see we're running a RELEASE version of OpenCore 0.6.8 built on March 27th, 2021 with Patcher Version 0.0.20!
|
||||
2
docs/package-lock.json
generated
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "OpenCore-Legacy-Patcher",
|
||||
"version": "0.6.6",
|
||||
"version": "0.0.1",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
||||
8
entitlements.plist
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>com.apple.security.cs.disable-library-validation</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
BIN
images/OC-Build.png
Normal file
|
After Width: | Height: | Size: 99 KiB |
BIN
images/OC-Picker-External.png
Normal file
|
After Width: | Height: | Size: 129 KiB |
|
Before Width: | Height: | Size: 141 KiB After Width: | Height: | Size: 141 KiB |
BIN
images/OC-Picker-SD.png
Normal file
|
After Width: | Height: | Size: 79 KiB |
BIN
images/OC-Picker-SSD.png
Normal file
|
After Width: | Height: | Size: 62 KiB |
BIN
images/background-moved.png
Normal file
|
After Width: | Height: | Size: 1.1 MiB |
|
Before Width: | Height: | Size: 69 KiB After Width: | Height: | Size: 68 KiB |
BIN
images/graphics-download.png
Normal file
|
After Width: | Height: | Size: 374 KiB |
BIN
images/graphics-open.png
Normal file
|
After Width: | Height: | Size: 514 KiB |
BIN
images/icns-sl-save.png
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
images/icnspack-done.png
Normal file
|
After Width: | Height: | Size: 505 KiB |
BIN
images/icnspack-folder.png
Normal file
|
After Width: | Height: | Size: 493 KiB |
BIN
images/icon-SL.png
Normal file
|
After Width: | Height: | Size: 232 KiB |
BIN
images/logs-efi.png
Normal file
|
After Width: | Height: | Size: 453 KiB |
BIN
images/mac-icns-drive.png
Normal file
|
After Width: | Height: | Size: 394 KiB |
BIN
images/mountefi.png
Normal file
|
After Width: | Height: | Size: 99 KiB |
BIN
images/oc-explained.png
Normal file
|
After Width: | Height: | Size: 544 KiB |
BIN
images/oclp-version.png
Normal file
|
After Width: | Height: | Size: 47 KiB |
@@ -29,6 +29,10 @@
|
||||
<key>Patch</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>Base</key>
|
||||
<string></string>
|
||||
<key>BaseSkip</key>
|
||||
<integer>0</integer>
|
||||
<key>Comment</key>
|
||||
<string>XHC1 to SHC1</string>
|
||||
<key>Count</key>
|
||||
@@ -55,6 +59,10 @@
|
||||
<data></data>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Base</key>
|
||||
<string></string>
|
||||
<key>BaseSkip</key>
|
||||
<integer>0</integer>
|
||||
<key>Comment</key>
|
||||
<string>EHC1 to EH01</string>
|
||||
<key>Count</key>
|
||||
@@ -81,6 +89,10 @@
|
||||
<data></data>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Base</key>
|
||||
<string></string>
|
||||
<key>BaseSkip</key>
|
||||
<integer>0</integer>
|
||||
<key>Comment</key>
|
||||
<string>EHC2 to EH02</string>
|
||||
<key>Count</key>
|
||||
@@ -152,7 +164,7 @@
|
||||
<key>ProtectMemoryRegions</key>
|
||||
<false/>
|
||||
<key>ProtectSecureBoot</key>
|
||||
<false/>
|
||||
<true/>
|
||||
<key>ProtectUefiServices</key>
|
||||
<false/>
|
||||
<key>ProvideCustomSlide</key>
|
||||
@@ -198,6 +210,24 @@
|
||||
<key>PlistPath</key>
|
||||
<string>Contents/Info.plist</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Arch</key>
|
||||
<string>x86_64</string>
|
||||
<key>Comment</key>
|
||||
<string>AppleHDA Patching</string>
|
||||
<key>Enabled</key>
|
||||
<false/>
|
||||
<key>MaxKernel</key>
|
||||
<string></string>
|
||||
<key>MinKernel</key>
|
||||
<string>18.0.0</string>
|
||||
<key>BundlePath</key>
|
||||
<string>AppleALC.kext</string>
|
||||
<key>ExecutablePath</key>
|
||||
<string>Contents/MacOS/AppleALC</string>
|
||||
<key>PlistPath</key>
|
||||
<string>Contents/Info.plist</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Arch</key>
|
||||
<string>x86_64</string>
|
||||
@@ -244,7 +274,7 @@
|
||||
<key>MaxKernel</key>
|
||||
<string></string>
|
||||
<key>MinKernel</key>
|
||||
<string>18.0.0</string>
|
||||
<string></string>
|
||||
<key>BundlePath</key>
|
||||
<string>AAAMouSSE.kext</string>
|
||||
<key>ExecutablePath</key>
|
||||
@@ -342,6 +372,60 @@
|
||||
<key>PlistPath</key>
|
||||
<string>Contents/Info.plist</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Arch</key>
|
||||
<string>x86_64</string>
|
||||
<key>Comment</key>
|
||||
<string>BCM94328 Wifi Patch</string>
|
||||
<key>Enabled</key>
|
||||
<false/>
|
||||
<key>MaxKernel</key>
|
||||
<string></string>
|
||||
<key>MinKernel</key>
|
||||
<string>16.0.0</string>
|
||||
<key>BundlePath</key>
|
||||
<string>corecaptureElCap.kext</string>
|
||||
<key>ExecutablePath</key>
|
||||
<string>Contents/MacOS/corecaptureElCap</string>
|
||||
<key>PlistPath</key>
|
||||
<string>Contents/Info.plist</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Arch</key>
|
||||
<string>x86_64</string>
|
||||
<key>Comment</key>
|
||||
<string>BCM94328 Wifi Patch</string>
|
||||
<key>Enabled</key>
|
||||
<false/>
|
||||
<key>MaxKernel</key>
|
||||
<string></string>
|
||||
<key>MinKernel</key>
|
||||
<string>16.0.0</string>
|
||||
<key>BundlePath</key>
|
||||
<string>IO80211ElCap.kext</string>
|
||||
<key>ExecutablePath</key>
|
||||
<string>Contents/MacOS/IO80211ElCap</string>
|
||||
<key>PlistPath</key>
|
||||
<string>Contents/Info.plist</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Arch</key>
|
||||
<string>x86_64</string>
|
||||
<key>Comment</key>
|
||||
<string>BCM94328 Wifi Patch</string>
|
||||
<key>Enabled</key>
|
||||
<false/>
|
||||
<key>MaxKernel</key>
|
||||
<string></string>
|
||||
<key>MinKernel</key>
|
||||
<string>16.0.0</string>
|
||||
<key>BundlePath</key>
|
||||
<string>IO80211ElCap.kext/Contents/PlugIns/AppleAirPortBrcm43224.kext</string>
|
||||
<key>ExecutablePath</key>
|
||||
<string>Contents/MacOS/AppleAirPortBrcm43224</string>
|
||||
<key>PlistPath</key>
|
||||
<string>Contents/Info.plist</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Arch</key>
|
||||
<string>x86_64</string>
|
||||
@@ -576,6 +660,114 @@
|
||||
<key>PlistPath</key>
|
||||
<string>Contents/Info.plist</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Arch</key>
|
||||
<string>x86_64</string>
|
||||
<key>Comment</key>
|
||||
<string>SMC Spoof</string>
|
||||
<key>Enabled</key>
|
||||
<false/>
|
||||
<key>MaxKernel</key>
|
||||
<string></string>
|
||||
<key>MinKernel</key>
|
||||
<string></string>
|
||||
<key>BundlePath</key>
|
||||
<string>SMC-Spoof.kext</string>
|
||||
<key>ExecutablePath</key>
|
||||
<string></string>
|
||||
<key>PlistPath</key>
|
||||
<string>Contents/Info.plist</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Arch</key>
|
||||
<string>x86_64</string>
|
||||
<key>Comment</key>
|
||||
<string>AppleGraphicsDevicePolicy Override</string>
|
||||
<key>Enabled</key>
|
||||
<false/>
|
||||
<key>MaxKernel</key>
|
||||
<string></string>
|
||||
<key>MinKernel</key>
|
||||
<string></string>
|
||||
<key>BundlePath</key>
|
||||
<string>AGDP-Override.kext</string>
|
||||
<key>ExecutablePath</key>
|
||||
<string></string>
|
||||
<key>PlistPath</key>
|
||||
<string>Contents/Info.plist</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Arch</key>
|
||||
<string>x86_64</string>
|
||||
<key>Comment</key>
|
||||
<string>AppleGraphicsPowerManagement Override</string>
|
||||
<key>Enabled</key>
|
||||
<false/>
|
||||
<key>MaxKernel</key>
|
||||
<string></string>
|
||||
<key>MinKernel</key>
|
||||
<string></string>
|
||||
<key>BundlePath</key>
|
||||
<string>AGPM-Override.kext</string>
|
||||
<key>ExecutablePath</key>
|
||||
<string></string>
|
||||
<key>PlistPath</key>
|
||||
<string>Contents/Info.plist</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Arch</key>
|
||||
<string>x86_64</string>
|
||||
<key>Comment</key>
|
||||
<string>AppleMuxControl Override</string>
|
||||
<key>Enabled</key>
|
||||
<false/>
|
||||
<key>MaxKernel</key>
|
||||
<string></string>
|
||||
<key>MinKernel</key>
|
||||
<string></string>
|
||||
<key>BundlePath</key>
|
||||
<string>AMC-Override.kext</string>
|
||||
<key>ExecutablePath</key>
|
||||
<string></string>
|
||||
<key>PlistPath</key>
|
||||
<string>Contents/Info.plist</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Arch</key>
|
||||
<string>x86_64</string>
|
||||
<key>Comment</key>
|
||||
<string>CpuTscSync</string>
|
||||
<key>Enabled</key>
|
||||
<false/>
|
||||
<key>MaxKernel</key>
|
||||
<string></string>
|
||||
<key>MinKernel</key>
|
||||
<string></string>
|
||||
<key>BundlePath</key>
|
||||
<string>CpuTscSync.kext</string>
|
||||
<key>ExecutablePath</key>
|
||||
<string>Contents/MacOS/CpuTscSync</string>
|
||||
<key>PlistPath</key>
|
||||
<string>Contents/Info.plist</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Arch</key>
|
||||
<string>x86_64</string>
|
||||
<key>Comment</key>
|
||||
<string>HibernationFixup</string>
|
||||
<key>Enabled</key>
|
||||
<false/>
|
||||
<key>MaxKernel</key>
|
||||
<string></string>
|
||||
<key>MinKernel</key>
|
||||
<string></string>
|
||||
<key>BundlePath</key>
|
||||
<string>HibernationFixup.kext</string>
|
||||
<key>ExecutablePath</key>
|
||||
<string>Contents/MacOS/HibernationFixup</string>
|
||||
<key>PlistPath</key>
|
||||
<string>Contents/Info.plist</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>Block</key>
|
||||
<array/>
|
||||
@@ -626,6 +818,66 @@
|
||||
<key>Skip</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Arch</key>
|
||||
<string>x86_64</string>
|
||||
<key>Base</key>
|
||||
<string></string>
|
||||
<key>Comment</key>
|
||||
<string>Patch AppleSMC</string>
|
||||
<key>Count</key>
|
||||
<integer>1</integer>
|
||||
<key>Enabled</key>
|
||||
<true/>
|
||||
<key>Find</key>
|
||||
<data>c21jLXZlcnNpb24=</data>
|
||||
<key>Identifier</key>
|
||||
<string>com.apple.driver.AppleSMC</string>
|
||||
<key>Limit</key>
|
||||
<integer>0</integer>
|
||||
<key>Mask</key>
|
||||
<data></data>
|
||||
<key>MaxKernel</key>
|
||||
<string></string>
|
||||
<key>MinKernel</key>
|
||||
<string></string>
|
||||
<key>Replace</key>
|
||||
<data>b2xkLXZlcnNpb24=</data>
|
||||
<key>ReplaceMask</key>
|
||||
<data></data>
|
||||
<key>Skip</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Arch</key>
|
||||
<string>x86_64</string>
|
||||
<key>Base</key>
|
||||
<string></string>
|
||||
<key>Comment</key>
|
||||
<string>Patch AppleIntelSNBGraphicsFB</string>
|
||||
<key>Count</key>
|
||||
<integer>0</integer>
|
||||
<key>Enabled</key>
|
||||
<false/>
|
||||
<key>Find</key>
|
||||
<data></data>
|
||||
<key>Identifier</key>
|
||||
<string>com.apple.driver.AppleIntelSNBGraphicsFB</string>
|
||||
<key>Limit</key>
|
||||
<integer>0</integer>
|
||||
<key>Mask</key>
|
||||
<data></data>
|
||||
<key>MaxKernel</key>
|
||||
<string></string>
|
||||
<key>MinKernel</key>
|
||||
<string>20.0.0</string>
|
||||
<key>Replace</key>
|
||||
<data></data>
|
||||
<key>ReplaceMask</key>
|
||||
<data></data>
|
||||
<key>Skip</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
</array>
|
||||
<key>Quirks</key>
|
||||
<dict>
|
||||
@@ -687,7 +939,7 @@
|
||||
<key>ConsoleAttributes</key>
|
||||
<integer>0</integer>
|
||||
<key>HibernateMode</key>
|
||||
<string>None</string>
|
||||
<string>Auto</string>
|
||||
<key>HideAuxiliary</key>
|
||||
<true/>
|
||||
<key>LauncherPath</key>
|
||||
@@ -703,7 +955,7 @@
|
||||
<key>PickerVariant</key>
|
||||
<string>Modern</string>
|
||||
<key>PollAppleHotKeys</key>
|
||||
<false/>
|
||||
<true/>
|
||||
<key>ShowPicker</key>
|
||||
<true/>
|
||||
<key>TakeoffDelay</key>
|
||||
@@ -787,7 +1039,7 @@
|
||||
<key>Arguments</key>
|
||||
<string></string>
|
||||
<key>Auxiliary</key>
|
||||
<false/>
|
||||
<true/>
|
||||
<key>Name</key>
|
||||
<string>OpenShell.efi</string>
|
||||
<key>Comment</key>
|
||||
@@ -832,6 +1084,8 @@
|
||||
<key>csr-active-config</key>
|
||||
<data>AAAAAA==</data>
|
||||
</dict>
|
||||
<key>FA4CE28D-B62F-4C99-9CC3-6815686E30F9</key>
|
||||
<dict/>
|
||||
</dict>
|
||||
<key>Delete</key>
|
||||
<dict>
|
||||
@@ -849,6 +1103,8 @@
|
||||
<array>
|
||||
<string>boot-args</string>
|
||||
</array>
|
||||
<key>FA4CE28D-B62F-4C99-9CC3-6815686E30F9</key>
|
||||
<array/>
|
||||
</dict>
|
||||
<key>LegacyEnable</key>
|
||||
<false/>
|
||||
@@ -997,7 +1253,7 @@
|
||||
<key>FirmwareFeaturesMask</key>
|
||||
<data></data>
|
||||
<key>PlatformFeature</key>
|
||||
<integer>0</integer>
|
||||
<integer>-1</integer>
|
||||
<key>ProcessorType</key>
|
||||
<integer>0</integer>
|
||||
<key>SmcVersion</key>
|
||||
@@ -1045,6 +1301,21 @@
|
||||
<key>MinVersion</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<key>AppleInput</key>
|
||||
<dict>
|
||||
<key>AppleEvent</key>
|
||||
<string>Builtin</string>
|
||||
<key>CustomDelays</key>
|
||||
<string>Disabled</string>
|
||||
<key>KeyInitialDelay</key>
|
||||
<integer>0</integer>
|
||||
<key>KeySubsequentDelay</key>
|
||||
<integer>5</integer>
|
||||
<key>PointerSpeedDiv</key>
|
||||
<integer>1</integer>
|
||||
<key>PointerSpeedMul</key>
|
||||
<integer>1</integer>
|
||||
</dict>
|
||||
<key>Audio</key>
|
||||
<dict>
|
||||
<key>AudioCodec</key>
|
||||
@@ -1126,8 +1397,6 @@
|
||||
<true/>
|
||||
<key>AppleDebugLog</key>
|
||||
<true/>
|
||||
<key>AppleEvent</key>
|
||||
<true/>
|
||||
<key>AppleFramebufferInfo</key>
|
||||
<false/>
|
||||
<key>AppleImageConversion</key>
|
||||
BIN
payloads/Drivers/ExFatDxeLegacy.efi
Normal file
BIN
payloads/Icon/External/.VolumeIcon.icns
vendored
Executable file
BIN
payloads/Icon/SD-Card/.VolumeIcon.icns
Normal file
BIN
payloads/Icon/SSD/.VolumeIcon.icns
Normal file
BIN
payloads/Kexts/Acidanthera/AppleALC-v1.6.0.zip
Normal file
BIN
payloads/Kexts/Acidanthera/CpuTscSync-v1.0.3.zip
Normal file
BIN
payloads/Kexts/Acidanthera/HibernationFixup-v1.3.9.zip
Normal file
BIN
payloads/Kexts/Acidanthera/Lilu-v1.5.2.zip
Normal file
BIN
payloads/Kexts/Acidanthera/RestrictEvents-MBP91-v1.0.1.zip
Normal file
21
payloads/Kexts/Acidanthera/RestrictEvents-MBP91.patch
Normal file
@@ -0,0 +1,21 @@
|
||||
From 772e02b375b5b2186342965f3089d9d1bca053bf Mon Sep 17 00:00:00 2001
|
||||
From: Dhinak G <17605561+dhinakg@users.noreply.github.com>
|
||||
Date: Tue, 23 Mar 2021 17:21:48 -0400
|
||||
Subject: [PATCH] Disable displaypolicyd
|
||||
|
||||
---
|
||||
RestrictEvents/RestrictEvents.cpp | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/RestrictEvents/RestrictEvents.cpp b/RestrictEvents/RestrictEvents.cpp
|
||||
index 69b6af8..029417c 100644
|
||||
--- a/RestrictEvents/RestrictEvents.cpp
|
||||
+++ b/RestrictEvents/RestrictEvents.cpp
|
||||
@@ -35,6 +35,7 @@ struct RestrictEventsPolicy {
|
||||
"/System/Library/CoreServices/ExpansionSlotNotification",
|
||||
"/System/Library/CoreServices/MemorySlotNotification",
|
||||
"/usr/libexec/firmwarecheckers/eficheck/eficheck",
|
||||
+ "/usr/libexec/displaypolicyd"
|
||||
};
|
||||
|
||||
char pathbuf[MAXPATHLEN];
|
||||
BIN
payloads/Kexts/Acidanthera/WhateverGreen-v1.4.9.zip
Normal file
BIN
payloads/Kexts/Ethernet/CatalinaBCM5701Ethernet-v1.0.1.zip
Normal file
BIN
payloads/Kexts/Misc/AppleBacklightFixup-v1.0.1.zip
Normal file
BIN
payloads/Kexts/Misc/SMC-Spoof-v1.0.0.zip
Normal file
@@ -0,0 +1,222 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>BuildMachineOSBuild</key>
|
||||
<string>20A241111</string>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>AppleGraphicsDevicePolicy</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>6.2.9, Copyright 2008-2021 Apple Inc. All rights reserved.</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.apple.driver.AppleGraphicsDevicePolicy</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>AppleGraphicsDevicePolicy</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>KEXT</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>6.2.9</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleSupportedPlatforms</key>
|
||||
<array>
|
||||
<string>MacOSX</string>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>6.2.9</string>
|
||||
<key>DTCompiler</key>
|
||||
<string>com.apple.compilers.llvm.clang.1_0</string>
|
||||
<key>DTPlatformBuild</key>
|
||||
<string>12E6178j</string>
|
||||
<key>DTPlatformName</key>
|
||||
<string>macosx</string>
|
||||
<key>DTPlatformVersion</key>
|
||||
<string>11.3</string>
|
||||
<key>DTSDKBuild</key>
|
||||
<string>20E205c</string>
|
||||
<key>DTSDKName</key>
|
||||
<string>macosx11.3internal</string>
|
||||
<key>DTXcode</key>
|
||||
<string>1240</string>
|
||||
<key>DTXcodeBuild</key>
|
||||
<string>12E6178j</string>
|
||||
<key>IOKitPersonalities</key>
|
||||
<dict>
|
||||
<key>AppleGraphicsDevicePolicy</key>
|
||||
<dict>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.apple.driver.AppleGraphicsDevicePolicy</string>
|
||||
<key>Config1</key>
|
||||
<dict>
|
||||
<key>GFX1</key>
|
||||
<dict>
|
||||
<key>unload</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>Config2</key>
|
||||
<dict>
|
||||
<key>GFX0</key>
|
||||
<dict>
|
||||
<key>EDID</key>
|
||||
<dict>
|
||||
<key>index</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<key>FeatureControl</key>
|
||||
<integer>12</integer>
|
||||
<key>unload</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>Config3</key>
|
||||
<dict>
|
||||
<key>GFX0</key>
|
||||
<dict>
|
||||
<key>EDID</key>
|
||||
<dict>
|
||||
<key>index</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<key>FeatureControl</key>
|
||||
<integer>12</integer>
|
||||
<key>unload</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<key>IGPU</key>
|
||||
<dict>
|
||||
<key>unload</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>Config4</key>
|
||||
<dict>
|
||||
<key>GFX0</key>
|
||||
<dict>
|
||||
<key>EDID</key>
|
||||
<dict>
|
||||
<key>index</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<key>FeatureControl</key>
|
||||
<integer>12</integer>
|
||||
<key>unload</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<key>IGPU</key>
|
||||
<dict>
|
||||
<key>unload</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>display</key>
|
||||
<dict>
|
||||
<key>EDID</key>
|
||||
<dict>
|
||||
<key>index</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<key>FeatureControl</key>
|
||||
<integer>12</integer>
|
||||
<key>unload</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>ConfigMap</key>
|
||||
<dict>
|
||||
<key>Mac-00BE6ED71E35EB86</key>
|
||||
<string>none</string>
|
||||
<key>Mac-031B6874CF7F642A</key>
|
||||
<string>Config2</string>
|
||||
<key>Mac-27ADBB7B4CEE8E61</key>
|
||||
<string>none</string>
|
||||
<key>Mac-42FD25EABCABB274</key>
|
||||
<string>Config2</string>
|
||||
<key>Mac-4B7AC7E43945597E</key>
|
||||
<string>none</string>
|
||||
<key>Mac-63001698E7A34814</key>
|
||||
<string>Config3</string>
|
||||
<key>Mac-65CE76090165799A</key>
|
||||
<string>Config2</string>
|
||||
<key>Mac-77EB7D7DAF985301</key>
|
||||
<string>none</string>
|
||||
<key>Mac-77F17D7DA9285301</key>
|
||||
<string>Config3</string>
|
||||
<key>Mac-7BA5B2D9E42DDD94</key>
|
||||
<string>Config4</string>
|
||||
<key>Mac-81E3E92DD6088272</key>
|
||||
<string>Config2</string>
|
||||
<key>Mac-AA95B1DDAB278B95</key>
|
||||
<string>Config3</string>
|
||||
<key>Mac-AF89B6D9451A490B</key>
|
||||
<string>Config3</string>
|
||||
<key>Mac-B809C3757DA9BB8D</key>
|
||||
<string>Config2</string>
|
||||
<key>Mac-BE088AF8C5EB4FA2</key>
|
||||
<string>Config3</string>
|
||||
<key>Mac-C3EC7CD22292981F</key>
|
||||
<string>none</string>
|
||||
<key>Mac-C9CF552659EA9913</key>
|
||||
<string>none</string>
|
||||
<key>Mac-CFF7D910A743CAAF</key>
|
||||
<string>Config3</string>
|
||||
<key>Mac-DB15BD556843C820</key>
|
||||
<string>Config2</string>
|
||||
<key>Mac-F60DEB81FF30ACF6</key>
|
||||
<string>Config1</string>
|
||||
<key>Mac-FA842E06C61E91C5</key>
|
||||
<string>Config2</string>
|
||||
<key>Mac-FC02E91DDD3FA6A4</key>
|
||||
<string>none</string>
|
||||
</dict>
|
||||
<key>Default</key>
|
||||
<dict>
|
||||
<key>none</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
<key>IOClass</key>
|
||||
<string>AppleGraphicsDevicePolicy</string>
|
||||
<key>IOMatchCategory</key>
|
||||
<string>AppleGraphicsDevicePolicy</string>
|
||||
<key>IOProviderClass</key>
|
||||
<string>AppleGraphicsDeviceControl</string>
|
||||
<key>IOResourceMatch</key>
|
||||
<string>IOKit</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>11.3</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>6.2.9, Copyright © 2008-2021 Apple Inc. All rights reserved.</string>
|
||||
<key>OSBundleLibraries</key>
|
||||
<dict>
|
||||
<key>com.apple.AppleGraphicsDeviceControl</key>
|
||||
<string>1.0</string>
|
||||
<key>com.apple.driver.AppleGraphicsControl</key>
|
||||
<string>1.0</string>
|
||||
<key>com.apple.iokit.IOACPIFamily</key>
|
||||
<string>1.0.0d1</string>
|
||||
<key>com.apple.iokit.IOGraphicsFamily</key>
|
||||
<string>1.1</string>
|
||||
<key>com.apple.iokit.IOPCIFamily</key>
|
||||
<string>1.0</string>
|
||||
<key>com.apple.kpi.bsd</key>
|
||||
<string>8.3.1</string>
|
||||
<key>com.apple.kpi.iokit</key>
|
||||
<string>8.3.1</string>
|
||||
<key>com.apple.kpi.libkern</key>
|
||||
<string>8.3.1</string>
|
||||
<key>com.apple.kpi.mach</key>
|
||||
<string>8.3.1</string>
|
||||
<key>com.apple.kpi.private</key>
|
||||
<string>8.0.0</string>
|
||||
<key>com.apple.kpi.unsupported</key>
|
||||
<string>8.3.1</string>
|
||||
</dict>
|
||||
<key>OSBundleRequired</key>
|
||||
<string>Safe Boot</string>
|
||||
</dict>
|
||||
</plist>
|
||||
150
payloads/Kexts/Plists/AppleGraphicsDevicePolicy/Info.plist
Normal file
@@ -0,0 +1,150 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>AGDP-Override</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.dortania.AGDP-Override</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>AGDP-Override</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>KEXT</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>9.9.9</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>9.9.9</string>
|
||||
<key>IOKitPersonalities</key>
|
||||
<dict>
|
||||
<key>AppleGraphicsDevicePolicy</key>
|
||||
<dict>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.apple.driver.AppleGraphicsDevicePolicy</string>
|
||||
<key>Config1</key>
|
||||
<dict>
|
||||
<key>GFX1</key>
|
||||
<dict>
|
||||
<key>unload</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>Config2</key>
|
||||
<dict>
|
||||
<key>GFX0</key>
|
||||
<dict>
|
||||
<key>EDID</key>
|
||||
<dict>
|
||||
<key>index</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<key>FeatureControl</key>
|
||||
<integer>12</integer>
|
||||
<key>unload</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>Config3</key>
|
||||
<dict>
|
||||
<key>GFX0</key>
|
||||
<dict>
|
||||
<key>EDID</key>
|
||||
<dict>
|
||||
<key>index</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<key>FeatureControl</key>
|
||||
<integer>12</integer>
|
||||
<key>unload</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<key>IGPU</key>
|
||||
<dict>
|
||||
<key>unload</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>Config4</key>
|
||||
<dict>
|
||||
<key>GFX0</key>
|
||||
<dict>
|
||||
<key>EDID</key>
|
||||
<dict>
|
||||
<key>index</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<key>FeatureControl</key>
|
||||
<integer>12</integer>
|
||||
<key>unload</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<key>IGPU</key>
|
||||
<dict>
|
||||
<key>unload</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>display</key>
|
||||
<dict>
|
||||
<key>EDID</key>
|
||||
<dict>
|
||||
<key>index</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<key>FeatureControl</key>
|
||||
<integer>12</integer>
|
||||
<key>unload</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>ConfigMap</key>
|
||||
<dict>
|
||||
<key>iMac13,1</key>
|
||||
<string>none</string>
|
||||
<key>iMac13,2</key>
|
||||
<string>none</string>
|
||||
<key>iMac14,1</key>
|
||||
<string>Config2</string>
|
||||
<key>iMac14,2</key>
|
||||
<string>none</string>
|
||||
<key>iMac14,3</key>
|
||||
<string>none</string>
|
||||
<key>MacBookPro9,1</key>
|
||||
<string>none</string>
|
||||
<key>MacBookPro10,1</key>
|
||||
<string>none</string>
|
||||
</dict>
|
||||
<key>Default</key>
|
||||
<dict>
|
||||
<key>none</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
<key>IOClass</key>
|
||||
<string>AppleGraphicsDevicePolicy</string>
|
||||
<key>IOMatchCategory</key>
|
||||
<string>AppleGraphicsDevicePolicy</string>
|
||||
<key>IOProviderClass</key>
|
||||
<string>AppleGraphicsDeviceControl</string>
|
||||
<key>IOResourceMatch</key>
|
||||
<string>IOKit</string>
|
||||
<key>IOProbeScore</key>
|
||||
<integer>1000</integer>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>11.3</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright © Dortania</string>
|
||||
<key>#OSBundleLibraries</key>
|
||||
<dict>
|
||||
<key>com.apple.driver.AppleGraphicsDevicePolicy</key>
|
||||
<string>5.2.7</string>
|
||||
</dict>
|
||||
<key>OSBundleRequired</key>
|
||||
<string>Safe Boot</string>
|
||||
</dict>
|
||||
</plist>
|
||||
4283
payloads/Kexts/Plists/AppleGraphicsPowerManagement/Info.plist
Normal file
422
payloads/Kexts/Plists/AppleMuxControl/AppleMuxControl.plist
Normal file
@@ -0,0 +1,422 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>BuildMachineOSBuild</key>
|
||||
<string>20A241111</string>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>AppleMuxControl</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>6.2.9, Copyright 2008-2021 Apple Inc. All rights reserved.</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.apple.driver.AppleMuxControl</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>AppleMuxControl</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>KEXT</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>6.2.9</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleSupportedPlatforms</key>
|
||||
<array>
|
||||
<string>MacOSX</string>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>6.2.9</string>
|
||||
<key>DTCompiler</key>
|
||||
<string>com.apple.compilers.llvm.clang.1_0</string>
|
||||
<key>DTPlatformBuild</key>
|
||||
<string>12E6178j</string>
|
||||
<key>DTPlatformName</key>
|
||||
<string>macosx</string>
|
||||
<key>DTPlatformVersion</key>
|
||||
<string>11.3</string>
|
||||
<key>DTSDKBuild</key>
|
||||
<string>20E205c</string>
|
||||
<key>DTSDKName</key>
|
||||
<string>macosx11.3internal</string>
|
||||
<key>DTXcode</key>
|
||||
<string>1240</string>
|
||||
<key>DTXcodeBuild</key>
|
||||
<string>12E6178j</string>
|
||||
<key>IOKitPersonalities</key>
|
||||
<dict>
|
||||
<key>AppleMuxControl</key>
|
||||
<dict>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.apple.driver.AppleMuxControl</string>
|
||||
<key>Config1</key>
|
||||
<dict>
|
||||
<key>BacklightSmoothing</key>
|
||||
<integer>8</integer>
|
||||
<key>DebounceAppExit</key>
|
||||
<integer>0</integer>
|
||||
<key>DebounceHDP</key>
|
||||
<integer>0</integer>
|
||||
<key>EnergySavingPolicy</key>
|
||||
<integer>1</integer>
|
||||
<key>FBDriver0</key>
|
||||
<string>AppleIntelFramebuffer</string>
|
||||
<key>FBDriver1</key>
|
||||
<string>NVDATesla,NVDA</string>
|
||||
<key>FeatureMask</key>
|
||||
<integer>132096</integer>
|
||||
<key>GLDriver0</key>
|
||||
<string>Gen575</string>
|
||||
<key>GLDriver1</key>
|
||||
<string>NVKernel</string>
|
||||
<key>GPUMinimumOffTime</key>
|
||||
<integer>50</integer>
|
||||
<key>HDADriver1</key>
|
||||
<string>AppleHDAController</string>
|
||||
<key>NumberFramebuffers0</key>
|
||||
<integer>1</integer>
|
||||
<key>NumberFramebuffers1</key>
|
||||
<integer>2</integer>
|
||||
<key>Policy</key>
|
||||
<integer>48</integer>
|
||||
</dict>
|
||||
<key>Config2</key>
|
||||
<dict>
|
||||
<key>BacklightSmoothing</key>
|
||||
<integer>8</integer>
|
||||
<key>ClamshellVendorWorkaround</key>
|
||||
<integer>1</integer>
|
||||
<key>DebounceAppExit</key>
|
||||
<integer>0</integer>
|
||||
<key>DebounceHDP</key>
|
||||
<integer>0</integer>
|
||||
<key>DisableTerminationControl</key>
|
||||
<integer>0</integer>
|
||||
<key>EnergySavingPolicy</key>
|
||||
<integer>1</integer>
|
||||
<key>FBDriver0</key>
|
||||
<string>AppleIntelFramebuffer</string>
|
||||
<key>FBDriver1</key>
|
||||
<string>ATIFramebufferNI</string>
|
||||
<key>FeatureMask</key>
|
||||
<integer>132096</integer>
|
||||
<key>GLDriver0</key>
|
||||
<string>Gen6Accelerator,Gen575</string>
|
||||
<key>GLDriver1</key>
|
||||
<string>ATIRadeonX3000,AMDTurksGraphicsAccelerator,AMDCaicosGraphicsAccelerator</string>
|
||||
<key>GPUMinimumOffTime</key>
|
||||
<integer>50</integer>
|
||||
<key>HDADriver1</key>
|
||||
<string>AppleHDAController</string>
|
||||
<key>HPDInterval</key>
|
||||
<integer>2000</integer>
|
||||
<key>NumberFramebuffers0</key>
|
||||
<integer>1</integer>
|
||||
<key>NumberFramebuffers1</key>
|
||||
<integer>3</integer>
|
||||
<key>Policy</key>
|
||||
<integer>48</integer>
|
||||
<key>PowerUpDownSequence</key>
|
||||
<integer>1</integer>
|
||||
<key>PowerUpPCILinkOnSleep</key>
|
||||
<integer>1</integer>
|
||||
<key>SpreadSpectrumControl</key>
|
||||
<integer>1</integer>
|
||||
</dict>
|
||||
<key>Config3</key>
|
||||
<dict>
|
||||
<key>BacklightSmoothing</key>
|
||||
<integer>8</integer>
|
||||
<key>DebounceAppExit</key>
|
||||
<integer>0</integer>
|
||||
<key>DebounceHDP</key>
|
||||
<integer>0</integer>
|
||||
<key>DisableTerminationControl</key>
|
||||
<integer>0</integer>
|
||||
<key>EnergySavingPolicy</key>
|
||||
<integer>1</integer>
|
||||
<key>FBDriver0</key>
|
||||
<string>AppleIntelFramebuffer</string>
|
||||
<key>FBDriver1</key>
|
||||
<string>NVDATesla,NVDA</string>
|
||||
<key>FeatureMask</key>
|
||||
<integer>132096</integer>
|
||||
<key>GLDriver0</key>
|
||||
<string>Gen7Accelerator,IntelAcceleratorClassic,IntelAccelerator</string>
|
||||
<key>GLDriver1</key>
|
||||
<string>NVKernel,nvAccelerator</string>
|
||||
<key>GPUMinimumOffTime</key>
|
||||
<integer>50</integer>
|
||||
<key>HDADriver1</key>
|
||||
<string>AppleHDAController</string>
|
||||
<key>HPDInterval</key>
|
||||
<integer>2000</integer>
|
||||
<key>NumberFramebuffers0</key>
|
||||
<integer>1</integer>
|
||||
<key>NumberFramebuffers1</key>
|
||||
<integer>4</integer>
|
||||
<key>Policy</key>
|
||||
<integer>48</integer>
|
||||
<key>PowerUpCompensation</key>
|
||||
<integer>0</integer>
|
||||
<key>PowerUpDownSequence</key>
|
||||
<integer>1</integer>
|
||||
<key>PowerUpPCILinkOnSleep</key>
|
||||
<integer>1</integer>
|
||||
<key>StartUpDelay</key>
|
||||
<integer>5000</integer>
|
||||
</dict>
|
||||
<key>Config4</key>
|
||||
<dict>
|
||||
<key>BacklightSmoothing</key>
|
||||
<integer>8</integer>
|
||||
<key>DebounceAppExit</key>
|
||||
<integer>0</integer>
|
||||
<key>DebounceHDP</key>
|
||||
<integer>0</integer>
|
||||
<key>DisableTerminationControl</key>
|
||||
<integer>0</integer>
|
||||
<key>EnergySavingPolicy</key>
|
||||
<integer>1</integer>
|
||||
<key>FBDriver0</key>
|
||||
<string>AppleIntelFramebuffer</string>
|
||||
<key>FBDriver1</key>
|
||||
<string>NVDA</string>
|
||||
<key>FeatureMask</key>
|
||||
<integer>132096</integer>
|
||||
<key>GLDriver0</key>
|
||||
<string>Gen7Accelerator,IntelAcceleratorClassic,IntelAccelerator</string>
|
||||
<key>GLDriver1</key>
|
||||
<string>NVKernel,nvAccelerator</string>
|
||||
<key>GPUMinimumOffTime</key>
|
||||
<integer>50</integer>
|
||||
<key>HDADriver1</key>
|
||||
<string>AppleHDAController</string>
|
||||
<key>HPDInterval</key>
|
||||
<integer>2000</integer>
|
||||
<key>NumberFramebuffers0</key>
|
||||
<integer>1</integer>
|
||||
<key>NumberFramebuffers1</key>
|
||||
<integer>4</integer>
|
||||
<key>Policy</key>
|
||||
<integer>48</integer>
|
||||
<key>PowerUpCompensation</key>
|
||||
<integer>0</integer>
|
||||
<key>PowerUpDownSequence</key>
|
||||
<integer>1</integer>
|
||||
<key>PowerUpPCILinkOnSleep</key>
|
||||
<integer>1</integer>
|
||||
</dict>
|
||||
<key>Config5</key>
|
||||
<dict>
|
||||
<key>BacklightSmoothing</key>
|
||||
<integer>8</integer>
|
||||
<key>DebounceAppExit</key>
|
||||
<integer>0</integer>
|
||||
<key>DebounceHDP</key>
|
||||
<integer>0</integer>
|
||||
<key>DisableTerminationControl</key>
|
||||
<integer>0</integer>
|
||||
<key>EnergySavingPolicy</key>
|
||||
<integer>1</integer>
|
||||
<key>FBDriver0</key>
|
||||
<string>AppleIntelFramebuffer</string>
|
||||
<key>FBDriver1</key>
|
||||
<string>NVDA</string>
|
||||
<key>FeatureMask</key>
|
||||
<integer>132096</integer>
|
||||
<key>GLDriver0</key>
|
||||
<string>IntelAccelerator</string>
|
||||
<key>GLDriver1</key>
|
||||
<string>NVKernel,nvAccelerator</string>
|
||||
<key>GPUMinimumOffTime</key>
|
||||
<integer>50</integer>
|
||||
<key>HDADriver1</key>
|
||||
<string>AppleHDAController</string>
|
||||
<key>HPDInterval</key>
|
||||
<integer>2000</integer>
|
||||
<key>NumberFramebuffers0</key>
|
||||
<integer>1</integer>
|
||||
<key>NumberFramebuffers1</key>
|
||||
<integer>4</integer>
|
||||
<key>Policy</key>
|
||||
<integer>48</integer>
|
||||
<key>PowerUpCompensation</key>
|
||||
<integer>1</integer>
|
||||
<key>PowerUpDownSequence</key>
|
||||
<integer>3</integer>
|
||||
<key>SaveRootPort</key>
|
||||
<integer>2</integer>
|
||||
<key>StartUpDelay</key>
|
||||
<integer>5000</integer>
|
||||
</dict>
|
||||
<key>Config6</key>
|
||||
<dict>
|
||||
<key>BacklightSmoothing</key>
|
||||
<integer>8</integer>
|
||||
<key>ClamshellVendorWorkaround</key>
|
||||
<integer>1</integer>
|
||||
<key>DebounceAppExit</key>
|
||||
<integer>0</integer>
|
||||
<key>DebounceHDP</key>
|
||||
<integer>0</integer>
|
||||
<key>DisableTerminationControl</key>
|
||||
<integer>0</integer>
|
||||
<key>EnergySavingPolicy</key>
|
||||
<integer>1</integer>
|
||||
<key>FBDriver0</key>
|
||||
<string>AppleIntelFramebuffer</string>
|
||||
<key>FBDriver1</key>
|
||||
<string>AMDFramebufferSI</string>
|
||||
<key>FeatureMask</key>
|
||||
<integer>132096</integer>
|
||||
<key>GLDriver0</key>
|
||||
<string>IntelAccelerator</string>
|
||||
<key>GLDriver1</key>
|
||||
<string>AMDVerdeGraphicsAccelerator,AMDRadeonX4000_AMDVerdeGraphicsAccelerator</string>
|
||||
<key>GPUMinimumOffTime</key>
|
||||
<integer>50</integer>
|
||||
<key>HDADriver1</key>
|
||||
<string>AppleHDAController</string>
|
||||
<key>HPDInterval</key>
|
||||
<integer>2000</integer>
|
||||
<key>NumberFramebuffers0</key>
|
||||
<integer>1</integer>
|
||||
<key>NumberFramebuffers1</key>
|
||||
<integer>6</integer>
|
||||
<key>Policy</key>
|
||||
<integer>48</integer>
|
||||
<key>PowerUpDownSequence</key>
|
||||
<integer>3</integer>
|
||||
<key>SaveRootPort</key>
|
||||
<integer>2</integer>
|
||||
<key>SpreadSpectrumControl</key>
|
||||
<integer>1</integer>
|
||||
</dict>
|
||||
<key>Config7</key>
|
||||
<dict>
|
||||
<key>BacklightSmoothing</key>
|
||||
<integer>8</integer>
|
||||
<key>ClamshellVendorWorkaround</key>
|
||||
<integer>1</integer>
|
||||
<key>DebounceAppExit</key>
|
||||
<integer>0</integer>
|
||||
<key>DebounceHDP</key>
|
||||
<integer>0</integer>
|
||||
<key>DisableTerminationControl</key>
|
||||
<integer>0</integer>
|
||||
<key>EnergySavingPolicy</key>
|
||||
<integer>1</integer>
|
||||
<key>FBDriver0</key>
|
||||
<string>AppleIntelFramebuffer</string>
|
||||
<key>FBDriver1</key>
|
||||
<string>AMDFramebufferVIB</string>
|
||||
<key>FeatureMask</key>
|
||||
<integer>136192</integer>
|
||||
<key>GLDriver0</key>
|
||||
<string>IntelAccelerator</string>
|
||||
<key>GLDriver1</key>
|
||||
<string>AMDRadeonX4100_AMDBaffinGraphicsAccelerator,AMDBaffinGraphicsAccelerator,AMDRadeonX4150_AMDBaffinGraphicsAccelerator,AMDRadeonX4000_AMDBaffinGraphicsAccelerator</string>
|
||||
<key>GPUMinimumOffTime</key>
|
||||
<integer>50</integer>
|
||||
<key>HDADriver1</key>
|
||||
<string>AppleHDAController</string>
|
||||
<key>HDADriver2</key>
|
||||
<string>AppleGFXHDAController</string>
|
||||
<key>HPDInterval</key>
|
||||
<integer>2000</integer>
|
||||
<key>HPDMask</key>
|
||||
<integer>15</integer>
|
||||
<key>Internal324</key>
|
||||
<true/>
|
||||
<key>NumberFramebuffers0</key>
|
||||
<integer>1</integer>
|
||||
<key>NumberFramebuffers1</key>
|
||||
<integer>5</integer>
|
||||
<key>Policy</key>
|
||||
<integer>48</integer>
|
||||
<key>PowerUpDownSequence</key>
|
||||
<integer>3</integer>
|
||||
<key>SaveRootPort</key>
|
||||
<integer>2</integer>
|
||||
<key>SpreadSpectrumControl</key>
|
||||
<integer>1</integer>
|
||||
</dict>
|
||||
<key>ConfigMap</key>
|
||||
<dict>
|
||||
<key>04XX</key>
|
||||
<string>Config1</string>
|
||||
<key>06XX</key>
|
||||
<string>Config2</string>
|
||||
<key>07XX</key>
|
||||
<string>Config3</string>
|
||||
<key>08XX</key>
|
||||
<string>Config5</string>
|
||||
<key>0AXX</key>
|
||||
<string>Config6</string>
|
||||
<key>0BXX</key>
|
||||
<string>Config7</string>
|
||||
<key>Mac-4B7AC7E43945597E</key>
|
||||
<string>Config4</string>
|
||||
</dict>
|
||||
<key>Default</key>
|
||||
<dict>
|
||||
<key>EnergySavingPolicy</key>
|
||||
<integer>1</integer>
|
||||
<key>FBDriver0</key>
|
||||
<string>NVDATesla,NVDA</string>
|
||||
<key>FBDriver1</key>
|
||||
<string>NVDATesla,NVDA</string>
|
||||
<key>GLDriver0</key>
|
||||
<string>NVKernel</string>
|
||||
<key>GLDriver1</key>
|
||||
<string>NVKernel</string>
|
||||
</dict>
|
||||
<key>IOClass</key>
|
||||
<string>AppleMuxControl</string>
|
||||
<key>IOMatchCategory</key>
|
||||
<string>AppleMuxControl</string>
|
||||
<key>IONameMatch</key>
|
||||
<string>GMUX</string>
|
||||
<key>IOProviderClass</key>
|
||||
<string>IOACPIPlatformDevice</string>
|
||||
<key>IOUserClientClass</key>
|
||||
<string>AppleGraphicsControlClient</string>
|
||||
<key>LionOS</key>
|
||||
<integer>1</integer>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>11.3</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>6.2.9, Copyright © 2008-2021 Apple Inc. All rights reserved.</string>
|
||||
<key>OSBundleLibraries</key>
|
||||
<dict>
|
||||
<key>com.apple.AppleGraphicsDeviceControl</key>
|
||||
<string>1.0</string>
|
||||
<key>com.apple.driver.AppleGraphicsControl</key>
|
||||
<string>1.0</string>
|
||||
<key>com.apple.iokit.IOACPIFamily</key>
|
||||
<string>1.0.0d1</string>
|
||||
<key>com.apple.iokit.IOGraphicsFamily</key>
|
||||
<string>1.1</string>
|
||||
<key>com.apple.iokit.IOPCIFamily</key>
|
||||
<string>1.0</string>
|
||||
<key>com.apple.kpi.bsd</key>
|
||||
<string>8.3.1</string>
|
||||
<key>com.apple.kpi.iokit</key>
|
||||
<string>8.3.1</string>
|
||||
<key>com.apple.kpi.libkern</key>
|
||||
<string>8.3.1</string>
|
||||
<key>com.apple.kpi.mach</key>
|
||||
<string>8.3.1</string>
|
||||
<key>com.apple.kpi.private</key>
|
||||
<string>8.0.0</string>
|
||||
<key>com.apple.kpi.unsupported</key>
|
||||
<string>8.3.1</string>
|
||||
</dict>
|
||||
<key>OSBundleRequired</key>
|
||||
<string>Safe Boot</string>
|
||||
</dict>
|
||||
</plist>
|
||||
378
payloads/Kexts/Plists/AppleMuxControl/Info.plist
Normal file
@@ -0,0 +1,378 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>AMC-Override</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.dortania.AMC-Override</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>AMC-Override</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>KEXT</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>9.9.9</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>9.9.9</string>
|
||||
<key>IOKitPersonalities</key>
|
||||
<dict>
|
||||
<key>AppleMuxControl</key>
|
||||
<dict>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.apple.driver.AppleMuxControl</string>
|
||||
<key>Config1</key>
|
||||
<dict>
|
||||
<key>BacklightSmoothing</key>
|
||||
<integer>8</integer>
|
||||
<key>DebounceAppExit</key>
|
||||
<integer>0</integer>
|
||||
<key>DebounceHDP</key>
|
||||
<integer>0</integer>
|
||||
<key>EnergySavingPolicy</key>
|
||||
<integer>1</integer>
|
||||
<key>FBDriver0</key>
|
||||
<string>AppleIntelFramebuffer</string>
|
||||
<key>FBDriver1</key>
|
||||
<string>NVDATesla,NVDA</string>
|
||||
<key>FeatureMask</key>
|
||||
<integer>132096</integer>
|
||||
<key>GLDriver0</key>
|
||||
<string>Gen575</string>
|
||||
<key>GLDriver1</key>
|
||||
<string>NVKernel</string>
|
||||
<key>GPUMinimumOffTime</key>
|
||||
<integer>50</integer>
|
||||
<key>HDADriver1</key>
|
||||
<string>AppleHDAController</string>
|
||||
<key>NumberFramebuffers0</key>
|
||||
<integer>1</integer>
|
||||
<key>NumberFramebuffers1</key>
|
||||
<integer>2</integer>
|
||||
<key>Policy</key>
|
||||
<integer>48</integer>
|
||||
</dict>
|
||||
<key>Config2</key>
|
||||
<dict>
|
||||
<key>BacklightSmoothing</key>
|
||||
<integer>8</integer>
|
||||
<key>ClamshellVendorWorkaround</key>
|
||||
<integer>1</integer>
|
||||
<key>DebounceAppExit</key>
|
||||
<integer>0</integer>
|
||||
<key>DebounceHDP</key>
|
||||
<integer>0</integer>
|
||||
<key>DisableTerminationControl</key>
|
||||
<integer>0</integer>
|
||||
<key>EnergySavingPolicy</key>
|
||||
<integer>1</integer>
|
||||
<key>FBDriver0</key>
|
||||
<string>AppleIntelFramebuffer</string>
|
||||
<key>FBDriver1</key>
|
||||
<string>ATIFramebufferNI</string>
|
||||
<key>FeatureMask</key>
|
||||
<integer>132096</integer>
|
||||
<key>GLDriver0</key>
|
||||
<string>Gen6Accelerator,Gen575</string>
|
||||
<key>GLDriver1</key>
|
||||
<string>ATIRadeonX3000,AMDTurksGraphicsAccelerator,AMDCaicosGraphicsAccelerator</string>
|
||||
<key>GPUMinimumOffTime</key>
|
||||
<integer>50</integer>
|
||||
<key>HDADriver1</key>
|
||||
<string>AppleHDAController</string>
|
||||
<key>HPDInterval</key>
|
||||
<integer>2000</integer>
|
||||
<key>NumberFramebuffers0</key>
|
||||
<integer>1</integer>
|
||||
<key>NumberFramebuffers1</key>
|
||||
<integer>3</integer>
|
||||
<key>Policy</key>
|
||||
<integer>48</integer>
|
||||
<key>PowerUpDownSequence</key>
|
||||
<integer>1</integer>
|
||||
<key>PowerUpPCILinkOnSleep</key>
|
||||
<integer>1</integer>
|
||||
<key>SpreadSpectrumControl</key>
|
||||
<integer>1</integer>
|
||||
</dict>
|
||||
<key>Config3</key>
|
||||
<dict>
|
||||
<key>BacklightSmoothing</key>
|
||||
<integer>8</integer>
|
||||
<key>DebounceAppExit</key>
|
||||
<integer>0</integer>
|
||||
<key>DebounceHDP</key>
|
||||
<integer>0</integer>
|
||||
<key>DisableTerminationControl</key>
|
||||
<integer>0</integer>
|
||||
<key>EnergySavingPolicy</key>
|
||||
<integer>1</integer>
|
||||
<key>FBDriver0</key>
|
||||
<string>AppleIntelFramebuffer</string>
|
||||
<key>FBDriver1</key>
|
||||
<string>NVDATesla,NVDA</string>
|
||||
<key>FeatureMask</key>
|
||||
<integer>132096</integer>
|
||||
<key>GLDriver0</key>
|
||||
<string>Gen7Accelerator,IntelAcceleratorClassic,IntelAccelerator</string>
|
||||
<key>GLDriver1</key>
|
||||
<string>NVKernel,nvAccelerator</string>
|
||||
<key>GPUMinimumOffTime</key>
|
||||
<integer>50</integer>
|
||||
<key>HDADriver1</key>
|
||||
<string>AppleHDAController</string>
|
||||
<key>HPDInterval</key>
|
||||
<integer>2000</integer>
|
||||
<key>NumberFramebuffers0</key>
|
||||
<integer>1</integer>
|
||||
<key>NumberFramebuffers1</key>
|
||||
<integer>4</integer>
|
||||
<key>Policy</key>
|
||||
<integer>48</integer>
|
||||
<key>PowerUpCompensation</key>
|
||||
<integer>0</integer>
|
||||
<key>PowerUpDownSequence</key>
|
||||
<integer>1</integer>
|
||||
<key>PowerUpPCILinkOnSleep</key>
|
||||
<integer>1</integer>
|
||||
<key>StartUpDelay</key>
|
||||
<integer>5000</integer>
|
||||
</dict>
|
||||
<key>Config4</key>
|
||||
<dict>
|
||||
<key>BacklightSmoothing</key>
|
||||
<integer>8</integer>
|
||||
<key>DebounceAppExit</key>
|
||||
<integer>0</integer>
|
||||
<key>DebounceHDP</key>
|
||||
<integer>0</integer>
|
||||
<key>DisableTerminationControl</key>
|
||||
<integer>0</integer>
|
||||
<key>EnergySavingPolicy</key>
|
||||
<integer>1</integer>
|
||||
<key>FBDriver0</key>
|
||||
<string>AppleIntelFramebuffer</string>
|
||||
<key>FBDriver1</key>
|
||||
<string>NVDA</string>
|
||||
<key>FeatureMask</key>
|
||||
<integer>132096</integer>
|
||||
<key>GLDriver0</key>
|
||||
<string>Gen7Accelerator,IntelAcceleratorClassic,IntelAccelerator</string>
|
||||
<key>GLDriver1</key>
|
||||
<string>NVKernel,nvAccelerator</string>
|
||||
<key>GPUMinimumOffTime</key>
|
||||
<integer>50</integer>
|
||||
<key>HDADriver1</key>
|
||||
<string>AppleHDAController</string>
|
||||
<key>HPDInterval</key>
|
||||
<integer>2000</integer>
|
||||
<key>NumberFramebuffers0</key>
|
||||
<integer>1</integer>
|
||||
<key>NumberFramebuffers1</key>
|
||||
<integer>4</integer>
|
||||
<key>Policy</key>
|
||||
<integer>48</integer>
|
||||
<key>PowerUpCompensation</key>
|
||||
<integer>0</integer>
|
||||
<key>PowerUpDownSequence</key>
|
||||
<integer>1</integer>
|
||||
<key>PowerUpPCILinkOnSleep</key>
|
||||
<integer>1</integer>
|
||||
</dict>
|
||||
<key>Config5</key>
|
||||
<dict>
|
||||
<key>BacklightSmoothing</key>
|
||||
<integer>8</integer>
|
||||
<key>DebounceAppExit</key>
|
||||
<integer>0</integer>
|
||||
<key>DebounceHDP</key>
|
||||
<integer>0</integer>
|
||||
<key>DisableTerminationControl</key>
|
||||
<integer>0</integer>
|
||||
<key>EnergySavingPolicy</key>
|
||||
<integer>1</integer>
|
||||
<key>FBDriver0</key>
|
||||
<string>AppleIntelFramebuffer</string>
|
||||
<key>FBDriver1</key>
|
||||
<string>NVDA</string>
|
||||
<key>FeatureMask</key>
|
||||
<integer>132096</integer>
|
||||
<key>GLDriver0</key>
|
||||
<string>IntelAccelerator</string>
|
||||
<key>GLDriver1</key>
|
||||
<string>NVKernel,nvAccelerator</string>
|
||||
<key>GPUMinimumOffTime</key>
|
||||
<integer>50</integer>
|
||||
<key>HDADriver1</key>
|
||||
<string>AppleHDAController</string>
|
||||
<key>HPDInterval</key>
|
||||
<integer>2000</integer>
|
||||
<key>NumberFramebuffers0</key>
|
||||
<integer>1</integer>
|
||||
<key>NumberFramebuffers1</key>
|
||||
<integer>4</integer>
|
||||
<key>Policy</key>
|
||||
<integer>48</integer>
|
||||
<key>PowerUpCompensation</key>
|
||||
<integer>1</integer>
|
||||
<key>PowerUpDownSequence</key>
|
||||
<integer>3</integer>
|
||||
<key>SaveRootPort</key>
|
||||
<integer>2</integer>
|
||||
<key>StartUpDelay</key>
|
||||
<integer>5000</integer>
|
||||
</dict>
|
||||
<key>Config6</key>
|
||||
<dict>
|
||||
<key>BacklightSmoothing</key>
|
||||
<integer>8</integer>
|
||||
<key>ClamshellVendorWorkaround</key>
|
||||
<integer>1</integer>
|
||||
<key>DebounceAppExit</key>
|
||||
<integer>0</integer>
|
||||
<key>DebounceHDP</key>
|
||||
<integer>0</integer>
|
||||
<key>DisableTerminationControl</key>
|
||||
<integer>0</integer>
|
||||
<key>EnergySavingPolicy</key>
|
||||
<integer>1</integer>
|
||||
<key>FBDriver0</key>
|
||||
<string>AppleIntelFramebuffer</string>
|
||||
<key>FBDriver1</key>
|
||||
<string>AMDFramebufferSI</string>
|
||||
<key>FeatureMask</key>
|
||||
<integer>132096</integer>
|
||||
<key>GLDriver0</key>
|
||||
<string>IntelAccelerator</string>
|
||||
<key>GLDriver1</key>
|
||||
<string>AMDVerdeGraphicsAccelerator,AMDRadeonX4000_AMDVerdeGraphicsAccelerator</string>
|
||||
<key>GPUMinimumOffTime</key>
|
||||
<integer>50</integer>
|
||||
<key>HDADriver1</key>
|
||||
<string>AppleHDAController</string>
|
||||
<key>HPDInterval</key>
|
||||
<integer>2000</integer>
|
||||
<key>NumberFramebuffers0</key>
|
||||
<integer>1</integer>
|
||||
<key>NumberFramebuffers1</key>
|
||||
<integer>6</integer>
|
||||
<key>Policy</key>
|
||||
<integer>48</integer>
|
||||
<key>PowerUpDownSequence</key>
|
||||
<integer>3</integer>
|
||||
<key>SaveRootPort</key>
|
||||
<integer>2</integer>
|
||||
<key>SpreadSpectrumControl</key>
|
||||
<integer>1</integer>
|
||||
</dict>
|
||||
<key>Config7</key>
|
||||
<dict>
|
||||
<key>BacklightSmoothing</key>
|
||||
<integer>8</integer>
|
||||
<key>ClamshellVendorWorkaround</key>
|
||||
<integer>1</integer>
|
||||
<key>DebounceAppExit</key>
|
||||
<integer>0</integer>
|
||||
<key>DebounceHDP</key>
|
||||
<integer>0</integer>
|
||||
<key>DisableTerminationControl</key>
|
||||
<integer>0</integer>
|
||||
<key>EnergySavingPolicy</key>
|
||||
<integer>1</integer>
|
||||
<key>FBDriver0</key>
|
||||
<string>AppleIntelFramebuffer</string>
|
||||
<key>FBDriver1</key>
|
||||
<string>AMDFramebufferVIB</string>
|
||||
<key>FeatureMask</key>
|
||||
<integer>136192</integer>
|
||||
<key>GLDriver0</key>
|
||||
<string>IntelAccelerator</string>
|
||||
<key>GLDriver1</key>
|
||||
<string>AMDRadeonX4100_AMDBaffinGraphicsAccelerator,AMDBaffinGraphicsAccelerator,AMDRadeonX4150_AMDBaffinGraphicsAccelerator,AMDRadeonX4000_AMDBaffinGraphicsAccelerator</string>
|
||||
<key>GPUMinimumOffTime</key>
|
||||
<integer>50</integer>
|
||||
<key>HDADriver1</key>
|
||||
<string>AppleHDAController</string>
|
||||
<key>HDADriver2</key>
|
||||
<string>AppleGFXHDAController</string>
|
||||
<key>HPDInterval</key>
|
||||
<integer>2000</integer>
|
||||
<key>HPDMask</key>
|
||||
<integer>15</integer>
|
||||
<key>Internal324</key>
|
||||
<true/>
|
||||
<key>NumberFramebuffers0</key>
|
||||
<integer>1</integer>
|
||||
<key>NumberFramebuffers1</key>
|
||||
<integer>5</integer>
|
||||
<key>Policy</key>
|
||||
<integer>48</integer>
|
||||
<key>PowerUpDownSequence</key>
|
||||
<integer>3</integer>
|
||||
<key>SaveRootPort</key>
|
||||
<integer>2</integer>
|
||||
<key>SpreadSpectrumControl</key>
|
||||
<integer>1</integer>
|
||||
</dict>
|
||||
<key>ConfigMap</key>
|
||||
<dict>
|
||||
<key>04XX</key>
|
||||
<string>Config1</string>
|
||||
<key>06XX</key>
|
||||
<string>Config2</string>
|
||||
<key>07XX</key>
|
||||
<string>Config3</string>
|
||||
<key>08XX</key>
|
||||
<string>Config5</string>
|
||||
<key>0AXX</key>
|
||||
<string>Config6</string>
|
||||
<key>0BXX</key>
|
||||
<string>Config7</string>
|
||||
<key>MacBookPro9,1</key>
|
||||
<string>Config4</string>
|
||||
</dict>
|
||||
<key>Default</key>
|
||||
<dict>
|
||||
<key>EnergySavingPolicy</key>
|
||||
<integer>1</integer>
|
||||
<key>FBDriver0</key>
|
||||
<string>NVDATesla,NVDA</string>
|
||||
<key>FBDriver1</key>
|
||||
<string>NVDATesla,NVDA</string>
|
||||
<key>GLDriver0</key>
|
||||
<string>NVKernel</string>
|
||||
<key>GLDriver1</key>
|
||||
<string>NVKernel</string>
|
||||
</dict>
|
||||
<key>IOClass</key>
|
||||
<string>AppleMuxControl</string>
|
||||
<key>IOMatchCategory</key>
|
||||
<string>AppleMuxControl</string>
|
||||
<key>IONameMatch</key>
|
||||
<string>GMUX</string>
|
||||
<key>IOProviderClass</key>
|
||||
<string>IOACPIPlatformDevice</string>
|
||||
<key>IOUserClientClass</key>
|
||||
<string>AppleGraphicsControlClient</string>
|
||||
<key>LionOS</key>
|
||||
<integer>1</integer>
|
||||
<key>IOProbeScore</key>
|
||||
<integer>1000</integer>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright © Dortania</string>
|
||||
<key>#OSBundleLibraries</key>
|
||||
<dict>
|
||||
<key>com.apple.driver.AppleMuxControl</key>
|
||||
<string>5.2.7</string>
|
||||
</dict>
|
||||
<key>OSBundleRequired</key>
|
||||
<string>Safe Boot</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -764,7 +764,7 @@
|
||||
<key>model</key>
|
||||
<string>XXerve3,1</string>
|
||||
</dict>
|
||||
<key>iMac7,1</key>
|
||||
<key>#iMac7,1</key>
|
||||
<dict>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.apple.driver.AppleUSBHostMergeProperties</string>
|
||||
@@ -3505,7 +3505,7 @@
|
||||
<key>Tunnel Endpoint Device Vendor ID</key>
|
||||
<data>AQAAAA==</data>
|
||||
</dict>
|
||||
<key>iMac7,1-EHC1</key>
|
||||
<key>#iMac7,1-EHC1</key>
|
||||
<dict>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.apple.driver.AppleUSBHostMergeProperties</string>
|
||||
@@ -3568,7 +3568,7 @@
|
||||
<key>model</key>
|
||||
<string>iXac7,1</string>
|
||||
</dict>
|
||||
<key>iMac7,1-EHC2</key>
|
||||
<key>#iMac7,1-EHC2</key>
|
||||
<dict>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.apple.driver.AppleUSBHostMergeProperties</string>
|
||||
@@ -5417,7 +5417,7 @@
|
||||
<key>model</key>
|
||||
<string>Xacmini4,1</string>
|
||||
</dict>
|
||||
<key>iMac7,1-OHC1</key>
|
||||
<key>#iMac7,1-OHC1</key>
|
||||
<dict>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.apple.driver.AppleUSBHostMergeProperties</string>
|
||||
@@ -5459,7 +5459,7 @@
|
||||
<key>model</key>
|
||||
<string>iXac9,1</string>
|
||||
</dict>
|
||||
<key>iMac7,1-OHC2</key>
|
||||
<key>#iMac7,1-OHC2</key>
|
||||
<dict>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.apple.driver.AppleUSBHostMergeProperties</string>
|
||||
@@ -5501,7 +5501,7 @@
|
||||
<key>model</key>
|
||||
<string>iXac9,1</string>
|
||||
</dict>
|
||||
<key>iMac8,1-OHC1 </key>
|
||||
<key>iMac8,1-OHC1</key>
|
||||
<dict>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.apple.driver.AppleUSBHostMergeProperties</string>
|
||||
@@ -7850,8 +7850,8 @@
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>board-id</key>
|
||||
<string>Mac-F60DEB81FF30ACF6</string>
|
||||
<key>model</key>
|
||||
<string>XacPro6,1</string>
|
||||
<key>locationID</key>
|
||||
<integer>487587840</integer>
|
||||
</dict>
|
||||
@@ -10467,8 +10467,8 @@
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>board-id</key>
|
||||
<string>Mac-7BA5B2D9E42DDD94</string>
|
||||
<key>model</key>
|
||||
<string>iXacPro1,1</string>
|
||||
</dict>
|
||||
<key>Dortania1,1</key>
|
||||
<dict>
|
||||
@@ -10603,6 +10603,8 @@
|
||||
<string>Xortania1,1</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright © Dortania</string>
|
||||
<key>OSBundleRequired</key>
|
||||
<string>Root</string>
|
||||
</dict>
|
||||
40
payloads/Kexts/Plists/PlatformPlugin/MacBook4,1/Info.plist
Normal file
346
payloads/Kexts/Plists/PlatformPlugin/MacBook4,1/MacBook4_1.plist
Normal file
@@ -0,0 +1,346 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IOPlatformThermalProfile</key>
|
||||
<dict>
|
||||
<key>ConfigArray</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>WWEN</key>
|
||||
<true/>
|
||||
<key>model</key>
|
||||
<string>MacBook4,1</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>CStateDict</key>
|
||||
<dict>
|
||||
<key>MacBook4,1</key>
|
||||
<string>CSD3</string>
|
||||
<key>CSD3</key>
|
||||
<dict>
|
||||
<key>C6</key>
|
||||
<dict>
|
||||
<key>enable</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>ControlArray</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>Desc-Key</key>
|
||||
<string>CPU_PLIMIT</string>
|
||||
<key>IOClass</key>
|
||||
<string>AppleSMCControl</string>
|
||||
<key>control-flags</key>
|
||||
<integer>2</integer>
|
||||
<key>control-id</key>
|
||||
<integer>10</integer>
|
||||
<key>location</key>
|
||||
<string>cpu plimit</string>
|
||||
<key>type</key>
|
||||
<string>smc</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Desc-Key</key>
|
||||
<string>CPU_STATE</string>
|
||||
<key>IOClass</key>
|
||||
<string>AppleSMCControl</string>
|
||||
<key>control-flags</key>
|
||||
<integer>2</integer>
|
||||
<key>control-id</key>
|
||||
<integer>13</integer>
|
||||
<key>location</key>
|
||||
<string>cpu state</string>
|
||||
<key>type</key>
|
||||
<string>smc</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Desc-Key</key>
|
||||
<string>GPU_PLIMIT</string>
|
||||
<key>IOClass</key>
|
||||
<string>AppleSMCControl</string>
|
||||
<key>control-flags</key>
|
||||
<integer>2</integer>
|
||||
<key>control-id</key>
|
||||
<integer>11</integer>
|
||||
<key>location</key>
|
||||
<string>gpu plimit</string>
|
||||
<key>type</key>
|
||||
<string>smc</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Desc-Key</key>
|
||||
<string>GPU_STATE</string>
|
||||
<key>IOClass</key>
|
||||
<string>AppleSMCControl</string>
|
||||
<key>control-flags</key>
|
||||
<integer>2</integer>
|
||||
<key>control-id</key>
|
||||
<integer>14</integer>
|
||||
<key>location</key>
|
||||
<string>gpu state</string>
|
||||
<key>type</key>
|
||||
<string>smc</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Desc-Key</key>
|
||||
<string>MEM_PLIMIT</string>
|
||||
<key>IOClass</key>
|
||||
<string>AppleSMCControl</string>
|
||||
<key>control-flags</key>
|
||||
<integer>2</integer>
|
||||
<key>control-id</key>
|
||||
<integer>12</integer>
|
||||
<key>location</key>
|
||||
<string>mem plimit</string>
|
||||
<key>type</key>
|
||||
<string>smc</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>CreationDate</key>
|
||||
<string>Tue May 26 15:26:07 PDT 2009</string>
|
||||
<key>CtrlLoopArray</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>Description</key>
|
||||
<string>SMC_CPU_Control_Loop</string>
|
||||
<key>IOClass</key>
|
||||
<string>ACPI_SMC_CtrlLoop</string>
|
||||
<key>PLimitClass</key>
|
||||
<array>
|
||||
<string>CPU</string>
|
||||
</array>
|
||||
<key>MetaStateArray</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>Description</key>
|
||||
<string>Normal</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Description</key>
|
||||
<string>Reduced Power</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Description</key>
|
||||
<string>User Low Power</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Description</key>
|
||||
<string>User High Power</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>StepDataDict</key>
|
||||
<dict>
|
||||
<key>MacBook4,1</key>
|
||||
<string>SP1</string>
|
||||
<key>SP1</key>
|
||||
<data>
|
||||
xgYAAAAAAQIEAAACAgAAVQBuAHMAcABlAGMAaQBmAGkAZQBkDAAH/wcAACEAAAACAAAB//8A/wD/
|
||||
AP8A/wD/AAYAAP8BAAP/AAsPAAD/AQAD/wALDwAA/wEAA/8ACw8AAP8BAAP/AAsPAAD/AQAD/wAL
|
||||
DwAA/wEAA/8ACw8AAP8BAAP/AAsPAAD/AQAD/wALDwAA/wEAA/8ACw8AAP8BAAP/AAsPAAD/AQAD
|
||||
/wALDwAA/wEAA/8ACw8AAP8BAAP/AAsPAAD/AQAD/wALDwAA/wEAA/8ACw8AAP8BAAP/AAsPAAD/
|
||||
AQAD/wALDwAA/wEAA/8ACw8AAP8BAAP/AAsPAAD/AQAD/wALDwAA/wEAA/8ACw8AAP8BAAP/AAsP
|
||||
AAD/AQAD/wALDwAA/wEAA/8ACw8AAP8BAAP/AAsPAAD/AQAD/wALDwAA/wEAA/8ACw8AAP8BAAP/
|
||||
AAsPAAD/AQAD/wALDwAA/wEAA/8ACw8AAP8BAAP/AAsPAAD/AQAD/wALDwAA/wEAA/8ACw8AAP8B
|
||||
AAP/AAsPAAD/AQAD/wALDwAA/wEAA/8ACw8AAP8BAAP/AAsPAAD/AQAD/wALDwAA/wEAA/8ACw8A
|
||||
AP8BAAP/AAsPAAD/AQAD/wALDwAA/wEAA/8ACw8AAP8BAAP/AAsPAAD/AQAD/wALDwAA/wEAA/8A
|
||||
Cw8AAP8BAAP/AAsPAAD/AQAD/wALDwAA/wEAA/8ACw8AAP8BAAP/AAsPAAD/AQAD/wALDwAA/wEA
|
||||
A/8ACw8AAP8BAAP/AAsPAAD/AQAD/wALDwAA/wEAA/8ACw8AAP8BAAP/AAsPAAD/AQAD/wALDwAA
|
||||
/wEAA/8ACw8AAP8BAAP/AAsPAAD/AQAD/wALDwAA/wEAA/8ACw8AAP8BAAP/AAsPAAD/AQAD/wAL
|
||||
DwAA/wEAA/8ACw8AAP8BAAP/AAsKAAABCgAAAQAAAAEAAAD1AAEFAAABAAAF/wABAAAAAQAAAAEG
|
||||
AAACAAAABAEAAIAAwwC3AC4ANAALAAAAAgAAAAEAAAABAAAAAgAAAAICAAACBgAAAQAAAAEAAAD1
|
||||
AAEFAAADAAAF/wADAgAAAwYAAAkAAAAEAAAATAAEBQAABAAABf8AAwAAAAEAAAAEBAAAgAAAAAoK
|
||||
AAAIAAAABQAAAAgAAAAFAAAAAwAAAAIAAAAFBgAABwAAAAEAAAD1AAEFAAAGAAAF/wADAAAAAwAA
|
||||
AAYGAAACAAAABAAAAKAADwUAAAcEAAAHAAAAAwAAAAQAAAAHBgAACAoAAAMAAAX/AAQCAAAIBgAA
|
||||
AQAAAAEAAADoAAMFAAAJAAAF/wAFAgAACQYAAAIAAAAEAAAA6AADBQAADQAAAAoAAAANAAAACgAA
|
||||
AAUAAAABAAAACgYAAAcAAAABAAAA9QABBQAACwAABf8ABQAAAAIAAAALBgAAAgAAAAQAAACgAA8F
|
||||
AAAMBAAADAAAAAUAAAADAAAADAYAAAgKAAAJAAAF/wAGAgAADQYAAAEAAAABAAAA6AADBQAADgAA
|
||||
Bf8ABwIAAA4GAAACAAAABAAAAFgAGwUAABIAAAAPAAAAEgAAAA8AAAAHAAAAAQAAAA8GAAAHAAAA
|
||||
AQAAAPUAAQUAABAAAAX/AAcAAAACAAAAEAYAAAIAAAAEAAAAoAAPBQAAEQQAABEAAAAHAAAAAwAA
|
||||
ABEGAAAICgAADgAABf8ACAIAABIGAAABAAAAAQAAAOgAAwUAABMAAAX/AAkCAAATBgAAAgAAAAQA
|
||||
AAD8AAgFAAAXAAAAFAAAABcAAAAUAAAACQAAAAEAAAAUBgAABwAAAAEAAAD1AAEFAAAVAAAF/wAJ
|
||||
AAAAAgAAABUGAAACAAAABAAAAKAADwUAABYEAAAWAAAACQAAAAMAAAAWBgAACAoAABMAAAX/AAoC
|
||||
AAAXBgAAAQAAAAEAAADoAAMFAAAYAAAF/wALAgAAGAYAAAIAAAAEAAAAKAAKBQAAHAAAABkAAAAc
|
||||
AAAAGQAAAAsAAAABAAAAGQYAAAcAAAABAAAA9QABBQAAGgAABf8ACwAAAAIAAAAaBgAAAgAAAAQA
|
||||
AACgAA8FAAAbBAAAGwAAAAsAAAADAAAAGwYAAAgKAAAYAAAF/wAMAgAAHAYAAAEAAAABAAAA9AAB
|
||||
BQAAHQAABf8ADQIAAB0GAAACAAAABAEAAIAAwwC3AC4ANAALAAAAHQAAAB4AAAAdAAAAHgAAAA0A
|
||||
AAABAAAAHgYAAAcAAAABAAAA9QABBQAAHwAABf8ADQAAAAIAAAAfBgAAAgAAAAQAAACgAA8FAAAg
|
||||
BAAAIAAAAA0AAAADAAAAIAYAAAgKAAAdAAAF/w==
|
||||
</data>
|
||||
</dict>
|
||||
<key>ctrlloop-id</key>
|
||||
<integer>0</integer>
|
||||
<key>is-state-driven</key>
|
||||
<integer>1</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Description</key>
|
||||
<string>SMC_GPU_sensor_Control_Loop</string>
|
||||
<key>GPUPowerMgmtFloorArray</key>
|
||||
<array>
|
||||
<integer>1</integer>
|
||||
</array>
|
||||
<key>GPUThresholdDict</key>
|
||||
<dict>
|
||||
<key>MacBook4,1</key>
|
||||
<string>TA3</string>
|
||||
<key>TA3</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>high-threshold</key>
|
||||
<integer>25</integer>
|
||||
<key>low-threshold</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>high-threshold</key>
|
||||
<integer>33</integer>
|
||||
<key>low-threshold</key>
|
||||
<integer>25</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>high-threshold</key>
|
||||
<integer>99</integer>
|
||||
<key>low-threshold</key>
|
||||
<integer>33</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>high-threshold</key>
|
||||
<integer>100</integer>
|
||||
<key>low-threshold</key>
|
||||
<integer>99</integer>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<key>IOClass</key>
|
||||
<string>ACPI_SMC_CtrlLoop</string>
|
||||
<key>PLimitClass</key>
|
||||
<array>
|
||||
<string>GPU</string>
|
||||
</array>
|
||||
<key>MetaStateArray</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>Description</key>
|
||||
<string>Normal</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Description</key>
|
||||
<string>Reduced Power</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Description</key>
|
||||
<string>User Low Power</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Description</key>
|
||||
<string>User High Power</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>SensorIDArray</key>
|
||||
<array>
|
||||
<integer>6</integer>
|
||||
</array>
|
||||
<key>ctrlloop-id</key>
|
||||
<integer>1</integer>
|
||||
<key>is-state-driven</key>
|
||||
<integer>1</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Description</key>
|
||||
<string>SMC_Memory_Control_Loop</string>
|
||||
<key>IOClass</key>
|
||||
<string>ACPI_SMC_CtrlLoop</string>
|
||||
<key>PLimitClass</key>
|
||||
<array>
|
||||
<string>Mem</string>
|
||||
</array>
|
||||
<key>MCHThrottleDict</key>
|
||||
<dict>
|
||||
<key>MacBook4,1</key>
|
||||
<string>MT3</string>
|
||||
<key>MT3</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>DTC_WAB</key>
|
||||
<integer>32</integer>
|
||||
<key>DTC_WAT</key>
|
||||
<integer>0</integer>
|
||||
<key>GTC_WAB</key>
|
||||
<integer>0</integer>
|
||||
<key>GTC_WAT</key>
|
||||
<integer>15</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>DTC_WAB</key>
|
||||
<integer>32</integer>
|
||||
<key>DTC_WAT</key>
|
||||
<integer>0</integer>
|
||||
<key>GTC_WAB</key>
|
||||
<integer>0</integer>
|
||||
<key>GTC_WAT</key>
|
||||
<integer>15</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>DTC_WAB</key>
|
||||
<integer>32</integer>
|
||||
<key>DTC_WAT</key>
|
||||
<integer>0</integer>
|
||||
<key>GTC_WAB</key>
|
||||
<integer>0</integer>
|
||||
<key>GTC_WAT</key>
|
||||
<integer>15</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>DTC_WAB</key>
|
||||
<integer>32</integer>
|
||||
<key>DTC_WAT</key>
|
||||
<integer>0</integer>
|
||||
<key>GTC_WAB</key>
|
||||
<integer>0</integer>
|
||||
<key>GTC_WAT</key>
|
||||
<integer>15</integer>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<key>MetaStateArray</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>Description</key>
|
||||
<string>Normal</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Description</key>
|
||||
<string>Reduced Power</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Description</key>
|
||||
<string>User Low Power</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Description</key>
|
||||
<string>User High Power</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>ctrlloop-id</key>
|
||||
<integer>2</integer>
|
||||
<key>is-state-driven</key>
|
||||
<integer>1</integer>
|
||||
</dict>
|
||||
</array>
|
||||
<key>SensorArray</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>Desc-Key</key>
|
||||
<string>GPU</string>
|
||||
<key>IOClass</key>
|
||||
<string>IOPlatformSensor</string>
|
||||
<key>sensor-id</key>
|
||||
<integer>6</integer>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
||||
40
payloads/Kexts/Plists/PlatformPlugin/MacBook5,1/Info.plist
Normal file
193
payloads/Kexts/Plists/PlatformPlugin/MacBook5,1/MacBook5_1.plist
Normal file
@@ -0,0 +1,193 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IOPlatformThermalProfile</key>
|
||||
<dict>
|
||||
<key>CreationDate</key>
|
||||
<string>Thu Oct 13 13:56:00 PDT 2005</string>
|
||||
<key>ConfigArray</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>model</key>
|
||||
<string>MacBook5,1</string>
|
||||
<key>iGPUThrottle</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</array>
|
||||
<key>ControlArray</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>Desc-Key</key>
|
||||
<string>CPU_PLIMIT</string>
|
||||
<key>IOClass</key>
|
||||
<string>AppleSMCControl</string>
|
||||
<key>control-flags</key>
|
||||
<integer>2</integer>
|
||||
<key>control-id</key>
|
||||
<integer>10</integer>
|
||||
<key>location</key>
|
||||
<string>cpu plimit</string>
|
||||
<key>type</key>
|
||||
<string>smc</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Desc-Key</key>
|
||||
<string>CPU_STATE</string>
|
||||
<key>IOClass</key>
|
||||
<string>AppleSMCControl</string>
|
||||
<key>control-flags</key>
|
||||
<integer>2</integer>
|
||||
<key>control-id</key>
|
||||
<integer>13</integer>
|
||||
<key>location</key>
|
||||
<string>cpu state</string>
|
||||
<key>type</key>
|
||||
<string>smc</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Desc-Key</key>
|
||||
<string>GPU_RANGE_CONTROL_INTERNAL</string>
|
||||
<key>IOClass</key>
|
||||
<string>IOPlatformControl</string>
|
||||
<key>control-flags</key>
|
||||
<integer>2</integer>
|
||||
<key>control-id</key>
|
||||
<integer>16</integer>
|
||||
<key>location</key>
|
||||
<string>gpu-internal</string>
|
||||
<key>type</key>
|
||||
<string>gpu-control</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>CtrlLoopArray</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>Description</key>
|
||||
<string>SMC_CPU_Control_Loop</string>
|
||||
<key>IOClass</key>
|
||||
<string>ACPI_SMC_CtrlLoop</string>
|
||||
<key>PLimitClass</key>
|
||||
<array>
|
||||
<string>CPU</string>
|
||||
</array>
|
||||
<key>MetaStateArray</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>Description</key>
|
||||
<string>Normal</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Description</key>
|
||||
<string>Reduced Power</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Description</key>
|
||||
<string>User Low Power</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Description</key>
|
||||
<string>User High Power</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>PLimitDict</key>
|
||||
<dict>
|
||||
<key>MacBook5,1</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<key>StepDataDict</key>
|
||||
<dict>
|
||||
<key>MacBook5,1</key>
|
||||
<string>SP1</string>
|
||||
<key>SP1</key>
|
||||
<data>
|
||||
xgYAAAAAAQIEAAACAgAAVQBuAHMAcABlAGMAaQBmAGkAZQBkDAAH/wcAACEAAAACAAAB//8A/wD/
|
||||
AP8A/wD/AAYAAP8BAAP/AAsPAAD/AQAD/wALDwAA/wEAA/8ACw8AAP8BAAP/AAsPAAD/AQAD/wAL
|
||||
DwAA/wEAA/8ACw8AAP8BAAP/AAsPAAD/AQAD/wALDwAA/wEAA/8ACw8AAP8BAAP/AAsPAAD/AQAD
|
||||
/wALDwAA/wEAA/8ACw8AAP8BAAP/AAsPAAD/AQAD/wALDwAA/wEAA/8ACw8AAP8BAAP/AAsPAAD/
|
||||
AQAD/wALDwAA/wEAA/8ACw8AAP8BAAP/AAsPAAD/AQAD/wALDwAA/wEAA/8ACw8AAP8BAAP/AAsP
|
||||
AAD/AQAD/wALDwAA/wEAA/8ACw8AAP8BAAP/AAsPAAD/AQAD/wALDwAA/wEAA/8ACw8AAP8BAAP/
|
||||
AAsPAAD/AQAD/wALDwAA/wEAA/8ACw8AAP8BAAP/AAsPAAD/AQAD/wALDwAA/wEAA/8ACw8AAP8B
|
||||
AAP/AAsPAAD/AQAD/wALDwAA/wEAA/8ACw8AAP8BAAP/AAsPAAD/AQAD/wALDwAA/wEAA/8ACw8A
|
||||
AP8BAAP/AAsPAAD/AQAD/wALDwAA/wEAA/8ACw8AAP8BAAP/AAsPAAD/AQAD/wALDwAA/wEAA/8A
|
||||
Cw8AAP8BAAP/AAsPAAD/AQAD/wALDwAA/wEAA/8ACw8AAP8BAAP/AAsPAAD/AQAD/wALDwAA/wEA
|
||||
A/8ACw8AAP8BAAP/AAsPAAD/AQAD/wALDwAA/wEAA/8ACw8AAP8BAAP/AAsPAAD/AQAD/wALDwAA
|
||||
/wEAA/8ACw8AAP8BAAP/AAsPAAD/AQAD/wALDwAA/wEAA/8ACw8AAP8BAAP/AAsPAAD/AQAD/wAL
|
||||
DwAA/wEAA/8ACw8AAP8BAAP/AAsKAAABCgAAAQAAAAEAAAD1AAEFAAABAAAF/wABAAAAAQAAAAEG
|
||||
AAACAAAABAEAAIAAwwC3AC4ANAALAAAAAgAAAAEAAAABAAAAAgAAAAICAAACBgAAAQAAAAEAAAD1
|
||||
AAEFAAADAAAF/wADAgAAAwYAAAkAAAAEAAAATAAEBQAABAAABf8AAwAAAAEAAAAEBAAAgAAAAAoK
|
||||
AAAIAAAABQAAAAgAAAAFAAAAAwAAAAIAAAAFBgAABwAAAAEAAAD1AAEFAAAGAAAF/wADAAAAAwAA
|
||||
AAYGAAACAAAABAAAAKAADwUAAAcEAAAHAAAAAwAAAAQAAAAHBgAACAoAAAMAAAX/AAQCAAAIBgAA
|
||||
AQAAAAEAAADoAAMFAAAJAAAF/wAFAgAACQYAAAIAAAAEAAAA6AADBQAADQAAAAoAAAANAAAACgAA
|
||||
AAUAAAABAAAACgYAAAcAAAABAAAA9QABBQAACwAABf8ABQAAAAIAAAALBgAAAgAAAAQAAACgAA8F
|
||||
AAAMBAAADAAAAAUAAAADAAAADAYAAAgKAAAJAAAF/wAGAgAADQYAAAEAAAABAAAA6AADBQAADgAA
|
||||
Bf8ABwIAAA4GAAACAAAABAAAAFgAGwUAABIAAAAPAAAAEgAAAA8AAAAHAAAAAQAAAA8GAAAHAAAA
|
||||
AQAAAPUAAQUAABAAAAX/AAcAAAACAAAAEAYAAAIAAAAEAAAAoAAPBQAAEQQAABEAAAAHAAAAAwAA
|
||||
ABEGAAAICgAADgAABf8ACAIAABIGAAABAAAAAQAAAOgAAwUAABMAAAX/AAkCAAATBgAAAgAAAAQA
|
||||
AAD8AAgFAAAXAAAAFAAAABcAAAAUAAAACQAAAAEAAAAUBgAABwAAAAEAAAD1AAEFAAAVAAAF/wAJ
|
||||
AAAAAgAAABUGAAACAAAABAAAAKAADwUAABYEAAAWAAAACQAAAAMAAAAWBgAACAoAABMAAAX/AAoC
|
||||
AAAXBgAAAQAAAAEAAADoAAMFAAAYAAAF/wALAgAAGAYAAAIAAAAEAAAAKAAKBQAAHAAAABkAAAAc
|
||||
AAAAGQAAAAsAAAABAAAAGQYAAAcAAAABAAAA9QABBQAAGgAABf8ACwAAAAIAAAAaBgAAAgAAAAQA
|
||||
AACgAA8FAAAbBAAAGwAAAAsAAAADAAAAGwYAAAgKAAAYAAAF/wAMAgAAHAYAAAEAAAABAAAA9AAB
|
||||
BQAAHQAABf8ADQIAAB0GAAACAAAABAEAAIAAwwC3AC4ANAALAAAAHQAAAB4AAAAdAAAAHgAAAA0A
|
||||
AAABAAAAHgYAAAcAAAABAAAA9QABBQAAHwAABf8ADQAAAAIAAAAfBgAAAgAAAAQAAACgAA8FAAAg
|
||||
BAAAIAAAAA0AAAADAAAAIAYAAAgKAAAdAAAF/w==
|
||||
</data>
|
||||
</dict>
|
||||
<key>ctrlloop-id</key>
|
||||
<integer>0</integer>
|
||||
<key>is-state-driven</key>
|
||||
<integer>1</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>ControlIDArray</key>
|
||||
<array>
|
||||
<integer>16</integer>
|
||||
<integer>17</integer>
|
||||
<integer>18</integer>
|
||||
</array>
|
||||
<key>Description</key>
|
||||
<string>SMC_GPU_Range_Control_Loop</string>
|
||||
<key>GPUControlInfoDict</key>
|
||||
<dict>
|
||||
<key>MacBook5,1</key>
|
||||
<string>CIA2</string>
|
||||
<key>CIA2</key>
|
||||
<array>
|
||||
<integer>1</integer>
|
||||
<integer>16</integer>
|
||||
<integer>0</integer>
|
||||
</array>
|
||||
</dict>
|
||||
<key>IOClass</key>
|
||||
<string>ACPI_SMC_GPU_CtrlLoop</string>
|
||||
<key>PLimitClass</key>
|
||||
<array>
|
||||
<string>GPU</string>
|
||||
</array>
|
||||
<key>MetaStateArray</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>Description</key>
|
||||
<string>Normal</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Description</key>
|
||||
<string>Reduced Power</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Description</key>
|
||||
<string>User Low Power</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Description</key>
|
||||
<string>User High Power</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>ctrlloop-id</key>
|
||||
<integer>3</integer>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
||||
40
payloads/Kexts/Plists/PlatformPlugin/MacBook5,2/Info.plist
Normal file
207
payloads/Kexts/Plists/PlatformPlugin/MacBook5,2/MacBook5_2.plist
Normal file
@@ -0,0 +1,207 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IOPlatformThermalProfile</key>
|
||||
<dict>
|
||||
<key>CreationDate</key>
|
||||
<string>Thu Oct 13 13:56:00 PDT 2005</string>
|
||||
<key>ConfigArray</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>model</key>
|
||||
<string>MacBook5,2</string>
|
||||
<key>iGPUThrottle</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</array>
|
||||
<key>ControlArray</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>Desc-Key</key>
|
||||
<string>CPU_PLIMIT</string>
|
||||
<key>IOClass</key>
|
||||
<string>AppleSMCControl</string>
|
||||
<key>control-flags</key>
|
||||
<integer>2</integer>
|
||||
<key>control-id</key>
|
||||
<integer>10</integer>
|
||||
<key>location</key>
|
||||
<string>cpu plimit</string>
|
||||
<key>type</key>
|
||||
<string>smc</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Desc-Key</key>
|
||||
<string>CPU_STATE</string>
|
||||
<key>IOClass</key>
|
||||
<string>AppleSMCControl</string>
|
||||
<key>control-flags</key>
|
||||
<integer>2</integer>
|
||||
<key>control-id</key>
|
||||
<integer>13</integer>
|
||||
<key>location</key>
|
||||
<string>cpu state</string>
|
||||
<key>type</key>
|
||||
<string>smc</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Desc-Key</key>
|
||||
<string>IDLE_PLIMIT</string>
|
||||
<key>IOClass</key>
|
||||
<string>AppleSMCControl</string>
|
||||
<key>control-flags</key>
|
||||
<integer>2</integer>
|
||||
<key>control-id</key>
|
||||
<integer>15</integer>
|
||||
<key>location</key>
|
||||
<string>idle limit</string>
|
||||
<key>type</key>
|
||||
<string>smc</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Desc-Key</key>
|
||||
<string>GPU_RANGE_CONTROL_INTERNAL</string>
|
||||
<key>IOClass</key>
|
||||
<string>IOPlatformControl</string>
|
||||
<key>control-flags</key>
|
||||
<integer>2</integer>
|
||||
<key>control-id</key>
|
||||
<integer>16</integer>
|
||||
<key>location</key>
|
||||
<string>gpu-internal</string>
|
||||
<key>type</key>
|
||||
<string>gpu-control</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>CtrlLoopArray</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>Description</key>
|
||||
<string>SMC_CPU_Control_Loop</string>
|
||||
<key>IOClass</key>
|
||||
<string>ACPI_SMC_CtrlLoop</string>
|
||||
<key>PLimitClass</key>
|
||||
<array>
|
||||
<string>CPU</string>
|
||||
</array>
|
||||
<key>MetaStateArray</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>Description</key>
|
||||
<string>Normal</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Description</key>
|
||||
<string>Reduced Power</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Description</key>
|
||||
<string>User Low Power</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Description</key>
|
||||
<string>User High Power</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>PLimitDict</key>
|
||||
<dict>
|
||||
<key>MacBook5,2</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<key>StepDataDict</key>
|
||||
<dict>
|
||||
<key>MacBook5,2</key>
|
||||
<string>SP1</string>
|
||||
<key>SP1</key>
|
||||
<data>
|
||||
xgYAAAAAAQIEAAACAgAAVQBuAHMAcABlAGMAaQBmAGkAZQBkDAAH/wcAACEAAAACAAAB//8A/wD/
|
||||
AP8A/wD/AAYAAP8BAAP/AAsPAAD/AQAD/wALDwAA/wEAA/8ACw8AAP8BAAP/AAsPAAD/AQAD/wAL
|
||||
DwAA/wEAA/8ACw8AAP8BAAP/AAsPAAD/AQAD/wALDwAA/wEAA/8ACw8AAP8BAAP/AAsPAAD/AQAD
|
||||
/wALDwAA/wEAA/8ACw8AAP8BAAP/AAsPAAD/AQAD/wALDwAA/wEAA/8ACw8AAP8BAAP/AAsPAAD/
|
||||
AQAD/wALDwAA/wEAA/8ACw8AAP8BAAP/AAsPAAD/AQAD/wALDwAA/wEAA/8ACw8AAP8BAAP/AAsP
|
||||
AAD/AQAD/wALDwAA/wEAA/8ACw8AAP8BAAP/AAsPAAD/AQAD/wALDwAA/wEAA/8ACw8AAP8BAAP/
|
||||
AAsPAAD/AQAD/wALDwAA/wEAA/8ACw8AAP8BAAP/AAsPAAD/AQAD/wALDwAA/wEAA/8ACw8AAP8B
|
||||
AAP/AAsPAAD/AQAD/wALDwAA/wEAA/8ACw8AAP8BAAP/AAsPAAD/AQAD/wALDwAA/wEAA/8ACw8A
|
||||
AP8BAAP/AAsPAAD/AQAD/wALDwAA/wEAA/8ACw8AAP8BAAP/AAsPAAD/AQAD/wALDwAA/wEAA/8A
|
||||
Cw8AAP8BAAP/AAsPAAD/AQAD/wALDwAA/wEAA/8ACw8AAP8BAAP/AAsPAAD/AQAD/wALDwAA/wEA
|
||||
A/8ACw8AAP8BAAP/AAsPAAD/AQAD/wALDwAA/wEAA/8ACw8AAP8BAAP/AAsPAAD/AQAD/wALDwAA
|
||||
/wEAA/8ACw8AAP8BAAP/AAsPAAD/AQAD/wALDwAA/wEAA/8ACw8AAP8BAAP/AAsPAAD/AQAD/wAL
|
||||
DwAA/wEAA/8ACw8AAP8BAAP/AAsKAAABCgAAAQAAAAEAAAD1AAEFAAABAAAF/wABAAAAAQAAAAEG
|
||||
AAACAAAABAEAAIAAwwC3AC4ANAALAAAAAgAAAAEAAAABAAAAAgAAAAICAAACBgAAAQAAAAEAAAD1
|
||||
AAEFAAADAAAF/wADAgAAAwYAAAkAAAAEAAAATAAEBQAABAAABf8AAwAAAAEAAAAEBAAAgAAAAAoK
|
||||
AAAIAAAABQAAAAgAAAAFAAAAAwAAAAIAAAAFBgAABwAAAAEAAAD1AAEFAAAGAAAF/wADAAAAAwAA
|
||||
AAYGAAACAAAABAAAAKAADwUAAAcEAAAHAAAAAwAAAAQAAAAHBgAACAoAAAMAAAX/AAQCAAAIBgAA
|
||||
AQAAAAEAAADoAAMFAAAJAAAF/wAFAgAACQYAAAIAAAAEAAAA6AADBQAADQAAAAoAAAANAAAACgAA
|
||||
AAUAAAABAAAACgYAAAcAAAABAAAA9QABBQAACwAABf8ABQAAAAIAAAALBgAAAgAAAAQAAACgAA8F
|
||||
AAAMBAAADAAAAAUAAAADAAAADAYAAAgKAAAJAAAF/wAGAgAADQYAAAEAAAABAAAA6AADBQAADgAA
|
||||
Bf8ABwIAAA4GAAACAAAABAAAAFgAGwUAABIAAAAPAAAAEgAAAA8AAAAHAAAAAQAAAA8GAAAHAAAA
|
||||
AQAAAPUAAQUAABAAAAX/AAcAAAACAAAAEAYAAAIAAAAEAAAAoAAPBQAAEQQAABEAAAAHAAAAAwAA
|
||||
ABEGAAAICgAADgAABf8ACAIAABIGAAABAAAAAQAAAOgAAwUAABMAAAX/AAkCAAATBgAAAgAAAAQA
|
||||
AAD8AAgFAAAXAAAAFAAAABcAAAAUAAAACQAAAAEAAAAUBgAABwAAAAEAAAD1AAEFAAAVAAAF/wAJ
|
||||
AAAAAgAAABUGAAACAAAABAAAAKAADwUAABYEAAAWAAAACQAAAAMAAAAWBgAACAoAABMAAAX/AAoC
|
||||
AAAXBgAAAQAAAAEAAADoAAMFAAAYAAAF/wALAgAAGAYAAAIAAAAEAAAAKAAKBQAAHAAAABkAAAAc
|
||||
AAAAGQAAAAsAAAABAAAAGQYAAAcAAAABAAAA9QABBQAAGgAABf8ACwAAAAIAAAAaBgAAAgAAAAQA
|
||||
AACgAA8FAAAbBAAAGwAAAAsAAAADAAAAGwYAAAgKAAAYAAAF/wAMAgAAHAYAAAEAAAABAAAA9AAB
|
||||
BQAAHQAABf8ADQIAAB0GAAACAAAABAEAAIAAwwC3AC4ANAALAAAAHQAAAB4AAAAdAAAAHgAAAA0A
|
||||
AAABAAAAHgYAAAcAAAABAAAA9QABBQAAHwAABf8ADQAAAAIAAAAfBgAAAgAAAAQAAACgAA8FAAAg
|
||||
BAAAIAAAAA0AAAADAAAAIAYAAAgKAAAdAAAF/w==
|
||||
</data>
|
||||
</dict>
|
||||
<key>ctrlloop-id</key>
|
||||
<integer>0</integer>
|
||||
<key>is-state-driven</key>
|
||||
<integer>1</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>ControlIDArray</key>
|
||||
<array>
|
||||
<integer>16</integer>
|
||||
<integer>17</integer>
|
||||
<integer>18</integer>
|
||||
</array>
|
||||
<key>Description</key>
|
||||
<string>SMC_GPU_Range_Control_Loop</string>
|
||||
<key>GPUControlInfoDict</key>
|
||||
<dict>
|
||||
<key>MacBook5,2</key>
|
||||
<string>CIA2</string>
|
||||
<key>CIA2</key>
|
||||
<array>
|
||||
<integer>1</integer>
|
||||
<integer>16</integer>
|
||||
<integer>0</integer>
|
||||
</array>
|
||||
</dict>
|
||||
<key>IOClass</key>
|
||||
<string>ACPI_SMC_GPU_CtrlLoop</string>
|
||||
<key>PLimitClass</key>
|
||||
<array>
|
||||
<string>GPU</string>
|
||||
</array>
|
||||
<key>MetaStateArray</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>Description</key>
|
||||
<string>Normal</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Description</key>
|
||||
<string>Reduced Power</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Description</key>
|
||||
<string>User Low Power</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Description</key>
|
||||
<string>User High Power</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>ctrlloop-id</key>
|
||||
<integer>3</integer>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
||||
40
payloads/Kexts/Plists/PlatformPlugin/MacBook6,1/Info.plist
Normal file
222
payloads/Kexts/Plists/PlatformPlugin/MacBook6,1/MacBook6_1.plist
Normal file
@@ -0,0 +1,222 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IOPlatformThermalProfile</key>
|
||||
<dict>
|
||||
<key>CreationDate</key>
|
||||
<string>Thu Oct 13 13:56:00 PDT 2005</string>
|
||||
<key>ConfigArray</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>model</key>
|
||||
<string>MacBook6,1</string>
|
||||
<key>iGPUThrottle</key>
|
||||
<true/>
|
||||
<key>SLFMLimiting</key>
|
||||
<integer>3</integer>
|
||||
</dict>
|
||||
</array>
|
||||
<key>CStateDict</key>
|
||||
<dict>
|
||||
<key>MacBook6,1</key>
|
||||
<string>CSD3</string>
|
||||
<key>CSD3</key>
|
||||
<dict>
|
||||
<key>C6</key>
|
||||
<dict>
|
||||
<key>enable</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>ControlArray</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>Desc-Key</key>
|
||||
<string>CPU_PLIMIT</string>
|
||||
<key>IOClass</key>
|
||||
<string>AppleSMCControl</string>
|
||||
<key>control-flags</key>
|
||||
<integer>2</integer>
|
||||
<key>control-id</key>
|
||||
<integer>10</integer>
|
||||
<key>location</key>
|
||||
<string>cpu plimit</string>
|
||||
<key>type</key>
|
||||
<string>smc</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Desc-Key</key>
|
||||
<string>CPU_STATE</string>
|
||||
<key>IOClass</key>
|
||||
<string>AppleSMCControl</string>
|
||||
<key>control-flags</key>
|
||||
<integer>2</integer>
|
||||
<key>control-id</key>
|
||||
<integer>13</integer>
|
||||
<key>location</key>
|
||||
<string>cpu state</string>
|
||||
<key>type</key>
|
||||
<string>smc</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Desc-Key</key>
|
||||
<string>IDLE_PLIMIT</string>
|
||||
<key>IOClass</key>
|
||||
<string>AppleSMCControl</string>
|
||||
<key>control-flags</key>
|
||||
<integer>2</integer>
|
||||
<key>control-id</key>
|
||||
<integer>15</integer>
|
||||
<key>location</key>
|
||||
<string>idle limit</string>
|
||||
<key>type</key>
|
||||
<string>smc</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Desc-Key</key>
|
||||
<string>GPU_RANGE_CONTROL_INTERNAL</string>
|
||||
<key>IOClass</key>
|
||||
<string>IOPlatformControl</string>
|
||||
<key>control-flags</key>
|
||||
<integer>2</integer>
|
||||
<key>control-id</key>
|
||||
<integer>16</integer>
|
||||
<key>location</key>
|
||||
<string>gpu-internal</string>
|
||||
<key>type</key>
|
||||
<string>gpu-control</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>CtrlLoopArray</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>Description</key>
|
||||
<string>SMC_CPU_Control_Loop</string>
|
||||
<key>IOClass</key>
|
||||
<string>ACPI_SMC_CtrlLoop</string>
|
||||
<key>PLimitClass</key>
|
||||
<array>
|
||||
<string>CPU</string>
|
||||
</array>
|
||||
<key>MetaStateArray</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>Description</key>
|
||||
<string>Normal</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Description</key>
|
||||
<string>Reduced Power</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Description</key>
|
||||
<string>User Low Power</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Description</key>
|
||||
<string>User High Power</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>PLimitDict</key>
|
||||
<dict>
|
||||
<key>MacBook6,1</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<key>StepDataDict</key>
|
||||
<dict>
|
||||
<key>MacBook6,1</key>
|
||||
<string>SP1</string>
|
||||
<key>SP1</key>
|
||||
<data>
|
||||
xgYAAAAAAQIEAAACAgAAVQBuAHMAcABlAGMAaQBmAGkAZQBkDAAH/wcAACEAAAACAAAB//8A/wD/
|
||||
AP8A/wD/AAYAAP8BAAP/AAsPAAD/AQAD/wALDwAA/wEAA/8ACw8AAP8BAAP/AAsPAAD/AQAD/wAL
|
||||
DwAA/wEAA/8ACw8AAP8BAAP/AAsPAAD/AQAD/wALDwAA/wEAA/8ACw8AAP8BAAP/AAsPAAD/AQAD
|
||||
/wALDwAA/wEAA/8ACw8AAP8BAAP/AAsPAAD/AQAD/wALDwAA/wEAA/8ACw8AAP8BAAP/AAsPAAD/
|
||||
AQAD/wALDwAA/wEAA/8ACw8AAP8BAAP/AAsPAAD/AQAD/wALDwAA/wEAA/8ACw8AAP8BAAP/AAsP
|
||||
AAD/AQAD/wALDwAA/wEAA/8ACw8AAP8BAAP/AAsPAAD/AQAD/wALDwAA/wEAA/8ACw8AAP8BAAP/
|
||||
AAsPAAD/AQAD/wALDwAA/wEAA/8ACw8AAP8BAAP/AAsPAAD/AQAD/wALDwAA/wEAA/8ACw8AAP8B
|
||||
AAP/AAsPAAD/AQAD/wALDwAA/wEAA/8ACw8AAP8BAAP/AAsPAAD/AQAD/wALDwAA/wEAA/8ACw8A
|
||||
AP8BAAP/AAsPAAD/AQAD/wALDwAA/wEAA/8ACw8AAP8BAAP/AAsPAAD/AQAD/wALDwAA/wEAA/8A
|
||||
Cw8AAP8BAAP/AAsPAAD/AQAD/wALDwAA/wEAA/8ACw8AAP8BAAP/AAsPAAD/AQAD/wALDwAA/wEA
|
||||
A/8ACw8AAP8BAAP/AAsPAAD/AQAD/wALDwAA/wEAA/8ACw8AAP8BAAP/AAsPAAD/AQAD/wALDwAA
|
||||
/wEAA/8ACw8AAP8BAAP/AAsPAAD/AQAD/wALDwAA/wEAA/8ACw8AAP8BAAP/AAsPAAD/AQAD/wAL
|
||||
DwAA/wEAA/8ACw8AAP8BAAP/AAsKAAABCgAAAQAAAAEAAAD1AAEFAAABAAAF/wABAAAAAQAAAAEG
|
||||
AAACAAAABAEAAIAAwwC3AC4ANAALAAAAAgAAAAEAAAABAAAAAgAAAAICAAACBgAAAQAAAAEAAAD1
|
||||
AAEFAAADAAAF/wADAgAAAwYAAAkAAAAEAAAATAAEBQAABAAABf8AAwAAAAEAAAAEBAAAgAAAAAoK
|
||||
AAAIAAAABQAAAAgAAAAFAAAAAwAAAAIAAAAFBgAABwAAAAEAAAD1AAEFAAAGAAAF/wADAAAAAwAA
|
||||
AAYGAAACAAAABAAAAKAADwUAAAcEAAAHAAAAAwAAAAQAAAAHBgAACAoAAAMAAAX/AAQCAAAIBgAA
|
||||
AQAAAAEAAADoAAMFAAAJAAAF/wAFAgAACQYAAAIAAAAEAAAA6AADBQAADQAAAAoAAAANAAAACgAA
|
||||
AAUAAAABAAAACgYAAAcAAAABAAAA9QABBQAACwAABf8ABQAAAAIAAAALBgAAAgAAAAQAAACgAA8F
|
||||
AAAMBAAADAAAAAUAAAADAAAADAYAAAgKAAAJAAAF/wAGAgAADQYAAAEAAAABAAAA6AADBQAADgAA
|
||||
Bf8ABwIAAA4GAAACAAAABAAAAFgAGwUAABIAAAAPAAAAEgAAAA8AAAAHAAAAAQAAAA8GAAAHAAAA
|
||||
AQAAAPUAAQUAABAAAAX/AAcAAAACAAAAEAYAAAIAAAAEAAAAoAAPBQAAEQQAABEAAAAHAAAAAwAA
|
||||
ABEGAAAICgAADgAABf8ACAIAABIGAAABAAAAAQAAAOgAAwUAABMAAAX/AAkCAAATBgAAAgAAAAQA
|
||||
AAD8AAgFAAAXAAAAFAAAABcAAAAUAAAACQAAAAEAAAAUBgAABwAAAAEAAAD1AAEFAAAVAAAF/wAJ
|
||||
AAAAAgAAABUGAAACAAAABAAAAKAADwUAABYEAAAWAAAACQAAAAMAAAAWBgAACAoAABMAAAX/AAoC
|
||||
AAAXBgAAAQAAAAEAAADoAAMFAAAYAAAF/wALAgAAGAYAAAIAAAAEAAAAKAAKBQAAHAAAABkAAAAc
|
||||
AAAAGQAAAAsAAAABAAAAGQYAAAcAAAABAAAA9QABBQAAGgAABf8ACwAAAAIAAAAaBgAAAgAAAAQA
|
||||
AACgAA8FAAAbBAAAGwAAAAsAAAADAAAAGwYAAAgKAAAYAAAF/wAMAgAAHAYAAAEAAAABAAAA9AAB
|
||||
BQAAHQAABf8ADQIAAB0GAAACAAAABAEAAIAAwwC3AC4ANAALAAAAHQAAAB4AAAAdAAAAHgAAAA0A
|
||||
AAABAAAAHgYAAAcAAAABAAAA9QABBQAAHwAABf8ADQAAAAIAAAAfBgAAAgAAAAQAAACgAA8FAAAg
|
||||
BAAAIAAAAA0AAAADAAAAIAYAAAgKAAAdAAAF/w==
|
||||
</data>
|
||||
</dict>
|
||||
<key>ctrlloop-id</key>
|
||||
<integer>0</integer>
|
||||
<key>is-state-driven</key>
|
||||
<integer>1</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>ControlIDArray</key>
|
||||
<array>
|
||||
<integer>16</integer>
|
||||
<integer>17</integer>
|
||||
<integer>18</integer>
|
||||
</array>
|
||||
<key>Description</key>
|
||||
<string>SMC_GPU_Range_Control_Loop</string>
|
||||
<key>GPUControlInfoDict</key>
|
||||
<dict>
|
||||
<key>MacBook6,1</key>
|
||||
<string>CIA2</string>
|
||||
<key>CIA2</key>
|
||||
<array>
|
||||
<integer>1</integer>
|
||||
<integer>16</integer>
|
||||
<integer>0</integer>
|
||||
</array>
|
||||
</dict>
|
||||
<key>IOClass</key>
|
||||
<string>ACPI_SMC_GPU_CtrlLoop</string>
|
||||
<key>PLimitClass</key>
|
||||
<array>
|
||||
<string>GPU</string>
|
||||
</array>
|
||||
<key>MetaStateArray</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>Description</key>
|
||||
<string>Normal</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Description</key>
|
||||
<string>Reduced Power</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Description</key>
|
||||
<string>User Low Power</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Description</key>
|
||||
<string>User High Power</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>ctrlloop-id</key>
|
||||
<integer>3</integer>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
||||