1. mtkohl85's Avatar
    Hi all.
    Background: Been watching this site since before getting the Nexus S 4G when it launched last summer. Upgraded from a well-warn Palm Pre, which I loved save for its painfully slow performance. My favorite feature of webOS, honestly, was the very direct ability to 1) unlock the device in dev mode and 2) restore the entire system to factory default in 20 minutes with the Palm Restore Tool.

    That said, I love my phone and the Android ecosystem, and have been studying for some time what rooting would involve, how it's done, advantages, restoring to factory, bootloader unlock, and so on. I rooted once, right before 2.3.7 was released, using Pete Alfonso's one-click root. This was short-lived since I updated to 2.3.7 as soon as it became available, and likewise with 4.0.4. Both OS updates were done via the recovery console and the associated "update.zip" files. I simply didn't feel like waiting for my phone to get the updates OTA. I can't say for sure if these were done via the default Android Recovery Console or Clockworkmod. All I can say for sure is that I currently have the default Android Recovery Console. If I ever had Clockworkmod installed, assuming it was installed via one-click root, it's gone now. I assume that one of the system updates restored it.

    So as it stands, I have (I believe) the factory out-of-the-box stock Android 4.0.4 build IMM76D, and the default recovery console, "Android system recovery <3e>". However, my bootloader is still unlocked.

    My understanding is that unlocking the bootloader is a prerequisite to obtaining root. I also understand that unlocking the bootloader is the only part of the root process that wipes the phone. Since mine is already unlocked, I can root without losing data/settings, correct? In fact, I have purposely avoided one-click restore options for this very reason.

    So to my big question...in studying everything I can find, I've found myself in a circular conundrum for which no one seems to ever actually explain...and forgive me if I just missed the point...but EVERY rooting tutorial I've found includes steps to install a custom recovery console like Clockworkmod, THEN root the phone buy using recovery to install the superuser file(s). However, EVERYTHING I've read about Clockworkmod states that root is required to install and use it. This seems very much like a chicken vs. egg scenario.

    So...can root be achieved WITHOUT using a custom recovery? simple yes/no will suffice, but additional useful commentary would be very much appreciated.

    I want to root my phone, not for any special purpose yet, but because I want to understand it. Forget custom ROMs and such for the time being. All of the tutorials I find are very step-by-step, and many are very very good...but I don't want just a checklist, I want to know what's going on, and why each step is necessary, what each step does, which steps are necessary for what purpose and which ones aren't. And this stuff doesn't seem to ever be explained anywhere. I'm making my own notes, but the above question is holding me up and I'm tired of searching. I'm that guy who takes stuff apart to learn how it goes back together, so that's my angle (and a systems engineer by trade).

    As part of this, I want to fully understand how to restore everything about the phone to its factory state. Until I do, I'm not going to hack it anymore (not asking how to do that, just stating my general intentions).

    FYI, I'm pretty tech-savvy, very familiar with Windows, OS X, and Linux command line stuff, as well as very experienced with scripting via Perl, Python, and VB. so you're not talking to an *****

    Thanks for any feedback.
    06-03-2012 06:51 PM
  2. mtkohl85's Avatar
    Also...despite my best efforts. There are a couple of misspellings above...they happen sometimes using my *cough cough* iPad *cough* virtual keyboard sometimes. Hope I don't get penalized for that
    06-03-2012 06:54 PM
  3. Phil Nickinson's Avatar
    You can flash image (img) files directly via fastboot and bypass recovery altogether.

    Do remember that those are different than update.zip files though. There's a little more manual labor involved.

    Also, remember that bootloader unlocking is different than loading a rooted system image. The SuperUser app is a gatekeeper for unlocked systems (think of it almost like a firewall.)

    Make sense?
    06-03-2012 08:42 PM
  4. Paul627g's Avatar
    In answer to one of your other questions, if your bootloader is already unlocked then your device will NOT be wiped again unless you do so via CWM recovery. The part everyone is concerned with naturally is their sdcard partition of the device. This will remain SAFE now that it was originally wiped during the bootloader unlocking.

    You can root your device but it has to be done via custom recovery.

    Examples below are the fastboot commands and what happens to achieve unlocking, flashing custom recovery and then superuser access (root access).

    Below unlocks the bootloader via fastboot (from the Android SDK)

    fastboot oem unlock


    Below flashes the custom recovery via fastboot.

    recovery-clockwork-5.0.2.0-crespo4g.img (this would be your cwm recovery file which you would place in your /platform-tools/ folder of the Android SDK where you fastboot.exe is located.

    fastboot flash recovery recovery-clockwork-5.0.2.0-crespo4g.img


    This file you would place on your sdcard location on your device and then "flash/install" in CWM recovery which will then give you root access/SuperUser. I have also taken the liberty of modifying the file so this recovery "sticks" on reboot.

    Superuser-3.0.7-efghi-signed.zip

    Now after flashing CWM recovery you would then from your Bootloader menu select RECOVERY to boot into CWM recovery and then flash a SU.zip (Superuser or Root Access) file.

    Reboot and bingo your rooted.


    All this is well explained in a guide I have in the Rooting and Hacking section.

    http://forums.androidcentral.com/spr...s-version.html
    06-03-2012 09:19 PM
  5. mtkohl85's Avatar
    Phil; Paul -

    Thanks much for the quick replies. Yes I understand what both of you posted. Good info. Paul, I have come across your tutorial in my research and have identified it as my baseline if you will, and I am confident I can follow it easily enough (un-doing and restoring to stock will be another endeavor).

    However, I'm not sure my primary question was answered, as both of your responses seem to contradict one another. You guys are the experts, so hopefuly you can clarify. Phil, your response seems to imply that a custom recovery is NOT necessarily required and that flashing of the required root files can be done via fastboot. In contrast, Paul explicitly states that a custom recovery like CWM is required. It makes me no difference either way, this is curiosity and for my own understanding. Obviously any changes made would need to be un-made when returning to stock, and that would include reinstalling the original recovery console. From my perspective, if the custom recovery console is not required, I would consider it to be separate from root and treat them as such for my own purposes (though like other users I would employ both to make use of the advantages of each).

    I have used this article as my primary source of info on CWM.
    What Is ClockworkMod Recovery And How To Use It On Android [Complete Guide]

    It states clearly that CWM REQUIRES root...hence my confusion/question. If CWM requires root, but root can only be achieved via CWM....you see my confusion? Obviously the steps spelled out in the tutorials are valid and I do trust them, I just feel I'm missing something. I can no doubt root the phone, I'm just missing some understanding. Am I digging too deep? Haha

    Thanks again to you both for your quick and generous responses. Great job all around.
    06-04-2012 01:11 AM
  6. aman1127's Avatar
    From my understanding you can flash a rom without a recovery hence stock. However, its advised that you do flash a recovery because its way easier to flash roms and you have a back up image

    Sent from my Nexus S 4G using Tapatalk 2
    06-07-2012 01:43 AM
  7. mtkohl85's Avatar
    Hi again.
    I've been playing around with fastboot and adb, getting comfortable with sending harmless commands. I did in fact flash CWM via fastboot according to Paul's instructions, but it disappears after every reboot and reverts to stock recovery.

    Does this mean that the CWM recovery isn't "sticky", or is it something about ADB that reverted me back to stock recovery? FYI, I downloaded the CWM image from Paul's link above.

    Also, can someone explain what is going on with "sticky" versus "not sticky" regarding CWM recovery? I thought that CWM recovery REPLACED the stock, but evidently that's not the case.

    Thanks much!
    06-08-2012 03:51 PM
  8. hlxanthus's Avatar
    I am far from experienced in recovery images, but I had this issue before on my optimus s. If I recall correctly it is due to running rooted stock. There is a way to make it stick but am unsure of how. Sorry not more help. I rooted my ns4g with the automated tool in the stickies which also flashes the recovery and never had an issue with loosing my cwm recovery. Probably the easiest fix now is to download rom manager and use it to flash it. That should do the trick.

    Sent from my Nexus S 4G using Tapatalk 2
    06-08-2012 04:01 PM
  9. deathpod's Avatar
    Hi again.
    I've been playing around with fastboot and adb, getting comfortable with sending harmless commands. I did in fact flash CWM via fastboot according to Paul's instructions, but it disappears after every reboot and reverts to stock recovery.

    Does this mean that the CWM recovery isn't "sticky", or is it something about ADB that reverted me back to stock recovery? FYI, I downloaded the CWM image from Paul's link above.

    Also, can someone explain what is going on with "sticky" versus "not sticky" regarding CWM recovery? I thought that CWM recovery REPLACED the stock, but evidently that's not the case.

    Thanks much!
    fastboot boot xxxx.img

    This is a way to boot into the custom recovery without flashing it. If you want it to "stick" you must flash it as follows:

    fastboot flash recovery xxxx.img

    I'm assuming you're not actually flashing, which would explain why it's gone when you reboot.

    Sent from my Nexus S 4G using Android Central Forums
    06-09-2012 11:29 PM
  10. mtkohl85's Avatar
    fastboot boot xxxx.img

    This is a way to boot into the custom recovery without flashing it. If you want it to "stick" you must flash it as follows:

    fastboot flash recovery xxxx.img

    I'm assuming you're not actually flashing, which would explain why it's gone when you reboot.

    Sent from my Nexus S 4G using Android Central Forums

    I did, in fact, FLASH CWM, yet it still reverted. There are many threads and posts about the recovery not "sticking", though I haven't studied enough to know why that's the case.

    I'm not having the problem now, though. I actually flashed all of the stock files, then flashed CWM, then the superuser file using CWM, then the tether fix. My CWM recovery hasn't reverted since, and I'm running on a stock rooted 4.0.4 except for the tether hack. My phone has never run better.
    06-11-2012 06:07 PM
LINK TO POST COPIED TO CLIPBOARD