Samsung Galaxy S2 - Guide to Rooting your phone (Always evolving and ever changing!)

mynameisjon

Supremacy Member
Joined
Feb 5, 2007
Messages
5,050
Reaction score
1
First note: I am only doing a windows guide because if you're using a mac, you're doing it wrong. If you're on linux, you probably know more than me when it comes to rooting.

Second note: Don't PM me asking for help. PMs asking for support go straight to the bin.

This process WILL wipe your phone
Once you root, your warranty is VOID. There are ways to go back to stock, but there's always a chance Samsung can detect that you rooted. Don't expect warranty once you've rooted.

You can get STOCK firmware from this thread. If you ever feel like unrooting..

Once you have rooted, you can use Titanium Backup to freeze/uninstall some of the bloatware. The list of apps that can/cannot be uninstalled safely are found HERE.

Files you will need
1. Kies driver for USB support

Kies installation
Some of you will try to install the new Kies over the Samsung Galaxy S (i9000) version, and reportedly sometimes your phone will not be detected, hence no new drivers installed.

To prevent this from happening, psychophant has suggested connecting your SGS2 to Kies at least once before attempting to use ODIN. Not sure if this helps you guys, I can't test it because I never got the error, and I never connected to Kies.

To fix this, you will need to go right click "My Computer" -> Device Manager

With your SGS2 plugged in, there should be an unknown USB device/phone/media player.

Right click that and then click "Update driver software", follow the prompt and choose "from CD". Then point the manager to the driver's directory in the CD.

Alternatively you can just double click the exe file in Samsung/Kies/Usb.

Thanks to Kennyboy for this fix.

2. ODIN - Courtesy of XDA forums for now. If anyone can host this file or re-upload to something other than rapidsh*t, let me know I will update.
3. A pre-rooted Kernel from Chainfire. You can grab it here. For this, you can do one of two things.

1. Note what firmware you have currently (settings->about phone->Baseband Version), and then download the same one from the above link.
OR
2. Download the latest Kernel that Chainfire has

Step 1:
Install Kies


Why? Because you need the usb drivers that Kies provides thats why. Do not ask whether there is a workaround because there is none that I know of, if there is, let me know I will update.

Step 2:
Familiarise yourself with ODIN


odinm.jpg

Image from xda

Taken from xda's Intratech

PDA refers to the build version of the firmware
Phone refers to the baseband/modem version
CSC is the consumer software customisation and is specific to geographical region and carriers. It contains the software packages specific to that region, carrier branding and also APN settings for data connection, MMS etc for your service provider.
.PIT refers to the partition information table you only need it if you screw up your partition table or if the firmware specifically requires it because of a change in the partition table layout. It's very likely you may never have to use this.

If the package only contains one .tar archive then it will have everything, pda+phone+csc, in the one file.

If it has multiple .tar archive then:
The .tar with modem in the name is the phone/baseband bit of the package
.tar with csc/multi-csc in the name is the csc bit of the package
.tar with code/PDA in the name is the PDA part of the firmware package

If this is the case you will need to put these .tar archives in the specific areas of Odin to flash the update

Step 3:
Close Kies in the system tray, because it will conflict with Odin. Remember you only need the driver.


Step 4:
Once you have your selected Firmware (which means you know which one to DL, e.g KE2/KF1/KFWTFBBQ), put your phone into DOWNLOAD MODE.

What is download mode? It's like when your phone becomes an FL and lets you put whatever you want into it.

How do you get your phone for be an FL? Turn off your phone.

Then, hold HOME, Volume Down and Power On.

Usually I release the power button after 4 secs because there will be a confirmation page after that that will prompt you to do the following.

Volume Up button - Continue
Volume Down button - cancel and reboot.

See the problem? You gotta be sure to catch that screen because if you continue holding down the volume down button it will just reboot. Try to have unrestricted access to your phone (no cables).

When in download mode, you'll know. ;)

Now Plug in your USB cable or put it into your Zenis Dock.

Step 5:

Fire Up Odin and then make sure that you a yellow box below the ID:COM in the top left. Should say something like COMxxxx

Usually, once you open ODIN, you do not need to tick or untick anything.

Select the Chainfire Kernel that you downloaded from this thread under the PDA section.

Press start.

Once rebooted, you are rooted and have the following:
- Superuser 2.3.6.1
- Busybox v1.16.2androidminimal (from CWM)
- Integrated CWM 4.0.0.2

*all subject to Chainfire's discretion as these may change



