File device = new File(PropertiesHelper.getValue(Constants.SERIAL_PORT_DEVICE_FILE));
if (!device.canRead() || !device.canWrite()) {
/* Missing read/write permission, trying to chmod the file */
Process su = Runtime.getRuntime().exec("/system/bin/su");
String cmd = "chmod 666 " + device.getAbsolutePath() + "\n" + "exit\n"
android在apk中获取root权限,并执行命令(改变文件权读写限)
最新推荐文章于 2024-03-03 22:06:55 发布