mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-23 03:20:16 +10:00
Fix Monterey Bluetooth
This commit is contained in:
@@ -948,7 +948,25 @@
|
||||
<key>MaxKernel</key>
|
||||
<string></string>
|
||||
<key>MinKernel</key>
|
||||
<string>20.4.0</string>
|
||||
<string>16.0.0</string>
|
||||
<key>PlistPath</key>
|
||||
<string>Contents/Info.plist</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Arch</key>
|
||||
<string>x86_64</string>
|
||||
<key>BundlePath</key>
|
||||
<string>BlueToolFixup.kext</string>
|
||||
<key>Comment</key>
|
||||
<string>Fix Monterey Bluetooth</string>
|
||||
<key>Enabled</key>
|
||||
<false/>
|
||||
<key>ExecutablePath</key>
|
||||
<string>Contents/MacOS/BlueToolFixup</string>
|
||||
<key>MaxKernel</key>
|
||||
<string></string>
|
||||
<key>MinKernel</key>
|
||||
<string>21.0.0</string>
|
||||
<key>PlistPath</key>
|
||||
<string>Contents/Info.plist</string>
|
||||
</dict>
|
||||
|
||||
BIN
payloads/Kexts/Bluetooth/BlueToolFixup-2046-v2.6.1.zip
Normal file
BIN
payloads/Kexts/Bluetooth/BlueToolFixup-2046-v2.6.1.zip
Normal file
Binary file not shown.
26
payloads/Kexts/Bluetooth/BlueToolFixup-2046.patch
Normal file
26
payloads/Kexts/Bluetooth/BlueToolFixup-2046.patch
Normal file
@@ -0,0 +1,26 @@
|
||||
diff --git a/BrcmPatchRAM/BlueToolFixup.cpp b/BrcmPatchRAM/BlueToolFixup.cpp
|
||||
index 0fa891a..e68f28e 100644
|
||||
--- a/BrcmPatchRAM/BlueToolFixup.cpp
|
||||
+++ b/BrcmPatchRAM/BlueToolFixup.cpp
|
||||
@@ -50,7 +50,11 @@ bool BlueToolFixup::start(IOService *provider) {
|
||||
static const uint8_t kSkipUpdateFilePathOriginal[] = "/etc/bluetool/SkipBluetoothAutomaticFirmwareUpdate";
|
||||
static const uint8_t kSkipUpdateFilePathPatched[] = "/System/Library/CoreServices/boot.efi";
|
||||
|
||||
+static const uint8_t kBluetoothUSBNameOriginal[] = "Bluetooth USB Host Controller";
|
||||
+static const uint8_t kBluetoothUSBNamePatched[] = "BRCM2046 Hub Host Controller";
|
||||
+
|
||||
static const char *blueToolPath = "/usr/sbin/BlueTool";
|
||||
+static const char *bluetoothdPath = "/usr/sbin/bluetoothd";
|
||||
|
||||
static mach_vm_address_t orig_cs_validate {};
|
||||
|
||||
@@ -74,6 +78,9 @@ static void patched_cs_validate_page(vnode_t vp, memory_object_t pager, memory_o
|
||||
if (vn_getpath(vp, path, &pathlen) == 0 && UNLIKELY(strcmp(path, blueToolPath) == 0)) {
|
||||
searchAndPatch(data, PAGE_SIZE, path, kSkipUpdateFilePathOriginal, kSkipUpdateFilePathPatched);
|
||||
}
|
||||
+ if (vn_getpath(vp, path, &pathlen) == 0 && UNLIKELY(strcmp(path, bluetoothdPath) == 0)) {
|
||||
+ searchAndPatch(data, PAGE_SIZE, path, kBluetoothUSBNameOriginal, kBluetoothUSBNamePatched);
|
||||
+ }
|
||||
}
|
||||
|
||||
|
||||
BIN
payloads/Kexts/Bluetooth/BlueToolFixup-2070-v2.6.1.zip
Normal file
BIN
payloads/Kexts/Bluetooth/BlueToolFixup-2070-v2.6.1.zip
Normal file
Binary file not shown.
26
payloads/Kexts/Bluetooth/BlueToolFixup-2070.patch
Normal file
26
payloads/Kexts/Bluetooth/BlueToolFixup-2070.patch
Normal file
@@ -0,0 +1,26 @@
|
||||
diff --git a/BrcmPatchRAM/BlueToolFixup.cpp b/BrcmPatchRAM/BlueToolFixup.cpp
|
||||
index 0fa891a..6a9d2f3 100644
|
||||
--- a/BrcmPatchRAM/BlueToolFixup.cpp
|
||||
+++ b/BrcmPatchRAM/BlueToolFixup.cpp
|
||||
@@ -50,7 +50,11 @@ bool BlueToolFixup::start(IOService *provider) {
|
||||
static const uint8_t kSkipUpdateFilePathOriginal[] = "/etc/bluetool/SkipBluetoothAutomaticFirmwareUpdate";
|
||||
static const uint8_t kSkipUpdateFilePathPatched[] = "/System/Library/CoreServices/boot.efi";
|
||||
|
||||
+static const uint8_t kBluetoothUSBNameOriginal[] = "Bluetooth USB Host Controller";
|
||||
+static const uint8_t kBluetoothUSBNamePatched[] = "BRCM2070 Hub Host Controller";
|
||||
+
|
||||
static const char *blueToolPath = "/usr/sbin/BlueTool";
|
||||
+static const char *bluetoothdPath = "/usr/sbin/bluetoothd";
|
||||
|
||||
static mach_vm_address_t orig_cs_validate {};
|
||||
|
||||
@@ -74,6 +78,9 @@ static void patched_cs_validate_page(vnode_t vp, memory_object_t pager, memory_o
|
||||
if (vn_getpath(vp, path, &pathlen) == 0 && UNLIKELY(strcmp(path, blueToolPath) == 0)) {
|
||||
searchAndPatch(data, PAGE_SIZE, path, kSkipUpdateFilePathOriginal, kSkipUpdateFilePathPatched);
|
||||
}
|
||||
+ if (vn_getpath(vp, path, &pathlen) == 0 && UNLIKELY(strcmp(path, bluetoothdPath) == 0)) {
|
||||
+ searchAndPatch(data, PAGE_SIZE, path, kBluetoothUSBNameOriginal, kBluetoothUSBNamePatched);
|
||||
+ }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user