所以我只是想修改家庭成员手机上的主机文件。我已将手机置于调试模式并提取主机文件,对其进行编辑,但是当我尝试推送它时,我收到消息“adb:错误:无法将‘D:/hosts\hosts’复制到‘/system’ /etc/hosts/hosts':远程无法创建文件:不是目录”
这是我使用过的命令:
adb pull /system/etc/hosts D:\hosts
/system/etc/hosts: 1 file pulled. 0.0 MB/s (56 bytes in 0.003s)
adb push D:\hosts /system/etc/
adb: error: failed to copy 'D:\hosts\hosts' to '/system/etc/hosts/hosts': remote couldn't create file: Not a directory
Run Code Online (Sandbox Code Playgroud)
这是我第一次使用 android debug/adb,我读过的其他内容都没有帮助。提前致谢。
编辑:所以我取得了一些进展。我意识到主机文件不在主机目录中,所以我将其更改为adb push D:\hosts /system/etc仍然不起作用,但adb push D:\hosts\hosts /system/etc给了我响应adb: error: failed to copy 'D:\hosts\hosts' to '/system/etc/hosts': remote couldn't create file: Read-only file system 所以看起来我的问题现在在adb shell chmod
EDIT2:所以经过一些更多的研究,我在 Android 上发现了这个只读文件系统。当我尝试时,mount -o rw,remount /system我得到了mount: …