SCHAPPY — 22. Oktober 2008, 16:10

iPhone: Unread SMS messages bug

After some firmware migrations I ended on 2.1 and recognized that my SMS icon shows at least 218 unread SMS messages. I wasn’t able to mark the messages as read, even if I view all of them.

I figuerd out, that the problem persists because of an improper update of the sms.db. The database contains all messages in one table and message groups in the database table msg_group. Each entry in the msg_group table contains an attribute unread_count which is updated implicitely. In my case the problem was, that various message groups hold imporper values for unread_count which where not reset by the corresponding trigger.

Start by syncing the iPhone completely using iTunes (this implicitely creates a complete system backup). Disconnect the phone and start the following. Use the terminal app or connect to your openSSH server to get console access. Change to the the SMS directory.

cd /private/var/mobile/Library/SMS

Disable the phone to reduce the risk of losing any new SMS. Additionally make copy of the existing sms.db.

cp sms.db sms.db.sav

Now open sqlite CLI and try to update sms.db

sqlite3 sms.db

We are going to set all messages to read by the following command.

update msg_group set unread_count = 0;

Exit sqlite and reboot the phone.

.exit

reboot

After a successful reboot the unread message indicator should dissappear.

Keine Kommentare »

RSS feed for comments on this post.

Bisher noch keine Kommentare.

Kommentare verfassen

Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>