#2: Migrate to Fairphone. Calendar Mess

The first post of this blog series (written in German) was A New Year’s resolution to gain more control in the digital sphere. It just happened that the devices that we are supposed to own transformed themselves from being a tool to a place that is highly controlled by organizations rather than individuals. In particular my smartphone. While the phone may be called smart, it is not smart to just let the phone do whatever it does, but rather shape it based on some criteria. But which criteria? Let’s start exploring, first of all.

I’ve got a Fairphone (model: FP1) about a week ago. It shipped with the Android version 4.2.2 and root access (with root, I can change the way how the device functions, for example block internet access for some applications). Today, I want to make it a phone for everyday usage. To do that, I will download and transfer my current data: Mails, Calendar, Contacts, Notes, Messages, … to the Fairphone. This gives me a chance to re-evaluate the services that I consumed and the habits with my old phone, a Samsung Galaxy S2, with Android 4.0.2 on it, non-rooted.

As you will see in this article, migrating Calendar events to another device that is a few centimeter away, is quite a technical and time-consuming endeavour, even for somebody who studied and works in computer science and decides not to use Google calendar for synchronization. This is how platforms usually work: “Many ways in, but no way out”. At least no comfortable way out.

How to get software? Alternatives to Google Play

In the mobile environment, software is not so much free-floating in different places, but rather consolidated in App Stores. An App Store is a software that allows to install and update software, rate and comment on software, etc. The authors of such an App Store have the power to publish and remove Apps as they like. They can make software more visible depending on their own criteria. And the App developers give away some control and get a bigger target group. For example, Google maintains its own App Store called “Google Play” and sometimes removes Apps because it violates the terms & conditions that every App developer must accept in order to publish an APK to “Google Play”. In one way, this is good, because it more or less reliably protects users from malicious apps that tend to spy on you, remotely control your device, enable the camera or the microphone without you ever notice. So there are sorts of quality control in place: Semi-automatic reviews from Google employees and comments and reports from the users. The comments from the users do not have a regular influence on the appearance and disappearance of the App.

Most smartphone users automatically assume that when you have a smartphone, you always have one central place to download new Apps. This makes those devices easy to use, especially for users that are afraid of installation wizards and Setup routines in Desktop computers. Two clicks are needed: The first click to download, the second click to accept the list of permissions that the app demands. You cannot restrict the permissions yourself. Google introduced a hidden permission manager for Android 4.3, but then removed it again in Android 4.4. They say, they released it by accident. The message to the user is: “Take it or leave. Don’t be evil!”

First observation: The Fairphone does not have an App Store pre-installed. One reason might be that the Fairphone has not yet licensed Google Play. Hovever, there are instructions on the main screen how to manually install Google products. I skip further documentation on how Google has means to control the Android landscape, but it would be interesting to get more substantial information than the one provided in source.android.com.

The absence of Google Apps is a great opportunity! It gives me the chance to try alternatives to the Google Play and remove the hard dependency on a Google account.

Hence, I downloaded the F-Droid APK (an APK is a package that contains the Android App and some metadata like a list of permissions that the app demands). F-Droid was founded in 2010 by Ciaran Gultnieks and only offers free and open source Android Apps. They manually build the source code of each submitted App instead of just forwarding the provided APK to the user. This gives an additional guarantee that the package that can be downloaded in F-Droid is derived from the source code. In other words: For each App in the F-Droid store, you can review the actual source code of the App that is currently executing on your device. Moreover, the F-Droid community checks for non-desirable features (“Anti-features”) within the App, for example advertisements, device tracking, or dependencies on non-free applications. You will also find Apps that Google does not want to have in Google Play because it does not fit into their business model, for example, check out NetMBuddy – which allows you to listen to music from YouTube servers if the App is in background.

Synchronizing Mails

By using F-Droid, I found and installed K-9 Mail, which I was already using earlier. In my opinion, K-9 Mail is the best alternative to Google Mail in the Android environment. With K-9 Mail I can already sync and read mails from the mail server hosted in an Austrian data center. I don’t yet have a server hosted at home, but I might give the HP ProLiant Microserver Gen8 a try, and/or get a Raspberry Pi. So you see, this is far from making myself completely independent from platform providers (which is anyway an illusion), but to decide based on my own criteria, when and how to take advantage of existing offerings and when it is better to spend additional effort.

