Contribute
Register

Patch AppleHDA kext on-the-fly with Clover bootloader

Status
Not open for further replies.
Joined
Oct 21, 2012
Messages
3,445
Motherboard
HP Elitebook 8470p
CPU
i5 3320M
Graphics
HD 4000, 1600x900
Mobile Phone
  1. iOS
EDIT: Complete guide here: http://www.insanelymac.com/forum/topic/298027-guide-aio-guides-for-hackintosh/page-2#entry2030060

By using Clover to patch AppleHDA binary on-the-fly + dummy Audio kext, we can update to any version without losing audio!

You can patch AppleHDA automatically by ProbookInstaller, or manually by doing all following steps for new kext:

- Patch AppleHDA.kext/Contents/MacOS/AppleHDA binary to your audio codec.
- Patch AppleHDA.kext/Contents/PlugIns/AppleHDAHardwareConfigDriver.kext/Contents/Info.plist
- Copy your patched layout12.xml.zlib and Platforms.xml.zlib to AppleHDA.kext/Contents/Resources/

My goal is to reduce the manual steps required, or it works oob right after update.

The first one you have to identify is your audio codec, here is the list for Probook:
- IDT 76d1: Probook 4x30s
- IDT 76d9: Probook 4x40s
- IDT 76e0: Probook 4x0s
- IDT 7605: Probook 6x60b/6x70b, Elitebook 8x60p/8x70p/2x60p/2x70p

1/ Patch AppleHDA.kext/Contents/MacOS/AppleHDA

In traditional method, you can use bcc9's script to patch AppleHDA by changing an existing codec to our codec. For example:
- IDT 76d1: 8419D411 -> D1761D11
- IDT 76d9: 8419D411 -> D9761D11
- IDT 76e0: 8B19D411 -> E0761D11 and 8419D411 -> 00000000 (to make sure right codec compare)
- IDT 7605: 8B19D411 -> 05761D11 and 8419D411 -> 00000000

You can use CloverConfigurator to add this to your config.plist like this: (please ignore AppleHDA xml -> zml, it's not necessary anymore)
11335437705_7a9f7d4d12_o.jpg



2/ Patch AppleHDAHardwareConfigDriver.kext/Contents/Info.plist, layout12.xml.zlib and Platforms.xml.zlib

Normally, we change the content of Info.plist to our codec, and copy layout*.xml.zlib and Platforms.xml.zlib to AppleHDA.kext/Contents/Resources/

We now can use a dummy kext (discovered by piker_alpha) to do the jobs automatically. You can download AppleHDAIDT.kext, which I created by piker_alpha guide (the kext is injected with 4 above codec configs).

Copy layout12.xml.zlib (or your layout*.xml.zlib), Platforms.xml.zlib from AppleHDA.kextt/Contents/Resources/ to AppleHDAIDT.kext/Contents/Resources/ and install it by Kext Wizard or Kext Utillity.

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

http://pikeralpha.wordpress.com/2013/12/17/new-style-of-applehda-kext-patching/
 
Joined
Sep 11, 2013
Messages
24
Motherboard
Probook 4540s
CPU
Intel Core i3-3110M (Dual-Core, 2.4 GHz)
Graphics
Intel HD Graphics 4000 AMD Radeon HD 7650M
Mac
Classic Mac
Mobile Phone
Thanks, it's working for me on 4x40s.
 
Joined
Nov 24, 2012
Messages
629
Motherboard
HP Probook 6470b
CPU
Intel Core i5-3320M
Graphics
Intel HD 4000, 1600x900
Mac
Classic Mac
Mobile Phone
Now this sells Clover for me... Will be trying it as soon i get some time.
I could create a patch for the HD4000 probooks (if you didn't already), should be easy... Are there any restriction on how long the HEX string can be?
 

ModBot

Super Moderator
Staff member
Joined
Jan 9, 2011
Messages
1,372
Motherboard
01010
CPU
10101
Graphics
01010
I don't have now, but I will give you one soon by PM. Stay tune!
Forum Rules:


  • Prerelease Software or Developer Builds are covered by NDA and therefore there cannot be any discussion of features included or removed within said software. The NDA also prohibits the distribution of any component contained within these releases. There will be no discussion of installing, help with installing or documenting the use of this type of software. Repeated violations of this rule will result in a permanent ban.
 

RehabMan

Moderator
Joined
May 2, 2012
Messages
183,514
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
  1. MacBook Air
Mobile Phone
  1. iOS
Normally, you can use bcc9's script to patch AppleHDA by changing an existing codec to our codec. For example:
- IDT 76d1: 8419D411 -> D1761D11
- IDT 76d9: 8419D411 -> D9761D11
- IDT 76e0: 8B19D411 -> E0761D11 and 8419D411 -> 00000000 (to make sure right codec compare)
- IDT 7605: 8B19D411 -> 05761D11 and 8419D411 -> 00000000

It might be a bit tricky to get the codec range patch part of bcc9's script, unless you're doing diffs of specific binaries and changing these patches over time... What I'm saying is bcc9's script is a little smarter than what can be accommodated with a binary search/replace.

And this will probably break in the future, so what's the point?

2/ Patch AppleHDAHardwareConfigDriver.kext/Contents/Info.plist

Normally, we change the content of Info.plist to our codec. Another way is using an injection kext (similar to ProBookARPT.kext) to inject the info, so we don't modify Info.plist manually.

I created ProBookIDT.kext for all 4 codec based on philip_petev's ProBookARPT.kext

Neat idea. Does it work?
 
Joined
Nov 24, 2012
Messages
629
Motherboard
HP Probook 6470b
CPU
Intel Core i5-3320M
Graphics
Intel HD 4000, 1600x900
Mac
Classic Mac
Mobile Phone
Forum Rules:


  • Prerelease Software or Developer Builds are covered by NDA and therefore there cannot be any discussion of features included or removed within said software. The NDA also prohibits the distribution of any component contained within these releases. There will be no discussion of installing, help with installing or documenting the use of this type of software. Repeated violations of this rule will result in a permanent ban.
Sorry for that....
But the deleted post was meant for 10.9 kext. Now if it will work in the future is up to Apple.
Can i repost?
 
Joined
Oct 21, 2012
Messages
3,445
Motherboard
HP Elitebook 8470p
CPU
i5 3320M
Graphics
HD 4000, 1600x900
Mobile Phone
  1. iOS
Sorry for that....
But the deleted post was meant for 10.9 kext. Now if it will work in the future is up to Apple.
Can i repost?

I will test the code tomorrow, thank you.
 
Joined
Oct 21, 2012
Messages
3,445
Motherboard
HP Elitebook 8470p
CPU
i5 3320M
Graphics
HD 4000, 1600x900
Mobile Phone
  1. iOS
It might be a bit tricky to get the codec range patch part of bcc9's script, unless you're doing diffs of specific binaries and changing these patches over time... What I'm saying is bcc9's script is a little smarter than what can be accommodated with a binary search/replace.
And this will probably break in the future, so what's the point?
I compared the original and patched 10.8.0 binary AppleHDA, all the codec patch are the same. It may change in the future, but I think it's long time.

Neat idea. Does it work?
Yes, and another 4540s user reports it work too.
 
Status
Not open for further replies.
Top