网上查到的方法 Process process = null; DataOutputStream os = null; try { String cmd = "chmod 777 " + getPackageCodePath(); process = Runtime.getRuntime().exec("su"); // 切换到root帐号 os = new DataOutputStream(process.getOutputStream()); os.writeB
[Android]Android 代码判断是否获取ROOT权限 方法比较简单,直接粘贴代码 public synchronized boolean getRootAhth() { Process process = null; DataOutputStream os = null; try { process = Runtime.getRuntime().exec("su"); os = new DataOutputStream(process.getOutputStream());