Skip to content

Migrating your contacts from iPhone to Android

July 15, 2012

This article shows you how to transfer your contacts from iPhone to Android without using googles sync server


Recently I got my first Android phone. As for most of the hacking affiliated people I felt a bit more comfortable with Android that with iOS. How long have I dreamed of having a phone with full access to the source code, with full access to the system. The manufacturer does not force me to buy his over-priced hardware to develop applications for the device. I can install every application I like to install. There are at least 100 more reasons why Android ‘feels’ better than iOS.

However, as I started to move my personal data from one device to the other, I noticed that also Android produces a feeling of discomfort. The system is designed to back up all the data on google servers. This includes contacts, photos, sms, emails, wifi-passwords (they can come in handy for google the next time the street view car passes by ๐Ÿ˜‰ )

So either you lose control over your device or you lose control over your data. The best solution to that problem for me is to use an Android phone and try to avoid as much as possible the Google services.

But… already the transfer of my contacts proved to be more complicated than I thought. The usual way to do so is to sync your iPhone contacts with Google and get them beamed to your Android device automatically. That’s exactly how I don’t want to do it. And apparently, there isn’t an easy solution to avoid Google to get all my contacts. The fault here is more on Apples side as they don’t offer a way of exporting the contacts on your phone.

For solving this issue I wrote a little python script which takes the iPhone address book database and transforms it into a vCard file, which should be readable by most of the email client, etc. Oh, and yes, Android offers a direct way of importing vCard files without going through google servers.

What you need to do:

You might want to adapt the phone number types starting at line 46 of the script. Just play around with the script and check the output (vcf file is in ASCII). Please note that this script only processes names, birthday, telephone numbers, email addresses and addresses. The script is tested with iOS 4.0.1.

From → Uncategorized

  1. Buena broder Graciass!!

  2. reb tet permalink

    I have a problem

    Traceback (most recent call last):
    File “./”, line 31, in
    import vobject
    ImportError: No module named vobject

  3. reb tet permalink

    nvm installed python-vobject package on Mint and all is well

  4. Taher permalink

    Thanx you are just a lifesaver. very helpful in case when my iphone 3g stop connecting to pc and have to backup all the contacts then i have used ssh to open all the directory of iphone through wifi and take a copy of addressbook.sqlitedb. although the article explain everything very briefly but in the end the results were awesome.
    if you are reading the comment please expand the article by giving links to python setup and packages link and methods to run the script and also the concept of backing up the addressbook file using ssh.

  5. Matt permalink

    Useful script, thanks!

    I had to download vobject (, dateutil (, and setuptools (; unzip each of them to the Python27\Lib folder, and run “python install” in each directory.

    Then it said the address book file was encrypted or couldn’t be opened!

    However I had seen this before, and it turns out that this means your sqlite3 version is not up to date. I downloaded the precompiled binary for sqlite3 version 3.8 from ( and replaced the dll in my Python27\DLLs folder and it finally worked!

    Hope this helps

    • Hi

      Thank you for the info! Actually I’ve never tried that script under windows. Good to know that it works there as well ๐Ÿ™‚

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: