我是Android新手。我试图运行一个shell命令来重命名系统中的文件。我有root权限。如何在Android应用程序中运行重命名shell命令(已过滤)
shell命令:
$ su
# mount -o remount,rw /system
# mv system/file.old system/file.new
我都试过,但不起作用:
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");
}
我确定有错误信息或类似的东西......你为什么不分享你的问题? – mthmulders 2013-04-09 10:26:18