[Sprint Samsung Galaxy S III] zalooa:
Welcome to Part II of the basics of ROM building.

If you have not had a chance yet, please check out this link. This should be followed after all of the "files" are gotten from the first part of this Trilogy of tutorials. Okay enough Lord of the Rings, the true trilogy (nerd reference may be criticized below, I preferred the matrix until the third one lol) I digress.

So, we have the files we downloaded them, Red bull/Rockstar/Monster/Bawls, whatever your legal poison. Let's set up working directories.

Organization is critical to the development process. I mean, I only realized this after I started modifying. I mean wow, it was so much easier once I started to record notes and logs.

To begin, always go to a root of a hard drive

Create a folder called

Rom

Tools and then create a new folder called Smali and APKTOOL

Multimedia and then create a new folder called Pictures and Sounds

So we have created 5 folders, do you need 5? No. Do you need 20? It doesn't matter, do what you are comfortable with. It is about staying organized.

Take the ROM you have selected from the first Basics Rom Tutorial. I assume for (hint hint) simplicities sake you chose a DeOdexed rom version of the Sprint S3 MD4 rom. Freeza Thank you. It will be in a zip file

Called: MD4_update_FULL_DeOdex.zip

Rename it to MD4.zip, feel free to call it whatever you want (remember feel comfortable). I will refer to it as MD4 from now on for simplicities sake.

So you have 7-zip installed right? Uh Oh, check, make sure that is ready to go before we start.

I cannot go into that tutorial because....well come onnnnnnn is it really that hard to press next 10 times or less :P?

Extract all the files to MD4_Version_1

Oh yeah, we will be making hundreds of versions if you want. Trust me later down the line, after each mod is good, you can just continue naming them in increments. But version control should always be implemented in case you mess something up. So the logic is:

Make 1 mod or set of mods, try mod, if it works keep using that version as your base version and keep going until you are ready to try it again. Mind you it is time consuming but the only way you truly learn this backwards art of reverse engineering.

So lets look at this disaster. I mean it's overwhelming so do not think you are King of the Hill or Any hill. Maybe a mole hill because this a very complicated system in front of us.

Let's analyze the anatomy, BTW, I do not even know what everything does or is, but by all means, ask questions and we will find out. A forum is meant to voice opinions and feedback to those opinions.

The root folder has 2 folders and 2 files

META-INF

system

boot.img

installbusybox

The META-INF folder is extremely important. It contains useful information about signatures and is very necessary for android to" say its official software" remember the idea of this folder, not its contents. I do not mess with this META-INF but there are so many all over the place down the road that we will need to know it plays an important role.

The system folder has every file that we are going to modify, we will hit this folder harder than a head crab being hit by another "delay" at Valve.

The boot.img is an important file for booting up android. We will not be touching that right now. Can you? Sure but hell, don't bother with it for this tutorial. If you know all about ROM mods like some of our bad-ass developers ( yes Cyanogen all of you are badass), Stop reading get to better pastures.

The installbusybox should be there for tools for ROM modifications. It is basically a set of functions that makes Android have teeth. I will not be using it right now but we can keep going. The best tools collected into one so do not delete or modify

Lets get to the meat, the big shabang, the wholy mole(for my Latin friends), the kabosh(for whoever knows what that is)

System

The sub folders are:

app: Contains all the apps that come with the ROM. Remember android operates by utilizing apps for different functions. Modify the files in here can be good and bad, we can make the best tweaks ever here or ruin everything. Be very careful, I have had boot hangs happen to these files

bin: This folder appears mysterious but it contains important files, the binary files. Complexity gets checked right here. This folder is extremely sensitive, I have not modified this folder just yet but when I feel like bricking my phone like a gravity gun dropping combine soldiers, I will get to this asap.

cameradata: Contains important files for camera raw data to JPEG conversion, I do not mod this folder.

csc: This is a jewel, it contains

Consumer Software Customization

. It has multiple XML files that can be edited and modified critical settings for various functions. Very nice to start your ROM customization here, but not the easiest, lets ease in with another folder first.

etc: This folder contains critical data storage. It has things like the

hosts