Nice to know (but not tried yet): K9 Mail integrates well with APG (OpenPGP for Android). After installing APG with F-Droid, you can sign,  encrypt, decrypt, and verify the integrity of mails after you have imported  the secret and public keys. It even allows you to create the keys on the device (although this is beta).

Mails: Check.

Synchronizing the Calendar: “Many ways in, but no way out.”

You think you own your device and can simply export the calendar data from the calendar app? I was also surprised that there is no built-in export function in the official Android Calendar app. While you can always use Google Calendar to synchronize events across devices, I do not want to do that.

So what are the alternatives? The synchronization menu in the Samsung S2 offers the following sync servers:

Facebook, Yahoo, Google, Microsoft. No thanks. What is this generic “Server”? I tried to figure it out by entering an arbitrary URL in the configuration and intercepting the traffic between the smartphone and the remote host with Charles Proxy, but its just a HTTP GET request with no payload in it. So I assume, this is just fake until someone proves me wrong.

Next try. The open source Android application named CalDAV sync (available in Play Store and F-Droid) requires a CalDAV server to sync calendar data. CalDAV is the name of a standardized protocol specified in RFC4791 which is an extension of another protocol (WebDAV) which is an extension of another protocol (HTTP). OK, here we go. For now, I don’t want all-time-syncronization, but just transfer my events between two phones. So I need a temporary CalDAV server on my desktop computer. Who can help? The Wikipedia platform. It has a list of CalDAV servers: I planned to choose something lightweight: Baïkal, but that did not work out for some reason. “Time is short. Keep it simple” was what I wanted to say. But I ended up with a full-fledged virtual Ubuntu Server installation and on top of it an ownCloud instance just to transfer my calendar data from one phone to another.

CalDAV uses the open format iCalendar to store calendar events in files with .ics extension. There is an App called iCal Import/Export 2.1, but this is only available in Google Play, not F-Droid. I checked out the source code, written by Lukas Aichbauer, but found out that unlike the App (also published by Lukas Aichbauer), the code is not working for Android > 4.0, probably because the Calendar API changed and the developer decided to went closed source with it, which is actually a violation of GNU GPL v3. I wrote him a mail, lets see. Update 19.09.2015: Received a mail from Lukas about this topic: According to him and his reference from stack overflow: If the copyright owner of the code, that is published with the GNU GPL v3, goes closed source, this is not a violation of GNU GPL v3, because independent of the GPL, Lukas is also the copyright owner of the code, which means he can do whatever he wants with it.  I think he is right with that. So legally, this seems bullet proof.

Since I am working with Android code during the week, I thought I could fix the issue with Android version > 4.0 directly in the available source code and contribute to the open source project, but lost interest  after 30 minutes, because I did not enjoy the structure of the code. If the author does not hand out the source code, I might write a small app that works for new and old devices and is available in F-Droid as well. But then we are already far from: “Time is short. Keep it simple”.

Synchronizing the Calendar: How I finally did it
Ok, this was basically consuming half of the day. To summarize what worked in order to transfer calendar events to the Fairphone is:

  1. @Samsung S2: Install iCal Import/Export 2.1 and export the default Calendar of the Samsung S2 called “My calendar” from Samsung, which cannot be syncronized via CalDAV, except one moves each and every event manually to another calendar. Result: An .ics file that can be moved to the desktop computer via drag & drop or by using adb pull /mnt/sdcard/myCal.ics /home/myself/Downloads/myCal.ics
  2. @Ubuntu: In Mozialla Thunderbird, install the Add on “Lightning” and create a new calendar: “ownCloud Calendar”. and use the CalDAV service URL from the ownCloud instance ( Take a look at the ownCloud documentation for details).The URL will look like this:
  3. @Ubuntu: Import myCal.ics to the calendar and press the synchronize button to send the imported events to the ownCloud server.

4. @Fairphone:  Install the CalDav Sync adapter with the same URL (including ownCloud username and password). If you don’t want to write such long URLs with the device keyboard, you can connect to the computer via USB and execute:

adb shell input text


Just wait a while and all the events should finally be available on the Fairphone. After this experience, I got the impression that paper-based events and schedules might not be the worst option, if it is a private calendar and it should be simple. 🙂

That’s it for the day. Come and join me in the next  round when I try to migrate Contacts, Notes and Messages.

Posted in Freiheit nehmen