adb push 失败提示 ‘Read-only file system’
$ adb push ./xxx /xxx/
failed to copy './xxx' to '/xxx/xxx': Read-only file system
解决方法:
$ adb root
restarting adbd as root
$ adb remount
remount succeeded
$ adb push ./libbacktrace.so /system/lib/
2783 KB/s (58588 bytes in 0.020s)
已经按照上面的步骤做了,还是提示 ‘Read-only file system’怎么办
$ adb shell
# mount
/dev/block/by-name/android_system /system ext4 ro,seclabel,relati me,data=ordered 0 0
可以看到/system还是只读属性‘ro’,接下来我们把它remount成rw
#mount -o remount -o rw /system
#mount
/dev/block/by-name/android_system /system ext4 rw,seclabel,relati me,data=ordered 0 0
tips:
先 adb root 再adb remount 否则会出现下面的情况
$ adb remount
remount of system failed: Permission denied
remount failed
可能需要adb reboot 注意看命令行中的提示