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?
- Testing if
File.Exists("/system/bin/su")
? Not sure, I think I cannot due to permissions - Testing if Superuser app is installed? Hmm, I think I need a special permission to use
PackageManager
and Superuser is not the onlu su manager (I know SuperSU for example) - Trying to run
su
is not an option because it triggers the su prompt which is something I don't want in a non-root app
Any idea? My purpose is to obtain anonymous statistics on how many devices are rooted, obviously with user's consent :)