adb 相关问题总结

1. adb shell权限问题
$ su //root权限来启动adb server
$ adb kill-server && adb start-server
* daemon not running. starting it now *
* daemon started successfully *
$ exit
$ adb shell //再次执行adb shell就可以了。

2. adb push 失败提示 ‘Read-only file system’
方法1:
$ adb root
restarting adbd as root
$ adb remount
remount succeeded
$ adb push ./libbacktrace.so /system/lib/
2783 KB/s (58588 bytes in 0.020s)

方法2:
已经按照上面的步骤做了,还是提示 ‘Read-only file system’怎么办
$ adb root
$ adb shell
$ mount //查看权限
/dev/block/system on /system type ext4 (ro,seclabel,relatime,data=ordered)
/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

原文地址:https://www.cnblogs.com/clovershell/p/10566474.html