有两种命令:
android shell 命令实现复制文件
1、cat source_file > dest_file
2、dd if=source_file of=dest_file
Android remount命令的两种写法
remount命令的两种写法
不同系统的参数格式可能不一样,而且可能没有--help打印,记录一下:
mount -o remount -rw /system
mount -o remount,rw /system
有个需求,客户样机固件里面的jar包有些问题需要替换,但是样机已经卖到用户手上了
,这里需要用做过apk去给用户做替换处理;
String [] commands={"mount -o remount,rw /system"
,"dd if=/storage/sdcard0/framework.jar of=/system/framework/framework.jar"
,"reboot"
};
ShellUtils.execCommand(commands,true);
网友评论