谁能建议如何使用ADB编辑主机文件?

发布于 2025-02-09 06:07:06 字数 761 浏览 1 评论 0原文

在运行推动命令时会遇到错误,并且无法进入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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

憧憬巴黎街头的黎明 2025-02-16 06:07:06

由于安全限制,您无法在标准的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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文