Process su = Runtime.getRuntime().exec(mSuPath); String cmd = "chmod 666 " + device.getAbsolutePath() + "\n" + "exit\n"; su.getOutputStream().write(cmd.getBytes()); 建议通过标志位决定是否需要进行提权操作
Process su = Runtime.getRuntime().exec(mSuPath);
String cmd = "chmod 666 " + device.getAbsolutePath() + "\n" + "exit\n";
su.getOutputStream().write(cmd.getBytes());
建议通过标志位决定是否需要进行提权操作