Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

Possible Duplicate:
I've rooted my phone. Now what? What do I gain from rooting?
What does “to root a phone” mean?

I just spent half a day finding a rooting guide for Nexus S and I was wondering why root accounts aren't available on Android phones from the beginning? Being derived from Linux, why isn't it like on Linux with the root account and other accounts?

I am thinking maybe malware protection, but there are malicious software that can do harm without root account right? What are the major benefits?

share|improve this question

marked as duplicate by GAThrawn, jlehenbauer, Al E., Flow, ce4 Aug 14 '12 at 21:19

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
edit your title because it contradicts your question, bad tagging too. Having devices not give you Super User permissions basically helps novices from accidentally misusing important files, directories or system resources thus potentially damaging their devices, gives the rom makers a place to store their own applications and content without worrying users may delete them (see, bloatware), prevents you from flashing roms or do other things that legally may void your warranty etc.. –  svarog Jun 21 '12 at 18:45
    
It is "like on linux". The root account and other accounts are always there, you just don't have access to them. –  user606723 Jun 21 '12 at 18:49
5  
Android is not derived from Linux. It uses the Linux kernel. –  Richard Borcsik Jun 21 '12 at 18:58

1 Answer 1

up vote 3 down vote accepted

why root accounts aren't available on Android phones from the beginning?

Standard android apps are subject to Android permission system, which requires apps to declare the permission they require in a Manifest file. An app that have root access can easily circumvent around this permission system.

Being derived from Linux, why isn't it like on Linux with the root account and other accounts?

It is just like Linux. Even in desktop Linux distros, notably Ubuntu, the standard root account is disabled by inaccessible password.

I am thinking maybe malware protection, but there are malicious software that can do harm without root account right?

Yes, for example, there are malware apps that can send your contact lists to a shady server in a third world country. In a phone without root, these malicious apps will have to declare the permission to read your contact database in the Manifest, which is read and displayed before installing an app, giving you the chance to cancel installation. In rooted phones, it is possible for an app to read your contact database without explicitly declaring it in the Manifest, by asking for root permission instead. There are many other potential security breaches that can simply be avoided or minimized by disabling root access.

Also, in some systems, root can modify system files; modifying system files can make it impossible to completely revert to factory default (because those modifications would persist after the revert). Without root, one would have to use the bootloader to flash system file; greatly reducing the risk of malicious apps installing itself in a way that will persist over a factory reset.

Shipping phones without root also reduces the cost of customer support, as the number of ways that a customer may shoot him/herself in the foot are greatly reduced.

"With great power comes great responsibility", The sudo Lecture, also Ben Parker.

share|improve this answer
    
the standard root account is disabled by inaccessible password. Not really. The "owner" (first user created) can easily access it using sudo su - (especially on Ubuntu, yes). If afterwards he calls passwd, he can even login using root and the password he assigned. So exactly this one of the points where Android differs from Linux. –  Izzy Feb 1 '13 at 15:06
    
@Izzy: in Unix/Linux terminology, a "disabled" account is an account that is set to an unusable password. You're correct to say that other users accounts can still run setuid executable to a "disabled" account to effectively gain their privilege. However, this is not really a point of difference between Linux and Android, because both OS behave the same in this respect. Instead, the major difference is that neither su nor sudo is preinstalled in Android. –  Lie Ryan Feb 1 '13 at 20:51
    
OK, I won't split hairs on that -- put that way, you are 100% correct: without a working su/sudo, one cannot gain su privileges -- and stock Android comes without them. –  Izzy Feb 1 '13 at 22:42

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