Contribute
Register
Status
Not open for further replies.
I believe that script is for the case you want to patch AppleHDA on disk and is not Clover on-the-fly patching.

OKeY. So I'm going to that link you provided and I'll read if I can figure out anything.
 
You might also look at patch_hda.sh here: https://github.com/RehabMan/Lenovo-U430-Touch-DSDT-Patch

That script could be adapted to create the HDA injector for any codec...

Well I read too much posts and I really didn't understand exactly what I have to do! confused :ÖÄÅ
Can I just copy those Platforms.xml.zlib and layout1.xml.zlib from my working already patched HDA to AppleHDAIDT.kext and install it?
 
Well I read too much posts and I really didn't understand exactly what I have to do! confused :ÖÄÅ
Can I just copy those Platforms.xml.zlib and layout1.xml.zlib from my working already patched HDA to AppleHDAIDT.kext and install it?

If I was you, I'd use the patch_hda script. Provided you put your files there, it will create the injector for you. Much easier than doing it manually. If you have some knowledge of Terminal/shell script, look at the code in that script to see what is supposed to be done.

Basically, you need:
- Platforms.xml.zlib and layout1.xml.lib (assuming layout-id=1) from your working AppleHDA.
- And you need a plist snippet from AppleHDA.kext/Contents/PlugIns/AppleHDAHardwareConfigDriver.kext/Contents/Info.plist placed into a plist file (see the one that is already there, but replace it with your HDAConfigDefault data...

It will probably start to make some sense if you look at the contents of the Resources directory at the u430 repo.

That should help you create the injector.

Then you need to know the find/replace terms for the binary AppleHDA patch. Those come from the output of bcc9's patch-hda perl script. Those terms are used to patch the binary on the fly using config.plist KextsToPatch section.
 
If I was you, I'd use the patch_hda script. Provided you put your files there, it will create the injector for you. Much easier than doing it manually. If you have some knowledge of Terminal/shell script, look at the code in that script to see what is supposed to be done.

Basically, you need:
- Platforms.xml.zlib and layout1.xml.lib (assuming layout-id=1) from your working AppleHDA.
- And you need a plist snippet from AppleHDA.kext/Contents/PlugIns/AppleHDAHardwareConfigDriver.kext/Contents/Info.plist placed into a plist file (see the one that is already there, but replace it with your HDAConfigDefault data...

It will probably start to make some sense if you look at the contents of the Resources directory at the u430 repo.

That should help you create the injector.

Then you need to know the find/replace terms for the binary AppleHDA patch. Those come from the output of bcc9's patch-hda perl script. Those terms are used to patch the binary on the fly using config.plist KextsToPatch section.

I don't have knowledge of coding terminal/shel but what I want to do is to rename your codec to mine like this codec=ALC269
and change audio patch from yours to this


into method label _DSM parent_label HDEF remove_entry;
into device label HDEF insert
begin
Method (_DSM, 4, NotSerialized)\n
{\n
If (LEqual (Arg2, Zero)) { Return (Buffer() { 0x03 } ) }\n
Return (Package()\n
{\n
"layout-id", Buffer() { 1, 0x00, 0x00, 0x00 },\n
"hda-gfx", Buffer() { "onboard-1" },\n
"PinConfigurations", Buffer() { },\n
//"MaximumBootBeepVolume", 77,\n
})\n
}\n
end;

Then change contain of layout folder with my layout86.xml.zlib & Platforms.xml.zlib
And then snippet the info.plist ....
I hope I'm going to the right direction.

Can I use ProBook Installer to patch? I have seen ALC269 codec inside patch-hda-codecs.pl
https://github.com/philippetev/HP-P...pport Files/Support patches/Resources/scripts
 
I don't have knowledge of coding terminal/shel but what I want to do is to rename your codec to mine like this codec=ALC269
and change audio patch from yours to this


into method label _DSM parent_label HDEF remove_entry;
into device label HDEF insert
begin
Method (_DSM, 4, NotSerialized)\n
{\n
If (LEqual (Arg2, Zero)) { Return (Buffer() { 0x03 } ) }\n
Return (Package()\n
{\n
"layout-id", Buffer() { 1, 0x00, 0x00, 0x00 },\n
"hda-gfx", Buffer() { "onboard-1" },\n
"PinConfigurations", Buffer() { },\n
//"MaximumBootBeepVolume", 77,\n
})\n
}\n
end;

Then change contain of layout folder with my layout86.xml.zlib & Platforms.xml.zlib
And then snippet the info.plist ....
I hope I'm going to the right direction.

You are on the right track...

I believe these are the config.plist patches for ALC269
(output from bcc9's patch-hda.pl with 'Realtek ALC269')

Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KernelAndKextPatches</key>
<dict>
<key>KextsToPatch</key>
<array>
			<dict>
				<key>Name</key>
				<string>AppleHDA</string>
				<key>Comment</key>
				<string>Expect 2 matches</string>
				<key>Find</key>
				<data>PYQI7BA=</data>
				<key>Replace</key>
				<data>PQAAAAA=</data>
			</dict>
			<dict>
				<key>Name</key>
				<string>AppleHDA</string>
				<key>Comment</key>
				<string>Expect 2 matches</string>
				<key>Find</key>
				<data>PYUI7BA=</data>
				<key>Replace</key>
				<data>PQAAAAA=</data>
			</dict>
			<dict>
				<key>Name</key>
				<string>AppleHDA</string>
				<key>Comment</key>
				<string>Expect 2 matches</string>
				<key>Find</key>
				<data>PYQZ1BE=</data>
				<key>Replace</key>
				<data>PWkC7BA=</data>
			</dict>
</array>
</dict>
</dict>
</plist>
 
You are on the right track...

One thing these layout86.xml.zlib & Platforms.xml.zlib must be from native untouched AppleHDA or from working/Patched one?
My patched HDA have two more layout1.zml.zlib & Platforms.zml.zlib those came after I patched AppleHDA.kext
 
One thing these layout86.xml.zlib & Platforms.xml.zlib must be from native untouched AppleHDA or from working/Patched one?
My patched HDA have two more layout1.zml.zlib & Platforms.zml.zlib those came after I patched AppleHDA.kext

They are from your working/patched AppleHDA.kext. As is the data in ahhcd.plist/HDAConfigDefault.

Basically, you have the 4 components of an AppleHDA.kext patch:
- Platforms.xml.zlib
- layoutXX.xml.zlib (where XX is the layout-id chosen)
- HDAConfigDefault data for patched Info.plist in AppleHDAHardwareConfigDriver.kext.
- patched binary (config.plist patches)

The first three components are handled by the injector kext.
The last component is purely in config.plist.
 
They are from your working/patched AppleHDA.kext. As is the data in ahhcd.plist/HDAConfigDefault.

Basically, you have the 4 components of an AppleHDA.kext patch:
- Platforms.xml.zlib
- layoutXX.xml.zlib (where XX is the layout-id chosen)
- HDAConfigDefault data for patched Info.plist in AppleHDAHardwareConfigDriver.kext.
- patched binary (config.plist patches)

The first three components are handled by the injector kext.
The last component is purely in config.plist.

Well I found some one made Video Tutorial for exact ALC269 and provided all files.
http://hackintosh-forum.de/index.php?page=UserBlogEntry&entryID=306
https://www.dropbox.com/sh/5vs9mkdy6sa6oow/AADL_ndM8IVcKqWVPp2W3utNa#/
 
I replaced all my files with your and then I ran the script and I got this

Last login: Sun Aug 17 23:21:32 on ttys000
BoYs-MacBook-Pro:~ BoY$ /Users/BoY/Desktop/Lenovo-U430-Touch-DSDT-Patch-master/patch_hda.sh ; exit;
rm: AppleHDA_ALC269.kext: No such file or directory
Creating AppleHDA injector for ALC269...cp: ./Resources/layout/*.zlib: No such file or directory
Merge: Error Reading File: ./Resources/ahhcd.plist
Done.
logout

[Process completed]

When I run the scrip AppleHDA.kext must be unpatched in S/L/E???
 
Status
Not open for further replies.
Back
Top