I see that some rooting guides say that rooting involves:

  1. Download a SuperSU as a zip file that would be accessible to the phone (e.g. the sdcard).
  2. Unlock the phone's bootloader.
  3. Booting into a "custom" recovery mode. E.g. TWRP or CWM. Either temporarily booting using fastboot or flashing the custom recovery to the phone and then booting.
  4. Use the custom recovery mode to install the downloaded SuperSU zip file.
  5. Reboot the phone into normal mode and root access should be A) available and B) managed by the SuperSU program.

However, I also see that SuperSU is also on the Play Store. Installing from the Play Store does not promise any root access. (It actually assumes you already have it.)

So, my questions are:

  • What is different between these installation methods practically?
  • What is are the technical differences in actions or restrictions?
  • And how can/does the custom recovery installation method provide root access whereas the Play Store method can not?
up vote 23 down vote accepted

Root access (typically) requires several components that work in concert with one another. A somewhat simplified view of what you need is:

  • A native su binary. This can be invoked from the command line or from applications. It is what actually performs the act of switching users, and grants a process root permission.
  • A "gatekeeper" application, that regulates which other apps and processes are allowed to invoke su to gain root privileges.

Think of the SuperSU application as being a sort of graphical front-end for the su binary.

Because of the way directory/file permissions are configured on Android, you need to have the su binary on your /system partition in order for it to work. Putting elsewhere will not suffice, because it will not have the permissions it needs to actually allow processes to switch users.

Normal applications (without root) cannot write to /system, so the SuperSU application itself cannot simply install su where it needs to be. This is the reason why you will not have root if you install SuperSU from the Play Store without taking any other steps. All you have is the front-end, but not the underlying pieces that are necessary. You only have half of what you need for root, and no way to get the other half from the SuperSU application alone.

Therefore, the most common way to get the su file in the proper place is to install it from recovery, since the recovery system has full access to the device storage and can install files anywhere it wants. Once that is done, SuperSU and su can talk to each other and provide root access to other processes.

The recovery installation file also installs SuperSU because it is convenient, and putting it in /system prevents it from being erased by a factory reset. However, if you wanted to, you could install only su from recovery and then get SuperSU from the Play Store. It would function just fine. Similarly, you can update SuperSU from the Play Store later on and it will continue to function (because su is already in place at that point).

  • Question: Even if you had su in /system, would you or apps still have root access even without SuperSU? You might want to rephrase SuperSU as being the graphical front-end, and the "gatekeeper". – geffchang Jan 24 '15 at 7:56
  • 2
    I think it depends on how the su binary was built. Towelroot uses one that requires no additional app (it approves everything), but I'm not sure if SuperSU works that way in the absence of the app. – eldarerathis Jan 26 '15 at 15:32

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.