[Android Themes] bogarty:
COMPREHENSIVE GUIDE​

I finally managed to get a BOOTSOUND working on my custom BOOTANIMATION last night, but then the real frustration came. IT WAS SO FREAKING LOUD!!! I spent all night and today researching on the net about this & even trying to implement my own code in the mix in an effort to thwart/bypass the issue, but to no avail. Android seemed to insist on blasting the mother & from what I read, it seemed like this was a real problem for a great MANY, most of whom eventually gave up. Who would've thought that the solution would be much easier than I'd imagined.

I know this issue has been solved for many phones out there in many different ways, but not all and for those of us, like me, who are running stubborn versions of Android that insist on running at MAX VOLUME every time you fire them up, then this is for you! :)

This Bootanimation With Sound Was Made With This Tutorial!

[YOUTUBE]snrJZct96PQ[/YOUTUBE]​

WHAT TO KNOW FIRST:

1) BEFORE DOING ANYTHING YOU NEED TO BACK UP YOUR NAND FIRST!!! It can be done with Clockwork Mod Recovery or EXT-4 Recovery. In case you mess up you will need this to recover your rom. I am not responsible if you brick your phone!!!

2) You will need "ROOT EXPLORER" from the Android Market to do this.

3) This tutorial is for ADVANCED USERS and is assuming that you have already successfully installed your bootanimation, which is usually called "bootanimation.zip". In my case, however, it was "htc_bootanimation.zip". It will be whatever your current bootanimation is called. Just rename the original to something like "bootanimation1.zip", in case you want to go back and use it again later. Then, copy your new .zip file with the proper bootanimation name into the proper folder. Mine was in "/data/local", but different versions of Android will keep them in different places. I think, for instance, Cyanogen Mod keeps it in "/system/media". You'll just have to do some research & if you don't have a bootanimation.zip file for your phone, just search XDA for bootanimations. There are tons on here.

4) I tested this on "dansta34's" Team Blue Droid V3.7 Sensation XL Gen3 EU & Tmobile SonyXloud rom, which is ANDROID v2.3.5 w/ SENSE 3.5..

http://xdaforums.com/showthread.php?t=1275119

Alright! Once you've made sure your "bootanimation.zip" is in place & you've rebooted to see that it works, you are ready to go! :)

INSTALLING A QUIETER BOOTSOUND ON ANDROID:

1) Make sure you have already read & done everything above.

2) Download the "bootsnd.sh" file from the internet. There are lots of sources for this, so I'll just throw out a random link.

http://dl.dropbox.com/u/30200380/bootsnd.sh

Once you've downloaded it copy the file to the root of your sd card.(ie. "/sdcard")

3) Download or dig out the MP3 or WAV file that you would like to be the sound for your animation. Make sure it's not longer than like 30 seconds to a minute. Mine's about 1 minute, but that's only because that's how long my animation is & how long my rom generally takes to start up. Once you've downloaded it rename it to "android_audio.mp3" & then copy it to the root of your sd card as well.

4) Now, open the Root Explorer app from the Android Market. You may have to agree to allowing it SuperUser functions if you haven't opened it before. just click "ok" if that screen pops up. Make sure it says "Mounted as r/w" at the top. If not, click the "Mount R/W" button.

5) If you already know where your "android_audio.mp3" file is supposed to go, then go ahead and move it now, but if not, then we'll start with executing the "bootsnd.sh" file as the audio file location can be a bit complicated.

6) Everyone says to run "bootsnd.sh" through commands in "Terminal Emulator", but I think it is much easier to just execute it manually in Root Explorer. NOTE: If you want to do this, then skip to Step 7 now. If you must install it with "Terminal Emulator", however, then just run these commands in it and skip to Step 8:

su (then hit enter)

cd /sdcard (hit enter)

sh bootsnd.sh (hit enter)

If you get a "No Such User" error doing that last command, just ignore it. Don't run it again. The script has been written. We just need to fix some permissions later.

7) If you haven't executed "bootsnd.sh" yet, let's do it manually! :) Again, make sure it says "Mounted as r/w" at the top & scroll down to the "sdcard" folder in Root Explorer and click on it. Then, scroll down to the "bootsnd.sh" file. Press & hold on the file until a popup menu comes up. Select the option "Permissions" & click on all the boxes, except the "Special Permissions" ones, in the popup & click "OK". If it does not allow you to do this, then don't worry about it. We'll take care of this later. After that, just click(rather than press & hold) on the "bootsnd.sh" file to open it. The Script File menu should popup this time(3 buttons). Click on the Execute button. This is the same as running the "Terminal Emulator" commands above.

