Determine if running on a rooted device

My app has a certain piece of functionality that will only work on a device where root is available. Rather than having this feature fail when it is used (and then show an appropriate error message to the user), I’d prefer an ability to silently check if root is available first, and if not,hide the respective options in the first place.

Is there a way to do this?

28 Answers
28

Leave a Comment