yashsingh1/xdaforums huggingface dataset:
[OnePlus 3 & 3T Cross Device Development] :
How did you observe "that", if you've never expirienced "problems of this sort"? Your amalysis seems not congruent to me:

If updating to a newer fw has been the cause of this breakage, how could you be sure, updating to a similar fw (5.0.3 is one of the newest) can solve this?

Anyway: your analysis does not answer the basic question, you quoted:

Which means: flashing fw obxx breaks encrypting with twrp-3.2.1-0 (current). Is flashing fw 5.0.3 fixing this for twrp-3.2.1-0 (current)?

The analysis from this posting seems much more plausible to me.
[OnePlus 3 & 3T Cross Device Development] Sam Nakamura:
It should be obvious by my wording alone that I just stated my opinion based on personal experience, not meant to be a scientific analysis, simple thing - thanks for this most complete break down of things (probably), I stand corrected!
[OnePlus 3 & 3T Cross Device Development] :
That's not the point.

Maybe your analysis is right - who knows...

If you start your answer with "Sure..." the aksked person might think: "Ok; I don't need to test this, because [MENTION=7125933]Sam Nakamura[/MENTION] is 'Sure'. " But to be sure it's fw, we need this very check in this very situation:

twrp-3.2.1-0 (current) can't decrypt data. Other twrp is able to decrypt.

Flash fw from 5.0.3 from working twrp, as well as twrp-3.2.1-0 (current); reboot to recovery and check if twrp-3.2.1-0 (current) can decrypt data with the new firmware.

If this test turns out to work, your analysis is proofed to be true.

Never meant to offend you - it's just very important to get the original question answered, because no one can produce this "random" occurence of undecryptable data.

This is definetly an other issue, then the same sympton when switching from 14.1 to 15.1. I call it random, because I've not found any pattern on what exact circumstancies this happens. I'm hunting for this since end of February, but each time I'm just before getting an answer to the original question, the user either formats his device's data, or isn't willing to change a running system (what I completely understand!).

In deed I would be happy, if we can verify it's fw related!
[OnePlus 3 & 3T Cross Device Development] Striatum_bdr:
I think it's a mix between TWRP quota issue (see post linked a couple of posts above) and newest firmwares which seem to rely on this exclusively. I have personally to reformat my /data partition some weeks ago as neither TWRP neither the ROM was able to boot.
[OnePlus 3 & 3T Cross Device Development] Sam Nakamura:
First off, I'm not feeling offended, we're all here to learn and expand knowledge - no one here's a "knows it all", so no worries... :)

Vielleicht reden wir ja aneinander vorbei, keine Ahnung.

Maybe my expression of things wasn't really that fortunately but what I meant to say was I don't use the flashable firmware zips, I always use the full OOS builds (backup, clean flash and restore when using custom ROM, wich was like 95% for me) and with current TWRP I never had issues and I flashed every OB and Stable like this, I didn't left out any version but noticed that users reporting the problem usually jumped versions or used the small flashable zips or combining both.. Hence my statement, sure latest official TWRP works according to my experience... That's all I was trying to say

Interesting for me is that you call it random, I always felt certain situations are triggering it, like mentioned above... But that would explain it's weirdness to the whole messed decryption issue
[OnePlus 3 & 3T Cross Device Development] Doc Sniper:
I have the same problem on one of my two 3Ts. But I think it isn't because of the firmware version.

LOS 15.1 with OB29 firmware and TWRP 3.2.1-0 (new) can't decrypt Data, but OB29 firmware and TWRP 3.2.1-0 (old 3T) can decrypt and mount Data.

I have logs, but still no idea.

If you want, we can test it because I'm too lazy to format Data right now.

Since there are no problems except to install newer versions of TWRP, I don't care. :D :eek:

That seems to be the most interesting part of the log:

