n900 Tricks: Backing Up SMS Texts (plus IMs and Call Log)
There are a few tips and tricks out there for the N900 that you’ll only really come across if you’re a regular on the Maemo Talk forums. The same is probably true for other devices and their respective forums to some extent, but the Maemo community seems to be particularly active. This quick guide to backing up text messages on the n900 is a little different as it results in something that’s actually readable on your PC, and falls into the aforementioned category of guides that don’t seem to be available elsewhere.
One thing that I did appreciate about the n900 was that doing a complete flashing of the firmware didn’t wipe things like the text message log, and a lot of application settings survive presumably by being safely stored in the mass storage somewhere. Sadly, the downside of this is that when an application breaks (most notably in my case, the built in Ovi Maps), there’s no obvious way to fix it, including reflashing the firmware. Nokia do, however, offer blank image of for the mass storage that you can ‘flash’ onto the device. Before doing this though, I’d like to take a copy of a few things that I do want to keep…
Anyway, whatever your reason, taking a copy of your SMS / IM / call log is actually pretty simple. All it needs is a command to be executed within a terminal window.
Before doing this, I would recommend installing an SSH server (available from the Application Manager) and using a tool like Putty to connect to your device so you can use a normal keyboard and/or cut and paste from here…
Start out by opening a terminal and using cd to find a directory you want to put the backup in – the default location is probably fine if you’re using a terminal on your phone. Otherwise, you might want to do something like cd /home/user/MyDocs/ before doing anything else.
The following command, tweaked slightly from here, will dump all of the data from your phone’s communication database into a file called output.html:
sqlite3 -html /home/user/.rtcom-eventlogger/el.db “SELECT start_time,service_id,event_type_id,free_text, remote_uid FROM Events ORDER BY start_time DESC;” > output.html
This will create a file called output.html, which you can copy to your PC. For some browsers to view the file properly, you may need to open it in a text editor and add <html><table> to the top and </table></html> to the end – the command seems to omit these parts.
Once you’ve got the file open in a browser, a couple of the columns could benefit from some explanation. They’re displayed in the order they were mentioned in the command (there are no headings in the file):
- start_time: The time the item ‘began’, I presume. For text messages/IMs, this would be the time it arrived/was sent, whereas for calls it represents the beginning of the call.
- service_id: 1 for a call, 2 for an IM, 3 for SMS.
- event_type: This value depends on the service_id – there are two values for each. The larger value represents sent (outgoing) items, and the smaller represents received (incoming) items. For instance, for SMS (service_id is 3), the event_types for sent and received are 6 and 5 respectively.
- free_text: The actual text content of the message. Blank for calls.
- remote_uid: For calls and SMS, this is the phone number of the remote phone. For IM, this is the email address or screenname of the other half of the conversation.
Of course, there’s no easy way to restore the messages to the database afterwards – though some clever coding could probably pull it off. There is a Backup/Restore feature built into the phone if you want to go down this route, but personally I’m loosely planning a complete wipe and would like a stash of my old content stored somewhere, just in case there’s something I want to come back to later.
hi
you can use of new version nokia pc suite for macke a backup.
Hi,
It was a great wrk man i have done it as per ur instructions & i got it :-)
i have one more question ?
is there a way to categorize by sender & its only showing received iteams