✏ Porting TWRP recovery

No!

and some letters more, because the post must not have less then 20 new characters. Sigh!
Spielmops

1 Like

Thanks OuinOuin and Max_S for your efforts!

@OuinOuin did you have a chance to test your TWRP 3.0 version with an encrypted user data partition? Could TWRP decrypt it?

Dit anyone tried to use twrp from FPOSOS on FPOS and if so, what are the differences/advantages?

I just tried to flash the twrp image from the above dropbox link as well as the one from the fposos image. In both cases the flashing was reported to be fine but obviously the recovery image I have is still the stock. So I assume nothing was really flashed after all.

I assume the problem is that my phone is not rooted so far. I could not find any explicit indication of this requirement in the thread, however. Am I mistaken and I just missed it?
Otherwise: Could someone please confirm if rooting is required to flash the new recovery image? If so: It would be good to include this explicitly in the instructions above.

No, it isn’t required. I also flashed twrp without having root.

Ok, thanks for the clarification.

So I’m wondering what kind of problem I have then.
The fastboot flash recovery <recovery.img> command does not produce any errors - but I end up with the original recovery anyway…
Is there some other signature lock or something that has to be disabled first?
I also tried to boot the recovery via fastboot boot <recovery.img> but that just gives me a signature error after the transfer is complete. On the other hand I’m not sure if that would work anyway.

What do you do after the fastboot? Boot into the OS proper and reboot to recovery, or do you immediately boot into recovery? Don’t know for fairphone’s O’s, but some systems restored their original recovery if they found a modified one. Only if you immediately reboot into recovery after flashing the recovery was “fixed”

2 Likes

Thanks for the hint!

Just to be sure I tried again with Windows (instead of Linux). But that did not change anything.
I then made sure I boot immediately into recovery instead of letting the phone boot normally. And it actually worked!
I then rebooted the phone again and tried which recovery I will get afterwards: Turns out it is back to stock. So there’s clearly a restore going on there. I just wonder why this is not documented anywhere. Is it a new “feature” of the 1.2.8 FPOS? Or it just doesn’t happen once you rooted it?

So in case you have the same problem: Do NOT follow the instructions to fastboot reboot after the flashing. Instead you have to turn off your phone and get into recovery right away.

1 Like

Hey, I am interested in the stock recovery.img, can you give it to me?

At the end of the first post are several links, the one with the “18” in front seems to be the original recovery-image.

1 Like

You can always get an original recovery.img from here (‘Flashable Images’, not yet updated to 1.4.2 but shouldn’t care ;))

1 Like

Thanks, actually I extracted the one of FP Open OS and it seems to work :slight_smile:

Hello,

where can I find the preinstalled TWRP at FP OSOS?

I wanted to install the XPosed Framework on my FP2 and think that the TWRP is also very interesting.
My FP Open Version is 16.05.0.

Simple. Just shut down the phone, and then switch it on again while pressing vol+. When the phone started, release the power on button and a few seconds later release vol+. This will take you to the recovery

Thank you, that worked :slight_smile:

Thanks for all the hard work and all the information - a few questions, yet:

Q1: can I boot into the recovery without flashing it to the device?
As @mde has mentioned, I also get an error when trying to fastboot boot into the recovery.img. This makes me a bit nervous and keeps me from flashing the image to the device, at the moment :slight_smile:. Here’s what I get:

D:\...\>fastboot.exe boot twrp-recovery.img
downloading 'boot.img'...
OKAY [  0.501s]
booting...
FAILED (remote: bootimage: incomplete or not signed)
finished. total time: 0.506s

Same question, different wording: does this error only occur when trying to “boot” into the recovery.img and should flashing it work properly? Or will “flashing” it to the device produce the same problem (or real one then…)?

Q2: which one is the TWRP recovery.img that I should use for FP2 today?
I suppose the “newer” one from @OuinOuin’s post is the one to go for? (or are there any more up to date TWRP versions for the FP2 in the meantime?)

Q3: could a broken recovery image be restored again?
If I flash the TWRP recovery.img and in case it didn’t work, is it possible to boot into fastboot mode and flash the original recovery again? I would I end up with an entirely messed up (bricked?) phone in case something went wrong here?

Thanks already for your efforts! :slight_smile:

You better read this. If you experiment without knowledge you will end with an unusable phone.

Q1:yes, every phone has a recovery, but not TWRP …
Q2: from Ouinouin, oi
Q3: yes

If you want the newest TWRP (3.0.2-0, based on the android-7.0 branch) version with fixed adb (so you can use it without mounting /system), you can download it here: download here :slight_smile: I didn’t test it extensively but afaik everything should work as expected.

I will also send the patch I used for fixing adb so hopefully it can get fixed by the Fairphone devs in the next release :thumbsup:

6 Likes

Really great, thanks a lot!

ADB is working indeed.
Though, an encrypted /data partition cannot be mounted. Too bad, was hoping to be able to use TWRP for backups.

Anyhow, great work, thanks a lot!

It looks like twrp v3 still isn’t able to decrypt out of the box… I surfed a bit on their forum and it looks like it still need tweaking per every device… Too bad, as long as Fairphone won’t attack this problem…

2 Likes