Maybe you can test for the presence of the "su" command. It would just be as simple as testing if the file /system/xbin/su exists but I'm not sure how reliable that would be. Another possibility is to check for the presence of /system/app/Superuser.apk, but I also don't know how reliable that would be.
I wouldn't recommend having different behavior on your app based on that unless you intend to write an app that requires root functionality. Not everyone that roots their phone are pirates. There are still plenty of legitimate reasons for people to root their phones, especially if their phones are not running Froyo (which contains features that root users have had for a while). If you want to protect your app use LVL as Miguel said. On Nov 1, 1:42 pm, Tejas <[email protected]> wrote: > Hi, > > I would like to find out in my application if the phone is rooted or > not. > Is there any API that tests this ? > > Regards, > Tejas -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

