title: Externally generated SQLite database considered read-only by Android's SQLiteOpenHelper
body: <p>I have an SQLite database that I have generated using the SQLite JDBC connector found <a href="http://www.zentus.com/sqlitejdbc/" rel="nofollow">here</a>.</p>
  
  <p>I have then copied this database to my Android phone's SD card, and attempted to open it, using an SQLiteOpenHelper. I get the following exceptions:</p>
  
  <pre><code>ERROR/SQLiteOpenHelper(7373): android.database.sqlite.SQLiteException: attempt to write a readonly database: BEGIN EXCLUSIVE;
  
  ERROR/AndroidRuntime(7373): Caused by: android.database.sqlite.SQLiteException: Can't upgrade read-only database from version 0 to 1: /mnt/sdcard/4Trak/4Trak.db
  </code></pre>
  
  <p>This doesn't make any sense to me. Why is it a read-only database? I was able to write to it to generate it in the first place, and again when I realised I would need an android_metadata table, and added it using an SQLite browser. </p>