0

I copy database from other app package in Download folder, i do it by root and terminal commands. I have permissions on external storage, But when i try to open database, i have that exception, how to fix that ? If try to open database on desktop, all ok.

android.database.sqlite.SQLiteDatabaseCorruptException: malformed database 
    schema (part_idx_MESSAGES_LIKES_read_0) - near "WHERE": syntax error (code 11): 
    , while compiling: select name from sqlite_master where type='table'
  • I am not sure about the corruption, but a work around could be to dump the schema and data from the original database into a textfile and then run the scripts on the new database location. Helpful explanantion at: http://www.sqlitetutorial.net/sqlite-dump/ – Lew Perren Jun 30 '17 at 08:36

2 Answers2

0

The database uses features introduces in a recent SQLite version (probably an expression index), and the SQLite library on Android is too old.

CL.
  • 173,858
  • 17
  • 217
  • 259
0

I would comment on @CL's post, but I do not have enough reputation so I will add as an answer and it may get moved. Anyway, assuming @CL is right, and I think he is, my suggestion below the question of a work around using a schema and data dump would be a way to transfer between the different versions. I hope it helps.

Lew Perren
  • 1,209
  • 1
  • 10
  • 14