Fairphone 4 – Root -December 2021

A couple of days ago I received my Fairphone 4, but unfortunately for the moment, there aren’t any alternative operating systems available that provides you root access. Fortunately, the community already found a method to root the phone and to install Magisk. However, the instructions were not always that clear and I have written my own instructions guide.

⚠⚠⚠ WARNING ⚠⚠⚠

This guide is provided as is and comes with ABSOLUTELY NO WARRANTY; during the process the phone will be wiped and you will lose data. There is also a reasonable chance the phone gets bricked. Perform these steps is at your own risk and the writer, the community or Fairphone are not liable for any damages caused by following this procedure. Continue on your own risk.

The above warning can be summarized in the simple question: “Do you trust a geek from Belgium”, if the answer is No, close this page and wait until there are beter alternatives. Fun Fact… initially I ended up with corrupted phone, so again, on your own risk.

“Remember, kids: The only difference between screwing around and science is writing it down.”

Also, while this was a fun little project, I’m not planning to keep this procedure up to date. So, for support, it is best you reach out to the community on the FairPhone website.

Download adb & fastboot

The adb and fastboot tools can be found on the official developer website from android: https://developer.android.com/studio/releases/platform-tools

Download the tools and extract them somewhere on your computer.

Unlock the bootloader

Again, another warning, when you unlock the bootloader, the device will be wiped and you lose all data. Please note: I have performed this on Windows 10 machine. For Linux and macOS, some steps could be different.

  1. Get the bootloader unlock code from the FairPhone website by following the next procedure, and while it says FairPhone 3 it also works for the 4: https://www.fairphone.com/en/bootloader-unlocking-code-for-fairphone-3/
  2. Once you have entered the code on the phone; Go to Settings > System > Advanced > Developer options
  3. Enable USB Debugging and connect the phone to the computer using a USB cable
  4. On the computer, open a PowerShell window or Windows Terminal and go to the location where you have downloaded the platform tools (adb & fastboot)
  5. Reboot into the bootloader by running the command .\adb.exe reboot bootloader
  6. On the phone; You should see Device State – Locked and need to unlock it by running the following command on the computer: .\fastboot.exe flashing unlock
  7. Note: if you receive the message < waiting for any device >, you are probably missing the correct driver. Run ‘PART 2 On your computer‘ of the following article. (This was a mistake I initially made)
  8. After successfully running the command, you will see a big warning on the phone. Confirm by selecting UNLOCK THE BOOTLOADER and push the power button
  9. After this step, the phone will reboot a couple of times and eventually will be wiped

Once done, you will need to run the initial configuration process and enable the USB debugging again.

Install Magisk App

The latest version of the Magisk App can be found on the Github Page of the developer: https://github.com/topjohnwu/Magisk/releases

Download the APK and install this on the phone.

Download and patch the stock boot image

The original boot image can be found on the FairPhone website: https://code.fairphone.com/projects/fairphone-4-kernel.html

Make sure you download the correct build. To find the correct build; On the phone, go to Settings > About Phone > Build number.

In this example the build number is FP4.FP3Q.A.094.20211213 so the corresponding boot.ing-file is build A.094.

Once you have downloaded the image to your phone, you need to patch the file using the Magisk App:

  1. Open the Magisk app on the phone.
  2. Click on Magisk Install.
  3. Select Select and Patch a file
  4. Selected te downloaded image (in my case A.094-boot.img)
  5. Click on LETS’s GO
  6. (optional) Write down the output location

⚠ Obviously, make sure that the patching was successful.

Install the patched boot image

  1. On the computer, open a terminal and go to the location where you have downloaded the platform tools (adb & fastboot)
  2. Download the patched boot image to the computer using the command adb pull <patched boot image location>
  3. Reboot the phone to the bootloader using the command: .\adb.exe reboot bootloader
  4. Perform a fastboot with the patched image using the command: .\fastboot.exe boot <path to boot image on pc>
  5. After successful booting using fastboot, on the phone: Open Magisk
  6. Click on Magisk Install
  7. Select Direct Install (Recommended)
  8. Click on LETS’s GO
  9. Once successful, reboot the Phone

And that’s it, normally this will provide you root access with Magisk installed.

Final warning: Don’t lock the bootloader again, like I did. 😅

Resources

5 thoughts on “Fairphone 4 – Root -December 2021”

  1. Thanks Stijn,
    You have a talent!
    Are you going to use this talent explaining how to install NanoDroid – MicroG on FP4? I got to here (Magisk on a rooted FP4), but now I’m strugling.
    Oh, looking forward to that.
    Regards, Robert

    PS I bricked my FP4 in 3 minutes, personal best, and forget to write down how I did it. Factory reset solved it.

    1. @Robert No, I’m using this phone on a daily basis, so I don’t feel like experimenting too much with it. Once LineageOS is released for Fairphone 4, I will probably move to that ROM.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.