Sunday

Universal Rooting for most ICS phones, Any ROM, now with CWM6


Root your ICS phone S2 + Samsung + not Samsung phones - No more waiting for custom kernels



This topic provides universal root methods to bypass the use of custom kernels. I took the time to write it as I was tired from waiting for a Dev to publish a custom kernel for the last firmware released.
I will try here to reference most threads and ways to root your phone. Some methods will let you root as soon as you get the new ROM, no more waiting for some dev to release a kernel for you.
I will not list here custom kernels that come with root, you can find them in other threads.

As a general rule, do not forget to take extra precautions when you flash anything: ALWAYS DO A NANDROID BACKUP IN CWM




Method 1 - Recommended
Push superuser + Busybox (Now v1.20.2 from Linus Yang) in recovery





Now, on the i9100 and some other phones (N7000...), you can flash the attached signed zip files in stock recovery, no more need to CWM.
A BIG BIG THANK YOU TO Chainfire for his support that made it possible and to Entropy512 who pushed me to look for a fix

Attached is the CWM Recovery 4.x non touch version, confirmed safe for wiping. It will not superbrick your phone


>>>>>> Now it is even getting greater with attached Clockworkmod v6.0.1.2 !!!! <<<<<<
>>>>>> Also probably safe from brickbug <<<<<<



Pros

  • Universal and will probably work on any ICS phone, if you have a CWM image. No longer wait for a modded kernel
  • On the i9100 and some other phones (N7000...), you can now even root from the stock recovery, no need to the cwm image
  • No PC needed, only an android device and the zip files that you download to your sd card
  • Fully reversible unroot without PC needed
  • No Yellow Triangle (Only for phones with a zip CWM image)
  • No custom counter increased (Only for phones with a zip CWM image)
  • Only copies superuser +/- busybox, nothing else is touched, neither /data nor the kernel
  • No brick risk while flashing cwm even if things go wrong as it will be always overwritten by stock recovery after a reboot

Cons

  • None since I switched to the CWM4 and CWM6 recoveries (no more superbrick risks under 4.0.4 ICS kernels, only CWM5.x was affected)

Special notes about busybox
  • The zip files attached in this post install busybox only in /system/xbin. I do not put any symlink in /system/bin
  • The uninstaller in this post, only removes busybox package from /system/xbin. I do not delete any package put in bin, as it is assumed it was put there by another program, not my script. It will not remove any symlink either. So, run the Busybox Uninstaller v1.0 for that


This method was first inspired from Rachmat3 thread here and Chainfire script here (do not forget to thank them). I modified it to work in stock recovery, enhanced script, include Chainfire superSU last version + BusyBox last binary. I also keep a ChainsDD superuser version.


