title: Android FileInputStream/FileOutputStream inaccessible after reboot, before unlock
body: <p>I have a background service which is started after a reboot by a receiver which gets the ACTION_LOCK_BOOT_COMPLETED intent, and the service is started and running as expected after reboot, before the screen is unlocked.</p>
  
  <p>However, in this service, I need to access files in external storage, via FileInputStream and FileOutputStream. After the screen is unlocked, all of this works as expected, so I know the implementation is correct and the app has all the appropriate permissions, i.e. I have:</p>
  
  <pre><code>&lt;uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /&gt;
  &lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /&gt;
  </code></pre>
  
  <p>However, before the screen is unlocked, the files cannot be accessed, and I get:</p>
  
  <p>W/ContextImpl: Failed to ensure /data/user/0/{path}/files: mkdir failed: ENOENT (No such file or directory)</p>
  
  <p>W/FileUtils: Failed to chmod(/data/{path}/files): android.system.ErrnoException: chmod failed: ENOENT (No such file or directory)</p>
  
  <p>Is there some limitation that external storage cannot be accessed before the screen is unlocked, and if so, is there a way to get around that?</p>