How to root a Fairphone 3

I own a pretty new smartphone. It’s a Fairphone 3+.

Like many geeks I prefer to have a custom ROM instead of the official Android©.

LineageOS does not officially support the Fairphone 31.

But we can find non-official ROM (I will try to install it and then make another post).

Before installing those kind of ROM (official or not) you must root your phone2.

And, all the tutorials I found on the web drives me crazy. But I succeeded. There is how I made it, with more details as possible.

Prerequisites

Install software

Depending of your distribution, search and install adb and fastboot utilities.

Unlock the bootloader

You will need to in lock the FP (for Fairphone). For that just read and apply the official procedure. Just omit the last step, Lock your bootloader (but remember about it).

Download the official ROM

We will use it and patch it.

Download it from this page, but don’t go futher.

Unzip

With the unzip tool, decompress the archive:

unzip FP3...user-fastbootimage.zip

This will result a new directory named after the zip name.

Go inside it with the cd command:

cd FP3...user-fastbootimage

You can use the bash completion, hitting the TAB key.

Download and install Magisk

Magisk is the tool which allow us to patch the system to grant root access. You just need Magisk manager. Download it using the android navigator and install it on your FP3.

Launch Magisk Manager

If you launch Magisk manager, you will see two parts:

  • Magisk
  • Manager

Magisk part tell that it’s not yet install (and for now it out of business) and the Manager part tell that the manager is installed (of course, you just have launch it!).

Command line operations

Here is the big part.

Upload files to you FP3

First you need to plug the FP3 to your computer.

Be sure the computer see the FP3 with the command:

adb devices
List of devices attached
A209RP9B0201	device

Be sure your device is unlock (schema, fingerprint, etc)

You’re still in the folder resulting of the unzipping official ROM.

With the adb command again were going to upload the boot.img file onte to Download folder of the FP3:

adb push boot.img /sdcard/Download/.

That’ it for now, time to go back on the phone.

Magisk Manager again

Launch Magisk Manager and, in the first part, hitting Installer. Navigate to the Download folder and choose boot.img, then the Go button on the up right of the screen.

This with patch the boot.img into a magisk_patched.img file.

Once it’s done we go back to the command line of your computer.

Get the patched image

We need to download on the computer the magisk_patched.img file.

With the adb command, simply pull the file:

adb pull /storage/emulated/0/Download/magisk_patched.img

Boot in bootloader mode

We need to boot the device into the bootloader mode (remember with unlock it at the beginning of the procedure).

adb reboot bootloader

You should have something like this:

The bootloader unloked

Pull the patched image

Back to the computer, we gonna use another command we had installed,fastboot.

Once we must find the active slot:

fastboot getvar current-slot
current-slot: a
Finished. Total time: 0.001s

Mine is a but yours could be b.

Be sure to make it active:

fastboot --set-active=a

Then, it’s time to flash the current boot.img with the patched one.

fastboot flash boot_a magisk_patched.img 
Sending 'boot_a' (20730 KB)                        OKAY [  0.938s]
Writing 'boot_a'                                   OKAY [  0.220s]
Finished. Total time: 1.245s

Adapt the command accord of your active slot

Hum… smell good!

Time to reboot the device.

Simply push to power button or type on your computer:

fastboot reboot

Check

Check in Magisk Manager, you should see some thing like that:

Magisk Manager

Sorry the screenshot is in french.

The first part show you that it’s installed and the small icons on the bottom of the screen let you see which applications are root granted.

Disclamer

IN ANY CASE I COULD BE RESPONSIBLE OF ANY DEVICE DAMAGE. YOU USE THIS TUTORIAL AND THE SOFTWARE IN YOUR OWN RESPONSIBILITY. IN CASE OF FAILURE, REINSTALL THE DEFAULT OS USING THE FAIRPHONE PROCEDURE.


  1. LineageOS 16 is available now. [return]
  2. Grant root access to the entire phone [return]