Instructions
  1. For phones affected by the superbrick bug (i9100, N7000) and that has a stock recovery accepting update.zip files (most phones with a temporary cwm.zip file at Clockworkmod site:
    You can flash the attached files directly in stock recovery 3e, no need to cwm:
    • Download the root file:
      - Root_SuperSU.0.96.Only-signed.zip for Chainfire SuperSU (the one that comes with CF_Root) without busybox.
      - Root_SuperSU.0.96-FreeSpace.zip for Chainfire SuperSU without busybox (use only if you have issues with previous one, usually for phones having a /system partition with 0 free space).
      - Root_SuperSU.0.96-Busybox.1.20.2-S2-signed.zip to install superSU + busybox v1.20.2 from Linus Yang.
      - Root_Superuser_3.1.3_Busybox_1.20.2-Update1-signed.zip if you prefer the classic ChainsDD superuser + Busybox from Linus Yang.
      - Root_Busybox_1.20.2_Only_XXX.zip to install only Busybox from Linus Yang.
      I advise Chainfire SuperSU for 2 reasons: it lets you unroot from within superSU application and it lets you migrate to ChainsDD superuser if you like later
    .
    • 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.

      For a complete removal of busybox, look here at my Busybox Uninstaller which will remove ALL busybox symlinks (over 600 files depending on installers used before):
      http://forum.xda-developers.com/show....php?t=1853419

    To get temporary cwm (to make nandroid backups...) or if stock recovery gives you a signature error, follow the next more universal steps.
    .
    .
  2. For most (if not all?) ICS phones having a CWM image at Clockworkmod site:
    • Download attached cwm-touch-6.0.x.x-i9100.zip for the i9100 Galaxy S2. This is the touch version but it also works with volume up/down keys and power button to select menu.
      CWM6 is now thought to be probably safe for wipe, no superbrick risks under ICS 4.0.4read more here

      I also attached the cwm6 non touch version and the recovery-clockwork-4.0.1.5-galaxys2.zip. CWM4 is also confirmed to be safe for wipe by Entropy512 Recognized Developer

      For other phones, download the cwm image from here http://clockworkmod.com/rommanager
    .
    • Put the previously downloaded cwm-touch-6.0.x.x-i9100.zip file on your external sd card
    • Download the attached root file you want as per instructions above
      I advise Chainfire SuperSU for 2 reasons: it lets you unroot from within superSU application and it lets you migrate to ChainsDD superuser if you like later
    • Copy the Root_XXX.zip file you downloaded to internal or external sd card
    • Boot into stock recovery (volume up+home+power), and select "apply update from external storage". Now select the cwm-touch-6.x.x.x-i9100.zip file you copied in previous step (this step gives a temporary flash that will disappear after reboot)
    • You get CWM recovery interface (this custom recovery is temporary, not permanent)
    • Inside CWM, select "install zip from sdcard". Then, select "choose zip from sdcard". Now, scroll down to the "Root_XXX.zip" file and hit power button to install it.
    • It will add SuperSU or Superuser last version apk to system/app, last superuser binary (su) to system/xbin and busybox last version to system/xbin, all with correct file permissions.
    • Reboot and you get permanent root + busybox installed on your stock kernel.
    • 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.

      For a complete removal of busybox, look here at my Busybox Uninstaller which will remove ALL busybox symlinks (over 600 files depending on installers used before):
      http://forum.xda-developers.com/show....php?t=1853419


Fix common issues: You end with both ChainsDD and Chainfire superuser and SuperSU

Also another symptom is having constantly superuser asking for updates from market.
Some people are getting duplicates from previous root methods using ChainsDD superuser instead of Chainfire superSU or vice versa when they come from SuperSU and switch to superuser.
Also, this can happen when you updated let's say to a future Chainfire SuperSU v1.0 and later you use one of my outdated scripts (with version 0.94 for example).

The cause is that I do not delete anything from /data/app. I can add it, it is not an issue, but till these brick things are fixed, I chose not to do it.

The solution is very easy:
Just uninstall from stock application manager all superuser applications. The /system/app application will stay as system applications cannot be removed normally in application manager
After that, just update your superuser application from market. Updates are put in /data/app and original copy will stay in /system/app.



Method 2
CF_Root + stock kernel + [optional] Mobile Odin Free version

Here, you use an older CF_Root kernel, and flash your newer stock kernel

  • Flash the CF_Root kernel with odin
  • No stock kernels for you? use Mobile Odin free version (see below)
  • After flashing the stock kernel, root will usually stay and you will be reverted back to your stock recovery instead of CWM recovery



Method 3
Insecure Kernels + SuperOneClick + [optional] Mobile Odin Free

Not tested by me. You get superuser instead of Chainfire superSU + an older busybox
  • No insecure kernel for your ROM? Just try a kernel from same ICS version, it usually works fine for rooting
  • Flash the insecure kernel with odin
  • Put your phone on USB debugging mode (System Settings / Developer Options)
  • Launch SuperOneClick and root using auto or psneuter method. Do not use the ZergRush Exploit as it is meant for older exploited GB versions
  • No stock kernel for your ROM? Use Mobile Odin Free version (see below)



Method 4
Insecure Kernels + S2 Root - For SAMSUNG Devices

  • It will do the same as in method 3, but using a newer and better supported tool than SuperOneClick
  • You have to flash an insecure kernel, root with S2Root and flash again your stock kernel
  • It roots using Chainfire SuperSU and busybox 1.20.1 at time of posting
  • Author is a recognized developer and offers great support
  • You are still depending on author to release a custom kernel for all your new ROMs



Mobile Odin Free version
Flash your stock kernel from complete ROM file

Now that Intratech stopped releasing stock kernels in his thread, rooting using methods 2 and 3 can be a problem. In fact, you will not be able to flash your newer original stock kernel after rooting with insecure or cf_root older kernel. You can look in abovelyriquidperfection thread for a stock kernel to flash in odin. But, if you do not like to wait for him to release a kernel, you can get Mobile Odin Free version

  • From your stock tar.md5 ROM file, extract the zimage file (your stock kernel)
  • Put zimage file on external sd card
  • Run Mobile Odin and specify the zimage file in kernel box like in this image:
  • Flash, you get your stock kernel and root is normally left



Mobile Odin Pro (Payed) version
Root + Flash - You should consider buying it.

With this method, you will have SuperSU from chainfire (that can be updated from market) but no Busybox.
You can install busybox from market or from attached CWM_Root_Busybox_1.20.2_Only_(No_SuperSU)-S2-Update2-signed.zip file in this thread

  • If you want to flash a full new rom, put the tar file on the external_sd. Point all boxes to the ROM tar file. Enable EverRoot option like in image below. Flash
  • If you flashed your ROM using odin and only want to root, proceed like in Example 4 above to flash only the kernel (zimage file from your actual ROM). Enable EverRoot option and flash
  • Now, install BusyBox from market or flash my CWM_Root_Busybox_1.20.2_Only_(No_SuperSU)-S2-Update2-signed.zip file with cwm to get last busybox.



Chainfire - adbd Insecure app
Getting switchable insecure kernel WITH stock kernel

One of the advantages for some people in CF_Root kernel is the insecure mode. Now, you can have insecure kernel like behavior without flashing a custom kernel. There is a magic app for that, signed Chainfire.
Thread + free download link here:
http://forum.xda-developers.com/show....php?t=1687590

And you can buy it from market to support author:
https://play.google.com/store/apps/d...chainfire.adbd

Instructions, quoted from chainfire
If you are running a stock (made by the phone manufacturer) kernel on your device, chances are adbd is running in "secure" mode, even if you are rooted. This app lets you run adbd in "insecure" mode, which gives you root access in "adb shell", allows access to system files and directories through "adb push/pull", and lets you run the "adb remount" command to make your /system partition writable.

Of course, your device must already be rooted for this to work. It may not work with "S-ON" devices and locked bootloaders.

This app does not make any permanent changes to your device - a reboot will undo any modification. That's why there is also the option to enable this feature at boot.

Note that if you have USB connected when the app activates or deactivates adbd root mode, you may need to unplug/replug the cable or run "adb kill-server" on your computer before adb will work again.