11

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

muru
  • 193,181
  • 53
  • 473
  • 722
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
Nicolas Delvaux
  • 443
  • 4
  • 10
  • 1
    This worked for me, and I avoided using developer mode - thanks. Though I seemed to only get a partial import from an Android export until I split the `.vcf` file out into individual 1-contact files with a script and then ran `syncevolution` in a loop. In between attempts I could delete the failed import from the Contacts app (long hold on a contact, check all using the check all button near the top right, and then delete all from the menu on the top right). Hopefully this will help someone else. – Robie Basak Mar 26 '15 at 20:38
  • If you use a folder name instead of a VCF file `syncevolution` will import all files in that folder. You don`t need to use `find`. – Florian Diesch Sep 11 '15 at 13:58
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.

Khurshid Alam
  • 3,040
  • 3
  • 25
  • 35
  • For those looking to export their contacts from an iPhone / iTunes to a .csv file: http://www.trickyways.com/2010/06/how-to-export-iphone-contacts-windows-xp/ – TomDogg Oct 27 '13 at 10:33
  • I cannot add the repository, I keep getting, "Error: need a single repository as argument" – Ibuntu Nov 29 '14 at 14:46
  • Found this: https://help.ubuntu.com/community/SyncEvolution and you need to include quotes so: sudo apt-add-repository "deb http://downloads.syncevolution.org/apt stable main" – Ibuntu Nov 29 '14 at 15:00
  • I got the repository added okay but I get the following error while updating: W: GPG error: http://downloads.syncevolution.org stable Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY AE24B1375E4ABB95 I can't seem to get syncevolution installed for some reason – Ibuntu Nov 29 '14 at 15:11
  • @Ibuntu Which version of Ubuntu are you using? For Ubuntu >=14.04, that ppa is NOT required. You can install syncevolution from repo.`sudo apt get install syncevolution syncevolution-provider-uoa` – Khurshid Alam Nov 29 '14 at 15:14
  • @Ibuntu What is your ubuntu touch version on the phone? You should first install syncevolution on phone & copy the vcf file to the phone & then run these commands from terminal on phone. Just provide the right path of copied vcf file. I am currently documenting direct sync between Google contacts & phone via carddav using syncevolution. This method doesn't require manual copying of vcf file. – Khurshid Alam Nov 29 '14 at 15:43
  • Even though touch images are very different from deskop iso , it does sync with desktop-repo version (& included softwares). For example `vivid-preinstalled-system-armel+flo.img` will get binaries from vivid repo on Nexux 7 when you run `sudo apt-get install` on phone. – Khurshid Alam Nov 29 '14 at 15:55
  • Let us [continue this discussion in chat](http://chat.stackexchange.com/rooms/19042/discussion-between-khurshid-alam-and-ibuntu). – Khurshid Alam Nov 29 '14 at 15:56
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
  • 703
  • 7
  • 19
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
  • 35,754
  • 55
  • 92
  • 145
Danfro
  • 436
  • 4
  • 4
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
  • 193,181
  • 53
  • 473
  • 722