谁能建议如何使用ADB编辑主机文件?
在运行推动命令时会遇到错误,并且无法进入root模式。
:\Users\...>adb push "C:\Users\...Desktop\platform-tools_r33.0.2-windows\platform-tools\hosts" /system/etc/
C:\Users\...ools\hosts: 1 file pushed, 0 skipped. 0.0 MB/s (188 bytes in 30.981s)
adb: error: failed to copy 'C:\Users\...tools\hosts' to '/system/etc/hosts': remote couldn't create file: Read-only file system
m31s:/etc $ su
/system/bin/sh: su: inaccessible or not found
m31s:/etc $ vi hosts
/system/bin/sh: vi: inaccessible or not found
127|m31s:/etc $ nano hosts
/system/bin/sh: nano: inaccessible or not found
127|m31s:/etc $ gedit hosts
/system/bin/sh: gedit: inaccessible or not found
#unable to root mode
C:\Users\...tools>adb root
adbd cannot run as root in production builds
getting errors while running push command and unable to enter in root mode.
:\Users\...>adb push "C:\Users\...Desktop\platform-tools_r33.0.2-windows\platform-tools\hosts" /system/etc/
C:\Users\...ools\hosts: 1 file pushed, 0 skipped. 0.0 MB/s (188 bytes in 30.981s)
adb: error: failed to copy 'C:\Users\...tools\hosts' to '/system/etc/hosts': remote couldn't create file: Read-only file system
m31s:/etc $ su
/system/bin/sh: su: inaccessible or not found
m31s:/etc $ vi hosts
/system/bin/sh: vi: inaccessible or not found
127|m31s:/etc $ nano hosts
/system/bin/sh: nano: inaccessible or not found
127|m31s:/etc $ gedit hosts
/system/bin/sh: gedit: inaccessible or not found
#unable to root mode
C:\Users\...tools>adb root
adbd cannot run as root in production builds
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
由于安全限制,您无法在标准的Android手机中执行此操作。唯一的方法是扎根手机。
You cannot do this in a standard Android phone because of security restrictions. The only way to do it is to root your phone.