file which will allows you to block ads(cough cough, youtube) and many other files. This folder can brick your phone. Lets not get crazy here...yet

fonts: Pretty obvious, fonts for the ROM, oh and it requires True Type Fonts so contact your local free repository for those.

framework: This folder is an important folder, almost just as important as the app folder

hdic: Language files they are based off the first 2 initials of the language. Not affecting anyone if we are not trying to pinch each ROM's size down to the bare minimum

lib: Library folder, this has files with extension .SO, they will contain libraries of information for different functions. For example, how to take a "Best Pose" picture mode would have functions in this folder as well as other areas of the rom.

media: Contains the most obvious of sounds and a prime location for android universal sounds and bootimages. The bootimages is a touchy subject, the files are Samsung proprietary which makes them useless to us for modification, but we can make the puppet dance one way or another. The sounds, however, are key as we can isolate sounds when the phone starts up, or mute certain camera functions here, we can even make it sound like all of your favorite games(Yes I did, Mechwarrior boot sounds are acceptable, F.E.A.R. sound effects and some DOOM noises added for ambiance and of course Half life 2 noises for complete nerdgasm)

T9DB: This folder contains T9 predictive text in I believe 3 languages: English, Spanish and Korean, can you get rid of 2 of these sure, but expect problems if you decide later you need them. I mean they are not that large in size but at the same time, everyone has their own way of doing things

tts: This folder houses the Text to Speech programs. They suck. I am sorry but they do, SVOX is better, I love IVONA personally. I always like a british women to wake me up and tell me I am late. But that's me.

usr: This folder is not really meant for us to modify as it has to do with the keyboard layout, grammar recognition and customization. Realistically though, I use Swiftkey and call it a day. So do not hate me if I do not bother with mucking around here. It is useful to some I am sure but nothing I want to dabble in. But by all means, it can be useful for setting well Settings.

vendor: Contains library and binary files for certain features from the vendor, I would say camera related but I do not care for this folder just like people really hated the HEV suit announcing all of its amazing features, are you kidding me that was the best part. Yes I fell 100 feet, please let me know about my fracture and how this suit somehow repaired it. It might have well said "Oww". Nothing wrong with that.

voicebargeindata: From my understanding, Svoice related. No need to bother, that feature is about as useful as a Crowbar in a Gun Fight.

vsc: Version Software Control

wakeupdata: Acoustic and Grammar models contains several languages as well

xbin: Has busy box and Super User, a useful tool to become well super.

build.prop: Very sensitive file that is magical and detrimental. There is a lot of false promises on performance with this one. We will dig through this one carefully.

CSCVersion.txt: Should have the model number of your phone

SW_Configuration.xml XML file with more model number configuration

Please feel free to let me know what is understood or not.

This run down allows us to attack the appropriate folders for the next parts

Before we even begin with the complicated mods, let's attack the basic mods first.

The media Folder then go to audio, there is 4 folders

alarms

notifications

ringtones

ui

The first 3 folders you can place anything you want inside. They each correspond to the default ringtones you would like in the phone. I recommend using .ogg files or .mp3 files, you can use Audacity to modify your sounds. Sometimes the length of the sound plays an important role. Short sounds should be kept short for a reason. If you play a noise and its barely half a second, do not make it 4 seconds long because it will sound ridiculous longer than what is meant to sound. Taking a picture while hearing Puff Daddy's Come with Me can be quite awkward but hey its all about your ROM, your choice, your likes. Who the hell is going to tell you that you cannot have a sound of a crowbar whacking a headcrab while in the middle of a busy subway.....besides the police. This works similarly to the situation of ringtones, keep them full blown songs and I have noticed some lag. Do not be discouraged, but most modern phones end the call after about 30 seconds. This time limit has to do with how long the phone is takes to find the phone and ping it. Of course, I safely recommend 45 seconds of your song to cover yourself.

Take note that there are 3 files in these folders that are set to default (ringtone, alarm and notification). We can change that with the build.prop but that's after we mess with the ui folder that contains the User Interface Sounds.

Alert_on_call.ogg: An Alert when you are on call. This should be subtle noise

Auto_focus.ogg: Tricky one, I modified this, still makes an auto focus noise. Clearly a trick has been devised

