rooting nexus s
Has been a week using this nexus s, and now it’s time to root and playin with custom rom. Found this page very helpful to root nexus s, and works like a charm on the first try, but since he is using winblows to do that, then I think I could share how to do that in linux way. Before we step in, I can suggest you to backup all the data on your sdcard, because I lost my whole data on my sdcard somewhere along this rooting process. ( I still don’t get it why in the world they have to re-formated my sdcard on the first place. I know it will erase all the data on the phone, and I remember I have to detach the sdcard when rooting my x10 before, but since this internal sdcard is not detachable then I choose to ignore it, resting on my estimation that ultimately proved wrong. Backup your sdcard, you’ll not regret it.
Here is the steps :
- You must already have the adb utility. ADB (android Debugging Bridge) tool is part of the Android SDK Tools and must be properly setup before you can continue. Head to this How to setup ADB procedure and make sure you FOLLOW ALL THE STEPS IN THE WRITTEN PROCEDURE as there have been updates added after this writing.
- You must already have the fastboot utility. Fastboot utility is part of the HTC ADP developer tools and available for Mac, Win and Linux platform. Head to this download page, download the linux version, extract them from zip and put the fastboot binary into the same working folder with adb tools above.
Unlock the Bootloader :
This step is needed because nexus s has an OEM lock code at the bootloader, we must unlock it first.
- Turn off the phone
- Turn it on by holding Volume Up and Power until fastboot mode comes up.
- Plug the phone in via USB cable to your computer while it is in fastboot mode.
- Open konsole, su to root and type this command : fastboot oem unlock
- When you hit Enter, the phone will ask you to confirm, select yes of course.
- You now have an unlocked bootloader.
- When unlocked, during booting, when Google text come out, there will be an unlock padlock at the bottom of the phone screen. This is normal. don’t be worried.
Flashing a Custom Recovery Image :
This step is needed so we can root later onto this custom recovery image.
- Download this custom recovery image and save it to your computer : ClockworkMod Recovery for Nexus S or here
- Put the downloaded recovery.img file into the same folder with adb and fastboot tool.
- Put the phone on fastboot mode like above steps, turn it off, turn it on again by holding Volume Up and Power until fastboot mode comes up, and plugged in the USB cable.
- Open konsole, su to root and type this command : fastboot flash recovery recovery.img
- Done. You were using the custom recovery image and ready to root.
Root the Phone :
- Download this Superuser flashable zip file and save it to your computer : Superuser for Android 2.0 and Up Flashable Zip or from here.
- If you’re still on fastboot mode, continue to next step, and if not put the phone on fastboot mode like above steps, turn it off, turn it on again by holding Volume Up and Power until fastboot mode comes up, and plugged in the USB cable.
- While in fastboot mode screen, select Recovery using the volume buttons and power button to execute then wait for it to boot into recovery mode.
- Once in recovery mode, select Mounts and Storage then select Mount USB Storage so we can transfer files to the sdcard while it is in recovery mode.
- Now, copy the downloaded Superuser.zip file to the root of sdcard (do NOT extract it, do NOT put it in any folders, just put on the root folder of the sdcard).
- Select Unmount on the phone.
- Select Mount System, then select Go Back to get back to the main menu of the fastboot mode screen.
- Then scroll to flash zip from sdcard and then choose zip from sd card and select the superuser.zip file and wait for it to finish flashing.
- Once it is done, select Go Back then Reboot System and wait for the phone to reboot.
- Your phone is rooted now, but there is one more step to complete the process.
Stop the Phone from Uninstalling the Custom Recovery Image :
- Once the phone is booted up, plug it in via USB cable and do NOT mount the storage.
- Open konsole, su to root and type this command :
mount -o rw,remount /dev/block/mtdblock3 /system
mv install-recovery.sh install-recovery-no.sh
- That steps can be explain as we will mount the system as writable and rename the file that overwrites the recovery image on reboot so that our custom recovery will stay.
- Turn off the phone and turn it back on by holding down Volume Up and Power to get into fastboot mode.
- Plug the phone in via USB cable while in fastboot mode, open konsole again, su to root and type this :
adb reboot bootloader
fastboot flash recovery recovery.img
- Once it is done, you have just reflashed the recovery image and it will now stick. You are all done! You have an unlocked bootloader, a custom recovery image, and root access!
Congratulations, and have fun …