This question already has an answer here:
- Determine if running on a rooted device 20 answers
I want to programatically find in my application if the android phone is rooted. I found many links like: Determine if running on a rooted device Effective way to programatically check if I'm rooted on Android? discussing on the same topic. However, as mentioned in those links there is no one and definite way to find out. These posts are pretty old and I was wondering if there is anything better to achieve it now in recent releases?
Thanks in advance!
You can use the roottools library. They offer a method to check for root access. https://code.google.com/p/roottools/
I've wrapped this code (working ok without any other external jar/lib) from RootTools