<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>fairphone &#8211; /bin &#8211; basisgruppe informatik</title>
	<atom:link href="https://blog.diebin.at/tag/fairphone/feed" rel="self" type="application/rss+xml" />
	<link>https://blog.diebin.at</link>
	<description>Infos, News und Updates der basisgruppe informatik</description>
	<lastBuildDate>Tue, 06 Mar 2018 15:38:47 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.9.4</generator>
	<item>
		<title>#4 Migrate Contacts and Calendar to Fairphone</title>
		<link>https://blog.diebin.at/1556/4-migrate-contacts-and-calendar-to-fairphone</link>
		<pubDate>Sun, 15 Jun 2014 12:33:15 +0000</pubDate>
		<dc:creator><![CDATA[Andyka]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[fairphone]]></category>
		<category><![CDATA[kritische informatik]]></category>
		<category><![CDATA[Selbstorganisation]]></category>

		<guid isPermaLink="false">https://blog.diebin.at/?p=1556</guid>
		<description><![CDATA[It&#8217;s been a while since the last post in the series &#8220;Freiheit nehmen&#8221;. I was busy with working (Mobile Banking stuff) and reading (Andreas Huyssen : Present Pasts &#8211; Urban Palimpsets and the politics of memory). Moreover, I started to<span class="ellipsis">&#8230;</span><div class="read-more"><a href="https://blog.diebin.at/1556/4-migrate-contacts-and-calendar-to-fairphone">Read more &#8250;</a></div><!-- end of .read-more -->]]></description>
				<content:encoded><![CDATA[<p><a href="https://blog.diebin.at/wp-content/uploads/2014/06/sqlite3.png"><img class="size-full wp-image-1557 alignnone" alt="sqlite3" src="https://blog.diebin.at/wp-content/uploads/2014/06/sqlite3.png" width="547" height="92" srcset="https://blog.diebin.at/wp-content/uploads/2014/06/sqlite3.png 547w, https://blog.diebin.at/wp-content/uploads/2014/06/sqlite3-300x50.png 300w, https://blog.diebin.at/wp-content/uploads/2014/06/sqlite3-100x16.png 100w, https://blog.diebin.at/wp-content/uploads/2014/06/sqlite3-150x25.png 150w, https://blog.diebin.at/wp-content/uploads/2014/06/sqlite3-200x33.png 200w, https://blog.diebin.at/wp-content/uploads/2014/06/sqlite3-450x75.png 450w" sizes="(max-width: 547px) 100vw, 547px" /></a></p>
<p>It&#8217;s been a while since the last post in the series &#8220;Freiheit nehmen&#8221;. I was busy with working (Mobile Banking stuff) and reading (Andreas Huyssen : Present Pasts &#8211; Urban Palimpsets and the politics of memory). Moreover, I started to look into the Open Source Video platform Kaltura and <a href="http://phaidon.philo.at/qu/?s=kaltura">blogged about it here</a>. One word: Frustration. Mixed concentrations of it. Since I messed up the configuration, I wanted to restart the VM where Kaltura is installed. Unfortunately, I forgot the password that encrypts the VM. Now I have to start from scratch with a new VM.</p>
<p>That&#8217;s why I move on to another construction site. Migrating from Samsung S2 to Fairphone. There are problems at multiple levels:</p>
<ul>
<li>At a high level: I am carrying around two devices every day. It&#8217;s not a big tragedy during work, since I am working everyday with multiple smartphones. But for personal use this must really change.</li>
<li>My contacts are not imported to Fairphone yet.</li>
<li>My calendar syncronization got reverted, for whatever reason. (Maybe it requires the sync server to be up and running all the time.)</li>
</ul>
<p>Let&#8217;s tackle it, in the end it was quite easy. I will share my knowledge. Plus bonus material: a journey through the data jungle of a device that I have used since 3 years</p>
<p><span id="more-1556"></span></p>
<p><strong>Samsung S2 &#8211; Creaate a Full Backup</strong></p>
<ul>
<li>My Samsung S2 went into a bootloop and I was about to lose all my data stored there.</li>
<li>Fortunately, this is<a href="http://www.android-hilfe.de/samsung-galaxy-s2-i9100-forum/499336-s2-bootet-nur-noch-bis-zum-samsung-logo-datensicherung-noch-moeglich-2.html"> a common problem</a>. And I found help in forums and blogs.</li>
<li>Essentially, the steps are:
<ul>
<li>Insert an SD-Card</li>
<li>Install <a href="http://www.androidayos.com/2013/01/24/root-i9100xwls8-samsung-galaxy-s2-4-1-2-jelly-bean-with-philz-cwm6/">PhilZ Recovery Root Kernel</a></li>
<li>Make a Backup of the System and store it on the SD-Card</li>
<li>Copy the Backup to your PC</li>
</ul>
</li>
<li>Do a factory reset and reboot</li>
<li>Side-effect: The device is now rooted. I have not figured out a way to disable root again other than removing PhilZ recovery and flashing the original kernel.</li>
</ul>
<p><strong>Extracat the Backup</strong></p>
<p>PhilZ recovery backup has multiple tar files and some are split into multiple parts:</p>
<ul>
<li>cache.ext4.tar + cache.ext4.tar.a</li>
<li><strong>data.ext4.tar + data.ext4.tar.a + data.ext4.tar.b</strong></li>
<li>preload.ext4.tar + preload.ext4.tar.a</li>
<li>system.ext4.tar + system.ext4.tar.a</li>
</ul>
<p>The data.ext4.* files are of our interest here. I remember having problems extracing the multi-part tar.<br />
My .bash_history logged this, maybe it helps you:</p>
<blockquote><p>tar -A data.ext4.tar.a data.ext4.tar.b<br />
cat data.ext4.tar.* &gt;data.ext4-full.tar<br />
ls<br />
tar -Mxf data.ext4.tar.a<br />
ls<br />
tar -Mxf data.ext4.tar.b<br />
ls<br />
rm -R data<br />
ls -lah<br />
tar -xf data.ext4-full.tar</p></blockquote>
<p>In the end, I have a data directory that contains all the data that are supposed to be private to the application, according to the <a href="https://developer.android.com/guide/topics/data/data-storage.html">Android developer guide -&gt; Internal Storage.</a></p>
<p>This should make Application developers aware that your users, if they have a rooted device, can easily read out all the files that you store using code like this:</p>
<blockquote><p>FileOutputStream fos = openFileOutput(FILENAME, Context.MODE_PRIVATE)</p></blockquote>
<p>Now let&#8217;s solve our calendar / contact problems.</p>
<p><strong>Transfer Calendar to Fairphone</strong></p>
<p>That&#8217;s easy:</p>
<ul>
<li> adb push ./data/data/com.android.providers.calendar/databases/calendar.db /data/data/com.android.providers.calendar/databases/calendar.db</li>
</ul>
<p><strong>Transfer Contacts to Fairphone</strong></p>
<p>There are two options:</p>
<p>Option 1: You have your contacts already in your old phone<br />
Just export it as vcf file, transfer the file to the Fairphone and tap on it to import it.</p>
<p>Option 2: You only have a backup of the contacts.<br />
Simply pushing the contacts2.db and the profile.db to the Fairphone does not work. It makes the Fairphone crash infinitely (&#8220;acore process stopped working&#8221;). If you try this out and you are stuck, only deleting all files in the /com.android.providers.contacts/databases directory made the system happy again.</p>
<p>You also cannot conntect to contact2.db by using sqlite3 and execut a query like this: <code>SELECT name, number FROM view_v1_phones.</code> Or at least I got an error:</p>
<blockquote><p><code>Error: no such function: _PHONE_NUMBER_STRIPPED_REVERSED</code>.</p></blockquote>
<p>This has been discussed at multiple places (e.g. <a href="http://taskerfans.blogspot.ch/2013/04/how-to-get-contact-phone-number-via.html">here</a>) with no fix.</p>
<p>The solution is similar to the first option. Convert the contacts2.db into a vcf file using a handy tool called dump-contacts2db written by <a href="https://github.com/damiencourousse">damiencourousse:</a></p>
<blockquote><p>git clone https://github.com/stachre/dump-contacts2db.git<br />
cd dump-contacts2db/<br />
chmod +x dump-contacts2db.sh<br />
./dump-contacts2db.sh ~SamsungS2Backup/data/data/com.android.providers.contacts/databases/contacts2.db &gt;contacts2.vcf<br />
adb push contacts2.vcf /storage/sdcard1/</p></blockquote>
<p>Then, open your favorite file manager on the Fairphone (e.g. com.mediatek.filemanager), view your SDCard and tap on contacts2.vcf. You will get a popup saying the vcf will be imported immediately. Wait a few seconds and go to the &#8220;People&#8221; or &#8220;Phone&#8221; app. I was irritated because the list of contacts in the &#8220;Phone&#8221; app did not show all my contacts. The full list of contacts is available in the &#8220;People&#8221; app, which has also an import/export functionality for backups.</p>
<p><strong>Browsing through the data of my phone</strong></p>
<p>After being on the safe side with all a typical phone should provide (contacts, calendar), I had a look at the wealth of files that my apps were creating over the last years. Here is just an excerpt of just a few:</p>
<p><code>tree -d ~/SamsungS2Backup/data/data &gt;tree.txt<br />
~/SamsungS2Backup/data/data/<br />
<strong>├── clipboard</strong><br />
│   ├── 11035877441527_713_688<br />
│   ├── 11117198484028_490_157<br />
│   ├── 11123529923033_399_203<br />
│   ├── 11125022485038_58_11<br />
│   ├── 11131899365217_381_354<br />
│   ├── 11132476725430_290_78<br />
│   ├── 11132692882052_300_262<br />
│   ├── 11134788405632_438_384<br />
│   ├── 11137058721120_616_237<br />
│   ├── 1113945536256_810_435<br />
│   ├── 11155423043231_266_46<br />
│   ├── 11157595924259_753_313<br />
│   ├── 1116525320426_49_9<br />
│   ├── 11177034803045_163_50<br />
│   ├── 11184939921140_966_757<br />
│   ├── 11191003921513_416_146<br />
│   ├── 1119155824634_641_489<br />
│   ├── 1119626880629_35_3<br />
│   ├── 1120410536616_847_142<br />
│   ├── 1121935560353_752_429<br />
│   ├── 11219932321750_779_538<br />
│   └── 11225179923135_382_381<br />
├── data<br />
<strong>│   ├── com.android.calendar</strong><br />
│   │   ├── cache<br />
│   │   │   └── com.android.renderscript.cache<br />
│   │   ├── lib<br />
│   │   └── shared_prefs<br />
<strong>│   ├── com.android.contacts</strong><br />
│   │   ├── cache<br />
│   │   ├── files<br />
│   │   ├── lib<br />
│   │   └── shared_prefs<br />
│   ├── com.android.defcontainer<br />
│   │   ├── cache<br />
│   │   │   └── com.android.renderscript.cache<br />
│   │   └── lib<br />
│   ├── com.android.email<br />
│   │   ├── cache<br />
│   │   │   └── com.android.renderscript.cache<br />
│   │   ├── databases<br />
│   │   ├── files<br />
│   │   ├── lib<br />
│   │   └── shared_prefs<br />
│   ├── com.android.exchange<br />
│   │   ├── cache<br />
│   │   │   └── com.android.renderscript.cache<br />
│   │   └── lib<br />
│   ├── com.android.facelock<br />
│   │   └── lib<br />
│   ├── com.android.htmlviewer<br />
│   │   ├── cache<br />
│   │   ├── databases<br />
│   │   └── lib<br />
│   ├── com.android.keychain<br />
│   │   ├── cache<br />
│   │   ├── databases<br />
│   │   └── lib<br />
│   ├── com.android.mms<br />
│   │   ├── app_sslcache<br />
│   │   ├── cache<br />
│   │   │   └── com.android.renderscript.cache<br />
│   │   ├── lib<br />
│   │   └── shared_prefs<br />
<strong>│   ├── com.android.phone</strong><br />
│   │   ├── cache<br />
│   │   ├── databases<br />
│   │   ├── files<br />
│   │   ├── lib<br />
│   │   └── shared_prefs<br />
<strong>│   ├── com.android.providers.calendar</strong><br />
│   │   ├── cache<br />
│   │   │   └── com.android.renderscript.cache<br />
│   │   ├── databases<br />
│   │   ├── lib<br />
│   │   ├── shared_prefs<br />
│   │   └── sticker<br />
<strong>│   ├── com.android.providers.contacts</strong><br />
│   │   ├── cache<br />
│   │   ├── databases<br />
│   │   ├── files<br />
│   │   │   ├── photos<br />
│   │   │   └── profile<br />
│   │   │       └── photos<br />
│   │   ├── lib<br />
│   │   └── shared_prefs<br />
│   ├── com.android.providers.media<br />
│   │   ├── cache<br />
│   │   ├── databases<br />
│   │   ├── face<br />
│   │   ├── lib<br />
│   │   └── shared_prefs<br />
│   ├── com.android.providers.security<br />
│   │   └── lib<br />
│   ├── com.android.providers.settings<br />
│   │   ├── databases<br />
│   │   └── lib<br />
│   ├── com.android.providers.tasks<br />
│   │   ├── cache<br />
│   │   ├── databases<br />
│   │   └── lib<br />
│   ├── com.android.providers.telephony<br />
│   │   ├── databases<br />
│   │   ├── lib<br />
│   │   └── shared_prefs<br />
│   ├── com.android.providers.userdictionary<br />
│   │   └── lib<br />
│   ├── com.android.samsungtest.DataCreate<br />
│   │   └── lib<br />
│   ├── com.android.settings<br />
│   │   ├── cache<br />
│   │   ├── databases<br />
│   │   ├── files<br />
│   │   ├── lib<br />
│   │   └── shared_prefs<br />
│   ├── com.dropbox.android<br />
│   │   ├── app_bromo<br />
│   │   ├── app_sslcache<br />
│   │   ├── cache<br />
│   │   │   └── com.android.renderscript.cache<br />
│   │   ├── databases<br />
│   │   ├── files<br />
│   │   │   └── anl<br />
│   │   ├── lib<br />
│   │   └── shared_prefs<br />
│   ├── com.google.android.gm<br />
│   │   ├── app_sslcache<br />
│   │   ├── cache<br />
│   │   │   └── com.android.renderscript.cache<br />
│   │   ├── databases<br />
│   │   ├── files<br />
│   │   ├── lib<br />
│   │   └── shared_prefs<br />
│   ├── com.google.android.videos<br />
│   │   ├── cache<br />
│   │   ├── databases<br />
│   │   ├── files<br />
│   │   ├── lib<br />
│   │   └── shared_prefs<br />
│   ├── com.google.android.voicesearch<br />
│   │   ├── app_sslcache<br />
│   │   ├── cache<br />
│   │   ├── lib<br />
│   │   └── shared_prefs<br />
│   ├── com.google.android.youtube<br />
│   │   ├── app_sslcache<br />
│   │   ├── cache<br />
│   │   │   └── com.android.renderscript.cache<br />
│   │   ├── databases<br />
│   │   ├── files<br />
│   │   ├── lib<br />
│   │   └── shared_prefs<br />
│   ├── com.imdb.mobile<br />
│   │   ├── cache<br />
│   │   │   ├── com.android.renderscript.cache<br />
│   │   │   ├── default<br />
│   │   │   └── defaultImages<br />
│   │   ├── databases<br />
│   │   ├── files<br />
│   │   ├── lib<br />
│   │   └── shared_prefs<br />
<strong>│   ├── com.linkedin.android</strong><br />
│   │   ├── cache<br />
│   │   ├── databases<br />
│   │   ├── databasese<br />
│   │   │   └── localstorage<br />
│   │   ├── files<br />
│   │   ├── lib<br />
│   │   └── shared_prefs<br />
</code><br />
One thing that I was not aware is how the clipboard behaves: Apparently, whenever you copy some text or images into the Android clipboard, it gets stored in the /data/clipboard directory for a while:<br />
<code><br />
ls */*<br />
11035877441527_713_688/clip                                         11137058721120_616_237/Screenshot_2014-05-16-17-11-15.png_thum.jpg  1119155824634_641_489/Screenshot_2014-05-13-10-06-33.png_thum.jpg<br />
11117198484028_490_157/clip                                         1113945536256_810_435/clip                                          1119626880629_35_3/clip<br />
11123529923033_399_203/clip                                         11155423043231_266_46/clip                                          1119626880629_35_3/Screenshot_2014-05-13-10-06-28.png<br />
11123529923033_399_203/Screenshot_2014-05-13-11-30-16.png           11155423043231_266_46/Screenshot_2014-05-13-10-32-29.png            1119626880629_35_3/Screenshot_2014-05-13-10-06-28.png_thum.jpg<br />
11123529923033_399_203/Screenshot_2014-05-13-11-30-16.png_thum.jpg  11155423043231_266_46/Screenshot_2014-05-13-10-32-29.png_thum.jpg   1120410536616_847_142/clip<br />
11125022485038_58_11/clip                                           11157595924259_753_313/clip                                         1120410536616_847_142/Screenshot_2014-05-13-10-06-15.png<br />
11131899365217_381_354/clip                                         1116525320426_49_9/clip                                             1120410536616_847_142/Screenshot_2014-05-13-10-06-15.png_thum.jpg<br />
11132476725430_290_78/clip                                          11177034803045_163_50/clip                                          1121935560353_752_429/clip<br />
11132692882052_300_262/clip                                         11184939921140_966_757/clip                                         11219932321750_779_538/clip<br />
11134788405632_438_384/clip                                         11191003921513_416_146/clip                                         11225179923135_382_381/clip<br />
11137058721120_616_237/clip                                         1119155824634_641_489/clip<br />
11137058721120_616_237/Screenshot_2014-05-16-17-11-15.png           1119155824634_641_489/Screenshot_2014-05-13-10-06-33.png</code></p>
<p>The clip files contain the text that was stored in the clipboard.</p>
<blockquote><p><code>cat 11117198484028_40_157/clip<br />
��sr1android.sec.clipboard.data.list.ClipboardDataTextLmValuetLjava/lang/String;xr(android.sec.clipboard.data.ClipboardDataILOG_LENI    mFormatIDZ<br />
mIsProtectedxptEhttp://fincrunch.wordpress.com/2014/05/17/native-vs-html5-html5-wins/</code></p></blockquote>
<p>I read that this <a href="https://android.stackexchange.com/questions/59288/where-does-android-store-clipboard-data">persistent storage of clipboard data happens only in Samsung devices</a>, not in phones that have plain Android installed.</p>
]]></content:encoded>
			</item>
	</channel>
</rss>