8) Now, lets just make sure we have the proper permissions. Move up a level from "/sdcard" to just "/" & navigate to "/system/etc". Look for the file "init.local.rc". Press and hold on this file & click "Permissions" on the popup menu. Again click all of the boxes except the "Special Permissions" ones if they're not already & click "OK". Then move up a level again to the "/system" folder & click on the "bin" folder. You should now be in "/system/bin". Look for the file called "bootsound". Press and hold on it and do the same. Click "Permissions" & check all the boxes except "Special Permissions" boxes & click "OK". Permissions are done. NOTE: If you already know which file your bootsound MP3 or WAV needs to be copied to then move to step 9 now. If not, you will need to do steps 9 & 10 later. Skip to step 11 for now.

9) EDITING THE "BOOTSOUND" FILE IN "/system/bin" TO POINT TO YOUR MP3 or WAV: Press and hold on the "bootsound" file. Scroll down in the popup Options menu & select "Open in Text Editor". You'll see a bunch of code. Don't worry about what it means. Just look for the part that says something like "/system/media/android_audio.mp3". If your file belongs in this folder, then you don't have to change anything. If not you will have to edit this part. I had to change mine to "/system/customize/resource/android_audio.mp3", for instance, as that's where my sound file is supposed to go. Once you have made your changes. Save the file by hitting "menu" button and selecting "Save Changes". This will put you back to "/system/bin".

10) Now let's move our audio file to the right place! Back out to just "/" again & then open the "sdcard" folder. Scroll down to your "android_audio.mp3" file. Press & hold on the file until the popup menu comes up. Select the option "Move" to move the file. Then, navigate to the proper folder for your sound file according to your rom or Android version and click "Paste". NOTE: Copy the file to the same folder you designated in step 9 & move on to step 12.

11) Now, where to move this file is tricky! I had to try many different folders...one by one...rebooting each time to see if the sound would play...to figure out which one was correct for my rom. It is usually the same folder as your "bootanimation.zip". In my rom I had 2 copies of "bootanimation.zip". One in "/data/local" & one in "/system/customize/resource". However, my bootsound only worked when placed in "/system/customize/resource". I did not have to change the bootanimation in this folder though, only the one in "/data/local", as the resource folder one is more of a backup. Anyhow, I think in Cyanogen Mod, it goes in "/system/media" & still others require that it be in "/data/local" and so on. You will have to do a search on bootsounds for your rom or Android version...or just post a question in your rom thread. Don't try to be smart like I did & put a copy in all of these folders. When I restarted it, it played multiple files at the same time, which made it LOUDER THAN EVER!!! If you don't know where it goes, you will have to try the different folders one by one and reboot each time to see if it plays. Make sure before you reboot that your phone is not on MUTE, as it may make a difference, depending upon which folder your "android_audio.mp3" is supposed to go in. For instance, the fact that mine goes in "/system/customize/resource" means that the bootsound is directly linked to my ringer volume in Android. ie. If I put the phone on mute before rebooting, the bootsound will not play. It's not like that for all roms, but it is for mine. NOTE: Once you think you've figured out which folder the bootsound is supposed to be in, you will need to go back and do steps 9 & 10 before proceeding to step 12.

12) Now that you've got your bootsound to play on your bootanimation, all the hard stuff is done. Now you just have to ask yourself one question. Was it too loud? Unfortunately, many Android versions & roms default the bootsound to MAX VOLUME & like I said earlier I tried tweaking the code for it in so many different ways, but it just kept on blasting.

SO, I CAME UP WITH TWO POSSIBLE SOLUTIONS FOR THOSE WHO HAVE BOOTSOUND VOLUME PROBLEMS.

As I mentioned briefly in step 11, due to my "android_audio.mp3" file being in the "/system/customize/resource" folder, the volume of my bootsound depends partly upon my ringer volume(same as system volume) level in Android. So, if I put my phone on low volume or mute & then reboot, it actually makes my bootsound at low volume or mute. I've also read that sometimes the notifications volume can affect bootsound files that are placed in "/system/media" as well. I don't think that this is very common, but you can try playing around with different volume levels to see if it makes a difference. If you find that this doesn't apply to you then I have another suggestion below.

After messing around with all that, however, I still thought my bootsound was really loud at times so I came up with another solution which was simple, but actually worked quite well. I used a sound editing program that I had on my computer. It had an option on there called "FADE", which allowed me to load a sound file and then lower its volume manually within the file. The program was called "Cyberlink Wave Editor", but I think it only comes bundled with other software. If you want to try this method though there are tons of programs at sites like DOWNLOAD.CNET.COM. Some are free. Some are trials. Just took a quick glance & saw that there's an awesome one on there called "WavePad Sound Editor", which is just like mine. It's just a trial program, but you only need it once really & then you can delete it. You can always just search GOOGLE too by typing in something like "sound editing software decrease volume" or something, but I know CNET is virus free stuff, so that's what I use.

Anyhow, I hope this wasn't too confusing & that it helped some of you!!! If so, please click the "Thanks" Button if you can! :D