function isRoot() {
var file = null;
var paths = ["/system/bin/", "/system/xbin/", "/system/sbin/", "/sbin/", "/vendor/bin/", "/su/bin/"];
try {
for (let path in paths) {
let file = new java.io.File(paths[path] + "su");
if (file.exists() && file.canExecute()) return true;
}
} catch (x) {
toast("错误" + x)
}
return false;
}
autojs 判断root
-
WebView Android 11评论你