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.

What is the default password for the Android root account? Can I change the root password after rooting my android device by simply typing passwd?

How does the rooting process work? If I use a "one click root" app, what is it doing to my phone?

share|improve this question
1  
its not an iPhone there is no password. –  schwiz Dec 1 '10 at 21:42

3 Answers 3

up vote 29 down vote accepted
+50

root in Linux (or any Unix-like system) is just the user with User ID 0. The su program (which actually stands for "Switch User", not "Super User") is just a program to start another program with a different user ID than the starting program (by default to uid 0, which is to user root). Android does not use the traditional /etc/passwd, however it still uses Linux User ID and Group ID for managing permissions.

If you want to intercept su requests so you can ask for password or enforce other rules, you will need to replace /sbin/su with your own version of su. Alternative approach is the one described here: http://www.koushikdutta.com/2008/11/fixing-su-security-hole-on-modified.html though that will require applications to cooperate by firing an Intent when they want to switch user.

Android security framework is more or less like this: each installed application runs on its own User ID (selected at installation time), and application permissions is implemented as user groups.

Can i change the root password after rooting my android device by simply typing "passwd"?

Android does not use /etc/passwd so it also does not have passwd program.

how is the rooting process working ? i mean what is the "one click root" apps doing to my phone?

I'm not quire sure with the exact process myself, you probably want to ask to rooting developers. However, my guess is it just reverts the security check that originally prevent developer from setuid 0.

And im a developer, so how can i find hidden APIs (like iOS) for rooted app development ?

Since Android is open source, there is no truly hidden API in Android. However, there are some unpublicized or undocumented APIs, you can browse for this in Android's source code. However, these APIs are not about root developments, they're usually in-development APIs that are not ready yet or is too localized for specific purpose that is not useful for public developer (or perhaps Google just haven't realized their usefulness yet). You are not restricted from using these APIs, but since these are not an officially supported APIs, they may disappear or break backward compatibilities in the future. If you need to use these APIs make sure your app breaks gracefully.

share|improve this answer

The problem with a rooted android is the same as anything running a *nix OS with a root password unset/null .... any user can type "su" and gain root level (superuser/full administrative permissions) access to the entire system without providing a password. Put bluntly, you have a totaly unprotected system. As far as I have been able to find, the closest thing that gets android at least close to proper root protection is busybox that has been compiled with /etc/passwd and /etc/shadow support. But once you get this installed and working correctly, you would need to identify every program that needs root level permission and you would have to change the ownership to root and set the SUID bit on the file (chown {file_name} root:root; chmod 4755 {file_name}) .... The way the android OS is currently designed makes it a single user oriented OS that is protected by 1. not allowing anyone root access and 2. make all the system critical files read only. For the people that are *nix savy, this sucks ... for the people that basically have no clue, this protects the system and the other people that your system could negatively impact due to ignorance (like getting infected with a SPAM bot installed with root level access on your device because you did not protect the root account with a proper password...).

share|improve this answer
1  
This doesn't answer the question, it's just a rant about Android. –  Dan Hulme Jun 25 '13 at 21:40

Not a dev, but here's my best stab at an explanation as I understand it (assuming I've understood your question). Hopefully I'm not too far off the mark...

All the 'rooted' ROMs I have used manage root access user the SuperUser application - i.e. when you start an app that wants to run with SuperUser privileges, the SuperUser application will prompt the user to grant the 'root' application these permissions. The SuperUser application then maintains a white-list of apps that have been granted these permissions.

This is the same for Console emulators, etc, so you grant access to the console application - you don't need to enter a password within the emulator.

I don't think you need to worry about the root password for this.

With regards to hidden APIs - I don't think they are "hidden" as such, as the Android OS is open sourced in the first place.

share|improve this answer
    
is correct. You don't have to know/need a root password, instead there is a SuperUser app that will prompt you every time you are asked for root access. –  Bryan Denny Nov 19 '10 at 14:32
1  
i have a rooted phone and i have SU installed,but what if i dont want to use SU app for managing my apps and how to manually manage the password.anything related to android internal security structure will be useful –  Aji Nov 20 '10 at 5:28
    
I'd like to know the same Aji. –  Elysium Feb 25 '13 at 13:29

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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