Contribute
Register

creating a kext disabler

Status
Not open for further replies.

SG-

Joined
Dec 26, 2010
Messages
416
Motherboard
Z68X-UD3H-B3
CPU
2500K @4.4Ghz
Graphics
Nvidia 570 GTX
Mac
  1. 0
Classic Mac
  1. 0
Mobile Phone
  1. 0
I was wondering if anyone know how to create a kext disabler sort of like how NullCPUPowerManagement can override and disable the kext? I'd really like to one for AppleTyMCEDriver without having to constantly delete it or run a script to delete it just OS updates.
 
You should be able to do that using Kabyl's editable Disabler kext.

The one I attached disables AppleUserUpstreamClient.kext so make sure you edit Info.plist inside Disabler.kext/Contents and replace every instance of "AppleUserUpstreamClient" with "AppleTyMCEDriver" and you should be ok unless it breaks some dependencies.

It should look like this I guess:

Code:
<?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>CFBundleExecutable</key>
	<string>Disabler</string>
	<key>CFBundleGetInfoString</key>
	<string>Kernel Extension Disabler 1.0.1, Copyright © 2008 by Kabyl</string>
	<key>CFBundleIdentifier</key>
	<string>net.osrom.kext.Disabler</string>
	<key>CFBundleInfoDictionaryVersion</key>
	<string>6.0</string>
	<key>CFBundleName</key>
	<string>Kernel Extension Disabler</string>
	<key>CFBundlePackageType</key>
	<string>KEXT</string>
	<key>CFBundleVersion</key>
	<string>1.0.1</string>
	<key>IOKitPersonalities</key>
	<dict>
		<key>AppleTyMCEDriverDisabler</key>
		<dict>
			<key>CFBundleIdentifier</key>
			<string>net.osrom.kext.Disabler</string>
			<key>IOClass</key>
			<string>Disabler</string>
			<key>IOMatchCategory</key>
			<string>AppleTyMCEDriver</string>
			<key>IOProbeScore</key>
			<integer>1000</integer>
			<key>IOProviderClass</key>
			<string>IOFramebuffer</string>
			<key>IOResourceMatch</key>
			<string>IOKit</string>
		</dict>
		<key>Just for loading</key>
		<dict>
			<key>CFBundleIdentifier</key>
			<string>net.osrom.kext.Disabler</string>
			<key>IOClass</key>
			<string>Disabler</string>
			<key>IOMatchCategory</key>
			<string>Disabler</string>
			<key>IOProviderClass</key>
			<string>IOResources</string>
			<key>IOResourceMatch</key>
			<string>IOKit</string>
		</dict>
	</dict>
	<key>OSBundleLibraries</key>
	<dict>
		<key>com.apple.kpi.iokit</key>
		<string>8.0.0</string>
		<key>com.apple.kpi.libkern</key>
		<string>8.0.0</string>
	</dict>
	<key>OSBundleRequired</key>
	<string>Root</string>
</dict>
</plist>

Don't edit plist files with Textedit, it will probably fail to save the file in expected format. Use TextWrangler or Textmate instead (or nano in terminal).

Remember to set the permissions after saving, or you can install it with Kext Utility and it will do it for you.

Hope it works
 

Attachments

  • Disabler.kext.zip
    13.6 KB · Views: 425
I need to disable AppleUSBUHCI.kext and AppleUSBUHCIPCI.kext from inside IOUSBHostFamily.kext and both of them need to be disabled so how can I do that
 
I need to disable AppleUSBUHCI.kext and AppleUSBUHCIPCI.kext from inside IOUSBHostFamily.kext and both of them need to be disabled so how can I do that

Kexts are not really disabled... But entries in the IO catalog are overridden with different entries affecting the outcome of IOKit matching.

Keep in mind: what you're actually disabling is an IOKitPersonality by providing an alternate with a higher IOProbeScore.
 
Kexts are not really disabled... But entries in the IO catalog are overridden with different entries affecting the outcome of IOKit matching.

Keep in mind: what you're actually disabling is an IOKitPersonality by providing an alternate with a higher IOProbeScore.

So how can I prevent AppleUSBUHCIPCI.kext from booting?

the disabled kext that he provided up above I did what he said and changed it to the UHCI one so will it automatically go inside of IOUSBHostFamily.kext and find it
 
So how can I prevent AppleUSBUHCIPCI.kext from booting?

the disabled kext that he provided up above I did what he said and changed it to the UHCI one so will it automatically go inside of IOUSBHostFamily.kext and find it

You have to create an Info.plist that has the same IOKitPersonality that the kext is matching against your hardware. It is a bit hard to predict, but I'd guess it is the one matching on class (IOPCIClassMatch).

Try the attached... not sure if the IOResourceMatch is needed, so I comment it out. You can also try with it (remove the # from the key).
 

Attachments

  • UHCI_Disabler.kext.zip
    14.2 KB · Views: 335
You have to create an Info.plist that has the same IOKitPersonality that the kext is matching against your hardware. It is a bit hard to predict, but I'd guess it is the one matching on class (IOPCIClassMatch).

Try the attached... not sure if the IOResourceMatch is needed, so I comment it out. You can also try with it (remove the # from the key).

So right now would it be able to disable AppleUSBUHCI.kext as it is now because my laptop is running right now because those kexts are deleted so my computer boots i have no way of testing it because i don't have the kext anymore
 
So right now would it be able to disable AppleUSBUHCI.kext as it is now because my laptop is running right now because those kexts are deleted so my computer boots i have no way of testing it because i don't have the kext anymore

Restore the kexts from backup or run the OS X installer to refresh them... then you can test.
 
Restore the kexts from backup or run the OS X installer to refresh them... then you can test.

Do I place that kext into system library extensions
 
Do I place that kext into system library extensions

Yes. Or into /L/E.

such as:
Code:
sudo cp -R UHCI_Disabler.kext /System/Library/Extensions

or:
Code:
sudo cp -R UHCI_Disabler.kext /Library/Extensions

and rebuild cache:
Code:
sudo touch /System/Library/Extensions && sudo kextcache -u /
 
Status
Not open for further replies.
Back
Top