Your phone is now full of Tigerblood.

If you need to get rid of the Yellow Triangle and still keep the custom Kernel (as well as CWM), follow this guide here. - I don't provide support for this guide. This is just a courtesy.

I'll add more guides in the next 2 posts about FastDormancy and Overclocking/Underclocking to save battery. For now, this will do.
 
Last edited by a moderator:

mynameisjon

Supremacy Member
Joined
Feb 5, 2007
Messages
5,050
Reaction score
1
Fast Dormancy
Otherwise known as "WTF IS THIS SHIAT? PHONE Y U NO SLEEP?"

Will be removed and replaced by Titanium Backup guide once KG1 firmware is officially released (2.3.4 fixes/removes fast dormancy problems)

Fast Dormancy is a network reliant function that allows the phone radio to go into a semi-sleep state as opposed to fully awake and connected or fully asleep and not connected.

If your phone is connected to HSDPA all the time, your battery life would SUCK. You would get better connectivity, since your connection is always on, but lets face it, you're sucking your battery faster than a ATB FL.

If your phone radio goes to sleep, it disconnects from the network. This means that you need to re-establish a data connection with the network before you get to surf. Ever had the 3G/H sign on your bars disappear and then appear after 10-15 seconds? Thats your phone reconnecting (though not necessarily because the radio went to sleep).

Fast Dormancy keeps the phone in between. Its when your phone bars go from H to 3G because you're idling, then going back to H when you surf the web. It preserves battery life because your phone isn't pulling data all the time, but at the same time, maintains a semi-connection to the network.

When the network does not support this function, and your phone is trying to do the semi-connection but the network wants an all or nothing.

A typical sign would be seeing this in your LogCat.

05-14 15:07:26.200: DEBUG/FastDormancy(2815): before ======= ENTER DORMANCY =======
05-14 15:07:26.200: DEBUG/FastDormancy(2815): [FD] ON default: true
05-14 15:07:26.200: DEBUG/FastDormancy(2815): Before mDormFlag: false in getCapaDormancy()
05-14 15:07:26.200: DEBUG/FastDormancy(2815): After mDormFlag: false in getCapaDormancy()
05-14 15:07:27.204: DEBUG/FastDormancy(2815): before ======= ENTER DORMANCY =======
05-14 15:07:27.204: DEBUG/FastDormancy(2815): [FD] ON default: true
05-14 15:07:27.204: DEBUG/FastDormancy(2815): Before mDormFlag: false in getCapaDormancy()
05-14 15:07:27.204: DEBUG/FastDormancy(2815): After mDormFlag: false in getCapaDormancy()
05-14 15:07:28.210: DEBUG/FastDormancy(2815): before ======= ENTER DORMANCY =======
05-14 15:07:28.210: DEBUG/FastDormancy(2815): [FD] ON default: true
05-14 15:07:28.210: DEBUG/FastDormancy(2815): Before mDormFlag: false in getCapaDormancy()
05-14 15:07:28.215: DEBUG/FastDormancy(2815): After mDormFlag: false in getCapaDormancy()
05-14 15:07:29.214: DEBUG/FastDormancy(2815): before ======= ENTER DORMANCY =======
05-14 15:07:29.214: DEBUG/FastDormancy(2815): [FD] ON default: true
05-14 15:07:29.224: DEBUG/FastDormancy(2815): Before mDormFlag: false in getCapaDormancy()
05-14 15:07:29.224: DEBUG/FastDormancy(2815): After mDormFlag: false in getCapaDormancy()

This process shows up on your battery life status as "Android OS", leading to the "Android OS" bug.

If the network does not support Fast Dormancy, what's happening is that the process is just hammering away at the dormancy protocol (which uses a little bit of battery), but doesn't save you any battery life in return because your phone isn't going to semi-sleep. Most likely, it's on active the whole time. Thats how your battery drains.

This is an example of a log taken from my phone (on SingTel)

04-19 13:21:10.398 D/FastDormancy( 269): [FD] ON default: true
04-19 13:21:10.441 D/FastDormancy( 269): Before mDormFlag: true in getCapaDormancy()
04-19 13:21:10.445 D/FastDormancy( 269): After mDormFlag: true in getCapaDormancy()
04-19 13:21:10.449 W/FastDormancy( 269): ======= ENTER DORMANCY =======
04-19 13:21:10.500 D/FastDormancy( 269): ======= FAST DORMANCY Enter =======

This entry does repeat itself though, but I believe this is what's keeping the phone in it's semi-sleep state.

