I recently got a Fairphone 3, and while it looks promising, I’m having a problem.
I managed to install TWRP like I wanted, but couldn’t flash a custom rom from it. I managed to flash a rom (iodé 12), reinstalled TWRP, but it always corrupts the internal storage. After a while, I understood that it’s because my device is encrypted.
I tried to perform factory resets like there’s no tomorrow, at no point does it ask me if I want to encrypt my phone.
How the hell can I have an unencrypted phone ??? Or how can I access my encrypted data with TWRP ? It doesn’t ask for any password…
Which procedure did you follow for this?
TWRP is available here along with install instructions: https://twrp.me/fairphone/fairphone3.html
Note that TWRP gets installed via a script, it doesn’t get flashed anywhere like on devices using a different partition layout.
The Fairphone 3/3+ doesn’t have a recovery partition, so TWRP needs to get embedded into the boot partition. The installing script does that, but OSes might of course restore their own boot partition with OS updates (/e/OS does, for instance).
Which steps did you take exactly?
Please elaborate to avoid misunderstanding.
Internal Storage is a fixed term used for the storage area where Android lets the user roam relatively free. It’s where Android would put your photos, files etc. by default (if you didn’t deliberately change settings to do otherwise).
Do you mean this? Or do you mean something else?
What exactly doesn’t work as expected and how does it fail?
An Android factory reset only deletes user data as well as Apps installed by the user and their data, forcing the system to start over with the initial user setup afterwards. It shouldn’t get rid of encryption.
As far as I understood, encryption was made mandatory in recent Android.
That’s weird, because TWRP for the Fairphone 3/3+ supports encryption and should be able to decrypt the user data just fine.
I’m using TWRP on a Fairphone 3 myself, I’m using this feature all the time (when I make a TWRP backup).
Did you set an unlock method for the screen lock in the OS already? This should serve as the password then, and TWRP should prompt you for it (it makes sense to use a PIN or password for this if you want to use TWRP).
That’s the exact procedure I followed.
That’s what I meant by internal storage. What can be found at /storage/emulated/0.
Since it is encrypted, TWRP just shows a random string of letters, numbers and symbols for every folder and file.
TWRP doesn’t ask me for anything, but I’ve since then come across an explanation, stating that TWRP can’t handle Android 12 encryption right now… What version of Android are you using TWRP with ?
I don’t know about that, I have an other phone with CrDroid Android 13 on it, and it’s unencrypted…
edit : nope, apparently TWRP 3.7 should be able to handle the encryption…
Ah, I’m still using Android 11.
In this case, thanks for pioneering.
@urs_lesse: If you’re still running /e/OS Android 12 (S) with an unlocked bootloader … Could you boot twrp-3.7.0_9-0-FP3.img and see whether it can handle the encryption?
If it works, since it’s an upgraded installation the question would remain whether Android 11 or prior encryption is still in place, but even if so, this would show a way how to install to keep TWRP working with encryption.
Interesting. So it would still have the part in the Settings where the user can start encryption?
Sorry, I’d rather not mess with my daily driver phone.
After what happened to me, can’t say I blame you ^^’
Fair enough. I’ll see what I can do to do some testing. Probably not today.
You’re the best
It’s not even the fact that it is encrypted that bothers me, rather that I don’t have a say in the matter
I’m not bothered by enforced encryption. It’s a good thing, securing user data to a degree once an unlock method is set.
I’m bothered by TWRP not being able to handle it, knowing encryption support is not guaranteed in TWRP. It complicates my backup strategy.
But if I had to choose one over the other, I would choose encryption.
I briefly was on /e/OS Android 12, but had some immediate microG trouble and quickly settled on Android 11 for now. I didn’t bother to try TWRP then (didn’t need a backup of this state of the phone).
I don’t know how to check which version of encryption is on the data partition (= which Android version did the encryption).
On the Fairphone 2 TWRP could handle encryption up to Android 7. You could install and run e.g. LineageOS Android 8 with a data partition encrypted by Android 7, but not Android 9.
On my Fairphone 3 TWRP apparently can handle the /e/OS Android 11 encryption (it was an install from scratch with formatted data partition).
So I think I need to check what an upgrade to Android 12 without formatting the data partition would do to TWRP decryption capability, and ideally the same for an Android 12 install from scratch with formatted data partition.
I have similar reasons. While I don’t use TWRP often, it was nice to be able to have access to my files when I borked my OS once.
Also, the Magisk Manager for TWRP has been a life saver a couple of times.
So … I can confirm twrp-3.7.0_9-0-FP3 can’t handle encryption as soon as Android 12 is installed.
https://www.xda-developers.com/twrp-3-7-0-release-android-12-support/ suggests the issue is the “9-0” part. This TWRP version was “built out of the android-9.0 branch”, while the “newly introduced android-12.1 branch now supports data decryption on devices running Android 12/12L”.
It seems for successful decryption we would need a twrp-3.7.0_12-0-FP3 (as “official builds from the latest branch will have ‘12-0’ in the file name”).
@k4y0z: Is building TWRP for FP3 out of the android-12.1 branch possible?
Edit: Trying to backup the data partition in this state (since TWRP can see it with files and correct size, even if the files are encrypted) results in
createTarFork() process ended with ERROR: 255.
As my initial Android 12 microG trouble seems gone with 1.6-s-20221201239247-dev-FP3 and as the /e/OS dev builds for FP3 have Rooted Debugging, I might give ABRT a try, but I would need to revive my dual boot Linux, or see whether the Windows Subsystem for Linux is of any help with this, or just execute the commands from the scripts manually in an ADB root shell. Might take time.
The feature “rooted debugging” is also back in the current /e/OS stable builds (at least for FP4). So I used ABRT for creating a backup some weeks ago and it worked well. Still the “art” is successfully restoring a backup which I didn’t do. So I can’t guarantee it’s working.
I had this issue twice already with /e/OS Android 10. The last time it happened was after I tried to revert to a previous version after an OTA upgrade failed.
I found several topics about this issue on the internet but no helping answer. The only way I could solve the issue was to format the data partition and to restore data manually by what I had backed up before with the 3C-Toolbox (apps and app data) and with syncing data with my computer.
Small follow-up regarding complicating my backup strategy:
After I was done playing around, I wanted to restore my TWRP backup of my /e/OS Android 11 data partition … to the exact /e/OS Android 11 build I took the backup from (installed from scratch) … with the same unlock method set beforehand.
This worked for me several times in the past, but much to my surprise it didn’t work for me now with Android 11 (although I don’t know whether that’s the issue).
The boot process after the restore got stuck at the “Smartphone is starting” part, which went on forever. The restore and boot until then seemed successful, because I could open a rooted ADB shell on the phone in this state, which needed a successful restore of the data partition to have all the prior settings ready for this … but I didn’t manage to end or skip the “Smartphone is starting” part.
Luckily the TWRP data partition backup is not the only backup routine I do, so I decided to not throw any more time at this issue and just set the phone up from scratch on Android 12 now, got to get some progress out of this.
So for me from Android 11 on it seems for backups ABRT or well-documented (to not miss anything important and be done quickly) manual labour would be better backup strategies to check out.
And from Android 12 on TWRP is missing encryption support to access user data for now.
But other helpful TWRP features should still work fine.
Not so sure about using other TWRP features. When I was trying to get it to work, it would mess up everything as soon as I tried to access the files on the internal storage (either with MTP, or the included file explorer/installer), my phone wouldn’t boot, and I’d need to do a factory reset with another recovery.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.