I am copying a pre-existing database to /data/data/packagename/databases using code learned from using-your-own-sqlite-database-in-android-applications
When you copy database from your assets directory for example, then you must have android_metadata table created in it already. This table should have two columns: