Jump to content

Script for sfx strings


TheMarine
 Share

22 posts in this topic

Recommended Posts

Briefly: a pluggable string, is a very long combination of hex numbers, inserted in the boot plist file. It contains the data of some of your hardware and directly inserts this into the device tree. The idea of using this, is that you could stop using injectors to detect some of your hardware properly. A sfx string, then, is a pluggable string for your audio device. In my case, it fixed the "intermitent loading" problem I had, using the ALCinject injector.

 

I made a simple bash script to get the sfx string (audio) in an easier way. I'm not sure if it will work for everyone, i need more feedback. If you can try it, and tell me the results, it'll be great.

 

By the way, it includes the "gfxutil" - credits goes to the person that created this, it's posted on the netkas forum. I just included it to make the task easier. You can find all the info here (original post): http://forum.netkas.org/index.php/topic,104.0.html

 

 

YOU MUST HAVE EFI INSTALLED TO TRY THIS. Otherwise, you will get no results.

 

 

How-to:

1. First, download the attached file.

2. Create a folder on your desktop, and move the file there.

3. Uncompress it. You should now have two more files. gfxutil, and sfx.sh.

4. Go to the terminal, change to the directory you've just created, and type:

# chmod 755 sfx.sh gfxutil

# sh sfx.sh

5. If everything went good, you should now have a new file, called sfx.hex.

6. Open a new window in finder, go to /Library/Preferences/SystemConfiguration/, and copy the com.apple.Boot.plist file to your desktop. Don't close the window.

7. Open it with textedit. It should look similar to this, yours may be different:

<?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>Boot Graphics</key>
<string>Yes</string>
<key>Kernel</key>
<string>mach_kernel</string>
<key>Kernel Flags</key>
<string></string>
<key>Quiet Boot</key>
<string>No</string>
<key>Timeout</key>
<string>5</string>
</dict>
</plist>

8. Open the sfx.hex file with textedit too. Copy the entire string.

9. Now, you have to add:

<key>device-properties</key>
<string>PASTE_HERE_YOUR_STRING</string>

Your com.apple.Boot.plist file should now look like this:

<?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>Boot Graphics</key>
<string>Yes</string>
<key>Kernel</key>
<string>mach_kernel</string>
<key>Kernel Flags</key>
<string></string>
<key>Quiet Boot</key>
<string>No</string>
<key>Timeout</key>
<string>5</string>
<key>device-properties</key>
<string>2f010000010000000100000023010000070.......</string>
</dict>
</plist>

10. Save the com.apple.Boot.plist file, and close it. (You can close the sfx.hex file too).

11. Move the com.apple.Boot.plist file in your desktop to the SystemConfiguration window you left open. It should ask you to authenticate. Say yes and type in your password.

12. Now, remove any sound injectors from the /System/Library/Extensions folder (backup them before doing this!, ej: AppleAzaliaAudio.kext, ALCinject.kext).

 

Close your apps, your fingers, and restart!

 

Good luck

sfx_with_gfxutil.zip

Link to comment
Share on other sites

This is what I got, and it didn't make a hex so it didn't work for me. Maybe I didn't follow something right, I dunno.

 

xavier-cruzs-mac-pro:~ XavierCruz$ sh  /Users/XavierCruz/Desktop/lol/sfx.sh /Users/XavierCruz/Desktop/lol/sfx.sh: line 44: ./gfxutil: No such file or directory
printf: usage: printf [-v var] format [arguments]
/Users/XavierCruz/Desktop/lol/sfx.sh: line 70: ./gfxutil: No such file or directory
DONE
xavier-cruzs-mac-pro:~ XavierCruz$

Link to comment
Share on other sites

This is what I got, and it didn't make a hex so it didn't work for me. Maybe I didn't follow something right, I dunno.

 

