public boolean isRooted(Context context) {
File sufilebin = new File("/data/data/root");
try {
sufilebin.createNewFile();
if (sufilebin.exists()) {
sufilebin.delete();
}
return true;
} catch (IOException e) {
if (getPacakgeInfo(context, "com.noshufou.android.su") != null
|| getPacakgeInfo(context, "com.miui.uac") != null) {
return true;
}
return false;
}
}
本文介绍了一种通过创建并删除特殊文件来判断Android设备是否已被root的方法,利用此方法可以检查是否存在特定的root包。
8342

被折叠的 条评论
为什么被折叠?



