13

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?

1 Answer 1

23

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).

3
  • 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
    Commented Jan 24, 2015 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. Commented Jan 26, 2015 at 15:32
  • "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." Would you please provide a link that explains about this special configuration of the /system partition? What can binaries that are on /system do which is not allowed for binaries that are on /data? Commented Feb 10, 2019 at 7:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .