I need to add an entry to the etc/hosts
file on an android emulator.
Following all the advice online, I tried modifying the filesystem as read write through adb
. Then I would modify the file.
su
mount -o rw,remount /system
Then I append the etc/hosts
via cat
cat >> /system/etc/hosts
I type my text, then press enter. I recieve the following error:
/system/bin/sh: cat: : Read-only file system
When I try to mount as read, write again, I get an error:
mount: Read-only file system
Can't figure out what to fix at this point. I have a feeling my filesystem settings is being updated to stay as read only.
I've tried using adb push
and adb pull
. It works in different directories, but I can't modify the /system/etc
directory.