title: Trying to create a file in Android: open failed: EROFS (Read-only file system)
body: <p>This line:</p>
  
  <pre><code>final FileOutputStream outputStream = new FileOutputStream(name);
  </code></pre>
  
  <p>results in a <code>FileNotFoundException</code> with the message being <code>/2ozjfFQzwv: open failed: EROFS (Read-only file system)</code> where "2ozjfFQzwv" is what I passed as the name of the file.</p>
  
  <p>I have tried this with and without the <code>WRITE_INTERNAL_STORAGE</code> permission. How do I create this file for writing?</p>
  
  <p>Alternatively, I just want to be able to give an image to a new activity, and it is too large to serialize it in an extra. Is there an easier way than writing it to a file then reading from it again? All the questions on here seem to be about writing to an SD card, which I don't want to do because many people don't have SD card slots.</p>