How do I sync contacts on Ubuntu Touch?

How do I sync (upload to/download from) my contacts, with my Ubuntu Touch OS?


Solution 1:

Here is a simpler and more up-to-date answer for Ubuntu Touch 14.09/14.10.

Even if it is easier that it used to be (no need to be root, no need to use the developer mode...) an app that automates this would be appreciated.

Import

  • Copy your contacts (as one or multiple .vcf, other formats might work too) to your device. Let's say that you put them in a "Documents/contacts" folder.
  • Via the terminal app or via adb/ssh, run the following command:

syncevolution --import /home/phablet/Documents/contacts/your.vcf backend=evolution-contacts

And that's it!

SyncEvolution does not seem to support globbing, so if you have a lot of vcf files you can use a command like this one to import all vcf from the folder at once:

find /home/phablet/Documents/contacts -name *.vcf -exec syncevolution --import {} backend=evolution-contacts \;

Export

To create a "allmycontacts.vcf" files into the "Documents" folder, just run the following command via the terminal app or via adb/ssh:

syncevolution --export /home/phablet/Documents/allmycontacts.vcf backend=evolution-contacts

Solution 2:

Ubuntu Touch has EDS (Evolution-data-server) installed. So you can sync it using syncevolution.

First install latest stable version from repo:

For =>14.04

sudo apt-get install syncevolution syncevolution-provider-uoa

For <=13.10

sudo add-apt-repository "deb http://downloads.syncevolution.org/apt stable main"
sudo apt-get update
sudo apt-get install syncevolution-evolution

If you are using Google-Contacts, then export all contacts as vcf (i.e allcontacts.vcf) & then import it using following command at terminal (Change the path & database accordingly):

syncevolution --import /path/to/file/allcontacts.vcf backend=evolution-contacts database=Personal

To know the names of all available databases type:

syncevolution --print-databases

For more info visit:

  • SyncEvolution - Community Help Wiki

  • SyncEvolution


NOTE :

If vcard file (contacts.vcf) doesn't have new line space after END:VCARD, syncevolution might fail to import all the contacts.

Solution 3:

It is possible to sync your Official Aquaris Ubuntu Edition with e.g. Owncloud using CardDAV. This is what I did (see wiki.ubuntuusers.de for source):

  1. First I added the certificate of my site to the folder /usr/share/ca-certificates and updates the ca-cert database, since it is self-signed:

    sudo mount /dev/loop0 / -o remount,rw
    sudo cp /home/phablet/Downloads/server.crt /usr/share/ca-certificates
    

    Add a star to the new certificate while running the configuration

    sudo dpkg-reconfigure ca-certificates
    
  2. Add the syncevolution configuration:

    syncevolution --keyring=no --configure --template webdav username=<USERNAME> password=<PASSWORD> syncurl="in-its.de/owncloud" target-config@owncloud
    syncevolution --configure --template SyncEvolution_Client sync=none syncURL=local://@owncloud username= password= peerIsClient=1 owncloud
    syncevolution --configure database=https://<SERVER>/owncloud/remote.php/carddav/addressbooks/<USERNAME>/contacts backend=carddav target-config@owncloud contacts
    syncevolution --configure sync=two-way backend=contacts database="Persönlich" owncloud contacts
    
  3. Run sync:

    syncevolution --sync slow owncloud contacts
    

That made all my Owncloud contacts available on my Ubuntu Phone.

And CalDAV works similar:

syncevolution --configure database=https://<SERVER>/owncloud/remote.php/caldav/calendars/<USERNAME>/personal backend=caldav target-config@owncloud calendar
syncevolution --configure sync=two-way backend=events database="Persönlich" owncloud calendar

And then sync it:

syncevolution --sync slow owncloud calendar

So CalDAV and CardDAV are working!