Remove All Ads from XDA

[GUIDE] Getting the most out of your SGS [UPDATED: 28.02.2011]

55 posts
Thanks Meter: 83
By shantzu, Member on 3rd February 2011, 09:56 AM
Post Reply Email Thread
I will try to set up a guide to contain all of the information to get the most out of your I9000 Galaxy S. First the fineprint:

I am not responsible for any damage that any of these instructions may inflict to your phone, computer or any other device that is used in the processes described herein. I am also not responsible if you lose your warranty by flashing your phone with unsupported firmware or if any of these instructions brick your phone, if it will rape your wife or if it will eat your liver with some fava beans and a nice chianti.

I didn't test any of the programs specified herein for viruses/trojans/etc. I run Windows in a VirtualBox that doesn't have access to the internet and doesn't contain any private data, so I don't care for viruses, if you care for your OS though, you should check the programs for viruses before running them.

Use common sense when following such instructions, some of the things may differ because of different program versions, different operating systems or different setups.

Some of these instructions are based on a stock firmware, if your firmware is modded in any way, some of the things described herein may be inappropriate for your device.

1. NOT bricking your phone.

--Why, when, where: Everyone's afraid of bricking their phone. I see the term "bricking" is being a bit overused in these forums though. Everyone is using it, even for the case where the phone can actually be "repaired" with a few simple hacks, IMHO the term "bricking" should only be used in the case where you get your phone in a state where it is inoperable AND you can not in any way repair it yourself.

--Prerequisites: A bit of common sense.

There are a few simple steps that you can follow, to get the risk of "bricking" (as in, you can not repair it yourself and need to somehow get Samsung to either repair it for you, or give you a new device) to a minimum:
1.1. Before trying any of the other steps, make sure that you can get to both the "Recovery mode" and the "Download mode" using the 3-button-combo. If this doesn't work for your device you can try following the steps described here:
1.2. Try to avoid flashing stuff that contains a bootloader. The only way to permanently brick your phone so that you can not repair it yourself (at least AFAIK) is to flash a bootloader and then interrupt that flashing. If the bootloader didn't get flashed properly and it's broken, there isn't much you can do about it, and you need to somehow get Samsung to either repair it or give you a new one (if you're lucky). If the bootloader is fine, there is almost always a way to "repair" your phone yourself.
1.3. Do not interrupt the flashing processes. When using Odin or Heimdall to flash stuff to your phone, there is always the risk of bricking it if you interrupt the flashing process. If the bootloader is fine though and you can get into the "Download mode", you might be able to repair it.

If you follow these simple advices, it might save you money, nerves and also some time without your phone (the time that it takes Samsung to repair it, which can sometimes, depending on country, be even a couple of months).

2. Flashing stock firmwares.

--Why, when, where: You should usually do this if your phone doesn't work with your current firmware, if there is a new firmware out that might work better or if you just want to go to a stock firmware.

--Prerequisites: Odin, a stock firmware (from for example).
NOTE: Apparently there are people that report that using Odin v1.3 might interrupt the flashing and leave you with a soft brick and that v1.7 doesn't have this problem. I have always used v1.3 and never had problems because of it, but if v1.3 isn't working for you, you might give v1.7 (or even heimdall) a try before giving up.

The steps to flashing a stock firmware are already described in a couple of other threads, like:
Nonetheless, here a quick sum-up of what you have to do:
2.1. Open up Odin.
2.2. Put your phone in the "Download mode" with the 3-button-combo (Volume Down + Home + Power).
2.3. Connect your phone to your computer (DO NOT CONNECT THE PHONE BEFORE OPENING ODIN OR THIS WILL NOT WORK).
2.4. Odin should recognize your phone and one of the "com" boxes should light up yellow. If this isn't the case, try repeating the previous steps and eventually connect your phone to another USB port.
2.5. Select your firmware in Odin.
2.5.1. --OPTIONAL-- If you want your phone to be like new, you can select "Re-Partition" in Odin, which will make it repartition your Internal SD. In this case you also have to use a .pit file (WARNING -- you will lose all of your installed applications and settings).
2.6. Take a deep breath and click the "Start" button.
2.7. Wait for the firmware to be flashed and for the device to be restarted.
2.8. You now have a stock firmware. If you also selected "Re-Partition" in Odin, all your programs and settings will be gone and your device will be like new.

