判断Android设备是否已Root
Code base on [softctrl/roottools][1]
Add it to your build.gradle with:
allprojects {
repositories {
maven { url "https://jitpack.io" }
}
}
and:
dependencies {
compile 'com.github.coleflowers:roottools-android-studio:v1.0'
}
and:
import com.stericson.RootTools.RootTools;
if (RootTools.isRootAvailable()){
} else {
}
[1]: https://github.com/softctrl/roottools