Kexts and Device IDs

This is a kind of renewal from my original post HERE.

One of the most common things when using a Hackintosh, is the necessity to make some simple changes to some kexts in order to have a device working properly…

But why do we have to change this?

When Apple uses a specific piece of hardware, it approves this device, thus, it creates a driver (Kernel Extension, AKA kext) to control this device, and inside this kext, we’ll have the driver itself, a XML (plist) file containing some controls and also Device Identifiers (DeviceIDs) to be used by this hardware…

This means that, whenever Apple is using this hardware, it will be detected by its Device Identifier (DeviceID) which has been approved and supported by Apple…

In the case of hardware components for PC, in the most cases, some devices may have the same DeviceIDs used by Apple, but, there are cases were this not happens, and also, there is the possibility that Apple itself may not offer support for some devices and remove it from this list…

There is only one fact, if Apple never used a specific device, it will never work, but, sometimes, using a kext from a similar device, for example, a Wi-Fi controller from the same chipset family, we can get it working by adding its DeviceID to a compatible driver (kext)…

The first thing we have to discover is the DeviceID of this hardware we are trying to activate…

There are several ways to find this out, but the easiest way is using SystemInfo.app or DPCIManager.app….

DPCIManager

As you can see at the image above, it detects all devices on the machine and shows their
VendorID and DeviceID

Having the VendorID and DeviceID in hands, we have now to add it to the “Info.plist” file that are inside of the kext…

NOTE: Keep in mind that a “kext” is nothing more than a folder and the sum of its contents form a Kernel Extension…

First, make a copy of the kext at your Desktop, we will handle this one… Also, make sure to have a copy of the original kext at a safe place in case something goes wrong…

Do a mouse right above the kext (for those using Apple mouse use CTRL+Click) and select “Show Package Contents”…

A new window will open showing the contents of the kext, double click the folder called “Contents”, and again, do a mouse right-click on the file called “Info.plist”, select “Open With” and navigate to your preferred application to edit text files…

NOTE: At the example I’m using TextWrangler but if you don’t have it, you can use TextEdit.app to make changes to the file… But be careful… When you save the changes,
make sure to NOT change the file extension, it must be “.plist”… If you have a different file extension like “.txt” the changes will have no effect…

“Okay, but where do I enter the information??”

This can vary from kext to kext, usually the examples below are the most used, and you have
to enter your DeviceID (and VendorID if necessary) according to the examples below for each “string” …


 

<key>IOPCIPrimaryMatch</key>
<string>0x813610ec</string>

 

Example = <string>0xDeviceIDVendorID</string>

 


 

<key>IOPCIMatch</key>
<string>0x816910ec 0x816710ec 0x816810ec 0x813610ec</string>

 

Example = <string>0xDeviceIDVendorID</string>

 


 

<key>IONameMatch</key>
			<array>
				<string>pci8086,27b8</string>
				<string>pci8086,2811</string>
				<string>pci8086,2815</string>
				<string>pci8086,27b9</string>
				<string>pci8086,27bd</string>
				<string>pci8086,2670</string>
				<string>pci8086,8119</string>
				<string>pci8086,2916</string>
				<string>pci8086,3a18</string>
				<string>pci8086,3b00</string>
				<string>pci8086,3b01</string>
				<string>pci8086,3b02</string>
				<string>pci8086,3b09</string>
				<string>pci10de,aac</string>
				<string>pci10de,aae</string>
				<string>pci10de,aaf</string>
				<string>pci10de,d80</string>
				<string>pci10de,d81</string>
				<string>pci10de,d82</string>
				<string>pci10de,d83</string>
			</array>

 

Example = <string>pciVendorID,DeviceID</string>

 


 

<key>IOPCIPrimaryMatch</key>
			<string>
                0x00f010de&0xfff0ffff
                0x019010de&0xfff0ffff
                0x040010de&0xfff0ffff
                0x042010de&0xfff0ffff
                0x05e010de&0xfff8ffff
                0x05f010de&0xfff0ffff
                0x060010de&0xffe0ffff
                0x062010de&0xffe0ffff
                0x064010de&0xffe0ffff
                0x06e010de&0xfff0ffff
                0x086010de&0xffe0ffff
                0x08a010de&0xffe0ffff
                0x0a2010de&0xffa0ffff
                0x0ca010de&0xffe0ffff
            </string>

 

Example = <string>0xDeviceIDVendorID&amp;0xfff0ffff</string>

 


After edit the file and save the changes, we need to repair permissions of the kext, for this, run the following commands on Terminal.app, each line at once followed by RETURN (Enter)…

chown -R root:wheel /PATHTOTHEKEXT/NAMEOFTHEKEXT.kext
chmod -R 755 /PATHTOTHEKEXT/NAMEOFTHEKEXT.kext

After this, use KextUtility to install the kext, update Kext Exclude List and rebuild kext caches…

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s