English

Failed to decrypt data in TWRP on LOS 15.1 system

solved
twrp
lineageos
Tags: #<Tag:0x00007f57d1f4f738> #<Tag:0x00007f57d1f4f5f8> #<Tag:0x00007f57d1f4f4b8>

#1

I’m not able to decrypt data in TWRP on FP2 with LOS 15.1.

  • version 15.1-20181115-NIGHTLY-FP2
  • TWRP 3.2.3
  • phone is encrypted
  • error message is “Password failed, please try again” when I Enter Password in TWRP “Mount Decrypt Data” although same password works when decrypting data on LOS system start. I can cancel and find “Failed to decrypt data” then in log.
  • I’ve found that I’m probably not then only one…: https://github.com/omnirom/android_bootable_recovery/issues/224
  • If I remove Password within LOS security settings then TWRP still asks for a password…

Does anyone know a solution?
Is it possible to start decryption within running LOS system (i.e. revert an encrypted system to an unencrypted one)?


#2

Since when?
If you encrypted with LineageOS 15.1, then TWRP as of now can’t decrypt, that’s true and known.
Prior encryption with Fairphone’s OSes or LineageOS 14.1 should work, LineageOS 15.1 can be installed on such an encrypted data partition, I’m running such a setup.


#3

Ok, thanks. Yes, it was encrypted with LOS 15.1. Good to know at least…


#4

Ok, then waiting for TWRP to fix this (didn’t happen for months now) or formatting the data partition and installing again it is … or just living with it, if no TWRP backup of data is needed.


#5

I’ll try out Titanium Backup.


#6

i’m having the same issue here. would be great to see a solution. do you know what’s the issue?
on 14.1 it was working, correct?
cheers


#7

Correct. But LineageOS 15.1 (or perhaps Android 8 or 8.1 in general) seems to do something differently when encrypting, and TWRP can’t handle it yet.

The current workaround is to install LineageOS 15.1 on a data partition already encrypted with LineageOS 14.1. This way decrypting works for both current TWRP and LineageOS 15.1.


#8

I did look totally naively into the code. Unfortunately, at the moment, I don’t have the time or space to try compiling it by myself, but two observations:

no init.recovery.vold_decrypt.rc, which seems to be present on devices being able to decrypt.

Also, the following subdirectory in twrp source sounds interesting: https://github.com/TeamWin/Team-Win-Recovery-Project/tree/android-8.1)/crypto/ ext4crypt /

If anybody has more insight than me, I’d sure like to test…

Klaus


#9

Hi everyone,

I also encrypted my FP2 running LOS 15.1. I still want to flash the nightly updates and also opengapps updates every now an then (does that even make sense? :sweat_smile:) so I came up with installing Flashfire. I used the “set date to 2013” workaround and purchased the pro version in app store to make it run without changing the date every time.

So after choosing the file to flash, Flashfire is not starting any scripts and reboots without doing anything - I tried different files for flashing, set different options for the flash and watched a youtube video, where someone demonstrates how a flash works.
At my phone only the loading screen appears, then black for approx. 2 seconds, then reboot.

Well my google research told me, that Flashfire is on ice, at least the contact thread is closed and I don’t know how to ask the developer himself.

Furthermore I don’t own a old camera module for installing LOS 14.1 and do the approach AnotherElk is talking about.

  1. Do you have any tips for fixing the Flashfire bug?
  2. Do you know if any time soon TWRP is willing to fix this bug and release an update?
  3. Do you install nightly updates and how frequently?
  4. Do you recommend changing to Fairphone Open with Android 7.1 and do an encryption?

Thanks for your time and help! Have a wonderful day :grinning:

Edit: I wanted to post links to the referring sites, but since I’m a newbie, I can only post two links :sweat_smile:


#10

Remind me, why exactly is an old camera module needed (for this specifically)?
Related to this: I seem to recall that enabling the torch function of the new camera module before rebooting/encrypting/etc. solved some of the issues, not sure whether that works here (e.g. flashfire) though.


#11

I assume you don’t have an sd card as external memory?
When you’re rebooting the phone for going into twrp, simply press Vol+, then it will boot into twrp for updating.
I install a new version of opengapps every now and then, but also don’t know whether it’s necessary (but could imagine maybe some bugs are stomped…)
E.g. when installing a new monthly security updated LOS
I check the changelog to see whether an update of LOS might be interesting…
Also, you still could flash new versions via sideload in twrp


#12

I use LineageOS for microG, which gets weekly updates, so in general I update weekly …


It depends on what you want to do with the encryption.

I don’t quite get until now what you are trying to achieve.

If you want to be able to decrypt user data in TWRP (e.g. for backup purposes), LineageOS 15.1 encryption will not work until TWRP can handle that. LineageOS 14.1 encryption or encryption with one of Fairphone’s OSes will work for that.

If you just want to do updates, encryption has nothing to do with this, because the partition which gets updated is not encrypted.

And you want to use something like Flashfire for installing stuff? So you don’t want to use TWRP? Encryption wouldn’t matter either way.

Regarding the current state of affairs with the new camera module …

If you want to encrypt … enable the flashlight before and it should work.
If you want to reboot automatically into recovery (e.g. for updates) … enable the flashlight before and it should work.
If you want to shutdown … enable the flashlight before and it should work.

For safety’s sake, disconnect any USB connection and disable Bluetooth, both things have lead to the flashlight workaround not working for other users occasionally.


#13

Hi and thank you for your help!!

I don’t know, this is what AnotherElk did described here
maybe it has something to do with:

Thats good to know, I was not sure about that… But makes sense… :sweat_smile:

If TWRP works, I’m fine with that. Flashfire was just a idea for a workaround.

Can I install the opengapps updates with TWRP with encrypted data partition?

Do I get that right, encryption does effect the data partition? The LOS updates won’t write anything to data, so I can ignore the fact, that TWRP cannot encrypt the partition for the sake of doing updates?

Thank you, I already figured that out :smile:

Thanks, good to know that!

Have a nice day guys!


#14

If you don’t have a sd card at have, you can flash it via suideload. And if you’re rooted, you probably can use the cache partition, as the ota does