3. Rooting your phone and flashing a custom Kernel.

--Why, when, where: Rooting your phone will get you super-user permissions to Android (super-user is Linux's equivalent of "Administrator rights" in Windows). This will allow you to execute some programs that need root permissions, access partitions that you otherwise couldn't and do other cool stuff with it.

--Prerequisites: Stock firmware (as most --if not all-- of the custom ROMs or kernels have root permissions already), Odin or Heimdall.

There are many ways to get root permissions on your device, like with special apps (OCLF for example), with CWM (aka ClockWork Mod) or, my preferred method, flashing a kernel that has this built-in. For this example I will use the SpeedMod Kernel, which is my preferred one. If you have another kernel that you like and that has root built-in, you can use that one.
3.1. Download your preferred kernel (the version for Odin, not the one for CWM).
3.2. Open up Odin or Heimdall.
3.3. Put you phone into "Download mode" and connect it to your computer (DO NOT CONNECT THE PHONE BEFORE OPENING ODIN OR THIS WILL NOT WORK).
3.4.1. If you are using Heimdall, unpack your kernel until you end up with a file called zImage. Select that in Heimdall in the box for "Kernel (zImage)" and click Start.
3.4.2. If you are using Odin, select the file you downloaded in the PDA box and click Start.
3.5. After your Phone reboots, go into "Recovery mode" and go to "Advanced Speedmod ULK features" -> "ROOT / Install Superuser".
3.6. After rebooting the phone again, you should have root permissions.

4. Deodexing your apps and framework.

--Why, when, where: The system applications and the framework files on the Android OS are normally 'odex'ed. By deodexing, you will get rid of the .odex files that come with every apk and jar file and you will be able to edit the apks like any other apk. It will also save you a wee bit of space, and make your apps launch a wee bit faster.

--Prerequisites: Stock firmware (as most --if not all-- of the custom ROMs are deodexed already), xUltimate (this is what I found to be the easiest, if you know any software that is better, please let me know), root permissions.
You can download xUltimate from here:

There are more ways to deodex your apps, but I found xUltimate to be the easiest.
4.1. First of all, you need to get the files from "/system/app" into the subdirectory "origi_app" and all of the files from "/system/framework" into the subdirectory "origi_frame". Both "origi_app" and "origi_frame" should be in the folder you extracted xUltimate to. If they don't exist, create them yourself. There are actually two ways to get the files there, either with xUltimate itself (options 1 and 2) or by copying them to your SD with "Root Explorer" for example and then copying them from your SD to your computer (or with adb of course).
4.2. Deodex the apps and framework with xUltimate, options 3 and 4.
4.3. After deodexing is finished, the deodexed files will be located in the directories "done_app" and "done_frame" in your xUltimate folder. You have to get these files back to their original directories, in /system/app and /system/framework. Again, there are a couple of ways to do this, either with adb (MOST RECOMMENDED ONE), or with "Root Explorer". For the adb method, you should open a command prompt and execute following code:
adb shell
mount -o rw,remount /dev/block/mmcblk1p21 /system
rm /system/app/*.odex
rm /system/framework/*.odex
cp /sdcard/done_app/* /system/app/
cp /sdcard/done_frame/* /system/framework/
mount -o ro,remount /dev/block/mmcblk1p21 /system

5. Optimizing and zipaligning your apps.

I wasn't yet successful at optimizing or zipaligning. Optimizing (aka Compressing) the apps gave me a lot of FCs, optimizing the framework files gave me bootloops. If anyone has any advice on this, I'd be very thankful.

Also, see post #2

6. Protecting your screen.

--Why, when, where: This is not about protecting your screen from scratches, but rather about protecting it from degradation over time. As you might already know, AMOLED screens are prone to the "burn-in" effect. To elaborate a little: AMOLED uses Organic LEDs to display the amazing graphics you see on your display. These OLEDs are very good at displaying bright, colorful pictures, they have a downside though -- they fade over time. That means, the more a specific OLED is used, the less light it emits. If the whole screen would degrade at the same pace, that wouldn't be such a BIG problem, but the very nature of the OLED screens makes them degrade unevenly. That means the OLEDs that are used more frequently (like clock, phone signal, wifi, notification bar), get dimmer faster and this leads to ugly "shadows" on fullscreen apps. To be able to keep your screen as beautiful as new, I got a couple of tips, so that the display degrades more evenly and you avoid the ugly "shadows".
!! Most users won't even notice these degradations, also they won't be noticeable in 90% of use-cases and they will only appear after longer use (6 months+), but you can still use these tricks if you want your display to be almost as good as new a couple of years from now !!

6.1. Don't set brightness to 100%. At least not all the time. You should best be using a brightness setting that fits your ambient light, or the "Automatic brightness" setting. This will ensure that the OLEDs don't wear out as fast (the brighter you use them, the faster they will degrade).
6.2. Use a grey notification bar. The notification bar is the biggest "static" element on the screen. Most apps that are not fullscreen, will also show the notification bar, and this leads to an uneven degradation in that area if it isn't a neutral color. If you use a white notification bar, the OLEDs there will get dimmer faster and you will get an ugly shadow when using fullscreen apps, if you use a black notification bar, it will not degrade as fast as the rest of the screen and that area will be "brighter" in fullscreen apps, that's why I recommend a medium grey.
6.3. Use as little static elements as possible. If you don't need the clock in the notification bar, get rid of it. Get a theme that uses grey or green icons (see next step why) and try not to leave the phone on over night displaying the same static image.
6.4. Avoid blue. As you can see here for example: the blue OLEDs are degrading at a much faster pace than the green or red ones, this is why you should avoid using blue wallpapers or blue themes, they will make your display degrade faster than if you use a green theme and a green wallpaper for example.

These tips won't make your screen live forever, it will degrade too, but by using these tips, at least you can assure that you will have the most of your awesome display even in a year or two from now.

7. Theme-ing your phone.

Coming soon...

8. Unlocking your phone.

--Why, when, where: If you bought your phone with a contract, chances are that it might be locked in that specific network. If you want to also use other SIM cards in it, that are from another provider, you will have to unlock the phone (!! WARNING !! in most cases this will lead to a void warranty, please consult your contract).

--Prerequisites: Root privileges, adb.

8.1. Get the /efs/nv_data.bin file from your device to your computer. You can do this either with adb or by copying the file to your SD card with "Root Explorer" and then copying it over to your machine from the SD (Be sure to keep a backup of this file and the /efs/.nv_data.bin.md5 file.)
8.2. Open up the file in a hex editor, go to the address 0x181468, where you will see something like this:
FF 01 00 00 00 00 46 46 46...
We are interested in that first '01', that means the phone is locked. Just change it to '00' and save the file. Copy it back to your SD card and then with "Root Explorer" back to it's original location (or 'push' it directly with adb). Then remove the .nv_data.bin.md5 file and restart the device (Again, be sure to make copies of these files before modifying or deleting them!). After this, you should be able to insert any SIM card into your device and it should work without the need for any further hacks.

9. Setting up 'adb' on your machine.

--Why, when, where: adb (aka "Android Debug Bridge") is a tool that will let you execute remote commands on your android device. It is useful for debugging, accessing and copying files from/to your device and much more.

--Prerequisites: The android SDK, which you can download from here: and the USB drivers for your phone, which you can get by either installing Kies or by downloading and installing these drivers: (password is 'ragin' -- I didn't test them, so feedback on these is welcome).

9.1. Unpack the downloaded android-sdk.
9.2. Go to the unpacked directory and launch the SDK Manager.
9.3. Go to "Available packages" -> "Third party Add-ons" -> "Google Inc. add-ons" and tick the box next to "Google Usb Driver package" and the click on the "Install Selected" button. This will download and install the Google USB Drivers.
9.4. Whenever you want to connect to your phone through adb, make sure that you have enabled "USB Debugging" under "Settings" -> "Applications" -> "Development".
9.5. You should now be able to open up a command line ("Start" -> "Run..." -> Type "cmd" and click "OK"), cd to the subfolder "platform-tools" under the folder where you unpacked android-sdk and run "adb" in there.
Take some time to get used with the commands that adb offers, as these will help you to debug problems when you encounter some.

10. Lagfixing

--Why, when, where: It is said that the default filesystem that is being used for the partitions on the SGS (RFS) is having slow read times and thus the programs launch a bit slow, sometimes perceived as "lag". This can be fixed by converting the filesystem on the most used partitions to a more modern filesystem, like the ext filesystem, which not only has a bunch of improvements over such old filesystems like RFS, but also seems to be a bit faster.

--Prerequisites: A kernel that supports lagfix.

10.1. Since every kernel has it's own way of converting your FS, you should best look into the documentation of your kernel on how you can apply a lagfix. Some even apply it automatically for you (as in, "lagfix on" is their default setting).

11. Do NOT overcharge

--Why, when, where: Almost all new batteries have an overcharging protection. This means that the protection that is built into the battery will not let it charge to 100%. This is a feature, not a bug! This will help prolong your battery life while also keeping it safe from overheating/explosion/etc. Do not try to trick it and unplug and plug again until you see 100%, just get used to the fact that you can't have 100% battery anymore and live with it, or you risk destroying your battery.

12. Call recording

--Why, when, where: Most Galaxy S firmwares don't have the ability to record both streams of a call. This is not a bug, it was designed like this because in most countries it is illegal to record someone without their permission. Yes, there are apps that will let you record a call, but without software support, it will record the other end from the microphone, which will result in low quality, but there is a workaround.
This might be illegal in your country! I'm not responsible if you get sued for recording someone without their permission.

--Prerequisites: Root permissions, adb/root explorer, a 2.2.1 firmware.

12.1 Download the attached "" and unpack it.
12.2 After unpacking you should have 3 .so files. You need to get these files into your /system/lib folder with either adb or by copying them to the phone and then using "Root Explorer" to copy them to the proper folder.
12.3 Reboot.
12.4 After the phone has rebooted, you can use most apps that are on the market to record calls properly (that means not from the microphone). I use AllCallRecorder because it is simple and does the job. There are also Phone.apk's that have call recording built in, you could also install one of those and record your calls with it.

That is all for now. I will add more information as time goes by and I hope this will become a full guide on how to make the best out of our devices. If you have constructive criticism, questions or any ideas or tips on how to improve this, please let me know. If you don't have anything constructive to add to this thread, please DO NOT post. If my troll alarm goes off, I WILL ignore you.

Thanks goes to:
ragin for the USB drivers.

I have learned most of the stuff I put here from various searches on Google and the xda forums and I may not remember the exact threads I got them from. If you feel I have copied your work without giving you credit, I am very sorry for that. Please let me know via a post or a PM and I will link you in the "Thanks".

I am sorry if my English is bad, it's my third language though. I hope that the post is understandable by most people.
Attached Files
File Type: zip - [Click for QR Code] (363.6 KB, 1573 views)
The Following 60 Users Say Thank You to shantzu For This Useful Post: [ View ] Gift shantzu Ad-Free
3rd February 2011, 09:57 AM |#2  
shantzu's Avatar
OP Member
Thanks Meter: 83
This post will contain instructions for *nix based operating systems

Because I am using Linux myself and because it is much easier to do stuff in the command line on Linux than it is on Windows, I will mostly post instructions for *nix systems. If anyone wants to help out by "translating" them over for Windows machines, I can include it in the next post.

Optimizing and zipaligning

I have managed to Optimize and zipalign the apps in /system/apps with the following code.
You need to run this on a *nix distribution (I used Ubuntu) with at least the following packages installed: bash, zip, unzip, optipng. Put all the .apk files from /system/app in a folder on your machine, cd to that folder and execute this code snippet.
Also, beware that some of the apps might not work (I had for example FCs with the camera and the phone app), I'll try to figure this out and make it pretty much foolproof. Currently everything but the .9.png files are optimized (the .9.png files are some special files that can't be treated like normal png files).

for apk_file in *.apk; do
	file_name=`echo $apk_file | sed -r s/.apk//`
	echo -ne "Unpacking\t$file_name.apk... "
	mkdir $file_name
	unzip -qq $file_name.apk -d $file_name
	cd $file_name
	echo -ne "Done.\n"
	echo -ne "Optimizing\t$file_name.apk... "
	for pngfile in $(find . -name '*.png' | fgrep -v .9.png); do
		optipng -quiet -o 5 $pngfile
	echo -ne "Done.\n"
	echo -ne "Repacking\t$file_name.apk... "
	zip -q -0 -r ../$file_name.apk *
	cd ..
	rm -rf $file_name
	echo -ne "Done.\n"
	echo -ne "Zipaligning\t$file_name.apk... "
	zipalign -fv 4 $apk_file $
	mv $ $apk_file
	echo -ne "Done.\n"
EDIT: I added the -0 flag to the zip command, since you should never "compress" apk files, because this leads to the FCs I was experiencing.
The Following 7 Users Say Thank You to shantzu For This Useful Post: [ View ] Gift shantzu Ad-Free
3rd February 2011, 09:58 AM |#3  
shantzu's Avatar
OP Member
Thanks Meter: 83
Post also reserved.
3rd February 2011, 10:04 AM |#4  
shantzu's Avatar
OP Member
Thanks Meter: 83
Last reserved post. You can start flaming now.
3rd February 2011, 10:12 AM |#5  
Thanks Meter: 7
Originally Posted by shantzu

Last reserved post. You can start flaming now.

Posted in the wrong place... try reading the faq's about where this belongs.
3rd February 2011, 10:25 AM |#6  
shantzu's Avatar
OP Member
Thanks Meter: 83
Originally Posted by davidf

Posted in the wrong place... try reading the faq's about where this belongs.

Well, the rules of the development section state: "Rom Development - only meant for very advanced technical discussion directly related to ROM development activity and the delivery of actual ROMs and ROM components ONLY."

I'd regard this as an "advanced tehnical discussion", since it also contains information on how to deodex and (to come soon) optimize/zipalign your apps, that's why I thought it would belong here. I would also like this to be a place for advanced discussions on best practices on deodexing, theme-ing, and otherwise modifing a stock ROM manually. If the moderators still think that this doesn't belong here, I'm sorry, and would like to ask them to move it to the proper Forum.
The Following 2 Users Say Thank You to shantzu For This Useful Post: [ View ] Gift shantzu Ad-Free
3rd February 2011, 10:38 AM |#7  
ragin's Avatar
Senior Member
Flag Hubli
Thanks Meter: 159
Sticky Material.

Don't you think your Title is misnamed? The thread contains much more than just a guide getting most out of our SGS.

Very good effort anyway.
3rd February 2011, 11:18 AM |#8  
shantzu's Avatar
OP Member
Thanks Meter: 83
Originally Posted by ragin

Sticky Material.

Don't you think your Title is misnamed? The thread contains much more than just a guide getting most out of our SGS.

Very good effort anyway.

Well, I didn't know what else to name it, and didn't want to use a really long name. I think this title best describes what it's about...

Thank you for your reply!
3rd February 2011, 11:48 AM |#9  
Senior Member
Flag Brisbane
Thanks Meter: 34
very good post. It'll be extremely helpful for new users i reckon.
3rd February 2011, 12:14 PM |#10  
waveboy2u's Avatar
Flag Istanbul
Thanks Meter: 4
can this method be used on almost any samsung galaxy? (i have galaxy 551)
and about xUltimate a general app for any Android phone or only for SGS ?
3rd February 2011, 12:22 PM |#11  
Junior Member
Thanks Meter: 0
Awesome stuff thanks for this cleared up a few things
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes