I am unable to find out this information in the db file. where does exactly android store database version info?
+6
A:
You can read the version using android.database.sqlite.SQLiteDatabase.getVersion().
Internally, this method executes the SQL statement "PRAGMA user_version". I got that from the Android source code.
In the database file, the version is stored at byte offset 60 in the database header of the database file, in the field 'user cookie'.
Thomas Mueller
2010-09-14 18:52:56
that was useful, but my question is where does this version info get stored on the filesystem (or may be in database file)?
bhups
2010-09-15 03:23:48
It's stored in the database header (I updated my answer).
Thomas Mueller
2010-09-15 04:12:29