get_crypt_ftr_info crypto key location: 'footer'
I:Backup folder set to '/data/media/TWRP/BACKUPS/xxxxxxxx'
I:Settings storage is '/data/media'
I:Device is encrypted with the default password, attempting to decrypt.
crypt_ftr->fs_size = 237437880
Error starting keymaster signature transaction: -10000
Signing failed
kdf failed
failure decrypting master key
Failed to decrypt master key
crypt_ftr->fs_size = 237437880
Using scrypt with keymaster for cryptfs KDF
keymaster module name is Keymaster QTI HAL
keymaster version is 256
Found keymaster1 module, using keymaster1 API.
Signing safely-padded object
Error sending data to keymaster signature transaction: -21
Signing failed
kdf failed
failure decrypting master key
Failed to decrypt master key
Failed to decrypt data.
Unable to decrypt with default password.
[OnePlus 3 & 3T Cross Device Development] :
This is the typical one when going nougat -> oreo (aka lineage-14.1 -> 15.1, aka original twrp-3.2.1-0 -> current zwrp-3.2.1-0). The only way I know of to solve this is reformating and redoing the initial encryption with an oreo based rom. This one is NOT related to fw.

I'm looking for: current twrp-3.2.1-0 is decrypting just fine - out of a sudden decrypting stops working. Suspected: fw updates, that skip some versions.

Than you very much for offering your assistence, I appriciate that! Sadly you have the "normal" issue...
[OnePlus 3 & 3T Cross Device Development] milomak:
does this twrp support installing zip files greater than 2gb (as in an update.zip from titanium backup)?
[OnePlus 3 & 3T Cross Device Development] Doc Sniper:
But it's very strange that the new 3.2.1-0 TWRP worked on that 3T and suddenly is unable to decrypt Data after a LOS update a while ago (a 15.1 weekly update).

And on my other phone I did the same update from 14 to 15 and everything is working great with the new TWRP.

Edit:

Have tested BlueSpark and Red Wolf Recovery and both can decrypt data on the said 3T.

Afaik both recoveries are Oreo based ?!?

Is it possible that this is a bug of the Oreo based TWRP?

Edit 2: Same with TWRP 3.2.2-0, it can't decrypt Data (default_password) and is asking for password.
[OnePlus 3 & 3T Cross Device Development] theCroh:
I've got this problem. I'm on RR Oreo and decryption is fine. If I flash any Firmware above openbeta 28 or 29 (I've lost count about the last working one), TWRP can't decrypt it anymore. Sideloading an older firmware immediately fixes the problem.
[OnePlus 3 & 3T Cross Device Development] xarrismoto:
Noise!
[OnePlus 3 & 3T Cross Device Development] RealZac:
Same decryption problem with twrp-3.2.2-0-oneplus3: Data cannot be decrypted and twrp is asking for password.
[OnePlus 3 & 3T Cross Device Development] Dirk:
There's a new TWRP? No notification?

Bloody ninja updates! :laugh:

I can't see any changelog. What am i missing?
[OnePlus 3 & 3T Cross Device Development] :
Ninja updates come with stealth changelogs... ;) At least the new update is shipped with an updated version number... ;)

Seriously: a changelog would be great!
[OnePlus 3 & 3T Cross Device Development] Dirk:
Made me lol. :good:

Changelog: Numbers changed. Recovery is now 0.0.1-0 better!
[OnePlus 3 & 3T Cross Device Development] SpasilliumNexus:
Not sure where to begin to see the changes between 3.2.1 and 3.2.2, so here's everything that was merged from 3.2.0 forward:

GitHub: https://github.com/omnirom/android_...r=fac1b3835c905f33af45ef984448f1286e505cec+69

Gerrit: https://gerrit.omnirom.org/#/q/status:merged+project:android_bootable_recovery,50

For those that don't know how to navigate one or the other:

GitHub: click "Newer" at the bottom.

Gerrit: click the left arrow at the bottom.
[OnePlus 3 & 3T Cross Device Development] madm03:
Somewhere on this forum is an explanation why this happens, but the best fix is is probably to do what nvertigo67 wrote.

Or the lazy way would be to stay on a FW that works. Then you could still update the modem only :)
[OnePlus 3 & 3T Cross Device Development] Doc Sniper:
Had a look at the log and Red Wolf 027 recovery is based on Oreo TWRP 3.2.1 and it can decrypt Data successfully.

