Wednesday 24 August 2011

Android Diaries, Part 4: Fixing the SGS2



The Samsung Galaxy S II is a wonderful device out of the box but the one thing that irks me is the TouchWiz UI skin. The plain simple Android experience is damn near perfect, I don’t understand why manufacturers need to add extra bloat and crap (MotoBlur, Sense, TouchWiz, etc.) to the user experience. This guide documents my attempts to get rid of all the excess crap.

Disclaimer:
If you decide to follow through with this stuff, do it at your own risk. If you screw up, you may potentially wreck your device and even if you don’t screw up, odds are you’ll have to reset all your data anyways. While I’ll try and make this newbie friendly, please recognize that this stuff is not necessarily for the digitally faint of heart. I wrote up a post to cover some basics of getting everything backed up..

Progression

  1. Root access. This is the most basic step: here, we grant the user (i.e., you) full administrative privileges on your phone. This is akin to being a system administrator on a computer as opposed to a guest.
  2. System utilities. Things like backing up your applications and data and such, require administrative rights.
  3. Recovery environment. This is the next logical step, here we have tools that let us backup the entire OS and dabble in trying out new ROMS and such.
  4. Custom ROMs. Here is the final stage where we tinker with custom ROMs. This will be covered in a separate article here.
If you don’t know what rooting is, you should read this before moving on. Should probably read this for good measure too. If you’re still antsy or asking “why do I want to root”, you should probably stop now. You should probably have a glance at the [potential] reasons not to root. People who root and people who don’t innately don’t see why the other party would do things that way haha. If you’re still unsure and uncertain about why you’d want to root, then it’s probably not for you.
There are a couple of ways that I’ve tried to root the SGS2. The difference between two ways is dependent on whether you want to go on and tinker with custom ROMs or not. I’ll try and break the progression down as simply as I can. I’ll also try and outline the amount of “risk” involved with each step. Let’s get started!

Part 1: Prep-work, Risk Free
  1. Make sure you have the latest .NET Framework installed. You should have this on your computer regardless. This is required by a few tools.
  2. Make sure you install the latest version of Samsung Kies. This package installs the driver so that the computer knows how to interact with your phone specifically.
  3. Don’t remember if this is entirely optional or not, but you should (or probably will need/want to) install the Android SDK. At the very least, the only packages you need are
    • Android SDK Tools <latest version>
    • Android SDK Platform Tools <latest version>
    • Google USB Driver Package <latest version>
  4. Download ODIN. This is Samsung’s tool for performing flashing operations on your phone.
  5. Figure out what your phone’s kernel version before we get started.
    1. Open your phone’s settings
    2. Go to ‘about’. You should see something similar to this
    3. Scroll down and write down the following
      • Android version
      • Baseband Version
      • Kernel version
    4. Look in the kernel version string in the above sample, see the I9100XXKG6 substring? The important bit here is the KG6. Remember this.
    5. Visit here and download the appropriate insecure kernel. Using the above example, search for KG6 and download that appropriate file.
  6. Plug your phone into the computer at least once, so the drivers can be initialized and such. If you’re running a stock, virgin setup, go ahead and fire up KIES and see if you can connect (you should be able to, you may need to reboot once beforehand though).
  7. Make sure your phone has debugging enabled. (Settings > Applications > Development > Debugging Mode)
  8. Proceed to Part 2
Part 2: Deciding, Risk-Free
Now you need to decide if you just want root access or if you want root access and clockworkmod (CWM). What clockworkmod is, is a custom recovery environment which lets you change the ROM on the phone (think of the ROM as the operating system of the phone).
For people who just want root access, that’s often enough. If you want to muck around with the OS, then you’ll need a working CWM. The reason I offer this choice is because one set of instructions won’t let you get access to CWM (meaning you can’t inadvertently break stuff).
If you choose “I just want root for now”, you can always come back later and dabble with CWM – just choose the other option when you get to this step.
  • For root only, proceed to Part 3
  • For root and the ability to mess with the ROM, proceed to Part 4
Part 3: Just Root, Risk-Free
  1. Visit this and download the appropriate insecure kernel. Do a search for three letter/numbers I told you to remember in Part 1.
  2. Proceed to Part 5 where you will make use of the file you downloaded.
Part 4: Root + CWM, Risk-Free
  1. Visit this link. Read through the first link, scroll down to the section titled ‘Help! Which file do I use ?’ and read it.
  2. You will find the downloads you need in post 3, 4 and 5 .
  3. Proceed to Part 5 where you will make use of the file you downloaded.
Part 5: Flashing, Medium-High Risk
  1. You may need to extract the file that you downloaded (in the step before you got here). Extract that file (if applicable) to the same directory.
  2. Make sure the phone is unplugged from the computer (and has decent/full battery) and turn the phone off
  3. Press VOLUME DOWN + HOME BUTTON + POWER for about 3 seconds. It will present you with the following warning screen. Press VOLUME UP.
  4. It should now load a console looking screen
  5. Plug the phone into the computer and start ODIN. This is what ODIN looks like when everything is detected and okay. If you are seeing this, then your phone hasn’t been detected by ODIN (meaning, most likely, you didn’t install the drivers or initialize them by plugging the phone in once beforehand).
  6. Verify that only the “Auto Reboot” and “F. Reset Time” checkboxes are checked.
  7. Click the PDA button and select the file (or the extracted file) from Step 1.
  8. Hit START. When ODIN is done, it should reboot the phone for you and you should have two green boxes like this. During the phone’s boot-up, you should see a big yellow exclamation mark at the bottom.
  9. If you came from Step 3, got to Part 8
  10. If you came from Step 4 then go to Part 6
Part 6: Verifying root, Low-Risk
There are a few ways to verify root, here are some easy ones:
  • Verify the existence of the Superuser application. It’s application icon looks like this
  • Download Root Checker from the Android market and run it. You may be prompted with a Superuser permissions dialog which looks similar to this
  • If you have a Terminal application, start it up and run the command su. It should ask you for superuser permissions and then the next prompt should be a # symbol.
If you did Part 3, then you’re done! If you did Part 4, then proceed to Part 7.
Part 7: Verifying CWM, Low-Risk
  1. Download and install ROM Manager from the Android Market. When you launch it, it should prompt you for Superuser rights (allow it) and you should see something like this.
  2. If you are not currently running the latest version, click the Flash ClockworkMod Recovery option.
  3. Click Reboot into Recovery
  4. Since you did Part 4, you should see something like this. If you see something like this then something is wrong and we’ll have to fix/work-around it.
  5. Select reboot device for now.
If you had problems with step 4 here and are seeing the stock recovery environment rather than the custom one, then we need to see if you can somehow get to it. Most of the time, if the stock environment loads, it will be because of a signature validation error or something similar. Now we need to see if we can get a workaround:
  1. Plug the phone into the computer
  2. Open command prompt and navigate to the folder you installed the Android SDK to (by default it should be C:\Program Files (x86)\Android\ or similar)
  3. There should be a folder called platform-tools. Navigate to this.
  4. Type adb reboot recovery and press enter
At this point, the phone should reboot into the recovery mode, now you should see the expected ClockworkMod (CWM) mode. At this point, we have a workaround to get to CWM by using adb. For a permanent fix, try a custom ROM with this properly built in (a separate article)
Part 8: Single Click Root, Low-Risk
  1. Download the S2Root attachment from this post.
  2. Run it, click Root Device. When it’s done it will reboot your device.
  3. I’ve found that sometimes/often it doesn’t quite work the first time, so just repeat the process again.
  4. Proceed to Part 6

No comments:

Post a Comment