Editing /system/etc/hosts on Android Emulator in Ubuntu
<p>I need to add an entry to the <code>etc/hosts</code> file on an android emulator.
Following all the advice online, I tried modifying the filesystem as read write through <code>adb</code>. Then I would modify the file. </p>

<pre><code>su
mount -o rw,remount /system
</code></pre>

<p>Then I append the <code>etc/hosts</code> via cat</p>

<pre><code>cat &gt;&gt; /system/etc/hosts
</code></pre>

<p>I type my text, then press enter. I recieve the following error:</p>

<blockquote>
  <p>/system/bin/sh: cat: : Read-only file system</p>
</blockquote>

<p>When I try to mount as read, write again, I get an error:</p>

<blockquote>
  <p>mount: Read-only file system</p>
</blockquote>

<p>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. </p>

<p>I've tried using <code>adb push</code> and <code>adb pull</code>. It works in different directories, but I can't modify the <code>/system/etc</code> directory. </p>