> In each case the same thing happens, the messages briefly display, then
> disappear

I think your sms-controlling app has synced the whole sms database
with some server. When you start your phone it shows you local data
but then it sees that server has latest data (maybe using modification
date on the database, maybe some synchronization token stored in the
database) and restores everything from there.

So maybe you need to look for some setting saying "allow to sync
everything with server" and "allow to sync everything back from
server".


Pavel


On Mon, Jul 23, 2012 at 3:51 PM,  <gsm-gin...@gmx.ie> wrote:
> So close, yet so far! This is really getting on my wick...
>
>>> Example scenario where vast swathes of content have vanished from
>>> mmssms.db thanks to an unintentional mass-DELETE FROM through the naughty
>>> Android SMS app:
>>>
>>> ls -al /data/data/com.android.providers.telephony/databases/mm*
>>> -rw-rw---- 1 root root 60416 Jul 17 20:16 mmssms.db
>>> -rw-rw---- 1 radio radio 32768 Jul 17 16:18 mmssms.db-shm
>>> -rw-rw---- 1 radio radio 628832 Jun 30 19:23 mmssms.db-wal
>> The WAL file does not contain the old data, it contains the new data. If
>> the WAL file has not been checkpointed, you should be able to simply delete
>> the WAL file and the old data will still be in the original database file.
>> A "checkpoint" operation is the act of moving the new database from the WAL
>> file back into the original database file, presumably overwriting the old
>> data (depending on your settings and other factors).
>> But, if the WAL file has been partially checkpointed, and that checkpoint
>> was interrupted by a crash or power failure, deleting the WAL file will
>> corrupt your database. So you should probably run the experiment on a
>> backup. :-)
>
> In my test, I started the phone in single-user/recovery mode, deleted
> mmssms.db-wal and restarted. The deleted messages showed very briefly,
> then vanished.
> I then restored mmssms.db to its original (just after deletion) state
> and deleted both mmssms.db-wal and mmssms.db-shm. Same result.
> Not to be deterred, I then restored the mmssms.db, deleted the
> mmssms.db-shm and created a zero-length file. In all cases the owner was
> set to radio:radio (in the initial example below mmssms.db was incorrectly
> set to root.)
> In each case the same thing happens, the messages briefly display, then
> disappear, mmssms.db, then mmssms.db-wal and mmssms.db-shm with the much
> sought-after deleted messages, so (if I'm not mistaken) at least some of
> the info is retained in mmssms.db itself, albeit with instructions to
> purge.
>
> Is there any way to merge the lost data stored in mmssms.db-wal /
> mmssms.db-shm back into mmssms.db? For example, if the DB/WAL stores a
> bunch of DELETE FROM statements could they be changed to INSERT INTO?
>
> Mandy
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to