11

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

muru
  • 207,228
TomDogg
  • 260
  • 1
  • 3
  • 12

7 Answers7

10

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
7

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:


NOTE :

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

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!

Tim
  • 236
  • 1
  • 5
0

The simplest solution to this that I have found having done this with a couple of phones is to simply export your contacts to a vcard with your current device and then email this to yourself. Then install Dekko on the Ubuntu Touch device, receive the email and open the attachment - it will then be automatically imported. No terminal required, and it only takes seconds once Dekko is installed.

user99306
  • 733
0

Another manual approach for backup/restore of contacs, calendar, ... is

  1. start data manager on the phone
  2. get permission for all files (input PIN,...)
  3. make all files visible (settings show hidden files)
  4. copy the whole folder home/phablet/.local/share/evolution to "documents"
  5. connect the phone to another computer/laptop via usb
  6. unlock home screen on the phone to allow access to the phone via usb
  7. copy the evolution folder to your harddrive

For restoring just do it the other way around.

The folder evolution contains all contacts, notes, calendar-events. So you may as well only backup/restore individual files.

David Foerster
  • 36,890
  • 56
  • 97
  • 151
Danfro
  • 436
0

If you encounter some trouble to import a vcf file with a vcd format version 2.1, you can import it first in evolution software installed in a linux desktop, then export it with evolution : you'll have a vcf in 3.0 version, and import in you ubuntu phone will work properly.

-2
syncevolution --import /path/to/file/allcontacts.vcf backend=evolution-contacts database=system-address-book
muru
  • 207,228