Android Genymotion:编辑/system/etc/hosts文件
我目前正在努力修改我的Genymotion Android emulator的主机文件 众所周知的重新安装、拉入和推入方式在使用Genymotion时似乎根本不起作用,因为文件系统总是只读的,并且重新安装被拒绝 早些时候,我认识到Genymotion VM已经随superuser一起提供,所以我打开了shell并进行了su'd,但问题是相同的:文件系统是只读的 有人知道如何在Genymotion VM中更改该文件吗 谢谢Android Genymotion:编辑/system/etc/hosts文件,android,genymotion,root,Android,Genymotion,Root,我目前正在努力修改我的Genymotion Android emulator的主机文件 众所周知的重新安装、拉入和推入方式在使用Genymotion时似乎根本不起作用,因为文件系统总是只读的,并且重新安装被拒绝 早些时候,我认识到Genymotion VM已经随superuser一起提供,所以我打开了shell并进行了su'd,但问题是相同的:文件系统是只读的 有人知道如何在Genymotion VM中更改该文件吗 谢谢 Arne运行Genymotion Android emulator,并在控
Arne运行Genymotion Android emulator,并在控制台中介绍以下说明:
它适合我,我希望也适合你。是的,这个问题存在,并且adb root无法在windows上解决它,它也无法从eclipse中编辑/替换 相反,在Genymotion上安装Total Commander(如果您安装了谷歌应用程序,它非常简单),然后转到您想要编辑的文件,长按并选择edit with Total Commander Editor。它将请求根权限,格兰特。我正在使用这个:
ip="$(ifconfig | grep -A 1 'eth0' | tail -1 | cut -d ':' -f 2 | cut -d ' ' -f 1)"
adb root
adb remount
cat /etc/hosts|sed 's/127.0.0.1/'$ip'/' > /tmp/hosts-adb
adb push /tmp/hosts-adb /system/etc/hosts
基本上,这会获取您的主机文件,将所有127.0.0.1更改为您的本地网络ip,并将其发送到genymotion。adb重新装载的正常方法对我来说非常有效。当您尝试重新安装时,会收到什么错误消息?您使用的是哪个版本的GenyMoon?有没有其他设备连接到adb?我也有同样的问题,这让我抓狂这对我来说很好,只是我不得不修改顶行:
ip=“$(ifconfig | grep-a1'en0'| tail-1 | cut-d':“-f2 | cut-d'-f2)”
简单高效这对我来说也很有效!非常感谢你的帮助!最重要的步骤是重新安装adb。如果adb shell
in并使用linux命令重新安装,则它将不起作用。在adb重新装载后
,您还可以使用shell中的vi
编辑文件。