View Single Post
Posts: 85 | Thanked: 97 times | Joined on May 2011
#14
BIG Thank you to friesoft for pointing me in the right direction & God for answering prayer! Was getting terribly frustrated by this problem.

I was able to fix the problem of messages not showing correctly, a red exclamation mark on one of my conversation threads, messages disappearing and re-appearing, messages not showing as sent, etc.

Note: Everyone should make a back up of the el-v1.db file and a backup using the built in Backup app before trying any of this if you care to retain your messages. In case something goes wrong just restore from that!

Following friesoft's directions I started messing with the database using Sqliteman. This is what I did (comments followed by sql statements):

1: Put the device in offline mode
2: Make a back up using the Backup app
3: Copy the /home/user/.rtcomm-eventlogger folder somewhere safe (MyDocs or somewhere on your computer)
4: Copy the /home/user/.rtcomm-eventlogger/el-v1.db to your computer
5: Use Sqliteman or another sqlite program that allows running queries on the database and use the following as a general guide


  • See if there are any messages showing as not read:
    Code:
    select * from events where is_read = 0
  • If there are, change them all to read at once:
    Code:
    update "events"
    set "is_read" = 1
    where "is_read" = 0
  • Find all messages with no remote_uid (no phone number, there should always be one):
    Code:
    select * from events where remote_uid = ""
  • Run this command multiple times, replacing the id to match each one of the messages found above, and the remote_uid with the correct phone number of the contact that sent that message:
    Code:
    update "events"
    set "remote_uid" = "+12345678901"
    where "id" = 2233
  • Find all the pending messages (flags set to 1, meaning SMS is in a pending state):
    Code:
    select * from events where flags = "1"
  • If there are some, unflag all (flags set to 0):
    Code:
    update "events"
    set "flags" = "0"
    where "flags" = "1"
  • Clear flags stored in groupcache for that conversation (makes things appear right in the conversations overview):
    Code:
    update "groupcache"
    set flags = "0"
    where flags != "0"

Copy the database back to the phone in the correct location, be sure the owner/permissions match the other files in the directory, and restart the phone. When it prompts to go online while turning on let it.

Other observations:
  • Still had the red exclamation in the Conversations overview until reset the flags in groupcache,
  • Might also want to just set read_events equal to total_events to be sure none show as unread in the overview? I did not have any discrepancies so cannot comment on that.
  • Do blank values in the headers table matter? I have some but wasn't sure so just left them alone.
 

The Following 6 Users Say Thank You to computerinfo21 For This Useful Post: