Jump to content

How to patch AppleHDA with the help of Bootloader.

AppleHDA Patch Clover XPC bareBoot

  • Please log in to reply
13 replies to this topic

#1
Alex Auditore

Alex Auditore

    InsanelyMac Legend

  • Donators
  • 698 posts
  • Gender:Male

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.insanelym...ader/?p=1929163

Attached Files


Edited by Alex Auditore, 04 August 2013 - 06:49 PM.


#2
EvgeniX

EvgeniX

    InsanelyMac Protégé

  • Members
  • PipPip
  • 95 posts
  • Gender:Male

also if you do not want to make extra ALCXXX.kext you can put stuff from AppleHDAHardwareConfigDriver to FackeSMC Info.plist



#3
Alex Auditore

Alex Auditore

    InsanelyMac Legend

  • Donators
  • 698 posts
  • Gender:Male

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

Attached Files



#4
toleda

toleda

    InsanelyMac Legend

  • Gurus
  • 786 posts
  • Gender:Male

 

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?



#5
EvgeniX

EvgeniX

    InsanelyMac Protégé

  • Members
  • PipPip
  • 95 posts
  • Gender:Male

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

 

hex: 786D6C2E7A6C = Ascii: xml.zl

 

7a6d6c2e7a6c = zml.zl



#6
toleda

toleda

    InsanelyMac Legend

  • Gurus
  • 786 posts
  • Gender:Male

hex: 786D6C2E7A6C = Ascii: xml.zl

 

7a6d6c2e7a6c = zml.zl

Thanks.



#7
TimeWalker75a

TimeWalker75a

    InsanelyMac Legend

  • Gurus
  • 919 posts
  • Gender:Male
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!

#8
Alex Auditore

Alex Auditore

    InsanelyMac Legend

  • Donators
  • 698 posts
  • Gender:Male
http://www.insanelym...-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

#9
TimeWalker75a

TimeWalker75a

    InsanelyMac Legend

  • Gurus
  • 919 posts
  • Gender:Male

http://www.insanelym...-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.



#10
Alex Auditore

Alex Auditore

    InsanelyMac Legend

  • Donators
  • 698 posts
  • Gender:Male
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.

#11
philip_petev

philip_petev

    InsanelyMac Protégé

  • Members
  • PipPip
  • 72 posts
  • Gender:Male
  • Location:Haskovo, Bulgaria

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?



#12
toleda

toleda

    InsanelyMac Legend

  • Gurus
  • 786 posts
  • Gender:Male

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?



#13
TimeWalker75a

TimeWalker75a

    InsanelyMac Legend

  • Gurus
  • 919 posts
  • Gender:Male
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.

#14
toleda

toleda

    InsanelyMac Legend

  • Gurus
  • 786 posts
  • Gender:Male

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.







Also tagged with one or more of these keywords: AppleHDA, Patch, Clover, XPC, bareBoot


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

© 2014 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   PHP hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy