[Nexus S General] DJBhardwaj:
​

Hey folks, here I look forward to guide the Google Nexus S users of the XDA Community to go custom with their Samsung Nexus S. I shall try to put forth the most prevailing steps to make my way to your minds. Also I will use the fastboot method to accomplish custom during this entire guide. Before we put our hands on the device and begin with the instructions, I would like to state some general terms, for your ease. :good:

Terms & Understanding

What is Bootloader and Why do we need to Unlock?

A bootloader is a boot initializing component which is generally locked by the device manufacturer to avoid any messing around with the OS. We need to unlock it for the same reason. Once unlocked it will allow us to change the boot sequence and modify the OS in accordance of our needs.

What is Rooting?

It is a process of gaining root privileges over an Android subsystem. Rooting an Android device is easy in most cases. If you will to Install custom ROMs, kernels, other patches or addons to your Android device, rooting is what you will need. It can be achieved in two ways; either by manual method (using fastboot) or by automatic method (using toolkit or software) . Here, I am going to follow the manual method by using fastboot commands.

ClockworkMod, what is it?

In short, CWM; It is a secondary recovery system created by Koush (Koushik Dutta), which adds enormous features like wiping partitions, flashing flash able .zip files like ROMs, kernels, patches etc to the stock AOSP recovery. Visit ClockworkMod website for more.

What does Custom ROM means?

These are the aftermarket Android firmware which are not official supported by the OEM (Original Equipment Manufacturer). They are made available to the Android public by Android developers and contributors all around the world. Custom ROMs are either built from Google’s source code i.e AOSP (Android Open Source Project) or are modified versions of the device manufacturer’s ROM (Stock ROMs or Factory ROMs) with additional tweaks and extend functions which are not delivered with the Stock ROMs. Some of the popular Custom ROMs include CyanogenMod (CM), Android Open Kang Project (AOKP), MIUI, Codename Android (CNA), Oxygen, ParanoidAndroid and many more.

What is Custom Kernel?

A Kernel is a bridge between the applications and the actual data processing done at the hardware level, In simple words, it is the communication between the hardware and software of an Operating System. In Android world, Custom Kernels play a vital role since they provide the users with several features including changing CPU frequencies, modifying the boot sequence and boot scripts and other features too.

What are Google Apps (Gapps)? The name speaks for itself. Gapps are Google apps for Android available in flash-able zip format. Most of these applications can now be found and updated via the Google Play Store.Some of the apps include the Google Play Store itself, Google Talk, Google Sync (for adding and synchronizing Google accounts), Google Backup Transport, Car Home, Gmail, Google Maps, YouTube, Google Search, Google Voice Search, Google Music, and Google Docs. In some Custom ROMs, the Google Apps are included. These are usually stock ROMs, smaller or less-common ROMs, or those from areas where intellectual property laws are less commonly obeyed. But many AOSP ROMs, most famously CyanogenMod and AOKP, do not include the Google Apps due to licensing issues. They are after all proprietary code owned by Google and not included in the Android Open Source Project.

Disclaimer

Early necessary requirements

At least 60% of battery to ensure no random shutdowns due to low battery.

Backup your storage manually. Also your text messages and contacts using some backup app.

Install Google and Samsung USB drivers from here

A compatible USB data cable for undisturbed connection between PC and device.

Enable USB Debugging in your device’s settings [Settings > Developer Settings > USB Debugging].

A PC with Windows OS.

Download Required files

Extract the downloaded NexusS_files.zip to the desktop. So now you will have a folder named "NSFiles" on your desktop which beholds all the needed files during the process.

Please make sure to follow every single instruction mentioned during the guidelines. This will resist you from any mishaps during the process. Lets begin!

Unlock Bootloader

NOTE: Unlocking the bootloader will erase all the data on the phone as well as SD storage. So be sure to back everything up.

Reboot your Nexus S into bootloader mode by pressing volume up + power buttons simultaneously until you see the bootloader screen.

Connect your device to the PC via the USB data cable.

Open the extracted folder "NSFiles" that we have have on the desktop. On an empty space inside the folder, press shift and right click and then select "Open command prompt here". This will execute a new CMD window which is already cd'ed to the folder's location.

Type in CMD:

fastboot oem unlock

You will now receive a message on the screen. Use the volume keys to highlight "Yes" and select it using the power button.

Your bootloader is now unlocked.

Highlight and select "Reboot" to reboot your device.

You have successfully unlocked your Nexus S bootloader.

Installing Custom Recovery

Reboot your phone into bootloader mode by pressing volume up + power buttons altogether.

Connect it to the PC via USB data cable.

While in the "NSFiles" folder on your desktop, press shift + right click on an empty space and go to "Open command promopt here". This will execute a command window which is already cd'ed to your current location.

