How to root the Fairphone 4

Prerequisites

  • Unlock the bootloader
  • Install Magisk
  • Get the original boot.img of your ROM

Process

Initial Setup

  • Patch the downloaded stock boot.img with Magisk
  • Transfer / adb pull that patched boot.img to your PC
  • Reboot to fastboot adb reboot bootloader and temporarily boot from the patched boot.img fastboot boot /path/to/patched_boot.img
    Do not flash that boot.img!!!
  • Wait for the device to boot (took a bit longer than usual)
  • Open the Magisk app (press Cancel when asked to perform Additional Setup), choose direct install and reboot

After OTA Update

  • Download and install the update
    Do not reboot yet!!
  • Open Magisk and select Install
  • Choose "Install to inactive slot (after OTA)"