Alex009988 Posted June 23, 2013 Share Posted June 23, 2013 (edited) 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 Layout2) Binary patch of AppleHDA3) Entry of PinConfig in plist of AppleHDAHardwareConfigDriver4) Entry of description of input/output to layoutXX.xml.zlib5) 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 least786d6c2e7a6c -> 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/Resourcesand make solayout65.xml.zlib->layout65.zml.zlibPlatforms.xml.zlib->Platforms.zml.zlibAnd 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.kextwhich 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 August 4, 2013 by Alex Auditore 2 Link to comment Share on other sites More sharing options...
EvgeniX Posted June 30, 2013 Share Posted June 30, 2013 also if you do not want to make extra ALCXXX.kext you can put stuff from AppleHDAHardwareConfigDriver to FackeSMC Info.plist Link to comment Share on other sites More sharing options...
Alex009988 Posted June 30, 2013 Author Share Posted June 30, 2013 also if you do not want to make extra ALCXXX.kext you can put stuff from AppleHDAHardwareConfigDriver to FackeSMC Info.plist Year it is also possible and good I attached sample of plist from FakeSMC for ALC670 and AGMP Info.plist.zip 1 Link to comment Share on other sites More sharing options...
toleda Posted August 3, 2013 Share Posted August 3, 2013 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 More sharing options...
EvgeniX Posted August 3, 2013 Share Posted August 3, 2013 Most interesting. How did you determine 786d6c2e 7a6c and 7a6d6c2e 7a6c? hex: 786D6C2E7A6C = Ascii: xml.zl 7a6d6c2e7a6c = zml.zl Link to comment Share on other sites More sharing options...
toleda Posted August 3, 2013 Share Posted August 3, 2013 hex: 786D6C2E7A6C = Ascii: xml.zl 7a6d6c2e7a6c = zml.zl Thanks. Link to comment Share on other sites More sharing options...
TimeWalker75a Posted August 4, 2013 Share Posted August 4, 2013 You forgot to give credits to the author of this idea - abxite. Stop fcn reposting people's work as your own! First XPC, then bareBoot, now this! Have your manners straight! Link to comment Share on other sites More sharing options...
Alex009988 Posted August 4, 2013 Author Share Posted August 4, 2013 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 Link to comment Share on other sites More sharing options...
TimeWalker75a Posted August 4, 2013 Share Posted August 4, 2013 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 More sharing options...
Alex009988 Posted August 4, 2013 Author Share Posted August 4, 2013 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 More sharing options...
Philip Petev Posted January 9, 2014 Share Posted January 9, 2014 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 More sharing options...
toleda Posted March 1, 2014 Share Posted March 1, 2014 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 More sharing options...
TimeWalker75a Posted March 1, 2014 Share Posted March 1, 2014 The patch is not looking for anything, it makes the binary read your custom zml files instead of stock XML files and uncompress resources with zml extension. 1 Link to comment Share on other sites More sharing options...
toleda Posted March 1, 2014 Share Posted March 1, 2014 The patch is not looking for anything, it makes the binary read your custom zml files instead of stock XML files and uncompress resources with zml extension. Thanks for the explanation, now working. Link to comment Share on other sites More sharing options...
KonstantinosNks Posted October 5, 2015 Share Posted October 5, 2015 This guide is awesome and working fine on my ALC898 with clover hda patching and custom zlib layout and platform. Anyone tried to patch zlib files via clover? it is possible? Link to comment Share on other sites More sharing options...
Recommended Posts