[Galaxy S II Q&A, Help & Troubleshooting] avirk:
Hello guys I’m here with a noob guide for who are very new to Rooting and how to install a new ROM on SGS2, :)

But this guide after rooting process will be same to flash the Custom ROM on other devices as well.

Rooting of GB devices​

I'm not responsible for any harm to your device in this process, you are doing it on your own risk. By doing this you're voiding warranty of your product.

2.3.3/2.3.6 User should have to take a look on Chainfire's CFRoot method. However 2.3.3 can be rooted through recovery but 2.3.6 can't be without CFRoot method.

Needed tool for rooting GB

PC

Samsung USB drivers

Odin3

CFRooted stock kernel

Instructions-

Follow these instructions to the letter. Do not touch any buttons or checkboxes that are not listed below to touch!

Unzip the attached CF-Root-xxx-vX.X.zip

(USB) Disconnect your phone from your computer

Start ODIN

Click the PDA button, and select CF-Root-xxx-vX.X.tar

Put your phone in download mode

(USB) Connect the phone to your computer

Make sure repartition is NOT checked

Click the START button

Wait for the phone to reboot

Done

Now you have rooted phone with custom recovery. Thanks to [MENTION=631273]Chainfire[/MENTION] for his awesome work.

Rooting of ICS​

So for rooting the SGS2 we have a lots of guides but there is the much safe way to root it flashing the script via Stock recovery. So Philz has overcome to this problem with his awesome Kernel and with this thread named [ICS/JB]Universal Rooting for most phones, Any ROM, now with CWM6.

Instructions-

Copy the Root_XXX.zip file you downloaded to externalsd card

Boot into stock recovery (volume up+home+power), and select "apply update from external storage". Now select the Root_XXX.zip file downloaded above and you are rooted

To unroot, do the above steps and replace the file Root_XXX.zip by the attached Unroot_SuperUser-Busybox-Uninstaller-Update2-signed.zip. It will delete superuser, su and busybox packages.

Download links-

Root_SuperSU.0.98-Busybox.1.20.2-signed.zip

Unroot_SuperUser-Busybox-Uninstaller-Update2-signed.zip

Thanks to [MENTION=4666971]Phil3759[/MENTION] for his awesome thread. Now you need custom kernels which should have the custom recovery, for that you can use DorimanX or Siyah kernel which are brickbug free.

Or you can just download the PhilzKernelCWM.zip with your matched code or at least similar kernel code and put it on your external SD card and then reboot into recovery by Holding the three combo key (Volumeup + Home + Power) and then choose option “Install Update zip” and choose the PhilzCWM.zip and flash it. After flashing done, you have rooted your Phone successfully with SuperSU installed. Now reboot to the recovery again and backup your ROM.

For JB release rooting​

Just flash the philz kernel from the stock recovery and you are rooted.

Now time to Backup your current ROM before flashing the new Custom ROM on your device, it is recommended in case when something happen bad. If you are running 4.0.3 or 4.0.4 then the backup process is very simple just reboot into recovery and then touch the Backup option and that’s all, your all apps, contacts, sms and data will be backed up by default, and this backup will be placed on external sd card in Clockworkmod/Backup path by default.

But if you are running JB 4.1.2 then the backup job is not easy on all recovery’s. There is an extra folder called Preload is very important one where your all system apps have been placed, which is not included in simple backup process. So the drill starts here…..Reboot into recovery select option “Backup and Restore”

Now select the option “Advance Backup and Restore”

Now select the “Custom Backup Job”. There you have tick the “Preload” folder and then scroll down and “Start custom Backup job” And then it will ask where you want to store the backup on you “Intenal/External Stroage”. After selecting the storage path it will start the backup process. When it finished you are ready to install the new ROM.

Note: If you don’t want to do this manually then I recommend the Apolo kernel which can backup the Preload by default no need of custom backup

NOTE: Before doing the below steps, backup your all apps and data using “Helium” or “Go backup” from play store to restore them on your newly flashed ROM. As after wipe data/reset you will lost all your contacts, Sms’s, and app and their data.

Now select the option “Wipe Data/ Factory reset” and then choose the second option “Clean to Install a New ROM”.

Note: I’ve seen this option in Philz only which is for Samsung only, non Samsung users have to select the first option and then follow these steps:

Wipe cache

Advanced/Wipe Dalvik cache

Now Select the option “Install Zip” and choose your zip from either Internal SD card or External SD Card wherever you have put the downloaded ROM zip file and flash it. Let’s finish the process and now reboot your system, it will take about 5-10 Min on first boot so don’t panic.

My credit and thanks

A big thanks to my NeatROM family.