Backup on new HTC devices

HTC started to enable the new “write-ahead-log” transaction management for all SQLite databases on the phone, even when the application did not ask for it. The implications are that the database on these phones is now run in a mode which would require special attention by the application, since it fundamentally changes the way data is stored.

While it was previously valid to assume that at the end of a transaction, the new data was present in the database file, this is no longer the case when WAL is enabled. In this case, the new data is only located in a separate write-ahead log and NOT in the main database file, as it was the case with traditional rollback journals.

Since ECAS is currently not aware of this, a database backup will NOT contain all the latest data. To allow a full backup, ECAS now needs to trigger a flush of the write-ahead log into the main database file before backing up the database. As of version 2.1.2, this is not the case. Beware of incomplete backups on these HTC phones (running Android 2.3.4)!

A new version is under development, which will try to work around this issue. However, it is irresponsible to silently force all applications on a system to use this new mode, when they are potentially not ready to deal with it. Complain to HTC about any loss of data you may suffer due to this change. Note that the original Android version from Google, as is distributed for development and testing, does NOT enable this mode, so developers will not be aware of the fact that HTC changed it on their version of Android.

Additional reading about the new mode can be found here.

 

This entry was posted in News. Bookmark the permalink.

Leave a Reply