This is a dirty fix but it worked for me (on Linux although cygwin could be used on Windows env) :
- Export your contact in Thunderbird as CSV using commas.
- File format is like this :
First Name,Last Name,Display Name,Nickname,Primary Email,Secondary
Email,Screen Name,Work Phone,Home Phone,Fax Number,Pager Number,Mobile
Number,Home Address,Home Address 2,Home City,Home County,Home Post
Code,Home Country,Work Address,Work Address 2,Work City,Work
County,Work Post Code,Work Country,Job
Title,Department,Organisation,Web Page 1,Web Page 2,Birth Year,Birth
Month,Birth Day,Custom 1,Custom 2,Custom 3,Custom 4,Notes,
In my case most the entries contain only First Name,Last Name,Display Name,,Primary Email.
So I used sed to convert each entry to VCF 2.1 format :
BEGIN:VCARD
VERSION:2.1
N:LastName;FirstName
FN:FirstName LastName
EMAIL;PREF;INTERNET:local@domain
END:VCARD
Here is the script ( honestly it is just a one line command but for more clarity.. ) :
#!/bin/bash
# This script convert a ThunderBird AddressBook ( 17.04) exported as CSV file using commas into a VCF 2.1 file.
# rmistero - April 2013 - GNU GPL 3
CSV_FILE="contacts.csv"
VCF_FILE="contacts.vcf"
# sed is looking for regex pattern NOT containing commas between 2 commas.
sed -e "s/^\([^,]*\|\".*\"\),\([^,]*\),\([^,]*\),[^,]*,\([^,\"\']*\),.*$/N:\2;\1\nFN:\3\nEMAIL;PREF;INTERNET:\4\n/g" -e "1d" < $CSV_FILE | sed -e "/^EMAIL/ a\END:VCARD" -e "/^N/ i\BEGIN:VCARD\nVERSION:2.1" | grep -vE "^$|\"" > $VCF_FILE
Once the file has been converted, just put the file on the USB drive of your Android phone.
Then go to Contact, Settings, and Import/Export a single vCard file.
If everything goes well you should see the number of contact entries detected by the phone and the number loaded to the phone.
NOTE: to count the number of entries in contacts.csv, just do :
grep -c EMAIL contacts.csv
This will return the number of lines matching "EMAIL" ( hence number of contacts).