Importing vCard files from Nokia N9 to Android

I had some issues with importing contacts from Nokia N9 to Nexus 5. vCards with embedded images from N9 did not work in Nexus 5.

Actually there were two problems. No images were shown with contact and import of some of the vCards with images failed altogether.

Here is a short tutorial what to do to get everything working.

First just export contacts from N9 to files. A .vcf file for each contact will be created to MyDocs/Contacts on N9 (where Contacts directory has been localized, so for example it could be MyDocs/Osoitekirja). Copy the whole directory to your computer and run this sed in it:

sed -i 's/PHOTO;TYPE=PNG;ENCODING=b/PHOTO;ENCODING=BASE64;PNG/' *.vcf

That will fix the image information with the base64 encoded images. After that the start of the first line of the base64 encoded PHOTO field should look like this:

PHOTO;ENCODING=BASE64;PNG:

The other problem was with ADR field in vCard file being just before PHOTO field. For some reason vCards with PHOTO field following ADR field would not import at all to Nexus 5. Fix to this was to add EMAIL field just before PHOTO field

EMAIL;TYPE=HOME:first.last@example.com

After these fixes just copy the whole directory to android (via mass storage) and then import it from Contacts app.

Categories: N9, Android, English
Date: 2014-03-15 18:51:05