Android 判斷有無ROOT程式碼
public boolean isRoot(){
boolean bool = false;
try{
if ((!new File(“/system/bin/su”).exists()) && (!new File(“/system/xbin/su”).exists())){
bool = false;
} else {
bool = true;
}
} catch (Exception e) {
e.printStackTrace();
}
return bool;
}