Contribute
Register

How to calculate Find/Replace values for KextsToPatch

Joined
Nov 28, 2016
Messages
7
Motherboard
Gigabyte GA-Z170X-Gaming 5
CPU
Intel Core i7 6700K
Graphics
MSI GTX 970 4GD5T OCV1
Mac
iMac
Mobile Phone
Android
Hello, I have a PCIe Wifi/Bluetooth card (made in China) with BCM94360CD (for Wifi) and BCM20702A0 (for BT) chips. The system info for the BT part is:

Product ID: 0x22be (= 8894 in decimal)
Vendor ID: 0x0a5c (Broadcom Corp.) (= 2652 in decimal)
Version: 1.12
Serial Number: 000000000000
Speed: Up to 12 Mb/sec
Manufacturer: Broadcom Corp
Location ID: 0x14620000 / 5
Current Available (mA): 500
Extra Operating Current (mA): 0

Since its Product ID and Vendor ID are different from any one listed in
/System/Library/Extensions/IOBluetoothFamily.kext/Contents/PlugIns/BroadcomBluetoothHostControllerUSBTransport.kext/Contents/Info.plist, I needed to directly edit and change one entry in the Info.plist of BroadcomBluetoothHostControllerUSBTransport.kext every time when I upgraded my MacOS, and rebuilt the kexts cache. That is quite inconvenient.

The original passage in the Info.plist is as follows (the values to be modified are marked blue):

<key>IOKitPersonalities</key>
<dict>
<key>Broadcom2045FamilyUSBBluetoothHCIController_D</key>
<dict>
<key>CFBundleIdentifier</key>
<string>com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport</string>
<key>IOClass</key>
<string>BroadcomBluetoothHostControllerUSBTransport</string>
<key>IOProviderClass</key>
<string>IOUSBHostDevice</string>
<key>idProduct</key>
<integer>33292</integer>
<key>idVendor</key>
<integer>1452</integer>
</dict>

The modified passage in the Info.plist is marked red as follows:

<key>IOKitPersonalities</key>
<dict>
<key>Broadcom2045FamilyUSBBluetoothHCIController_D</key>
<dict>
<key>CFBundleIdentifier</key>
<string>com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport</string>
<key>IOClass</key>
<string>BroadcomBluetoothHostControllerUSBTransport</string>
<key>IOProviderClass</key>
<string>IOUSBHostDevice</string>
<key>idProduct</key>
<integer>8894</integer>
<key>idVendor</key>
<integer>2652</integer>
</dict>


I think I should have used KextsToPatch in Clover's config.plist instead. But I don't know how to correctly convert the values for the Product ID(the old is 33292, the new is 8894) and Vendor ID (the old is 1452 and the new is 2652) to fill into the "Find*" and "Replace*" columns in the KextsToPatch list seen in the Clover Configurator. I will have to add two entries into the KextsToPatch list, one for Product ID, the other for Vendor ID, right? And what to fill into the "Name*" column? Both entries use "BroadcomBluetoothHostControllerUSBTransport" for the "Name*" column? The ckeckbox for the "InfoPlistPatch" column should be clicked, right? Thanks a lot in advance.
 
Joined
Oct 9, 2018
Messages
2
Motherboard
HP Elitedesk 800 G1 SFF
CPU
i5-4570
Graphics
HD 4600
Mac
iMac
Mobile Phone
Android
I think this is what you want please test and reply.
Add these entries with Clover Configurator to config.plist/KernelAndKextPatches/KextsToPatch

First patch:

Comment: Change idVendor from 1452 to 2652
Name: BroadcomBluetoothHostControllerUSBTransport
Find: 3C696E74 65676572 3E313435 323C2F69 6E746567 65723E
Replace: 3C696E74 65676572 3E203236 3532203C 2F696E74 65676572 3E
InfoPlistPatch: YES

Second patch:

Comment: Change idVendor from 1452 to 2652
Name: BroadcomBluetoothHostControllerUSBTransport
Find: 3C696E74 65676572 3E333332 39323C2F 696E7465 6765723E
Replace: 3C696E74 65676572 3E383839 343C2F69 6E746567 65723E
InfoPlistPatch: YES

Info.plist patching is done in the cache, so to make those patches take effects:
First reboot with config.plist/SystemParameters/NoCaches/YES
second reboot with config.plist/SystemParameters/NoCaches/NO

Thats it.
 
Last edited:
Joined
Nov 28, 2016
Messages
7
Motherboard
Gigabyte GA-Z170X-Gaming 5
CPU
Intel Core i7 6700K
Graphics
MSI GTX 970 4GD5T OCV1
Mac
iMac
Mobile Phone
Android
I think this is what you want
First patch:
Comment: Change idVendor from 1452 to 2652
Name: BroadcomBluetoothHostControllerUSBTransport
Find: 3C696E74 65676572 3E313435 323C2F69 6E746567 65723E
Replace: 3C696E74 65676572 3E203236 3532203C 2F696E74 65676572 3E
InfoPlistPatch: YES

Second patch:
Comment: Change idVendor from 1452 to 2652
Name: BroadcomBluetoothHostControllerUSBTransport
Find: 3C696E74 65676572 3E333332 39323C2F 696E7465 6765723E
Replace: 3C696E74 65676572 3E383839 343C2F69 6E746567 65723E
InfoPlistPatch: YES
Hello, @daasarix, I am very sorry for replying so late. I have been troubled by other issues so that I have reinstalled my Hackintosh for several times. Now I can test your solution and it works! I really appreciate your kind help.

Would you please tell me how you obtained the two sets of Find/Replace values? They look so complex :) The comments for your two patch entries are the same "Change idVendor from 1452 to 2652". Since I don't know how to calculate the hex values, I have no idea which one comment should be modified to be "Change idProduct from 33292 to 8894".
 
Top