/** * 判斷當前手機是否有ROOT權限 * @return */ 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; } Log.d(TAG, "bool = " + bool); } catch (Exception e) { } return bool; }