Jump to content

Script to patch AppleHDA binary for osx10.7/10.8/10.9


bcc9
 Share

168 posts in this topic

Recommended Posts

 

Download it from here https://drive.google.com/folderview?id=0B48JgRz2mGDSflRIWU03cDAyQ19OWVJxUEJvVnNEcnBxeUpYQlFpcDh3dVFRcEg5UWZXa2c&usp=sharing

With latest version of script got this error for IDT 92HD81B1X5 -

 

Sahil:~ palash$ /Users/palash/Desktop/patch-hda/patch-hda 

OSX version 10.10.2 detected

Default target codec: 1002aa01

 detected.

Enter codec-id or codec-name for AppleHDA patch.  Eg. 111d7675 or IDT 7675

Press enter for default, or ? for help (Default: 1002aa01

)

? 111d7605

Patching AppleHDA codec 11d4198b with 111d7605

2 codec range comparison(s) to patch

Patching range comparison 11d41983

Patching range comparison 11d41984

Unexpected codec match count: 2 (4 expected)

Aborting with AppleHDA NOT patched

Sahil:~ palash$ 

 

 

Don't know what's wrong. Anything wrong with script or I have done something wrong?

 

Share your patched AppleHDA.

  • Like 1
Link to comment
Share on other sites

  • 2 months later...

This is my modified script for 10.7 ~ 10.11

https://www.dropbox.com/s/l5pclf0l2z0w9no/patch-hda.zip?dl=0

 

Hi Poken! My result:

 

iMac-di-Ciro:~ ciro$ cd desktop

iMac-di-Ciro:desktop ciro$ cd patch-hda

iMac-di-Ciro:patch-hda ciro$ sudo ./patch-hda.pl

OSX version 10.11 detected

Default target codec: 10ec0892 detected.

Enter codec-id or codec-name for AppleHDA patch.  Eg. 111d7675 or IDT 7675

Press enter for default, or ? for help (Default: 10ec0892)

? 10ec0892

There are 2 choices for target codec 

Choose codec number to patch to (1 thru 2) (default 1)

Choice 1: ALC 885

Choice 2: ADI 1984B

? 1

Patching AppleHDA codec 10ec0885 with 10ec0892

No codec range comparisons require patching

mv: rename /System/Library/Extensions/AppleHDA.kext/Contents/MacOS/AppleHDA to /System/Library/Extensions/AppleHDA.kext/Contents/MacOS/AppleHDA.orig: Operation not permitted

iMac-di-Ciro:patch-hda ciro$

Link to comment
Share on other sites

Hi Poken! My result:

 

iMac-di-Ciro:~ ciro$ cd desktop

iMac-di-Ciro:desktop ciro$ cd patch-hda

iMac-di-Ciro:patch-hda ciro$ sudo ./patch-hda.pl

OSX version 10.11 detected

Default target codec: 10ec0892 detected.

Enter codec-id or codec-name for AppleHDA patch.  Eg. 111d7675 or IDT 7675

Press enter for default, or ? for help (Default: 10ec0892)

? 10ec0892

There are 2 choices for target codec 

Choose codec number to patch to (1 thru 2) (default 1)

Choice 1: ALC 885

Choice 2: ADI 1984B

? 1

Patching AppleHDA codec 10ec0885 with 10ec0892

No codec range comparisons require patching

mv: rename /System/Library/Extensions/AppleHDA.kext/Contents/MacOS/AppleHDA to /System/Library/Extensions/AppleHDA.kext/Contents/MacOS/AppleHDA.orig: Operation not permitted

iMac-di-Ciro:patch-hda ciro$

 

Try with bootflag rootless=0 along with kext-dev-mode=1

 

But script doesn't work with my ALC887 on OS X 10.11.

 

