如何在 G1 电话上设置主机名
我有一部已 root 的 G1 手机,我想设置其主机名。 作为 root,我可以运行 hostname
命令并设置它,但该名称在重新启动后无法保留。
首先,我尝试创建一个仅包含我的主机名的 /etc/hostname
文件,但这不起作用。
接下来,我像这样编辑 /etc/hosts
:
127.0.0.1 g1-phone localhost
但是也失败了。 还有其他方法可以尝试永久设置主机名吗?
I have a root'd G1 phone, and I would like to set its hostname. As root I can run the hostname
command and set it, but the name does not survive reboot.
First, I tried creating a /etc/hostname
file that only contained my hostname, but that did not work.
Next, I edited /etc/hosts
like this:
127.0.0.1 g1-phone localhost
However that failed as well. Are there any other methods I can try to set the hostname permanently?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
适用于 Android 手机的 Cyanogen ROM 包含您可以自定义的 userinit.sh 脚本。 关于页面对其进行了如下描述:
http://www.cyanogenmod.com/about
我还没有'我尝试将主机名命令放在那里,因为我在论坛上读到,很容易破坏该脚本,要么变砖,要么必须重置手机。
Cyanogen ROM for Android phones includes a userinit.sh script that you can customize. The About page describes it as such:
http://www.cyanogenmod.com/about
I haven't tried putting the hostname command in there because I have read in the forums that it is easy to break that script and either brick or have to reset your phone.