SQLite Forum

Why data is lost in SQLite database with WAL mode on when connection is not closed properly?
Login
I'm beginning to suspect this is an Android thing.  Please try

A) Run your original App (or an adapted version of it) on a computer, rather than your Android platform.  Kill it at the same place.

1) Check to see whether opening that database on the same computer retrieves the 'lost' data.
2) Do it again, but this time open the database after kill on your Android platform.

B) Then do it the other way. around. Prepare the database and WAL file on your android platform by killing the app as above.

 1) You already know that opening that database on the Android platform loses data.
 2) Do it again, instead of opening on Android, copy the database and WAL file to your computer, and open it on that.