The Fairphone 2 of Theseus

Warning: this is still a draft. I wrote down the important bits so that I don't forget

It should be common knowledge that you can (or at least could) get spare parts for pretty much every major component of a Fairphone 2. Broken camera? Just remove the old camera module and stick in a new one. Broken charger port? Same story. Even the display can be swapped without so much as a screwdriver.

But what about the main module? The one with the CPU and memory and storage where all the pictures and browser history, apps and contacts live? The soul of the phone? Surely that can't be easily replaced?

With the bootable recovery image from Lineage, we can boot the old module into a minimal recovery environment. There, we can enable ADB access. After attaching a usb cable, we can copy the complete memory from the old main module to the connected computer.

Step 1

adb pull /dev/block/mmcblk0 mmcblk0.img

This will take quite a while and require a lot of space on the computer. It should be possible (although I haven't tried this) to compress the image on the fly:

adb shell 'dd if=/dev/block/mmcblk0 2>/dev/null' | gzip > mmcblk0.img.gz

Now we have a complete copy of everything that was living on the old core module on our computer. It is in fact so complete that even the whole Android system is included.

Step 2

Now we do the whole thing in reverse with the new core module. We boot also put the new module into Lineage recovery, enable ADB access, attach the USB cable. Now we simply write everything that we copied from the memory of the old module into the new one.

pv mmcblk0.img | adb shell 'dd of=/dev/block/mmcblk0'

I use pv to get a nice progress bar. If you don't have it installed, you can use cat in its place but won't get a nice progress bar. Be prepared to wait a while.

If you have a compressed image, you have to decompress it on the fly, something like so:

gunzip mmcblk0.img.gz | pv | adb shell 'dd of=/dev/block/mmcblk0'


Now we have successfully replaced the core module, keeping the Android system and all the memory contents, including pictures and browser history.

Pages linking here