Auto_focus_error.ogg: Same as above

Call_Connect.ogg: When the call first connects

Cam_Start.ogg: Video Recorder start noise

Cam_Stop.ogg: Video Recorder stops noise

camera_click.ogg: Camera Click noise

Camera_click_short.ogg: Camera Click noise

Camera_empty.ogg: Camera related

camera_focus.ogg: Tricksie this one is, mute and still makes noise, will discuss where noise is coming from

Camera_Timer.ogg: Timer for camera countdown

Camera_Timer_2sec.ogg: 2 Second timer

Charger_Connection.ogg: When you plug in your phone to charging port

Dialer_new.ogg: Tricky one will get to later

Dock.ogg: When you put the phone on dock, useful to distinguish from charger_connection.ogg

Effect_Tick.ogg: I have heard it whilst changing pictures but not sure

Highlight.ogg: I Silenced it, and "I dont know whhhyyy"( Can you guess which comedian said this line and if you know it say it in his voice)

HoverPointer.ogg: I Silenced it, and "I dont know whhhyyy"( Can you guess which comedian said this line and, if you know it, say it in his voice)

Insert.ogg: Google Voice Noise

KeypressDelete.ogg: Default keyboard, I do not use this

KeypressReturn.ogg: Default keyboard, I do not use this

KeypressSpacebar.ogg: Default keyboard, I do not use this

KeypressStandard.ogg: Default keyboard, I do not use this

Lock.ogg: When you press the power button and it instantly locks. This noise will play. Mechwarrior noise here

LowBattery.ogg: Doom low amm noise here to indicate I should have brought a charger becuase my battery is low

New_chat.ogg: Chat software related, I got rid of that junk but thats for another tutorial

PowerOff.ogg: Most people silence this as it is the noise that powers off the phone, I got creative here but you do not have to.

PowerOn.ogg: Most people silence this as it is the noise that powers on the phone, I got creative here but you do not have to.

S_HW_Touch.ogg: The HW indicates Hardware touch, basically the buttons and any touch screen action

S_SIP_Backspace.ogg: Backspace stuff

Sent_chat.ogg: See New_chat.ogg

Shutter.ogg: Silence this for sure if you do not want noise but really silence everything camera related here and it wont be 100%. So just do it

Shutter_multiple.ogg: Burst shot related

TW_Battery_caution.ogg: Any TW has to do with TouchWiz related actions. This one is for battery

TW_Call_Disconnect.ogg: The tricky thing is, some of these are controlled by another piece of software, this one is one of them

TW_Error.ogg:

TW_Silent_mode_off.ogg:

TW_SIP.ogg: Sounds like the default tapping sound for the rom's built in keyboard

TW_Touch.ogg: The default TouchWiz touch noise. Tricky little one this was as I had to verify there was no other location for the droplet noise, it turns out there is, so stay tuned as we dig into the apps and locate where the rest of the sounds are

TW_Unlock_Glass.ogg: Gallery Noises for file management

TW_Unlock_Puzzle.ogg: Gallery Noises for file management, not sure why I heard these exact noises in the gallery app other than they are linked

TW_Volume_control.ogg: The volume rocker button on the side, i mean logically there is only one choice, the Half Life 1 Medical Bay MedShot sound, okay maybe too annoying sure, but bada$$

Undock.ogg: Removing the phone from the dock that so few of us get because you know it doesn't fit my big case, or expanded battery or whatever. You know what, custom solutions are too expensive but trust me people do make the docks that accommodate bigger cases

Unlock.ogg: When you type in your Pin/Password/Pattern, the sound that it makes to unlock

VideoRecord.ogg: Camera video start recording noise, of course, I silenced this one as well

So this takes care of some of the noises, the problem is, Samsung software actually hides the rest of the noises. They are actually hidden away in the APK files in the system/app folder. Do not worry, in future parts of this Discovery channel special on Black Mesa, we will be investigating why they detonated a nuke in the first place if it didnt do anything to stop the invasion. I mean future parts of this series

