Android examples for Android OS:Shell
chmod file mode by path via shell
//package com.java2s; import java.io.IOException; public class Main { public static void chmod(String permission, String path) { try {//from ww w . j a v a 2 s .c o m String command = "chmod " + permission + " " + path; Runtime runtime = Runtime.getRuntime(); runtime.exec(command); } catch (IOException e) { e.printStackTrace(); } } }