TWRP for Fairphone 3

3 Likes

I had the same error-code as Stefan
(FP3,root,TWRP3.4) I choose every partition to be backedup except “SD-EXT”

I:Find_File: Error opening ‘/sys/class/backlight’


I:Failed to load image from indeterminate013, error -1


I:addFile ‘/data/misc_ce/0/BIRNXu6JStT9PesVZ0YvWD/KQ9WYK8AIVcD9C63IZLfWB’ including root: 1
==> set selinux context: u:object_r:storaged_data_file:s0
I:Error adding file ‘/data/misc_ce/0/BIRNXu6JStT9PesVZ0YvWD/KQ9WYK8AIVcD9C63IZLfWB’ to ‘/external_sd/TWRP/BACKUPS/A209JDY40201/1969-12-31–20-23-03_89012A011020200109/data.ext4.win000’
Error creating backup.
I:ERROR tarList for thread ID 0
Error creating backup.
I:InfoManager saving ‘/external_sd/TWRP/BACKUPS/A209JDY40201/1969-12-31–20-23-03_89012A011020200109/data.info’
createTarFork() process ended with ERROR: 255
Backup Failed. Cleaning Backup Folder.

I checked and the filesystem on the SD-Card is exFAT, and there is enough free space.
Any idea what’s wrong?

For comparison I tried a backup without the Partition “Data (excl. storage)” which got through without an error.

It looks like your data wasn’t decrypted properly and can therefore not be backed up.
Did you decrypt successfully?
Are you using multiple user-profiles or apps, that would create a separate user-profile?

2 Likes

That indeed looks like the problem I had here: TWRP for Fairphone 3

TWRP 3.4.0 should support multi-user decryption, although I haven’t tested it myself.
AFAIK you need to decrypt additional profiles separately via the menu.
If you want to give that another go, and let us know if that works.

Yes, that was the issue, when I tried another time, TWRP opened a prompt for the pw, decrypted the int. storage and the backup went smoothly.

2 Likes

Can I use this TWRP for the FP3+?

1 Like

yes, you can.

Steven

2 Likes

Is there a more user-friendly way to backup my FP3 before installing /e/?

I invite you to read the #dic:backup manual on the forum. You could use Titanium Backup (Play Store) or OAndBackupX (F-Droid). But myself I have tried neither.

Hello,

That’s a great news, but how?

I used adb reboot fastboot then
fastboot --set-active=a fastboot boot twrp-3.4.0-0-FP3.img

but the result is:

creating boot image...
creating boot image - 10240 bytes
Sending 'boot.img' (10 KB)                         OKAY [  0.028s]
Booting                                            FAILED (remote: 'dtb not found')
fastboot: error: Command failed

Think I need some help.

Thanks for any advice.
Thanks for all the great job the community accomplished.
jfoucry

Hi,

“fastboot boot twrp.img” works for me.

Steven

Well not for me, but I succeeded to root my FP3+. I am writing a tutorial right now.

Thanks.

2 Likes

This looks like your boot.img is not the correct file: creating boot image usually appears when the file does not have the correct header. Also 10KB is way to small for the boot image.

I get:

fastboot boot twrp-3.4.0-0-FP3.img 
Downloading 'boot.img'
OKAY [  0.979s]
booting
OKAY [  8.642s]
Finished. Total time: 9.659s
3 Likes

Oh God! You’e right. I did not check before but my twrp.img file is in fact a html file!

Btw, I succeeded to root my fairphone with Magisk. I did not net twrp anymore I think.

I finally succeeded to boot on twrp.img and install it on my FP3+.
I need to complete my blog post :slight_smile:

Thanks for your help.

I tried flashing my phone with your FP3_flashall.exe, however, after booting my phone into fastboot the program just halts. It looks like it doesn’t wait long enough (only 5 seconds) for the phone to boot into fastboot, and then cannot find it and also never tries again. Starting the .exe while already in fastboot mode also fails, because the program seems to look only in adb, not fastboot.

Is there any way I can continue with the flashing process? I would have flashed the .img files with a bash script as usual, however, some of those files aren’t included in the 7z file (for example, modem.img), so I’m not sure about what to do.

flash.sh begin
#!/bin/sh

   DEVICE="FP3"

_exit(){
  echo $1
  exit 1
}

## CHECK THE DEVICE
fastboot getvar product 2>&1 | grep "product: $DEVICE" >/dev/null || _exit "This is not a $DEVICE"