OOS (OB29) and LOS 15.1 can decrypt it too, no problems at all. So I assume it's a bug, because only the Oreo based original TWRP can't decrypt Data.

I really want to know why ? (Formatting Data isn't the problem, I do full backups to computer regularly)
[OnePlus 3 & 3T Cross Device Development] :
+all updates to packages bootable_recovery and the device tree depends on...

From the sources I expect mkfs.f2fs (aka change fs to f2fs) still broken - can someone confirm, please?
[OnePlus 3 & 3T Cross Device Development] Rhodesgod:
when i want to flash roms, gapps, firmware , etc i get this error : e: recv error on uevent.

any help ? i didn't have problem before.but once i wanted to wipe and format data ro try a new rom it showed.

i had lag even in twrp when this error showed.

after flashing rom nd using phone i have random reboots !

is this a hardware problem?

ty.
[OnePlus 3 & 3T Cross Device Development] Doc Sniper:
The change log of TWRP 3.2.2-0 according to: https://www.xda-developers.com/twrp-3-2-2-0-adb-fixes-improve-ota/

* adb backup fixes
* OTA style update zips will now install automatically without prompting for decrypt
* minor tweaks to handling date/time on Qualcomm devices
* updates to some language translations
[OnePlus 3 & 3T Cross Device Development] :
Dianjulintao isn't even updating the thread, so yeah guess the update will be pretty much without bug fixing specifically for oneplus 3.

Looking at previous bug report, I have no interest for it if it's just going to be ignored again.
[OnePlus 3 & 3T Cross Device Development] :
I understand your frustration. I'm completely with you for that matter.

Telling from the code base, I'm pretty sure that not only op3/t suffer from this. Maybe there's still hope to get it fixed one day... :good:
[OnePlus 3 & 3T Cross Device Development] osrox:
After flashing OOS firmware+modem 5.0.3 > RR rom update using Red Wolf recovery.

i tried to test but, the Official TWRP (3.2.1-0) still does NOT accept the encryption password.

so i'm back to using Red Wolf Recovery for now (flashed using Flashify App).
[OnePlus 3 & 3T Cross Device Development] Doc Sniper:
There is a Nougat based older 3.2.1-0

https://xdaforums.com/showpost.php?p=76418753&postcount=191
[OnePlus 3 & 3T Cross Device Development] osrox:
You mean to say, official TWRP for OnePlus3 hasn't yet been updated properly, for Oreo builds ?
[OnePlus 3 & 3T Cross Device Development] Doc Sniper:
No, I'm just saying I have two 3T's and both had LOS 14 and I've both upgraded to 15 dirty. Both have worked once with the Oreo based TWRP and encrypted data.

But since some weeks on one of the two 3T only the nougat based TWRP (or Red Wulf recovery) can decrypt the Data partition. The Oreo based TWRP fails (only) on this device.

On the other 3T both TWRPs are working, the Nougat and the Oreo based version. I'm still trying to figure out why.
[OnePlus 3 & 3T Cross Device Development] counterfeit187:
Encryption changed in firmware on one of the updates to Oreo from OnePlus. iirc you can wipe everything, format data, and set up encryption properly to fix.
[OnePlus 3 & 3T Cross Device Development] Doc Sniper:
Mhhh maybe, but then these 3 things are weird:

1. Why does one 3T work, but not the other 3T ?

2. Why does (Oreo based) Red Wolf Recovery work?

3. Why is OOS Beta 29 able to decrypt Data perfectly?
[OnePlus 3 & 3T Cross Device Development] Sarta55:
So if I do this once, encryption will work properly again and even for the next firmware upgrades? Anybody tried this?
[OnePlus 3 & 3T Cross Device Development] Dirk:
What exactly is it you're trying to do, or what issue are you having?
[OnePlus 3 & 3T Cross Device Development] Sarta55:
I want to clean flash to OnePlus 3T OxygenOS Open beta 30 and keep my data/encryption but I read reports of problems with twrp and active encryption.

https://xdaforums.com/oneplus-3/one...ent/8-x-omni-oneplus-3t-t3695992/post75474445

https://xdaforums.com/oneplus-3/one...ent/8-x-omni-oneplus-3t-t3695992/post75910140

https://xdaforums.com/oneplus-3/one...ent/8-x-omni-oneplus-3t-t3695992/post76796505

https://xdaforums.com/oneplus-3/one...ent/8-x-omni-oneplus-3t-t3695992/post75196808

https://xdaforums.com/oneplus-3/one...ent/8-x-omni-oneplus-3t-t3695992/post75910140

Also there are people claiming that "these issues don't seem to be a problem anymore due to TWRP update":

https://xdaforums.com/oneplus-5t/de...os-15-1-oreo-oneplus-5t-t3730058/post76240098

Which is contradicted by posts of twrp having problems with encryption some months later.

I'm lost. Is this problem still there, will it ever be solved or do I have to bite the bullet and format the partition. But even then, if twrp can't handle the encryption of current firmware, will this really be enough to solve this?
[OnePlus 3 & 3T Cross Device Development] Dirk:
I don't know what TWRP you're on but i've never had any trouble with 3.2.1-0. I haven't used OOS since unlocking my phone though. I think you're worrying too much and doing too little. Backup your stuff, Nandroid, and then Clean Install OP30. I'm sure you're familiar with the flashing procedure?

I'd use 3.2.1-0 and keep the Red Wolf Recovery handy in case you need a fall-back.
[OnePlus 3 & 3T Cross Device Development] BillGoss:
There are a number of issues with official TWRP:

- how it handles quotas on ext4

- it has issues formatting back to f2fs

- there are conditions under which it can't decrypt the data partition.

Reading from this https://xdaforums.com/oneplus-3/one...ial-twrp-touch-recovery-t3742894/post76941896 and the next 20 posts or so is "interesting".

But not everybody has issues and it seems to depend mainly on whether they've jumped OnePlus releases and/or changed formats.

I, for one, have never had issues, but then I'm still on the original encrypted f2fs data partition.

If you do run into encryption problems with the latest official TWRP, then the Red Wolf version of TWRP seems to be the best at successfully accessing the data partition. See https://xdaforums.com/oneplus-3/one.../recovery-red-wolf-recovery-project-t3805416/

And if that doesn't work, then a complete reformat of the data partition will fix things.
[OnePlus 3 & 3T Cross Device Development] thx84:
Which firmware are you currently using?
[OnePlus 3 & 3T Cross Device Development] Sarta55:
Formatted to ext4, so I guess there could be an issue.

I'm still on OnePlus 3T OxygenOS Open beta 21 from January.
[OnePlus 3 & 3T Cross Device Development] Gautam Kapoor:
twrp 3.2.2 booting up very slow.. it takes near about 10 min.. any fix?
[OnePlus 3 & 3T Cross Device Development] rippledrums:
Do you have /data formatted as F2FS or ext4?

If it's F2FS then that's normal.
[OnePlus 3 & 3T Cross Device Development] BillGoss:
"Could" being the operative word. Try official TWRP and if you do have problems, then you know what to do.

If you don't try it, you'll never know if you have issues with it.

Not for me. I'm on encrypted f2fs and TWRP boots quickly. I'm using 50 GB of my 128 GB.
[OnePlus 3 & 3T Cross Device Development] counterfeit187:
Here's my results for encryption with twrp 3.2.2 I have the latest firmware for 3t (beta30), LineageOS 15.1--most recent weekly, opengapps, and magisk. Went into settings > security & privacy > encryption & credentials, and tapped Encrypt Phone. It said it would take a long time (1 hour), but finished in just a couple minutes. Success?

It requires pattern on boot and says it's encrypted, but I thought it was supposed to to take much longer. Did something go wrong? Not as far as I can tell.
[OnePlus 3 & 3T Cross Device Development] mk_1996:
Me personally i would try it first. I'll take a nandroid of my current setup so that if something goes wrong, i would not have to start from scratch. If you're coming from oos chances are that you would already be encrypted. I think it's been encrypted successfully. Maybe less data means less time to encrypt. I could be wrong
[OnePlus 3 & 3T Cross Device Development] :
The usage is only one aspect of the decryption duration, but much more relevant is the directory and file count. If you generate in a loop 10,000 empty files (or empty dirs for that matter), you can easily get 5 to 10 minutes decryption time. I havn't tested with other recoveries then 3.2.1-0.

I think this estimation is based on older hardware. Encrypting after a clean flash without anything restored/installed: op1 and chagallwifi take 8 to 10 minutes. With op3t it's less then 5 minutes.

Don't allow the speed of your device to confuse you. Everything is fine: your device is encrypted.

You are absolutely correct here!

EDIT: perhaps the estimated encryption time is based on the old file based legacy encryption (volume based encryption is MUCH faster - that's what op3/t is using).
[OnePlus 3 & 3T Cross Device Development] counterfeit187:
Seems then, that the answer is encryption works fine on twrp 3.2.2 if you have latest firmware on the device. All my partitions are exf4.
[OnePlus 3 & 3T Cross Device Development] BillGoss:
I have more than 20,000 files on my data partition. 7,000 of those are on my user storage (/sdcard). And TWRP 3.2.2.0 takes 3s from the boot screen to the password prompt and 13s from entering the password to the menu screen. So decryption isn't at all slow on f2fs on my phone.
[OnePlus 3 & 3T Cross Device Development] Sam Nakamura:
Same here, never experienced slow boot times on f2fs on TWRP...
[OnePlus 3 & 3T Cross Device Development] rippledrums:
For me it was always slow on f2fs, and I never encrypted my data...

No idea why...
[OnePlus 3 & 3T Cross Device Development] mar.ur:
Are there any advantages to use f2fs in comparison to ext4 when your device has ufs memory ?
[OnePlus 3 & 3T Cross Device Development] :
xda suggests to use thread search:

https://xdaforums.com/search/thread/3742894?query=f2fs ext4 performance
[OnePlus 3 & 3T Cross Device Development] Sam Nakamura:
It almost looks like there's another variable in this "slow boot equation", I read reports from users many times about it and believe they're genuine, yet I never ever experienced it myself even once, no matter how full my storage was and my storage is always encrypted, results for me are always in the range described previously by [MENTION=2911853]BillGoss[/MENTION]
[OnePlus 3 & 3T Cross Device Development] rippledrums:
Not sure it has anything to do with occupied space either since I have the 128gb version and never even got to 50% full. :laugh:
[OnePlus 3 & 3T Cross Device Development] :
I wasn't precise enough:

From confirming the pin in twrp to "dm-0 successfully decrypted" doesn't change. But the time to twrp main screen dramatically increases ("updating partition details" increases):

Time from confirming the pin to twrp main screen is about 9 s, before I did this:

mktemp -d #generates a random dir; in this case /data/local/tmp/tmp.i1Zmnj. This allows to remove the complete dir at once instead of deleting 100000 files withe xargs, because the argument array is to large.
for ((n=1; n<=100000; n++)) ; do mktemp -d -p /data/local/tmp/tmp.i1Zmnj; done

(If you want to try this alone at home, tell caffeine to keep your device awake - otherwise this takes for ever.)

This increases the time by 600% (from 9s to 56s).

I'm completely with [MENTION=7125933]Sam Nakamura[/MENTION]: though this is 100% reproducable, there may be an other issue as well. I havn't numbers for unencrypted f2fs - but for encrypted ext4 this effect is MUCH!!! smaller (<10% increased time, if at all).
[OnePlus 3 & 3T Cross Device Development] Nexus-006:
Only for information if you would like to evaluate the decryption-problem of the current twpr.

my current config of my oneplus3 (a3003) :

firmware: OnePlus3-Nougat-4.5.1-Firmware

twpr: 3.0.4.1

OS: lineage-14.1-20180626-UNOFFICIAL-Sultan-oneplus3

Filesystem: All Partitions on ext4

Booting into Recovery, making Backups, Restoring Backups is working fine. No problems at all.

After flashing "twrp-3.0.2-22-oneplus3.img" and going into recovery twpr is asking for a decryption-password. So no matter what i try, the latest official twrp is useless for me with OB24, Nougart and ext4.

Flashing back "twrp-3.0.4-1-oneplus3.img" works and everything works fine.

Flashing "twrp-3.2.1-x_blu_spark_v8.61-op3_op3t.img" works also and everything works fine.

So far i didnt tried "RedWolf-027-OP3-3T-v3.img", but i guess that would also work fine.
[OnePlus 3 & 3T Cross Device Development] Sam Nakamura:
If you read the OP there's a disclaimer in the very first paragraphs that this recovery is intended to work with Oreo, no guarantees for Nougat, so it's probably the best to stay on the older / outdated versions that fit your system or use the alternatives you mentioned, I don't think that compatability to dead android versions is a priority for the OP...
[OnePlus 3 & 3T Cross Device Development] Nexus-006:
I'm aware of this, thanks.

Oh and btw, its "OnePlus3-Nougat-4.5.1-Firmware.zip" that is installed on my phone and not "OnePlus3-Nougat-OB24-Firmware.zip"
[OnePlus 3 & 3T Cross Device Development] Sam Nakamura:
All right :good:

------------

regarding firmware: it doesn't matter much as stable and beta in this case are nougat-based and therefore compatability is very limited / not existing...
[OnePlus 3 & 3T Cross Device Development] scilor:
I am currently on https://xdaforums.com/oneplus-3/one...ry-official-twrp-oneplus-3-3t-t3543391/page69

3.0.4-1 with f2fs, but when I flash the latest recovery 3.2.2-0 it asks for a decryption password now
[OnePlus 3 & 3T Cross Device Development] Sam Nakamura:
Ohhh, the version you're coming from is very old and outdated, I'm not sure sure if there's a way to update to the current version without formatting /data (which would be the cleanest and most future-proof solution anyway).

Encryption handling changed from Nougat to Oreo and this is a typical issue for many coming from old versions of TWRP or outdated firmware.

You can try to flash OOS 5.x via outdated recovery before you update TWRP but that's just a very wild guess, not necessarily working or solving the problem...

Then there's also blu_spark's TWRP (and another custom version of TWRP mentioned here in earlier posts, it's worth reading back a bit), they might be worth a try too but again, if you have a chance to format after flashing the latest version of TWRP you should do it, that's the best way to avoid issues in future.

Formatting would simultaneously have the positive effect of switching to the more reliable ext4 file system, even OnePlus moved away from f2fs, leaving only the 3/t with this file system (but that's another story). I think TWRP still can't format f2fs, so you don't have much of a choice here anyway, at least not that I know of...

By the way, which firmware you're on?
[OnePlus 3 & 3T Cross Device Development] scilor:
I updated my firmware around the time I started using nougat with sultanxdas LOS. I will try to update the firmware first and then try again.

F2FS was quite popular?! Now EXT4 is state of the art again?

I think I will try to backup my data from the DATA partition and then flash the newer firmware.
[OnePlus 3 & 3T Cross Device Development] Sam Nakamura:
Yeah :laugh: lol actually ext4 is dope again...

Just a good example from this very thread:

https://xdaforums.com/oneplus-3/one...ial-twrp-touch-recovery-t3742894/post77123246

I mean I use f2fs all the time on my 3t but it seems that ext4 is rather an improvement than anything else, so switching is not a disadvantage, especially as all ROMs are compatible, including OOS...
[OnePlus 3 & 3T Cross Device Development] scilor:
The blu TWRP did its job =). Works fine now thx
[OnePlus 3 & 3T Cross Device Development] laupuy:
Just for info, TWRP 3.2.3.0 is out https://eu.dl.twrp.me/oneplus3/

Changelog*:

Ethan Yonker

2018-07-27T20:07:14Z

Update proprietary files for decrypt Used files from OnePlus stock recovery that they use to decrypt in recovery. Change-Id: I11dcff9fcd0e1cbb9eab08b83050ec1c998861cb

*source: https://twrp.me/oneplus/oneplusthree.html