To Install ClockworkMod touch 6.0.1.0

Type in CMD:

fastboot flash recovery CWM-T.img

To Install ClockworkMod non-touch 6.0.1.0

Type in CMD:

fastboot flash recovery CWM.img

To Install TWRP 2.3.1.0

Type in CMD:

fastboot flash recovery TWRP.img

The CMD prompt will indicate when the flashing is complete, it barely takes a few seconds.

Do not exit the bootloader mode, since this is the way to boot into recovery.

Now to boot into your new custom recovery, highlight "RECOVERY" and select it using the power button.

Rooting the Nexus S

If you plan to use the stock (factory) ROM, it is preferable to root. Otherwise, all the Custom ROMs out there already have root access.

The mentioned process is recommended to carry out using ClockworkMod Recovery.

Download the latest SuperSU flash-able root package. [Chainfire's SuperSU Thread]

Power off your device and boot into the bootloader mode by pressing volume up + power buttons simultaneously until you see the bootloader screen. Highlight"RECOVERY" using the volume buttons and select it using the power button.

Now, your Nexus S is in recovery mode.

Go to "mounts and storage" > scroll to the very last and select "mount USB storage".

This will mount your device's storage to the PC.

Drag the downloaded "CWM-SuperSU-v0.98.zip" to the root of your storage.

Select "unmount" to exit the USB storage mode.

Go to "install zip from sdcard" > "choose zip from sdcard" > select the "CWM-SuperSU-v0.99.zip" you placed in the storage and flash it.

Once flashed, select "reboot system now"

.

You now have your device rooted. You can officially declare yourself as the true master of your device.

Install Custom ROMs

Installing a ROM is quiet a simple process, you can say that it is the easiest of all.

First, you need to choose a suitable ROM that meets your requirements.

Once you have chosen, download the ROM's .zip (flash able zip file) as provided by the Author/ Developer .

Also make sure to download specific Gapps and other add-on if provided by the developer himself. [If not, download generic Gapps from here]

Put the downloaded files to your SD storage either by using USB mass storage directly or by mounting USB storage in recovery mode.

Reboot your Nexus S into Recovery mode. Power off your device and boot into the bootloader mode by pressing volume up + power buttons simultaneously until you see the bootloader screen. Highlight"RECOVERY" using the volume buttons and select it using the power button.

Using CWM:

wipe data/factory reset.

Go to "mounts and storage" > "format /system".

Go to "install zip from sdcard" > "choose zip from sdcard" > select your ROM .zip file that you placed in step #6. Flash it.

Gapps are the next to be flashed just after flashing the ROM. So, flash Gapps following the same way as the ROM. further if your are provided any add-on in a flash able zip format you can flash it the same way after flashing the ROM and Gapps successfully.

Once everything has flashed successfully, select "reboot system now".

Using TWRP:

Go to "Wipe" > "System" and "Factory Reset".

Go to "Install" > choose the ROM .zip file and flash it.

Gapps are the next to be flashed just after flashing the ROM. So, flash Gapps following the same way as the ROM. further if your are provided any add-on in a flash able zip format you can flash it the same way after flashing the ROM and Gapps successfully.

When flashed, go to "Reboot" > "System".

Your phone will now boot into the custom ROM.

Install Custom Kernels

Download the flashable zip package of your desired Custom Kernel.

Connect your device to PC via USB cable in USB Storage Mode.

Drag the downloaded kernel zip package to the root of your device's storage.

Disconnect the device from PC.

Power off, now press the volume up button and the power button altogether until you see the bootloader screen. Use the volume keys to highlight "Recovery" and select it using the power button.

Your device shall now be in recovery mode.

Flash using CWM:

"advanced" > "Wipe Dalvik Cache"

"install zip from sdcard" > choose zip from sdcard" > now browse and select the kernel zip package that you placed in your storage root during step #3.

Select "Yes".

Your Kernel will now flash to your OS and replace your current kernel.

When it has successfully flashed, select "reboot system now".

Flash using TWRP:

"Wipe" > "Dalvik Cache"

"Install" > now browse and select the kernel zip package that you placed in your storage root during step #3.

Your Kernel will now flash to your OS and replace your current kernel.

When it has successfully flashed, go to "Reboot" and select "System".

You now have Custom Kernel installed on your Nexus S.

NOTE: Before choosing any Custom Kernel, do verify that the Kernel is meant to be flashed on your present Android OS version.

Congratulations! You shall now enjoy the full packed potential of your wonderful Nexus S.

If you have got any questions/ queries or you're stuck anywhere in the mid process, comment here. I will try my best and provide you an helping hand. :)