Showing posts with label contacts. Show all posts
Showing posts with label contacts. Show all posts

2012-01-27

Converting Nokia Ovi Suite Contacts for Android - 2012 Update

Seeing as my original post on converting Nokia OVI Suite contacts continues to get loads of hits, and I had to go through the process again for a friend's phone, I thought that I'd do a quick 2012 update. This will be a summary; if you're having trouble following it, take a look at the original post, which goes into more detail.

First off - things are a little easier these days! Gmail / Google Contacts now accepts multi-VCard .vcf files. Sadly, they still don't allow multi-file import, so the many output .vcf files must still be merged.

As a result, all you need to do is perform a full backup in OVI Suite, extract all the VCards from the the .nbu with NBUExplorer, and merge the VCards into a single file. Then, upload the resultant file to Gmail.

To merge the files, here's a quick snippet which I used in Cygwin:

 $ cat *.vcf >> merged.vcf 
According to Wiki, this is the DOS equivalent (but I don't even have dosbox installed right now to test it):
 $ copy /a a.vcf + b.vcf merged.vcf 
(Yes, that's a '+'; I'm not going to read up on DOS loops for you - just use cygwin).

2011-01-31

Converting Nokia Ovi Suite Contacts for Android (nbu2gmail, or nbu2csv)

== 2012 Update == This has gotten easier! I've posted a more up-to-date version here. == Too Long, I'm Lazy Version ==
Since most people getting to this page will just want a quick solution, here's the quick-and-easy version of the post. If you're in the mood for how I got to this awful hack of a way to convert contacts, read on ...

Phone -> OVI Suite -> NBUExplorer -> Microsoft Live Mail Address Book -> Gmail
On-phone -> .nbu -> (many) VCards -> .csv -> Online

If you're not stuck in Windows waiting for an interminable Ovi Suite synchronisation, you may have more luck with the scripts I discuss later in the post.

Update 2011-09-25 : Made this summary a little easier to follow, since this post is being read by way more people than I would have expected.
== Full Post ==

I just bought an HTC Desire, upgrading from my Nokia E66 which suddenly started to feel dated when I saw how fast Opera loaded on one owned by a friend of mine.

The problem is that in 2008, Nokia decided to do a complete overhaul of their mobile software, rebranding it from "Nokia PC Suite" to "Ovi Suite". They massively simplified the UI, introduced many bugs, and slowed it down to a crawl. Most importantly for me, they removed any way of extracting my Contacts in any useful format. All I could get with the most up-to-date version of Ovi (as of Jan 2011) was a "Nokia BackUp" .nbu file, which is intended to lock you into Nokia's Ovi platform. Fantastic.

According to the article on wiki, they've just added the ability to receive delivery reports to the phone, having sent a text message from Ovi. This despite the many hundreds (thousands?) of posts I have read asking for .csv output. Oh well.

Open-source to the rescue though - thank you to petrusek for his excellent NbuExplorer, which extracted all of my contacts with ease.

Bizarrely, it seems that the contact details stored in the .nbu file are in a perfectly simple and open format, VCard. I can't think of a reason that OVI doesn't allow users to extract them aside from platform lock-in. I'm very glad that the rest of the world seems to be moving away from this kind of thinking.

So now I was left with 334 VCards, only to find that Gmail Contacts would only allow me to upload one at a time. Poor thinking Google!

I have used VCards in KAddressbook before, so I knew that it was possible to create a single .vcf file with many VCard entries in it, but Gmail doesn't support this. There goes my easy
$ cat * >> contacts.vcf ! The only multiple-entry format that Gmail seems to support seems to be tried-and-tested CSV.

I first tried VCF-to-CSV-converter, but the VCards that OVI output were VCARD-2.1, and the converter only supports VCARD-3.0. Maybe it will someday. It also fails silently, adding a WARNING tag to the output csv file, but printing nothing to the console. Tut tut.

In retrospect, I should have tried replacing the version string in my VCards and trying vcf-to-csv-converter again, but it didn't occur to me at the time, and it seemed obvious(!) that there would be a script to do this incredibly common conversion.

Being stuck in Windows while Ovi Suite did its thing, I wasn't able to run VCFConvert, since PHP wasn't available through the Cygwin installer. If you are less paranoid than me, you could use the online version though.
I downloaded VCF2CSV, but had a solution before Cygwin installed a compiler for me (I use this Windows install so infrequently, I didn't even have an editor!)

Rather unbelievably, Annesoft wanted $20 for this trivial task. I didn't try their software either.

I tried CKHung's vcf2csv, the only script-based tool that I could get to work. Bizarrely though, "vcf2csv ignores the problematic FN field. (First Name)", which seriously limits its usefulness. I wonder what makes it harder to deal with than other fields. Again, this is probably easily fixed, but I was getting impatient to try my new phone!

In parallel with these attempts, I installed Thunderbird, confident that any decent open-source program as mature as TBird would be able to deal with common plaintext formats like VCard for me. Imagine my surprise when it couldn't! Oh, it would import from Outlook Express for me, but not VCard! The "More Functions for AddressBook" extension promised to do this for me, but I could not get it to work.

Seeing as Thunderbird had alerted me to it's presence, I next tried Outlook Express, and I was shocked to see exactly the same program my parents had been using the year that we bought our Pentium 4. Needless to say, Outlook Express didn't support importing multiple VCards at once.

Some more googling found me a blog post suggesting Windows Live Mail, which as it turned out was also installed on my machine. Lets not get into talking about finding new programs installed by stealth by a system update utility... Despite all that, it worked! The only hiccup was that I had to pretend to have a pop3 account just to use the Address Book feature. Importing the VCards took a long time (20-30 minutes?), but I was able to import them all, and then export to CSV. Success!

Minutes later, my Gmail Contacts were fully populated with phone numbers. Whew.

// This post was written while listening to a really catchy tune