I will try to set up a guide to contain all of the information to get the most out of your Samsung Galaxy S. First the fine print:
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. 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. Flashing stock firmware’s.
-> 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 www.samfirmware.com for example).
The steps to flashing a stock firmware are already described in a couple of other threads, like: xda-developers.com
Nonetheless, here a quick sum-up of what you have to do:
1.1. Open up Odin.
1.2. Put your phone in the “Download mode” with the 3-button-combo (Volume Down + Home + Power).
1.3. Connect your phone to your computer (DO NOT CONNECT THE PHONE BEFORE OPENING ODIN OR THIS WILL NOT WORK).
1.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.
1.5. Select your firmware in Odin.
1.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).
1.6. Take a deep breath and click the “Start” button.
1.7. Wait for the firmware to be flashed and for the device to be restarted.
1.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.
2. 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.
2.1. Download your preferred kernel (the version for Odin, not the one for CWM).
2.2. Open up Odin or Heimdall.
2.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).
2.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.
2.4.2. If you are using Odin, select the file you downloaded in the PDA box and click Start.
2.5. After your Phone reboots, go into “Recovery mode” and go to “Advanced Speedmod ULK features” -> “ROOT / Install Superuser”.
2.6. After rebooting the phone again, you should have root permissions.
3. 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: DroidForums.net
There are more ways to deodex your apps, but I found xUltimate to be the easiest.
3.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).
3.2. Deodex the apps and framework with xUltimate, options 3 and 4.
3.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:
Code:
adb shell
su
stop
mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system
cp /sdcard/done_app/* /system/app/
cp /sdcard/done_frame/* /system/framework/
rm /system/app/*.odex
rm /system/framework/*.odex
mount -o ro,remount -t ext3 /dev/block/mmcblk1p21 /system
reboot
4. 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.
5. 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 !!
5.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).
5.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.
5.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.
5.4. Avoid blue. As you can see here for example: HERE 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.
6. Theme-ing your phone.
Coming soon…
7. Unlocking your phone.
–> hy, 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 card 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.
7.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.)
7.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.