[T-Mobile Samsung Galaxy S II SGH-T989] datzstr8:
Introduction to Modifying ROM

In this post I will explain how to modify your stock ROM to include features like "volume wake-up" and more.

Getting your stock ROM

First we need to get a copy of your ROM. I found the easiest way to get this is to flash ClockworkMod and doing a backup of your phone to an external sd card. Connect your phone to your computer and grab the file called "system.ext4.tar" in your backup folder. This is your filesystem or ROM. Extract it to a working folder.

If you do not have ClockworkMod, please search the forums for instructions. ClockworkMod is a replacement for your default "Recovery" partition.

System folders

Here is a walkthrough of the folder structure of the system:

app\ - folder containing your apps (apk)

bin\ - folder containing binary executables

csc\ - consumer software customization, contains the software packages specific to your carrier

etc\ - system configurations

fonts\ - fonts folder

framework\ - folder containing android core files

lib\ - folder containing libraries (like .dll in windows) and modules (drivers)

media\ - folder containing media files

T9DB\ - looks like it contains keyboard layouts

tts\ - text to speech

usr\ - user settings

vsc\ - ????

xbin\ - alternate folder to hold binary executables???

build.prop - android settings file

CSCFiles.txt - carrier specific configuration file???

CSCVersion.txt - Configuration version???

SW_Configuration.xml - List of version numbers

The folders with question marks I am not sure of. If you know please post them here and I will update the list.

Understanding Odex and Deodex

Before getting your hands dirty, you need to know what odex and deodex means. Here is a good article on the issue: http://www.talkandroid.com/guides/m...n-the-all-inclusive-explanation/#.T1f7BN7Km9V

Remove Apps

All of your stock apps are in the "app" directory. You can remove all the bloat apps from this directory if you like.

Change Android Settings

You can modify "build.prop" in you system directory to change different Android settings. You can read more about the different settings here:

http://www.android-hilfe.de/root-ha...imus-3d/145592-tweaks-scripts-collection.html

Volume Wakeup

This volume wakeup guide was adapted from these two guides: http://www.jordanhotmann.com/2011/08/how-to-change-default-orientation-of.html and http://xdaforums.com/showthread.php?p=18226553

In this guide I will show you how to modify your system files to allow waking up your phone with the volume keys instead of just the power key. This will prolong the life of the power key.

Requirements

This mod requires an edit to a jar file (Java archived file), specifically the file "/system/framework/android.policy.jar." To do this we need some tools that will disassemble the jar or apk file so we can edit the source code. After that we need to assemble it back and overwrite the original file(s).

Download the 4 files located here (smali-1.3.2.jar, baksmali-1.3.2.jar, baksmali, and smali): http://code.google.com/p/smali/downloads/list

Put the 4 files in a folder which is included in your path. For example, I placed the files in my home directory under a folder called bin (~/bin). Then in my ".bashrc" file I have this call at the end of the script:

PATH=~/bin:$PATH

This allows you to make calls to "baksmali" and "smali" in any directory.

Still Under Construction