Old thread but I just rooted DivestOS on an FP3 and I basically followed recommended Magisk patch boot image approach, except flashing the patched boot image, you will boot with it ones (like recommended to do for the FP4, an approach, which I and several other also used successfully, e.g. to root CalyxOS).
Steps:
Extract the boot.img
from the DivestOS fastboot zip, which I used to install (divested-20.0-20231110-dos-FP3-fastboot.zip)
Transfer the boot.img
as well the Magisk-v26.4.apk
to the phone
(simply via USB cable and enabled File transfer)`
Install the Magisk App and start it.
Patch the boot.img via Magisk App (Click on âInstallâ then âSelect and Patch a Fileâ)
Transfer/copy the resulting magisk_patched-26400_lXE8u.img
back to the PC (via USB again)
Enable USB debugging again (to do so, enable and go to the dev options - as always)
adb reboot bootloader
fastboot boot magisk_patched-26400_lXE8u.img
(imho this is a very safe way to root, as, if this boot with the patched image fails you can simply restart your phone and it will boot as before)
Open the Magisk app (press Cancel
when asked to perform Additional Setup
)-
Choose âDirect Install (recommended)â and reboot`
Now your DivestOS is rooted.
I think there is no need for TWRP (but of course if you like to use it feel free to stick to the TWRP image way of rooting )