title: Exception "open failed: EROFS (Read-only file system)" thrown by
body: <p>First, I did read <a href="https://stackoverflow.com/questions/15711098/trying-to-create-a-file-in-android-open-failed-erofs-read-only-file-system">this post</a> about this exception carefully, but the answers cannot explain my case. I don't think permission is an issue here.</p>
  
  <p>The code:</p>
  
  <pre><code>Serializer serializer = new Persister();
  File fFoo= new File(context.getFilesDir(), "foo.xml");
  serializer.write(fooObject, fFoo);
  </code></pre>
  
  <p>serializer.write() throws the following exception <strong>once in a while</strong>:</p>
  
  <pre><code> Stack trace: java.io.FileNotFoundException: /data/data/net.foo.appfoo/files/foo.xml: open failed: EROFS (Read-only file system)
      at libcore.io.IoBridge.open(IoBridge.java:460)
      at java.io.FileOutputStream.&lt;init&gt;(FileOutputStream.java:88)
      at java.io.FileOutputStream.&lt;init&gt;(FileOutputStream.java:73)
      at org.simpleframework.xml.core.Persister.write(SourceFile:1198)
  </code></pre>
  
  <p>Could anyone point to a possible scenario for this to happen?</p>