How to run rename shell command in android app (rooted)
I'm new to Android. I'm trying to run a shell command to rename a file in the system. I've got root access to it. The shell command: $ su # mount -o remount,rw /system # mv system/file.old system/file.new I have tried this but doesn't work: public void but1(View view) throws IOException{ Process process = Runtime.getRuntime().exec("su"); process = Runtime.getRuntime().exec("mount -o remount,rw /system"); process = Runtime.getRuntime().exec("mv /system/file.old system/file.new"); } You can run more then one command using the same process, by writing the commands in the process's OuputStream .