Project

General

Profile

TWRP in future versions?

Added by Thomas Kitchin about 8 years ago

I understand that on the Samsung Galaxy S2, there is no separate recovery partition, and so it would seem that i9100 users are stuck with whatever comes with their kernel/rom.

There is one feature notably missing from clockworkmod, and that is the ability to read encrypted /data/ partitions. TWRP supports this, but since we can't flash it onto the device..

Why was clockworkmod chosen over TWRP in Replicant 4.2? Convenience? Is there any chance of moving to TWRP in future versions?


Replies (6)

RE: TWRP in future versions? - Added by My Self almost 8 years ago

I can't say too much about the why. AFAIK it was the "it just works" thing.
But you shouldn't give up. TWRP should work on i9100:

and I'm using TWRP on my i9300 combined with (alpha version of) Replicant 6.0 from here:
http://redmine.replicant.us/boards/21/topics/12057
...

RE: TWRP in future versions? - Added by E D over 7 years ago

My Self wrote:

I can't say too much about the why. AFAIK it was the "it just works" thing.
But you shouldn't give up. TWRP should work on i9100:

and I'm using TWRP on my i9300 combined with (alpha version of) Replicant 6.0 from here:
http://redmine.replicant.us/boards/21/topics/12057
...

Hello,

I would like also to upgrade my S3 i9300 up to Replicant 6.0 with TWRP. I am aware its still alpha testing.

Here are the steps I think to follow :
0) Backup my phone.
1) Retrieve Replicant 6.0 zip file,
2) copy it on the external SD Card
3) Retrieve the latest TWRP for i9300 from https://dl.twrp.me/i9300/, which is twrp-3.0.2-1-i9300.img
4) Put the phone in download mode : Volume down, Select, Power
5) Plug the phone to laptop USB port (prefer 2.0 ports I think)
6) sudo heimdall flash --BOOT twrp-3.0.2-1-i9300.img --RECOVERY twrp-3.0.2-1-i9300.img
7) Reboot to recovery and :
a) wipe out internal SD card (cache/data)
b) install zip from external SD card

Is there anything missing or incorrect ?

Also, do I need to build myself the Replicant 6.0 zip file or is there one ready to use ?
To be sure there is no interaction between Replicant 4.2 and the newer, I would like to wipe out
all the internal SD card, is it enough to wipe out data and cache and select factory reset ?

Thanks for your helps

Regards

RE: TWRP in future versions? - Added by Wolfgang Wiedmeyer about 7 years ago

Clockworkmod is the default recovery in CyanogenMod and as Replicant is based on CyanogenMod, it's the easiest way to have a working recovery that builds in the source tree and is compatible with the device sources. I stayed with CyanogenMod's recovery in Replicant 6.0 for this reason.

Getting the TWRP source code to build in the Replicant source tree is pretty straightforward, only busybox needs to be added. But TWRP doesn't just work with CyanogenMod's/Replicant's device tree. TWRP either uses it's own device tree which is a fork of an older CyanogenMod device tree or it's the device tree from Omnirom. TWRP is the default recovery in Omnirom. Omnirom doesn't support the Galaxy S2 or S3 in recent versions. So either way, device-specific TWRP adaptions have to be ported to Replicant which is not easy. It's possible but it takes some work, especially getting the partition management right. And you have to do this for every device separately.

I know that TWRP would be the better recovery, but it requires a lot more work in comparison to CyanogenMod's recovery and it's quite a maintenance burden in the long run.

RE: TWRP in future versions? - Added by Wolfgang Wiedmeyer almost 7 years ago

I rescind my statement that TWRP is the better recovery. It allows root access with ADB by default, regardless if ADB is enabled in the settings or if the connecting PC is authorized.

The Replicant 6.0 recovery does key authentication for ADB access and respects the ADB settings. There only appears to be a security bug: If a key was authorized but ADB was disabled later, the recovery still allows ADB access from a PC with this key.
When the data partition is encrypted, only ADB sideload access should be allowed as the recovery can't decrypt the data partition and verify the keys.

Furthermore, TWRP doesn't do signature verification of zips by default.

TWRP may also contain non-free firmwares, e.g. in the kernel, but I didn't verify this.

RE: TWRP in future versions? - Added by Jeremy Rand almost 7 years ago

Wolfgang Wiedmeyer wrote:

I rescind my statement that TWRP is the better recovery. It allows root access with ADB by default, regardless if ADB is enabled in the settings or if the connecting PC is authorized.

The Replicant 6.0 recovery does key authentication for ADB access and respects the ADB settings. There only appears to be a security bug: If a key was authorized but ADB was disabled later, the recovery still allows ADB access from a PC with this key.
When the data partition is encrypted, only ADB sideload access should be allowed as the recovery can't decrypt the data partition and verify the keys.

Furthermore, TWRP doesn't do signature verification of zips by default.

TWRP may also contain non-free firmwares, e.g. in the kernel, but I didn't verify this.

Interesting. Any chance this info could be added to the wiki? I see quite a few people using TWRP who are presumably unaware of these issues.

RE: TWRP in future versions? - Added by Wolfgang Wiedmeyer almost 7 years ago

Creating a wiki page explaining freedom issues and anti-features with other distributions is one of the tasks listed on the Tasks page. Maybe it can be added there if we also include security issues (not all of them may be anti-features, just sloppy security). Otherwise, whether TWRP contains non-free firmware or other non-free parts needs to be researched. On the devices where TWRP includes its own Linux kernel (S3, Note 2 and some others), I'd assume that the kernel is not deblobbed.

In general, the Replicant wiki should only be about Replicant and its software, except when the documentation is for research purposes. It's out of the scope of the project to advise against all sorts of software users are installing. There might also be similar issues with Xposed modules. We can't cover all of that. Adding such information to the wiki might not sound as much work, but it needs to be maintained and kept up-to-date.

    (1-6/6)