• We are moving to xdaforums.com!

    Posts made between now and when the migration is complete will not be carried over.
    You will be automatically redirected once the migration is complete.

How To Guide Fairphone 4 - Root

Search This thread

Eznaa

Member
Jun 7, 2021
17
7
Fairphone
ASUS ZenFone 8
Here's a quick guide for rooting your Fairphone 4.

DISCLAIMER

I'm not the author of this method, merely sharing the informations that can be found on fairphone community forums.
All credit goes to hirnsushi from fairphone community forum.

I will not be held responsible for any damage caused by this operation, flashing your device always implies a risk of manufacturing your very own plastic brick.


PREREQUISITES

-
Unlocked bootloader
- Computer with adb & fastboot
- Magisk app installed on your device
- FP4's official stock boot.img


HOW TO ROOT

1. Copy the boot.img file on your device's internal memory
2. Patch the boot.img file using Magisk -> Installation -> Patch a file
3. Transfer the patched boot.img back to your computer
4. Reboot to fastboot: Power + vol up from off device OR adb reboot bootloader
5. Boot from the patched img by running: fastboot boot patched_boot.img where patched_boot.img is actually replaced with the path and name of your patched file :)
DO NOT FLASH THE PATCHED IMG. BOOT ONLY.
6. Your device will take much much more time to boot than usual, be patient.
7. Once booted, open Magisk, run a direct Install and reboot.

You are now rooted.
This will break your ability to use Google Pay. Though a workaround is described below.


[OPTIONAL]- PASS SAFETYNET AND GPAY CERTIFICATION

1. Download and enable the following Magisk mod:
- Riru module
- Riru’s universal SafetyNet’s fix 2.1.2
- SQLLite for ARM aarch64 devices
- GPay SQLLite Fix 2.5

2. Enable Magisk hide and hide Magisk from the following packages:
- Google Play Store
- Google Pay
- Google Play Services

3. Now the part that is very important to follow otherwise it will not work :
- Put your phone in Airplane mode
- Clear all data from:
  • Google Play
  • Google Pay
  • Google Play Service: remember, clear ALL data, not just cache, even for this one
- Reboot
- Toggle Airplane mode off

You should now have a rooted device that can be used to pay for groceries. How cool is that.
If Pay app states device is not certified, there is high chances you did not follow exactly the described steps.
 
Last edited:

MKKLR21

Senior Member
Aug 8, 2013
317
141
I'm on the latest update and not able to unlock the bootloader. I enabled OEM unlocking in developer options and rebooted to bootloader. On the first screen it says "Device status: Locked" and doesn't react on any fastboot command. When I enter recovery and start fastboot, each command will fail (command not present in this implementation). Any hints?
 

MKKLR21

Senior Member
Aug 8, 2013
317
141
Finally managed to unlock the bootloader. The trick was to use an USB2.0 port on my PC.
 

Bobtheagent

Member
Nov 1, 2014
11
1
I live in US so don't have one in my hands yet. Has anyone done a .QCN dump of the phone yet? Do you program the phone with Firehose EDL? Are there qualcomm drivers? I have so many questions.
 

Thomas.swe

Member
Jan 29, 2022
25
2
I'm using latest magisk 24.1 and todays OTA fails. I tried with Zygisk on and off. In the magisk app under install there is a install to new slot thing but I feel like that's supposed to be used if it don't fail. will I brick my phone if i click it?


edit:
found this on fp forum
 
Last edited:

I_did_it_just_tmrrow

Senior Member
Feb 27, 2011
390
77
I tried it with the latest boot.img avaliable here ('cause I have the A.094 ROM version on my phone)
And that works perfectly, that's my daily driving phone, and no problems ;)
My Build-Number say I am on:
FP4.FP3R.A.099.20220112

So it seems my Bootloader version should be A.099 but there is no file like this:

Is it okay to take a older boot img or another?
Latest seems to be
and before that:
 

Thomas.swe

Member
Jan 29, 2022
25
2
I'm using latest magisk and safetynet-fix-v2.2.1, GPay.SQLite.Fix.v2.5, SQLite for ARM aarch64 devices.
 

I_did_it_just_tmrrow

Senior Member
Feb 27, 2011
390
77
the 099 came from OTA so why whould bootloader be 094?
I am just thinking that you are on 094. Perhaps I am wrong.

But in step 5 you boot the patched 094 img and with this 094 boot image you run the direct magisk install on step 7. If I a not wrong magisk used the current running boot-image. So magisk patched your 094.

Perhaps I am wrong, I am not sure.

EDIT:
You are right @Thomas.swe :) Sorry for confusing. 🙈
See here: https://forum.fairphone.com/t/fp4-root-access-is-possible-maybe-a-bit-risky/76839/144

EDIT2:
@Eznaa does "our device will take much much more time to boot than usual, be patient." mean more than 20 minutes?
EDIT3:
No :D I used the wrong bootloader. Iode OS has its own bootloader-image :D upsi
 
Last edited:

Dakkaron

