Tuesday, November 29, 2005

How to learn things without really trying

Regular readers of my blog may be familiar with the Siemens SX1 phone I so ill-advisedly bought some time ago. It finally died last week and I thought I had been very clever in backing up my contacts database just in time. For readers familiar with Symbian/Siemens/Nokia Series 60 phones, contacts appear to be stored in a proprietary format as a "contacts.cdb" file.

I never could have imagined quite how difficult it would have been to gain access to the contents without a running phone. Here are just some of the things I tried:

I first tried to find any software (free or otherwise) that could read the file format on Windows - and got nowhere (there were lots of code samples for Symbian but that didn't really help given that my phone was dead....). There is a business opportunity here.

I then started looking at the Siemens (now Ben-Q) website for more details and spotted that you can download phone emulators.... A HA! I thought..... I can get a Siemens phone running in emulation, find where it stores its contacts file, replace it with my backed up one and then view all my contacts on the emulator!

Sadly, if things were that simple, I wouldn't have still been working on this at midnight last night.

The problem is that different Siemens phones store their contacts in different formats and - worse - the emulator for the SL65 and CX70 emulates everything except the file systems --- which is "different" between real and emulated phones, apparently. (The reason I was using SL65 and CX70 emulators was because the site I found didn't offer an SX1 emulator.)

Undaunted, I had another brainwave..... I realised that I could use the Siemens phone manager software to "back up" the SL65. I would then have a back-up representation of the phone..... and that was precisely the format my rescued contacts file was in (since I had obtained it by backing up my SX1). I could swap the file on the backup and then sync back to the phone.

So all I had to do was install the Siemens Mobile Phone Manager software. Except... the backup format for the SL65 turned out to be different to the SX1. Arghhhh.

I was ready to give up..... unless..... perhaps...... maybe there really was an SX1 emulator. For reasons that are still not clear to me, I hadn't explicitly searched google for one of these until now. As soon as I did it, one popped up. It wasn't as full-featured as the SL65 emulator (it couldn't sync to the siemens data suite) but it DID run and it DOES use the contacts.cdb format.

So, at midnight last night, I booted an emulated Siemens SX1 with my backed-up contacts database running. HURRAH!!!

I will now have to copy the entries one-by-one by hand onto my new phone but at least I have them.... which is more than I had this time yesterday.

The lesson here, of course, is that it's insufficient to perform backups: one must also test them.

Ironically, I was discussing this with a colleague last week where I gravely nodded when he told me tales of those who had forgotten this advice. The shame.


2 comments:

andyp said...

I still think you should have done more work on programmatically getting at the data in the contacts.cdb file. Can't be beyond the realms of your genius to come up with a bit of Java to do this. On the other hand, your solution may be quicker.

Richard Brown said...

Hi Andy,

In what sense? There is no api to read these files that I can find - except for the Symbian platform. So any code I write would have to run inside the emulator.

Whilst the SL65 emulator was very nice and came with excellent instructions on how to use it with Eclipse, the SX1 emulator is very much more basic.

I agree, however, that it may be do-able... the contact API looks quite simple... the problem would be in packaging the code in such a way that it would run on the emulator. I don't intend to begin my transcribing until this evening in any case... perhaps I should look at the code route first.