A lot of people have said that increasing the interval between the poll will lead to increase battery life because Android OS shows less usage. (People report that Android OS shows up as using 40% of the battery life drained)

I would venture a guess and say the true bug here is that the % are wrong when it comes to "what's using the battery".

I think the way that the system is getting the timing is simply through the time the process is ON, not how much battery it actually is using.

Earlier in the day I had the polling set at 30, and I drained 10% in an hour. I changed the polling interval to 60, and it dropped even faster. This despite Android OS showing the "normal" 15-20% consumption.

Now lets take a look at Android OS usage.
Dormancy Value in nwk_info.db->nwkinfo set to "ON"


Poll Rate 30, used close to 40% of total battery consumption. 20 mins of usage over 5 hours

Now we look at poll rate 60.


This is cumulative, so subtract the previous 20 minutes and you get 10 minutes for 4 hours, vs 20 minutes for 5 hours.

Almost half right? so we should expect great battery life.


This is with Poll Rate 0.
1hr 19 mins - 31 mins = 48 mins.
So now we have 48 mins of Android OS usage in 9 hours. It's a 50% increase of usage compare to the previous settings. Battery life must then suck.


Dormancy Value in nwk_info.db->nwkinfo set to "OFF"

Poll Rate 60


Poll Rate 30


Poll Rate 0

This is the comparison of battery drain.



As you can see, Poll rate 0 shows the least battery drain consistently, despite Android OS usage being through the roof.

My conclusion is that the battery usage % shown by that screen is off, and does not reflect the true usage.

Poll rate of 60 means that the phone will be awake for that 60 secs before it is put to sleep, where as poll rate of 0 means that if the phone is awake, immediately it will be put to sleep.

Based on the settings that got me the best battery life, I have created a .db file with dormancy value "off" and poll rate "0"

You can download it here.

To use it, you will need root privilege.

Option 1.
With a root enable explorer, copy the file to /data/data/com.android.providers.telephony/database and replace the existing one. Don't forget to back it up before you replace. You will need to enable r/w if you're using root explorer, since data/data is read only.

Option 2.
Via adb.
With command prompt:
cd\[wherever your android sdk folder is]\platform-tools
adb devices
*check to see if you can see your device*
adb pull /data/data/com.android.providers.telephony/database/nwk_info.db
*make sure it is successful. this is your backup in case something goes wrong.
*copy it to a backup folder.
*now copy the new nwk_info.db that i have provided into the platform-tools folder
adb push nwk_info.db /data/data/com.android.providers.telephony/database/nwk_info.db

After both steps, go to *#9900# or *#*#9900#*#* (not sure which one will work for you.. both work for me)
Click disable fast dormancy, then click enable again.

Now reboot.
 
Last edited:

mynameisjon

Supremacy Member
Joined
Feb 5, 2007
Messages
5,050
Reaction score
1
Underclock/Overclock Undervolt Guide

Courtesy of snipes14

Because there seemed to be demand for it, I shall expand and elaborate on my previously posted undervolting guide. The procedure for overclocking should be the same, although personally I do not find the point in overclocking this phone since it's already very fast.

Step 1: Root your phone, using the guide provided by mynameisjohnson in the first post of this thread. The Utility we will be using for overclocking/underclocking/undervolting requires superuser access.

Step 2: Install Tegrak Overclock Ultimate from the market. The non-ultimate version does not allow for overclocking or undervolting, so you'll need this.

sc20110705173016.jpg


Step 3: Launch the app. This is what you'll see:

mainf.jpg


Step 4: Press "Load Overclock Module". A popup will ask if you want to grant superaccess permission. Accept.

superuser.jpg


Step 5: Press "Optimization". Now, undervolting is simply a process of finding the lowest possible voltage that your phone is stable at. You'll notice there's 5 different levels CPU frequency and voltage. Apparently the most important ones are level 4 and level 0: 200Mhz and 1200Mhz respectively. According to the good people at XDA, these are the two states that your phone spends most of its time in. When it's sleeping in your pocket, it's at 200mhz. When it's awake, it's usually at 1200Mhz.

This is the screen you will use to carry out your undervolting adventures:

uderoptions.jpg


Let's focus on 1200mhz. While the recommended value for this is 1200mv, depending on your own individual chip it might do better, or worse. (Remember that lower voltage is better!) Drop it down to 1200mv, run some intensive apps to test for stability, or use your phone normally for a day or two. If it doesn't crash or reboot itself, consider it stable.