## CHECK THE FILES
[ -f product.img ] || _exit "Couldn't find ./product.img"
[ -f keymaster.img ] || _exit "Couldn't find ./keymaster.img"
[ -f cmnlib64.img ] || _exit "Couldn't find ./cmnlib64.img"
[ -f cmnlib.img ] || _exit "Couldn't find ./cmnlib.img"
[ -f lksecapp.img ] || _exit "Couldn't find ./lksecapp.img"
[ -f mdtp.img ] || _exit "Couldn't find ./mdtp.img"
[ -f vendor.img ] || _exit "Couldn't find ./vendor.img"
[ -f system.img ] || _exit "Couldn't find ./system.img"
[ -f boot.img ] || _exit "Couldn't find ./boot.img"
[ -f vbmeta.img ] || _exit "Couldn't find ./vbmeta.img"
[ -f dtbo.img ] || _exit "Couldn't find ./dtbo.img"
[ -f dsp.img ] || _exit "Couldn't find ./dsp.img"
[ -f devcfg.img ] || _exit "Couldn't find ./devcfg.img"
[ -f tz.img ] || _exit "Couldn't find ./tz.img"
[ -f rpm.img ] || _exit "Couldn't find ./rpm.img"
[ -f sbl1.img ] || _exit "Couldn't find ./sbl1.img"
[ -f modem.img ] || _exit "Couldn't find ./modem.img"
[ -f aboot.img ] || _exit "Couldn't find ./aboot.img"

## GET THE SLOTS
fastboot getvar current-slot 2>&1 | grep "current-slot: a" >/dev/null
if [ $? -eq 0 ]; then
  CURRENT_SLOT="a"
  FLASH_SLOT="b"
else
  CURRENT_SLOT="b"
  FLASH_SLOT="a"
fi
echo "CURRENT SLOT: $CURRENT_SLOT"
echo "FLASHING SLOT: $FLASH_SLOT"

## FLASH THE OTHER SLOT PARTITIONS
fastboot flash product_$FLASH_SLOT product.img -S 522239K || _exit "problem while flashing product"
fastboot flash keymaster_$FLASH_SLOT keymaster.img || _exit "problem while flashing keymaster"
fastboot flash cmnlib64_$FLASH_SLOT cmnlib64.img || _exit "problem while flashing cmnlib64"
fastboot flash cmnlib_$FLASH_SLOT cmnlib.img || _exit "problem while flashing cmnlib"
fastboot flash lksecapp_$FLASH_SLOT lksecapp.img || _exit "problem while flashing lksecapp"
fastboot flash mdtp_$FLASH_SLOT mdtp.img || _exit "problem while flashing mdtp"
fastboot flash vendor_$FLASH_SLOT vendor.img -S 522239K || _exit "problem while flashing vendor"
fastboot flash system_$FLASH_SLOT system.img -S 522239K || _exit "problem while flashing system"
fastboot flash boot_$FLASH_SLOT boot.img || _exit "problem while flashing boot"
fastboot flash vbmeta_$FLASH_SLOT vbmeta.img || _exit "problem while flashing vbmeta"
fastboot flash dtbo_$FLASH_SLOT dtbo.img || _exit "problem while flashing dtbo"
fastboot flash dsp_$FLASH_SLOT dsp.img || _exit "problem while flashing dsp"
fastboot flash devcfg_$FLASH_SLOT devcfg.img || _exit "problem while flashing devcfg"
fastboot flash tz_$FLASH_SLOT tz.img || _exit "problem while flashing tz"
fastboot flash rpm_$FLASH_SLOT rpm.img || _exit "problem while flashing rpm"
fastboot flash modem_$FLASH_SLOT modem.img || _exit "problem while flashing modem"
fastboot flash aboot_$FLASH_SLOT aboot.img || _exit "problem while flashing aboot"
fastboot flash sbl1_$FLASH_SLOT sbl1.img || _exit "problem while flashing sbl1"

# Test the flashed bootloader
fastboot --set-active=$FLASH_SLOT
fastboot reboot bootloader
fastboot getvar current-slot 2>&1 | grep "current-slot: $FLASH_SLOT"  || _exit "/\!\\ Couldn't reboot to slot $FLASH_SLOT"
echo "Slot $FLASH_SLOT was successfully flashed."

flash.sh end

The modem image is included in the zip as NON-HLOS.bin, several other files also have different names. Just open the partition.txt file, every line corresponds to one partition slot and the filename comes after the comma:

modem_a,NON-HLOS.bin
modem_b,NON-HLOS.bin
fsc,
ssd,
sbl1_a,sbl1.mbn
sbl1_b,sbl1.mbn
...

The partitions without a corresponding filename should probably be kept and not flashed.

You can also have a look at partition.xml which contains the some more information about the partitions.

1 Like

Thank you very much! I also got the idea that I can make use of the “pause”-key to pause the script until my phone has properly booted into fastboot and then let it continue. Didn’t have the time to try that one yet, but I think I’ll try this approach first, and if for some reason it fails, I’ll resort to flashing manually.

Thanks again for your help, it is much appreciated.