How can i check if android device is rooted or not? I am using the following code:
Process proc = Runtime.getRuntime ().exec ("su");
and when I run it on a device I got following exception.
Causes by:Permission denied
But running on an emulator does not give any exception.
I am using another way to check. Entering adb shell
in the commend line for emulator returns #, but for device writing adb shell
gives the following error:
shell@android:/ $ su
su
/system/bin/sh: su: not found
127|shell@android:/ $
So how can I check if device is rooted or not.
Thanks in Advance.