2

As I understand to "Root" a device, means to gain privilege to do all sort of things with the device, without restrictions, which probably means "root privilege".

Isn't that what "su" utility provide , i.e. root privilege ? I mean is all we need is to run su in order to have root privilege or are there any additional things, that should be done ?

4

Yes, the su utility is all you need, but the problem is putting the su binary (basically the .exe of Linux and Linux based-OS's) onto the phone. In order to put su onto the phone, you need root in the first place. su is usually added to the phone by unlocking the bootloader, which allows it to run a recovery which can flash su onto the phone.

  • I've create a new system.img with su inside, and flashed it into device, but it shows me ("ls") the su as "Permssion denied", though I created it with 777 permission. – ransh Nov 17 '16 at 5:43
2

In Android, all applications have User ID numbers. These ID numbers let the OS identify the apps and what privileges they have and to what they can access to.

There is a special user, whose ID number is 0. That is the root user and it has all privileges and can access everything.

When you root your device, you add a binary that lets other apps run with the privileges of the root user. The moderation of this binary is usually done with a GUI application like SuperSU.

Alternative methods of rooting have been invented after Android 6.0 implemented new bug fixes that prevented the traditional method from being used.

Also, with the introduction of SEAndroid, root user too now can be enforced to act in a way that it doesn't have limitless power anymore.

  • I've create a new system.img with su inside, and flashed it into device, but it shows me ("ls") the su as "Permssion denied", though I created it with 777 permission. – ransh Nov 17 '16 at 5:43
  • @ransh That's one way of telling you that you need a management app (like SuperSU). Look into the SuperSU flashable package and you'll see it installs a lot of stuff along with the actual binary. – Andy Yan Nov 17 '16 at 9:20
  • @ransh What su did you use? Most su binaries usually reply to the calls made by the apps in accordance with the lists generated by the GUI management apps like SuperSU. – SarpSTA Nov 17 '16 at 12:07
1

That's partly correct but you also need some way to manage root applications and deal with prompts. This is called a root manager. Some include SuperSU, Superuser, etc.

  • You don't strictly need a root manager, but it makes things more secure. – Death Mask Salesman Nov 17 '16 at 16:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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