xavier-cruzs-mac-pro:~ XavierCruz$ sh  /Users/XavierCruz/Desktop/lol/sfx.sh /Users/XavierCruz/Desktop/lol/sfx.sh: line 44: ./gfxutil: No such file or directory
printf: usage: printf [-v var] format [arguments]
/Users/XavierCruz/Desktop/lol/sfx.sh: line 70: ./gfxutil: No such file or directory
DONE
xavier-cruzs-mac-pro:~ XavierCruz$

 

Thanks for your reply.

 

Is gfxutil in the same folder as sfx.sh? Else... try to change to the folder where the file is (cd ~/Desktop/lol), and then try to exec it.

 

By the way, you seem to have a compatible device.

 

GL!

Link to comment
Share on other sites

I got the hex and everything, put it in my com.apple.Boot.plist, removed ACLinject and rebooted. Nothing.

 

I remembering trying the manual way, but I stopped because when I actually could get the layout ID to show it was with ACLinect, but it would never show with ACLinject NOT installed. Either way I couldn't get it to work.

 

So I figured, hell let me make a new hex without it installed, and sure enough, it gave me a different hex. I'm going to try it without ACLinject and see what happens, just thought this was interesting enough to document, just incase anyone else runs into the snag.

 

Update: I tried with the new hex and still got nothing. I don't get it. :(

Link to comment
Share on other sites

Sure no problem. I included my first hex with ALCinject and the 2nd one with without it. My boot.plist also has my graphics string with it, just to let you know. And my boot.plist is using the hex without ACL.

 

Ohh... I see you pasted the string next to the other you have. You don't have to do that. You have to include both properties of every device in one .plist file, and then convert it to hex.

 

I'm going to post later the way you have to do it, now I have to go out for a while.

 

See ya!

Link to comment
Share on other sites

I got it! Although without your script since I see what you mean by having to have my GFX and SFX info on the same plist then converting it to hex. I didn't know how to include my GFX with you auto SFX script maker. Thanks for your help though!

 

Unfortunately, it didn't fix my sound not resuming from sleep (which was my whole reason for trying EFI SFX in the first place), which leads me to believe it's an AppleHDA.kext issue, which I personally don't know how to mess with.

Link to comment
Share on other sites

I got it! Although without your script since I see what you mean by having to have my GFX and SFX info on the same plist then converting it to hex. I didn't know how to include my GFX with you auto SFX script maker. Thanks for your help though!

 

Unfortunately, it didn't fix my sound not resuming from sleep (which was my whole reason for trying EFI SFX in the first place), which leads me to believe it's an AppleHDA.kext issue, which I personally don't know how to mess with.

 

Good you found out how. You got the idea :).

 

Well, the issue with sleep could be the AppleHDA.kext or the USB. Superhai made a patch for it, and it did fixed my sleep (If you can't find it to try it, tell me and i'll post it).

 

And... my script can help you in what you did.

What you have to do, is the following:

 

1. Go to terminal and change to the folder where you decompressed the script. Type in:

# nano sfx.sh

2. Inside nano, go to the bottom part of the file, and comment the line:

rm -f sfx.plist

to

#rm -f sfx.plist

3. Press Ctrl+x, press y (to save) and enter to save the file with the same name.

4. Now run the script, and you should have, apart from the sfx.sh file, another one called sfx.plist. That's the other file you need to complete your gfx string.

 

Good luck!

 

P.S: You have to generate the string with the injector, then remove it safely.

Link to comment
Share on other sites

Any other experience?

 

At least it seems the script does the job.

 

But I need more feedback, please. For those who have it already implemented, tell me if it generates the same hex string, please.

 

TheMarine.

Link to comment
Share on other sites

ok so i've already have an EFI string in my boot.plist for my graphics card, I modified the .sh file to get the additional .plist that this script spits out, so how do i get a hex dump for both my graphics card and my audio? I'm sure everything i need is right in front of my face, I'm just missing the next step or whatever lol. Thanks!

 

 

 

 

 

EDIT: Nevermind figured it. DOH! Thanks for this script, works great!

Link to comment
Share on other sites

