androidlinuxauthenticationrootsu

How android/linux sets whether the root user is logged in or a normal user is logged in?


It seems almost every android device comes without root permission, so some people provide a new ROM to root it. How do they achieve it? (Do they change anything in init process, or do they change some apps' access attributes on the storage, such as launcher or toolkit, or some process's uid/gid?)

I have a non-root mobile and another rooted one. I can't find the difference between them. The launcher are both with a uid/gid exceeding 10000.

In Linux desktop, this is controlled through the login process. But I still don't know the key reason.

It's confusing.


Solution

  • On a rooted Android, you can install apps that require special access (like the hardware)

    Because the hardware manufacturers and the developers at Google did not want to let users tweak the hardware, the root user is blocked.

    For example you can run softwares like Titanium backup (for making backups of application data), SetCPU (for overclocking your Android) and LES (Linux enhancement suite) if you have a rooted phone. Note that the rooted phone will allow apps to run through root only when asked for. Otherwise all the apps will work as the normal user.

    In Linux, you can use the su command to get ALL the root permissions or sudo to get minimal root permissions (controlled su)

    You can get the superuser permissions by rooting the phone, installing a terminal (Better Terminal Emulator) and typing "su" into the console. (Click "yes" if Superuser asks for permission)