Genymotion android仿真器adb外壳可以';t写入/etc/hosts

Genymotion android仿真器adb外壳可以';t写入/etc/hosts,android,android-emulator,Android,Android Emulator,我在本地主机下有一些虚拟主机,需要将其添加到Genmotion android emulator中的/etc/hosts中 对于我在windows cmd中使用的: adb shell mount -o remount,rw /system echo "192.168.xxx.xxx my_virtualhost" > /etc/hosts 我已尝试使用此虚拟设备: 谷歌银河Nexus-4.2.2-API 17-720x1280 一切都好。我得到了根shell,我的虚拟主机被添加到/

我在本地主机下有一些虚拟主机,需要将其添加到Genmotion android emulator中的/etc/hosts中

对于我在windows cmd中使用的:

adb shell
mount -o remount,rw /system
echo "192.168.xxx.xxx   my_virtualhost" > /etc/hosts
我已尝试使用此虚拟设备: 谷歌银河Nexus-4.2.2-API 17-720x1280 一切都好。我得到了根shell,我的虚拟主机被添加到/etc/hosts

但当我尝试在其他虚拟设备上执行相同操作时:Google Nexus 9-7.1.0-API 25-1536x2048不起作用,我得到了以下结果:

adb shell
mount -o remount,rw /system
echo "192.168.xxx.xxx   my_virtualhost" > /etc/hosts > /etc/hostsvbox86p:/ # mount -o remount,rw /system
mount: '/dev/block/sda6'->'/system': Device or resource busy
1|vbox86p:/ # echo "192.168.xxx.xxx   my_virtualhost" > /etc/hosts

你知道如何解决这个问题还是用另一种方式编辑/etc/host吗?

我的OnePlus 5也有同样的问题


必须将修改后的
hosts
文件上传到
/sdcard
,然后通过应用程序将其复制到
/etc/hosts
,该应用程序可以在运行中正确处理rw重新安装。

我的OnePlus 5也遇到了同样的问题

必须将修改后的
hosts
文件上传到
/sdcard
,然后通过应用程序将其复制到
/etc/hosts
,该应用程序可在运行中正确处理rw重新安装