User Tools

Site Tools


This is an old revision of the document!

Corrupted SQLite Database Repair

SQLite databases on Android devices are very stable by definition. However, we have experienced that databases can be corrupted. This may be due to wrong closing the database or killing Locus app. The result is that Locus Map is not able open the database file or the file deletes itself - this concerns both map files and points/track databases, all are SQLites. Luckily sometimes it is possible to repair such a corrupted database.

How to

Following steps require working with the command line.

  • Copy corrupted map file (or other sqlite database) from your device to PC
  • Download sqlite-shell from
  • Unpack it and place corrupted database file into the same directory as sqlite3.exe
  • Start cmd and navigate to the directory with the corrupted file
  • Run
$ sqlite3 mydata.db ".dump" | sqlite3 new.db
  • Try to import the fixed database

However, this is not always possible. The easiest and most reliable way is to restore the database file from the backup.

manual/advanced/map_tools/corrupted_sqlite.1446800664.txt.gz · Last modified: 2015/11/06 09:04 (external edit)