Skip to content Skip to sidebar Skip to footer

Testing If A Phone Is Rooted

Possible Duplicate: Determine if running on a rooted device I would like to know just whether or not a phone is rooted, without requesting root privileges. How can I do that? T

Solution 1:

Option 1. It is possible, it doesn't need any special permission.

Option 2. The rooted phone may not come with any Superuser manager application.

Option 3. As you said, it's not a good way to detect.

Besides, there's another option that is to check ro.build.tag (using getprop | grep ro.buil.tag or android.os.Build.TAG) if it contains testkeys string.

Edit: for option 1, I would suggest you find by setuid/setgid permission (i.e. find / -perm -2000 -o -perm -4000, and check if su is in the list)

Solution 2:

You cannot reliably do this, as what it means for a phone to be "rooted" is not always the same. What all the proposals you will get do is test for some of the popular root-related tools. But it is not possible to detect if the phone has been rooted in a way that does not utilize those tools.

Post a Comment for "Testing If A Phone Is Rooted"