Senior Member
Jan 13, 2013
62
19
I had root working using this method on A.116-boot.img. I then uninstalled Magisk, did an OTA (to A.128), did "Install Magisk to inactive Slot" (as I successfully did in older OTA updates), but it bootloops. If I `fastboot flash boot A.128-boot.img` it boots normally, but as expected, without root.

I tried an `adb wait-for-device shell magisk --remove-modules` to make sure no Magisk modules are causing the bootloop. I am on Magisk 25.1, btw.

Do you have any idea what could cause the Magisk-patched image to bootloop?
 

citroniais

Member
Dec 12, 2021
8
9
France
Hi,
Did you try to patch A.128 and boot on it ?
fastboot boot [image]

Please note : the best way to find an answer about any issue related to Fairphone is in the "Fairphone Community Forum" : forum.fairphone.com - The Fairphone users are not using that much XDA ;)
 
  • Like
Reactions: Aanze

beechwood45

Member
Aug 27, 2020
5
1
I am thinking of buying Fairphone 4 and need magisk. Can anyone answer a question about the installation instructions above? Magisk website says to flash the magisk patched boot image but here the instruction is to first boot from the magisk patched image, not flash it, and then once booted run a direct install from the magisk app. What is the reason for this extra step?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    Here's a quick guide for rooting your Fairphone 4.

    DISCLAIMER

    I'm not the author of this method, merely sharing the informations that can be found on fairphone community forums.
    All credit goes to hirnsushi from fairphone community forum.

    I will not be held responsible for any damage caused by this operation, flashing your device always implies a risk of manufacturing your very own plastic brick.


    PREREQUISITES

    -
    Unlocked bootloader
    - Computer with adb & fastboot
    - Magisk app installed on your device
    - FP4's official stock boot.img


    HOW TO ROOT

    1. Copy the boot.img file on your device's internal memory
    2. Patch the boot.img file using Magisk -> Installation -> Patch a file
    3. Transfer the patched boot.img back to your computer
    4. Reboot to fastboot: Power + vol up from off device OR adb reboot bootloader
    5. Boot from the patched img by running: fastboot boot patched_boot.img where patched_boot.img is actually replaced with the path and name of your patched file :)
    DO NOT FLASH THE PATCHED IMG. BOOT ONLY.
    6. Your device will take much much more time to boot than usual, be patient.
    7. Once booted, open Magisk, run a direct Install and reboot.

    You are now rooted.
    This will break your ability to use Google Pay. Though a workaround is described below.


    [OPTIONAL]- PASS SAFETYNET AND GPAY CERTIFICATION

    1. Download and enable the following Magisk mod:
    - Riru module
    - Riru’s universal SafetyNet’s fix 2.1.2
    - SQLLite for ARM aarch64 devices
    - GPay SQLLite Fix 2.5

    2. Enable Magisk hide and hide Magisk from the following packages:
    - Google Play Store
    - Google Pay
    - Google Play Services

    3. Now the part that is very important to follow otherwise it will not work :
    - Put your phone in Airplane mode
    - Clear all data from:
    • Google Play
    • Google Pay
    • Google Play Service: remember, clear ALL data, not just cache, even for this one
    - Reboot
    - Toggle Airplane mode off

    You should now have a rooted device that can be used to pay for groceries. How cool is that.
    If Pay app states device is not certified, there is high chances you did not follow exactly the described steps.
    3
    I tried it with the latest boot.img avaliable here ('cause I have the A.094 ROM version on my phone)
    And that works perfectly, that's my daily driving phone, and no problems ;)
    2
    Generally speaking I can only but encourage you to register and browse the fairphone forum as there are much much more resources, guides and activity around the fairphone 4 than on xda.
    2
    I just successfully rooted a new FP4 using this guide. It worked but required a few minor adjustments for 2023.
    • Before rooting I updated to Android 12 using the stock OTA update
    • As @rokejulianlockhart mentioned, the boot.img linked in the post is outdated. I downloaded FP4-SP29-factory.zip from fairphone, which contains the stock boot.img.
      • The official installation instructions are also useful for unlocking the bootloader
    • Riru is no longer developed. It has been replaced by Zygisk, a feature of Magisk that can be enabled in the Magisk settings.
    • Magisk modules are now installed from github. There is no module repository in Magisk
    • I used the 'Universal SafetyNet fix' from Displax/safetynet-fix. This incorporates some pull requests that have not yet been accepted by the upstream kdrag0n/safetynet-fix branch linked in the post. According to the YASNAC app this should be enough to install banking apps (I haven't tried gpay yet).
    2
    Mod translation: I'm Indonesian

    Greetings, and welcome to XDA. As a friendly reminder, we ask all members to please post in English as stipulated by XDA Rule #4:

    4. Use the English language.

    We understand that with all the different nationalities, not everyone speaks English well, but please try. If you're really unable to post in English, use an online translator. You're free to include your original message in your own language, below the English translation. (This rule covers your posts, profile entries and signature). You could try :- https://translate.google.com/ or https://www.babelfish.com/ or use one of your choice.

    Thank you for your cooperation, and enjoy your stay on XDA.

    -Regards: Badger50