title: SQLite & Android: unable to open database file - error 14
body: <p>I saw that a similar issue has been reported many times. In my case, I'm directly using the "C" API invoked using my own JNI library (not the Android Java layer), with the latest amalgamation 3.8.3. So I control what I'm dealing with.
  Then, on certain operations (UPDATE) I'm getting an error stating that it cannot open a database file. I don't get that with INSERT statements, only UPDATE.
  When I activate the SQLite error callback, I'm seeing the following:</p>
  
  <blockquote>
    <p>cannot open file at line 29299 of [6c643e45c2] os_unix.c: 29299: (13)
    open(./etilqs_1zMsiYdpXhd3JqY) - statements aborts at 36: [UPDATE
    .....]</p>
  </blockquote>
  
  <p>Digging this a little bit further, it appears to be related to the journal file. When I set the journal_mode to MEMORY using a pragma, then the issue disappears. But all the other modes, like WAL or TRUNCATED lead to the same error.</p>
  
  <p>When debugging the code from eclipse, I can see the -journal file being created when performing the INSERT. And then being removed when the transaction is complete. So it tells me that it has enough rights on the directory (/data/data//)</p>
  
  <p>Note that the exact same code works perfectly (C &amp; Java) on Windows, where I'm not getting the error. There is definitively something going on with Android and file access.</p>
  
  <p>I have a way to get the error reproduced systematically. If someone has some idea on what I should check, then I'll be happy to run some experiment and report the result.</p>