Reply
Thread Tools
Posts: 397 | Thanked: 185 times | Joined on Oct 2011
#1
I'm curious how does rooting work in Android? I'm writing this with limited knowledge of Linux in genera and even more limited knowledge on Android.

Still, I do know that in Linux system that I encountered thus far, root is just a privilege to "mess" around the system at root level, which normally required a separate "login" on each session (with password). This in theory should give good protection so that malware cannot mess around your stuff without your explicit permission via the input of your password.

However, I kept hearing the term "Root" in Android which requires some painful modification before they can gain the privilege, something that I don't quite understand why. Furthermore, once root privilege "unlocked", how can the user access root? Since there isn't a terminal, or am I correct to assume that once root is "unlocked", the OS will remain in Root for the rest of the time? Please enlighten me. Thanks
 

The Following User Says Thank You to kai_en For This Useful Post:
MohammadAG's Avatar
Posts: 2,473 | Thanked: 12,265 times | Joined on Oct 2009 @ Jerusalem, PS/IL
#2
Rooting Android is simply installing the su binary, in one way or another, on the device.
The su binary is modified in a way that it displays a dialog, asking to grant or deny permission from the user, once granted, it's similar to running then sh command.
Apps that use root simply execute commands in a shell (by running su -c or by using a shell and writing to its stdin, and parsing stdout).
The difficult part in rooting is getting the binary installed on the device, since it has to be in /system which is read-only, so you'd need to find a way to remount it as RW, with exploits to gain privileges or recovery which unpacks zips to /.
 

The Following 2 Users Say Thank You to MohammadAG For This Useful Post:
Posts: 397 | Thanked: 185 times | Joined on Oct 2011
#3
Originally Posted by MohammadAG View Post
Rooting Android is simply installing the su binary, in one way or another, on the device.
The su binary is modified in a way that it displays a dialog, asking to grant or deny permission from the user, once granted, it's similar to running then sh command.
Apps that use root simply execute commands in a shell (by running su -c or by using a shell and writing to its stdin, and parsing stdout).
The difficult part in rooting is getting the binary installed on the device, since it has to be in /system which is read-only, so you'd need to find a way to remount it as RW, with exploits to gain privileges or recovery which unpacks zips to /.
Would that be technically lead to insecurity? Granting permission by a simple yes or no since the permission mechanism isn't exclusive to the specific user like a password do.
 

The Following User Says Thank You to kai_en For This Useful Post:
MohammadAG's Avatar
Posts: 2,473 | Thanked: 12,265 times | Joined on Oct 2009 @ Jerusalem, PS/IL
#4
Yes, you could set a numerical PIN code in the SuperSU configuration app, but since I lock my device I don't have one.

On android 4.2, which has multiuser support, only the owner can grant root permissions.
 

The Following 2 Users Say Thank You to MohammadAG For This Useful Post:
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 01:36.