After reboot and kernel cache rebuilt, I have no audio outputs :(.

  • Like 1
Link to comment
Share on other sites

The script only patches binary of AppleHDA. You have to edit .xml.zlib, edit codec config in info.plist. The script only plays 1 of 3 steps for AppleHDA patching. Please look for AppleHDA guides for more detail.

Pokenguyen I followed your guide for pathcing apple hda on fly using update script but sound did'nt work. Then I use only script to get clover on fly patch config and use older one dummyhda downloaded from here httpwww.insanelymac.comforumtopic290687-wip-hp-envy-17t-j000-quad-haswell-10851091010 and sound works. Can you tell me what i do wrong by makeing my custom apple hda.

Link to comment
Share on other sites

Pokenguyen I followed your guide for pathcing apple hda on fly using update script but sound did'nt work. Then I use only script to get clover on fly patch config and use older one dummyhda downloaded from here httpwww.insanelymac.comforumtopic290687-wip-hp-envy-17t-j000-quad-haswell-10851091010 and sound works. Can you tell me what i do wrong by makeing my custom apple hda.

My guide is "Convert your patched AppleHDA to Clover patch on the fly", it means that you have to get sound first with a patched AppleHDA before following the guide, it's useless if you don't have sound yet. The guide you should find is "AppleHDA Patch guide" written by toleda or Mirone.

Link to comment
Share on other sites

  • 1 month later...

can you update this code too

No codec range comparisons require patching

0x80868D20, 0x1458A036, 0x11020011, 0x0918, Creative CA0132

Last login: Wed Jul 15 04:48:23 on console

manoranjans-Mac-Pro:~ manoranjan$ cd ~/Desktop/patch-hda

manoranjans-Mac-Pro:patch-hda manoranjan$ ./patch-hda.pl -x 11000211

OSX version 10.10.3 detected

Default target codec: 10de0040 detected.

Couldn't find a codec map to apply for '11000211'.

Would you like to try using ADI 1984 (the default) (Y/N)? Y

Patching AppleHDA codec 11d41984 with 11000211

No codec range comparisons require patching

<dict>

<key>Name</key>

<string>AppleHDA</string>

<key>Comment</key>

<string>Expect 2 matches</string>

<key>Find</key>

<data>hBnUEQ==</data>

<key>Replace</key>

<data>EQIAEQ==</data>

</dict>

manoranjans-Mac-Pro:patch-hda manoranjan$ 

 

Link to comment
Share on other sites

  • 3 months later...

This is my modified script for 10.7 ~ 10.11

https://www.dropbox.com/s/l5pclf0l2z0w9no/patch-hda.zip?dl=0

 

maybe unimportant, but bash version need to grab user arguments too

#!/bin/bash
# Wrapper for patch-hda.pl for users who like to click on scripts
# from the finder
#
# Copyright (c) 2012-2013 B.C. <bcc24x7@gmail.com> (bcc9 at insanelymac.com).
# All rights reserved.

IFS=
cd `dirname $0`
exec ./patch-hda.pl "$@"
Link to comment
Share on other sites

 

maybe unimportant, but bash version need to grab user arguments too

#!/bin/bash
# Wrapper for patch-hda.pl for users who like to click on scripts
# from the finder
#
# Copyright (c) 2012-2013 B.C. <bcc24x7@gmail.com> (bcc9 at insanelymac.com).
# All rights reserved.

IFS=
cd `dirname $0`
exec ./patch-hda.pl "$@"

why it needs arguments ??

Link to comment
Share on other sites

Hello @iDeepak, sorry if im wrong, but here from included readme.txt with direct perl script

Usage: patch-hda.pl <codec-id>|<codec-name>
Command line switches:
  -y            Use the auto-detected codec without running the script
                interactively.
  -c <choice>   For codecs with multiple known working choices for the
                runtime AppleHDA codec (target codec) to use,
                this option selects the choice.
                -c 1 lets you select choice #1 (the default),
                -c 2 the second choice, and so on.
  -s <directory>        kext directory to use instead of
                        /System/Library/Extensions
  -r <volume root>      specify an alternate disk volume to use
                        as the root for everything
  -o <os vers number>   override auto-detected OS version (10.7/10.8/10.9)
  -t            run the script in test-only mode,
                where AppleHDA is not actually patched.
Examples:       patch-hda.pl 111d7675
                patch-hda.pl 'IDT 7675'
                patch-hda.pl -c 2 'Realtek ALC892'
		patch-hda.pl -y

And here with bash script, ex:

<path-to-bash>/patch-hda -y
Link to comment
Share on other sites

 

Hello @iDeepak, sorry if im wrong, but here from included readme.txt with direct perl script

Usage: patch-hda.pl <codec-id>|<codec-name>
Command line switches:
  -y            Use the auto-detected codec without running the script
                interactively.
  -c <choice>   For codecs with multiple known working choices for the
                runtime AppleHDA codec (target codec) to use,
                this option selects the choice.
                -c 1 lets you select choice #1 (the default),
                -c 2 the second choice, and so on.
  -s <directory>        kext directory to use instead of
                        /System/Library/Extensions
  -r <volume root>      specify an alternate disk volume to use
                        as the root for everything
  -o <os vers number>   override auto-detected OS version (10.7/10.8/10.9)
  -t            run the script in test-only mode,
                where AppleHDA is not actually patched.
Examples:       patch-hda.pl 111d7675
                patch-hda.pl 'IDT 7675'
                patch-hda.pl -c 2 'Realtek ALC892'
		patch-hda.pl -y

And here with bash script, ex:

<path-to-bash>/patch-hda -y

auto-detect will not work if AppleHDA is not loaded anyhow , IMO this is not a good option will be confusing  

Link to comment
Share on other sites

Uhm @iDeepak what im trying to say is whether user choose to launch "patch-hda.pl" or "patch-hda", all must able to pass/read given user arguments. About supplied arguments / params its depend on user choices, above is just an example to debug this script. To avoid more users confusing is remove "patch-hda" from package, in my opinion..

Link to comment
Share on other sites

  • 11 months later...
  • 7 months later...

AppleHDA NOT patched

 

Last login: Fri Jun 16 13:32:34 on console

LLAs-MacBook-Pro:~ LLA$ cd /Users/LLA/Desktop/patch-hda.3.4 

LLAs-MacBook-Pro:patch-hda.3.4 LLA$ /Users/LLA/Desktop/patch-hda.3.4/patch-hda.pl 

OSX version 10.11.6 detected

Enter codec-id or codec-name for AppleHDA patch.  Eg. 111d7675 or IDT 7675

Press enter for default, or ? for help 

? 111d76e0

Patching AppleHDA codec 11d4198b with 111d76e0

2 codec range comparison(s) to patch

Patching range comparison 11d41983

Patching range comparison 11d41984

Unexpected codec match count: 2 (4 expected)

 

Aborting with AppleHDA NOT patched

-----------------------------------------------

Is this user error or issue with the script?   Using Original unpatched AppleHDA

Link to comment
Share on other sites

  • 1 year later...
 Share

×
×
  • Create New...