1

I have problem with TitaniumBackup. I had it installed on my Android tablet which is rooted and using Android 4.4.2. It was working fine, but I had to do factory reset and after that, if I try to launch TitaniumBackup, I get 'Unfortunately, Titanium Backup has stopped'.

This is the logcat with the lines that contain references to TitaniumBackup.

Line 111: E/AndroidRuntime(26306): Process: com.keramidas.TitaniumBackup, PID: 26306
Line 112: E/AndroidRuntime(26306): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.keramidas.TitaniumBackup/com.keramidas.TitaniumBackup.MainActivity}: android.database.sqlite.SQLiteException: Can't downgrade database from version 7 to 6
Line 131: E/AndroidRuntime(26306):        at com.keramidas.TitaniumBackup.MainActivity.onCreate(Source)

The error mentions

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.keramidas.TitaniumBackup/com.keramidas.TitaniumBackup.MainActivity}: android.database.sqlite.SQLiteException: Can't downgrade database from version 7 to 6

How to mitigate this issue?

  • Can't downgrade database from version 7 to 6: looks like the Titanium Backup you used before the factory reset is newer than the current one. Have you updated it? – Andrew T. Jan 28 at 15:18
  • No, i didn't update it. – user1800997 Jan 28 at 18:50
  • Looks more that you downgraded your TitaniumBackup version. You have to use the same or newer version of TitaniumBackup you used for creating the backup. – Robert Jan 28 at 19:54
  • I didn't downgraded but this shouldn't matter anyway. After factory reset everything is deleted, right? It should not be any traces of previous Titanium Backup versions. – user1800997 Jan 29 at 7:42
  • You didn't mention the Android OS version, but on Android Marshmallow or later, app data can be backed up and automatically restored after doing factory reset/reinstall. – Andrew T. Jan 29 at 7:49
1

[...] android.database.sqlite.SQLiteException: Can't downgrade database from version 7 to 6

This is caused when an app tries to downgrade an SQLite database from newer version, but failed since the code handle that is not implemented. (For more technical explanation: Can't downgrade database from version 2 to 1 even after fresh install and re-run).

This can also happen on Android Marshmallow (Android 6.x) or later when the data is backed up and restored after doing factory reset, leaving the data with newer version, but the app in older version.

What the user can do:

  1. If the user wants to use the existing database: they have to find and use the version of the app that is using the current (7)/newer (>7) SQLite database version. Usually this means the user needs to update the app to the previous app's version (before the factory reset) or newer one (latest from the Play Store/developer's website).

  2. If the user doesn't care about the existing database: depending on the database location, they can remove the database by e.g. deleting the file manually (probably need root access), cleaning the app data, etc. and let the app recreate a new database with older SQLite database version (big potential of data loss from the previous database).

  • Where is this database located? – user1800997 Jan 29 at 11:17
  • I was able to manually downgrade the database version of an IceCatMobile database via sqlite3. Root is required. – Death Mask Salesman Jan 29 at 11:46

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.