Clover Kextstopatch How to use 2015.10.21
A few days ago, because Thinkpad X230 BIOS white list limit, gave her a ar9285 wireless card, just because the network card can be driven by Mac OS X, but also in the Thinkpad X230 BIOS white list. To Clover configuration, in order to prevent forgetting, then recorded.
Because the flexible use of Clover to become black Apple users of compulsory courses, or you can only look for kext, hope and luck to correctly drive your hardware. Clover has a powerful function Kextstopatch, belonging to Kernelandkextpatches 's children.
The reason why use kextstopatch, because do not want every upgrade time, all go to change system Kext, also to prevent unexpected when upgrade, also keep the system original, clean and tidy. So in general, I rarely go directly to the kernel extension files of the system.
Apart from the built-in patches your can create your own ones providing following data:the binary file name, the data to F IND and the data to replace With-both in hexadecimal. The data length must be equal. A smaller replacement data line can is filled with zeroes.
According to the official version, the kernel extension is patched to open some of the restricted functions. For example, OS X itself already supports ar9285. Just provide the info.plist is not perfect, not open. With ar9285 's classmates know, only need to modify AirPortAtheros40.kext
an ID, that is, pci168c,2a
–> pci168c,2b
.
As has been said before,Kextstopatch is a child of kernelandkextpatches , so change the time to note that his general format is as follows
<key>kernelandkextpatches</key><dict> ...<key>kextstopatch</key><array> <dict> <key>comment </key> <string>your comment</string> <key>find</key> <data> data string </data> <key>infoplistpatch</key> <true/> <key>name</key> <string>kexts name</string> <key>replace </key> <data> new data string </data> </dict > </array></DICT>
- Name: is the file name of the kext you used to modify
- Comment: Values are some information that you could easily identify
- Find data: The base64 encoding that is the name of the information you use to replace
- Replace Data: Base64 encoding for replacing your new information
- Infoplistpatch: Patching Info.plist
Everything is clear, the change is Airportatheros40,info.plist is located /System/Library/Extensions/IO80211Family.kext/Contents/PlugIns/AirPortAtheros40.kext/Contents
under, open after you can see some of the following information
<key>ionamematch</key> <array> <string>pci168c,30</string> <string>pci168c,2a</string> <string>pci106b,0086 </string> <string>pci168c,1c</string> <string>pci168c,23</string> <string>pci168c,24< Span class= "NT" ></string></ARRAY>
All you have to do is pci168c,2a
replace it with a pci168c,2b
rude way of directly modifying the file, adding a row below <string>pci168c,2b</string>
, rebuilding the cache or restarting it two times, ar9285 is driven, and what I'm going to do is replace it in Clover.
pci168c,2a
pci168c,2b
Base64 encode, open the terminal:
→ ~ $ echo -n ‘pci168c,2a‘|base64cGNpMTY4YywyYQ==→ ~ $ echo -n ‘pci168c,2b‘|base64cGNpMTY4YywyYg==
Note that ECHO needs to add the-n parameter to prevent the encoding from being added to the carriage return character.
Write it into the Clover of the Config.plist KernelAndKextPatches
<key>kernelandkextpatches</key><dict> ...<key>kextstopatch</key><array><dict> <key>comment</key> <string>ar9285_noneedtoeditplist</string> <key>Find </key> <data> cgnpmty4yywyyq== </data> <key>infoplistpatch</key> <true/> <key>name</key> <string>airportatheros40< Span class= "NT" ></string> <key>replace</key> <data> cgnpmty4yywyyg== </data> </dict> </array></DICT>
At the same time Thinkpad X230 Bluetooth, the default can also be driven, but the Bluetooth version is 3.0, in the same vein, we modified the broadcombluetoothhostcontrollerusbtransport,info.plist is located in /System/Library/Extensions/IOBluetoothFamily.kext/Contents/PlugIns/BroadcomBluetoothHostControllerUSBTransport.kext/Contents
Directory, find Idvendor for 2652 equipment, and casually find a BT V3.0 model, for example PID 8600 0x2198 VID 2652 0xA5C
, we take it to operate
→ ~ $ echo -n ‘8600‘ |base64ODYwMA==→ ~ $ echo -n ‘8678‘ |base64ODY3OA==
After getting base64 code, write Config.plist
<key>kernelandkextpatches</key><dict><!--......--><key>kextstopatch</key><array> ...<dict> <key>comment</key> <string>inject_bcm20702a0</string> <key>find </key> <data> odywma== </data> <key>infoplistpatch</key> <true/> <key>name</key> <string> Broadcombluetoothhostcontrollerusbtransport</string> <key>Replace </key> <data> ody3oa== </data> </dict> </array></DICT>
Clover Kextstopatch use method 2015.10.21