Jump to content

How to patch AppleHDA with the help of Bootloader.


Alex009988
 Share

15 posts in this topic

Recommended Posts

Today I want to say about new method which allow to not take care of loss of sound after each update.

Let's recollect what AppleHDA demand from us.
1) To create device of HDEF in DSDT in which made necessary Layout
2) Binary patch of AppleHDA
3) Entry of PinConfig in plist of AppleHDAHardwareConfigDriver
4) Entry of description of input/output to layoutXX.xml.zlib
5) Entry of necessary nodes to Platform.xml.zlib.

And of course all of these parts are changed while updating is going on.

Here we go.
Patch is made by bootloader. And three or four patches are necessary for it.
Let's look at my case for ALC670 from Mavericks(use Property Plist Editor to see correct values). For the case of Clover(XPC and bareBoot also should do so)

		<key>KextsToPatch</key>
		<array>
			<dict>
				<key>Comment</key>
				<string>Patch_to_ALC670</string>
				<key>Find</key>
				<data>hAjsEA==</data>
				<key>Name</key>
				<string>AppleHDA</string>
				<key>Replace</key>
				<data>AAAAAA==</data>
			</dict>
			<dict>
				<key>Comment</key>
				<string>Patch_to_ALC670</string>
				<key>Find</key>
				<data>eG1sLnps</data>
				<key>Name</key>
				<string>AppleHDA</string>
				<key>Replace</key>
				<data>em1sLnps</data>
			</dict>
			<dict>
				<key>Comment</key>
				<string>Patch_to_ALC670</string>
				<key>Find</key>
				<data>hBnUEQ==</data>
				<key>Name</key>
				<string>AppleHDA</string>
				<key>Replace</key>
				<data>cAbsEA==</data>
			</dict>
		</array> 

8408ec10 -> 00000000 without it my codec doesn't work at Mavericks at least
786d6c2e7a6c -> 7a6d6c2e7a6c bin-patch to change ApppleHDA xml->zml(This idea was suggested by abxite)
8419d411 -> 7006ec10 bin-patch for my ALC670.
After that we go to the /System/Library/Extensions/AppleHDA.kext/Contents/Resources
and make so
layout65.xml.zlib->layout65.zml.zlib
Platforms.xml.zlib->Platforms.zml.zlib
And what we have. Bin patch, Invariable layout and Platform.
And what about PinConfig which is disposed in AppleHDAHardwareConfigDriver.
It is also not hard.
1) We should create simple kext ALCXXX.kext
which should contain plist like AppleHDAHardwareConfigDriver(See sample of ALC670)
My pinconfig is placed at  thirteenth array of AppleHDAHardwareConfigDriver(ALC885->ALC670)

2) Or you can add necessary information to the plist of FakeCMS

Here is sample of it

http://www.insanelymac.com/forum/topic/290092-how-to-patch-applehda-with-the-help-of-bootloader/?p=1929163

ALC670.zip

Property List Editor.zip

Edited by Alex Auditore
  • Like 2
Link to comment
Share on other sites

  • 1 month later...

 

786d6c2e7a6c -> 7a6d6c2e7a6c pin patch to change ApppleHDA xml->zml

 

After that we go to the /System/Library/Extensions/AppleHDA.kext/Contents/Resources

and make so

layout65.xml.zlib->layout65.zml.zlib

Platforms.xml.zlib->Platforms.zml.zlib

 

 

Most interesting.  How did you determine 786d6c2e 7a6c and 7a6d6c2e 7a6c?

Link to comment
Share on other sites

http://www.insanelymac.com/forum/topic/290096-kext-patches-by-bootloader/

Nope, I did it here. About XPC, There is only one English-forum which exists Today, and TheGeniusIAm doesn't oppose.

With bareboot, the same story. And my topic about patch for AppleHDAdiffer differ enough from ones where I took some information

Still, you were asked by toleda how have YOU determined the unicode string patch, which you actually haven't (no credit - everyone assumes it was you) as you didn't do a thing but bug everyone around to fix your sound for you. The fact that you have bothered to credit someone "somewhere there ..." doesn't actually matter as this is a new thread, be sure to repeat yourself when you need to! 

 

With XPC the first message in the thread you have created was "Are you the developer?". Same case for bareBoot - artur-pt has asked you if you were a developer of a given bootloader and in case you weren't (as everyone knew at this point that the thread you've created for XPC wasn't meant to be) why do you post in in the development section of the forum?

 

All this happens when you don't give credit where credit is due! And by the looks of it you'd rather see your name everywhere but give proper credit.

Link to comment
Share on other sites

I'm much tired with your continual questions. Why.why why. And plus 100500 why-ones.

The reason because I've created the topic with XPC is to show people something that I found. To have been drawn to more people to both bootloaders. Explain all of the features. To gather all of the knowledge and experience to one spot. Now iPhoneTom's forum is closed. And he released his last build at insanelymac. And again.

Neither Sunki, nor iPhoneTom have anything against it. They don't mind.

I can put an end to all my topics which created by me at any point when developers ask me to do it. However I don't think that it will happen.

But don't have butterflies in your stomach and failure of nerve. I will give a credit to abxite though I did iit at another topic.

And I will now carry this plea to you. Do not spam this thread, please, I very ask you about it.

Link to comment
Share on other sites

  • 5 months later...

I've tried the procedure on my ProBook 4340s (Clover r2445), but it didn't worked for me. It seems the layout ID is being injected correctly and I have no idea if the zml.zlib patch works, but the PinConfigurations property is empty. Tried both the FakeSMC way and an external injector kext, but the result was one and the same. Any ideas what might be the cause?

Link to comment
Share on other sites

  • 1 month later...

786d6c2e7a6c -> 7a6d6c2e7a6c bin-patch to change ApppleHDA xml->zml(This idea was suggested by abxite)

After that we go to the /System/Library/Extensions/AppleHDA.kext/Contents/Resources

and make so

layout65.xml.zlib->layout65.zml.zlib

Platforms.xml.zlib->Platforms.zml.zlib

Bin Patching and ConfigData working,  Layouts and Platforms are not working

Installed custom layout1.zml.zlib and Platforms.zml.zlib to Resources folder.

Installed KextsToPatch/Find xml.zl, Replace zml.zl from your example Info,plist

 

Not working.  I understanding the zml files survive a Software Update due to the name change.

I also understand Clover renames the zml files back to xml files to be loaded.

However, the patch is looking for xml files and renames those to zml files resulting in no audio.

What am I missing?

Link to comment
Share on other sites

  • 1 year later...
 Share

×
×
  • Create New...