Your next step, if you are feeling adventurous, is to go even lower to find out what's the lowest voltage your phone can run stably (is there such a word?) on. The procedure is the same as above: Run intensive apps to test for stability. It might be a good idea to take out your back panel to take out the battery in case of a crash.


Step 6: If you are satisfied with your settings and their stability, press "Set on Boot" for Tegrak to apply these settings whenever your phone boots up.

Now, one of you have asked what happens if the phone crashes as a result of too low a voltage setting? Will the phone be able to boot back up for you to select a stable voltage?

Thankfully, Tegrak is sensible enough. This is what happened when my phone rebooted after it crashed at 1200Mhz@1125mv:

stable.jpg


It should be obvious which option to choose.

I hope you will find this short guide helpful. Do feel free to post any feedback or inaccuracies so that I might correct it in the future. No PMs please! Any questions should be posted here so that both question and answer can benefit the community as a whole.

To do:

Find out what the scaling options means.

Attempt GPU undervolting.

Run comprehensive battery test to find out actual savings and thus feasibility of undervolting.
 
Last edited:

Vulpix

Moderator
Moderator
Joined
Jan 1, 2000
Messages
105,136
Reaction score
3,711
Last edited:

amoro123

Arch-Supremacy Member
Joined
Dec 1, 2005
Messages
13,456
Reaction score
337
Great thread! Will up ur pts when my power returns.

Ops.... this is not SBF. :(
 

kennyboy

High Supremacy Member
Joined
Nov 30, 2000
Messages
43,146
Reaction score
43
One thing I experienced, I'm installing Kies 2.0 over some older version of Kies for my SGS1.

It will not auto install the latest USB drivers, u gotta go inside the Samsung/Kies/Usb driver folder to run the exe again, otherwise when plugged in Download mode it will just say the driver not found.
 

psychophant

Senior Member
Joined
Aug 1, 2002
Messages
2,102
Reaction score
0
One thing I experienced, I'm installing Kies 2.0 over some older version of Kies for my SGS1.

It will not auto install the latest USB drivers, u gotta go inside the Samsung/Kies/Usb driver folder to run the exe again, otherwise when plugged in Download mode it will just say the driver not found.

Maybe should connect phone to Kies at least once? thats exactly what i did before i Odin-ed.
 

kennyboy

High Supremacy Member
Joined
Nov 30, 2000
Messages
43,146
Reaction score
43
Maybe should connect phone to Kies at least once? thats exactly what i did before i Odin-ed.
Never connect to Kies even with SGS1.....so should not be the reason.

Somehow it detects a previous installation of the usb drivers, and never runs the latest batch of drivers. So it didn't install the sgs2 usb drivers.
 

baby_bitsg

Senior Member
Joined
Aug 16, 2010
Messages
1,508
Reaction score
0
Never connect to Kies even with SGS1.....so should not be the reason.

Somehow it detects a previous installation of the usb drivers, and never runs the latest batch of drivers. So it didn't install the sgs2 usb drivers.

It always good to remove the last installed driver. You can use software like this to uninstall the driver when the phone is connected to the USB port. However you have to ensure Kies recognize the phone first.
 

sandyph

Senior Member
Joined
Dec 9, 2005
Messages
2,154
Reaction score
19
oh, after rooting, Kies say that this device model can not be updated
wondering is this because of the root or all have this message on Kies ?
 

baby_bitsg

Senior Member
Joined
Aug 16, 2010
Messages
1,508
Reaction score
0
oh, after rooting, Kies say that this device model can not be updated
wondering is this because of the root or all have this message on Kies ?

did you install original kernel back after rooting??? I'm waiting to get my S2 to try out rooting.
 

mynameisjon

Supremacy Member
Joined
Feb 5, 2007
Messages
5,050
Reaction score
1
oh, after rooting, Kies say that this device model can not be updated
wondering is this because of the root or all have this message on Kies ?

You would need to have the firmware that your phone originally had.

If you started out with KF1, flash a KF1 kernel
 

hongzang

Banned
Joined
Jul 28, 2008
Messages
3,422
Reaction score
0
hmm hi. i just got my GS2 but i don't understand this at all. doing this is for? :D i'm a idiot. i know LOL
 
Important Forum Advisory Note
This forum is moderated by volunteer moderators who will react only to members' feedback on posts. Moderators are not employees or representatives of HWZ. Forum members and moderators are responsible for their own posts.

Please refer to our Community Guidelines and Standards, Terms of Service and Member T&Cs for more information.
Top