In my apps (rooted devide), I want to chmod some files, folders to read and write. My code's here:
String path = "/mnt/sdcard/.android_secure";
String[] chmod = { "su", "-c","chmod 777 "+path };
try {
Runtime.getRuntime().exec(chmod);
} catch (IOException e) {
e.printStackTrace();
}
File f = new File("/mnt/sdcard/.android_secure");
f.canRead();
But the file still unreadable!