✏ Porting TWRP recovery

@Max_S a working TWRP would be fantastic! I am currently tying to flash a working xposed framework without a custom recovery but it seems to be a bit tricky. So I can only appreciate your efforts here a lot! :slight_smile:

I can’t. The Developers category is read only. Maybe you can give me access to it. But we can also leave it here.

I have it on my tablet and it works like a charm (I can even fire up Ubuntu (not Ubuntu Touch, the real Ubuntu !)). However the devs responsible for the post say it’s a giant hack, as it requires a patched kernel, and a custom TWRP recovery (“stock” twrp is not enough).

1 Like

[quote=“Max_S, post:3, topic:12558”]
Can you move it? I’ve only access to my fp1 at the moment.[/quote]

I could but, as @Moritz said, nobody would be able to write besides @admins and @moderators. So you need to be a bit more patient until we find an easy way to grant you write access for #software:dev

Ah, yes, that makes sense :smile: then leave it here please.

Thank you very much for this tutorial and bringing TWRP to the FP2.
Rooted my FP2 according to root with superuser and then just flashed the image you provided, and everything works fine so far (only tried a normal Backup to SD-card).
The clock works fine after I’ve set the correct timezone.

However, when I reboot from TWRP it wants to install SuperSU as I thinks my phone is not rooted. I have ignored this so far, as I DO have root access on my phone.

Thanks again for providing the image as it makes the whole process very fast and easy!
I will try to install Xposed and let you know, how it works for me.

1 Like

Very nice, installed the image and no problems so far.
Made a Backup of the whole system. Now trying to flash Chainfires SuperSU to get FolderMount to work.

Edit: Until now, SuperSU from Chainfire doesnt work.

I suggest you read @Max_S’ Post about flashing xposed in this threat, if you haven’t already:
https://forum.fairphone.com/t/flashing-xposed-framework-to-the-fp2-without-custom-recovery/12642/6
I’m a bit stranded at this for now, but quite curious on the results of your experiments :slight_smile:

Flashing XPosed worked without any problems.
I used the image xposed-v79-sdk22-arm.zip from here and installed the XPosedInstaller from the same page. So far I did not notice any problems with the libart.so etc, I did not have to rename/delete anything… Everything went smooth (took only about 10 min after the first reboot) and I installed GravityBox. I will let you know of any problems I encounter.

But so far, awesome job @Max_S!

2 Likes

Are you on stock firmware or on a self-built Android? Can you check if you have such files in /system/vendor/lib/?

Edit:
I checked the system.img from stock firmware and there aren’t libart*.so files in system/vendor/lib. They are in /system/lib as expected and also have a different size. I wonder how they built it.

Interesting. I’ll need to give it another try :wink:
Edit: Did you build on your own?

No, I used the image you provided in your link.

Yes, I still use the stock firmware.

GravityBox manages to change the appearance of my clock in the statusbar, however it does not remove the ‘missing SIM’ symbol after restart. Maybe it needs SuperSU for that? I only installed Superuser…

There are some more phones which a quite alike the Fairphone. What I would recommend is to have a look at the HTC One M8.

https://twrp.me/devices/htconem8gsm.html

Here you can see that there is only a recovery.fstab included, not any twrp.fstab. Maybe that makes it a bit easier to understand:

To get more similar phones, you can go to

Then click “PDAmaster”. There select:

Processor: Qualcomm Snapdragon 801 MSM8974AB v3
Operating System Family: Android
Min Resolution: 1080 x 1920
Max Resolution: 1080 x 1920

and then: START

Many of them do have a TWRP already.

I wisehd I could contribute testing, but until mine, as I just read, there are still 800 phones to go…
Edit: Actually, it should be on it’s way!

@Max_S you did a perfect job there. Did you compile it on Gentoo? :wink:
I built my own recovery image according to your instructions (you forgot the “sh build/environment.sh” and “choosecombo …” stuff but I could cope with that) :smiley:
It booted right away, I was able to write a backup to my 128GB, FAT32-formatted microSD and after setting the timezone, the time was displayed correctly.
Thank you very much!

I wikified the topic, so everyone can improve it now. :slight_smile:

2 Likes

So far everyone seems to be quite happy with Max’s version of the TWRP.

Except for the minor issues mentioned above, has anyone experienced any major dysfunction of it, yet?

However, I think as soon as I get my phone, as it sounds and as it seems to be able to create NANDROID backups, I will flash it to the phone just right away.

Has anyone maybe discovered differences in TWRP’s behaviour between using stock boot.img and the one mentioned in the root-thread?

1 Like

Great job!

Since this has the potential to brick your phone, some safety mechanism are in place.
@Max_S, do you mind putting hashes (md5sum, sha1um, or similar) of the recovery here? This would help other people to verify that the download is not corrupted.

Another question:
Does anyone know if a stock recovery is available somewhere, in case someone would want to switch back or in case one would be unsatisfied or brick the phone with a custom recovery?
At least I couldn’t find a the FP2 stock recovery anywhere online.

1 Like

Good question. I thought it was part of the official OTA update package, but unfortunately it isn’t.

2 Likes

As far as I can see there is only a boot.img in that zip file. I guess the data file doesn’t contain the recovery.

I would love to test the custom recovery, I am just a little bit reluctant at the moment since I will be traveling in the next weeks and need a stable phone :wink:

So I guess without an original recovery available I will rather wait until I’m back …

Anyhow, thanks for the great work! Looking forward to flash it some time!

1 Like