So where do we go now? Well modify the sounds you want or add the ringtones you want. But something that I felt was important was that certain noises be set when I reboot my rom by default. No I do not want that stupid Samsung whistle! NO ONE DOES SAMSUNG!.

Lets set the default sounds on ROM start up, we will need to modify the build.prop file

This file contains an amazingly large set of instructions for the start-up of the phone and features in the phone. it is therefore, very sensitive to screw-ups. Hopefully, notepad++ was installed.

Navigate in Windows to the working directory of your ROM in our case MD4/system/ there is a file there that says build.prop

Let's open that up in notepad++, we should see some intimidating pieces of code or more like lines of text that tell the phone what and when to do something.

A caution to all, the build.prop has been synonymous with words like "increase performance", "maximize battery life" and other claims that are unfortunately sometimes not always true, for every mod someone makes to this file, someone traces the code to a Gingerbread rom that is useless on Jelly Bean, or an old reference to ICS(Ice Cream Sandwich),

I would highly suggest we not dabble too much on this. XDA has some great people who have found great information about the build.prop file. This link, user Chris_84 has put a great Wikipedia together on this so I will not try and explain each one. But there are so many other links that can show a post of good tweaks and bad tweaks and useless tweaks that I will not go into. Let's instead focus on our start-up sounds

The build.prop code we will scroll to with the ctrl+f button should be enough for us to get started is

ro.config.alarm_alert=
ro.config.ringtone=
ro.config.notification_sound=

Each of these do have a word after the equal sign, which means if you configure the correct file in the correct folder(hint hint) alarm, ringtone,notification folders we talked about earlier, all you have to do is add the name of the file exactly as it appears, please only use .ogg files here. MP3 files also work but you know just do it okay. I don't ask Alex why she never made a move on me, I just know she cant have a meaningful relationship with a guy who doesn't even say hi, that's a little creepy but you know and I know she loves Freeman alright.

As an example, just in case my rant did not make any sense,

let's say you put the following sound in the system/media/audio/ringtones folder kick_push_lupe.ogg

you would put in the code the following

ro.config.alarm_alert=
ro.config.ringtone=
ro.config.notification_sound=[B]kick_push_lupe.ogg[/B]

And that's how simple that is.

So you say you have ranted on too long. Sure I have, but that's not going to be the end here. We will be modifying the rest of this rom business in the more difficult lesson which is part III, that will take the longest because we want to have fun. And I still have some Freduian issues with my role model Gordon Freeman that I need to bring out. Anyway

Also, before I go, you might ask, how do you execute TEST BATCH ALPHA-TRON!.

Go Back to your Home Folder MD4_Version_1/. You should see the folders we discussed earlier

META-INF

system

boot.img

installbusybox

Select all of those files and right click the mouse button to get a context menu from 7-zip or WinRAR and click Add to archive. Make a ZIP FILE ONLY. You can choose to compress the file if you want, I just click fastest compression options available and proceed.

When the zip file is in hand, I take the file and put it on the SD Card root directory. When it transfers(in about 5 minutes), you can open the CWM (clockworkmod) recovery or the TWRP recovery and install the ROM. Sure I did skip some steps here on how you get these recoveries and the like but this tutorial is about ROM modification and the sort not the super basics, you need those to even be reading these. If you need to get those going, let me know in the comments and we can spool that up in part III.

I do not know how many parts this will take, but it is time consuming, i have to research this stuff and recall my notes. I know the spirit of the guide is in the right place but please be patient. I will not fail you Krypton(YES I LIKED MAN OF STEEL, let the downvotes begin, oh wait not imgur).

I appreciate all feedback, do not get me wrong, and I will work whenever I am free to add as many of these parts as I can. I do want to help anyone out who has their own twist on what they want their ROM to do. It is the least I can do to payback this great community and assist one person or inspire one idea. That is all it took for me to get going, the next part will also have a very heavy hand in taking code from other people for examples of mods. I want to say from now, I did not do any of these codes, I used common sense to implement somehow into my own rom mods. They deserve all credit as they are amazing coders/crackers/hackers/whackers/ whatever you name it they truly deserve the praise. I am just compiling their logic into our ROM that we are building together. And has anyone seen the YouTube channel Vsauce, that channel is AWESOME.