ok so i've already have an EFI string in my boot.plist for my graphics card, I modified the .sh file to get the additional .plist that this script spits out, so how do i get a hex dump for both my graphics card and my audio? I'm sure everything i need is right in front of my face, I'm just missing the next step or whatever lol. Thanks!

 

EDIT: Nevermind figured it. DOH! Thanks for this script, works great!

 

You're welcome! :D

 

Good it worked for another person.

 

Well... for those that already have a gfx string. You have to merge your two files (sfx.plist and the gfx.plist) into one, where you have the properties for both devices. When you have this done, save the file, and use the gfxutil to create the new string:

 

$ ./gfxutil -i xml -o hex gfx_and_sfx.plist string.hex

 

And the result will be the hex string generated into the string.hex file. The next step, is the same as the one explained in the first post, inserting the string into the boot's plist file.

 

C ya!

Link to comment
Share on other sites

i just tried this on a Vostro 1500, and it seems to work. there's no ALCInject.kext in my extensions folder, and i'm listening to iTunes right now! thanks for the shell script and the clear instructions! :pirate2:

 

now to try getting an EFI string for the vidcard....

Link to comment
Share on other sites

i just tried this on a Vostro 1500, and it seems to work. there's no ALCInject.kext in my extensions folder, and i'm listening to iTunes right now! thanks for the shell script and the clear instructions! :(

 

now to try getting an EFI string for the vidcard....

 

¡Excellent! I'm glad it worked for you ^^

 

For the video card (which one do you have?), you should try the netkas forum, there's an excellent guide there.

Link to comment
Share on other sites

¡Excellent! I'm glad it worked for you ^^

 

For the video card (which one do you have?), you should try the netkas forum, there's an excellent guide there.

 

i have the 8600m gt 256. i tried it last night, but alas my darwin/bsd/*nix skillz are non-existent. commented the line in your script to leave the sfx.plist in place, then tried to follow the netkas guide to get the gfx plist, then copied the contents into one both.plist file, and made a huge hex string from that. threw the big hex string into com.apple.Boot.plist, moved NVinject.kext, rebooted -v, and got stuck hanging after enet and wifi mac addresses showed up. no kp visible or anything, it just hung there. odd.

 

the gfx.plist came up with a bunch of values of type "data" instead of "string" so i tried changing some of those to match the strings in IO(somethingorother) from Applications/Utilities. i'll have to re-read the guide and try it again tonight.

 

thanks for making that shell script though. made the sfx efi string soooo easy ;)

Link to comment
Share on other sites

i have the 8600m gt 256. i tried it last night, but alas my darwin/bsd/*nix skillz are non-existent. commented the line in your script to leave the sfx.plist in place, then tried to follow the netkas guide to get the gfx plist, then copied the contents into one both.plist file, and made a huge hex string from that. threw the big hex string into com.apple.Boot.plist, moved NVinject.kext, rebooted -v, and got stuck hanging after enet and wifi mac addresses showed up. no kp visible or anything, it just hung there. odd.

 

the gfx.plist came up with a bunch of values of type "data" instead of "string" so i tried changing some of those to match the strings in IO(somethingorother) from Applications/Utilities. i'll have to re-read the guide and try it again tonight.

 

thanks for making that shell script though. made the sfx efi string soooo easy :)

 

Data values must be kept as data. That's the way it works. You can read it properly with Property List Editor, that comes with XCode. Other text file editing software's will read it as Data and you'll just see the encoded part.

 

Also, would you mind in posting your sfx.plist, sfx_and_gfx.plist, and com.apple.Boot.plist? (Maybe I can help you a little with it) I'm planing to do a gfx script too, for nvidia cards, but I don't have one and i don't how you get that properties (ex: the nvinject, as ALCinject does for audio, "detects" and inserts the properties for your card in the ioreg tree?)

 

And, about the sfx script... that was the idea. Making it as easier as it can be. :(

 

See you

Link to comment
Share on other sites

 Share

×
×
  • Create New...