AndroidSerialPort
AndroidSerialPort copied to clipboard
构造方法中尝试进行提权会导致进程被系统直接杀掉,try-catch也无效
Process su = Runtime.getRuntime().exec(mSuPath); String cmd = "chmod 666 " + device.getAbsolutePath() + "\n" + "exit\n"; su.getOutputStream().write(cmd.getBytes());
建议通过标志位决定是否需要进行提权操作