Decryption failed - Android Q&A, Help & Troubleshooting

I'm running an encrypted OnePlus One. I went in to recovery, did a nandroid backup, then did a wipe data to test something. The phone booted fine after the wipe. Then I went back in to recovery and restored my nandroid. Now the phone won't decrypt and says I need to factory reset. Says something like "Your password is correct but decryption failed" ... Is there a way to recover my data, or am I screwed?

Related

[Q]How to Decrypt an ATT HTC One?

Hello everyone,
Does anyone know how I can wipe/decrypt an encrypted ATT HTC One? I need to remove encryption to install another ROM.
Prior to this phone I had a Galaxy S3 and to remove encryption I needed to use ODIN to restore the device to factory defaults.
I have tried to enter the encryption initial PIN incorrectly a number of times and the phone just reboots,
I have tried to enter the encryption PIN incorrectly after getting past the first encryption password over 40 times and that did not work either.
I tried a factory reset in CWM and that did not work as it could not mount /data (assuming that is because it is encrypted.)
I am now trying to SOFF and factory reset with CWM.
* UPDATE *
So I succesfully S-OFF'd my device, booted into the boot loader, chose the "factory reset" option which launched CWM, chose factory reset and same issue. CWM reports "Formatting data... Error mounting /data! Skipping Format..."
Can anyone provide any input?
Flash stock recovery, reboot to bootloader, then factory reset.

TWRP 2.8.5.0 fails to backup encrypted phones and restore password-protected backups

Recently, I've been experimenting with increasing the security of my phone which was recently migrated to CM (12.1) and TWRP (2.8.5.0). Let's just say that it did not go well.
First, I tried enabling a password for my TWRP backups. I set the password/encryption option and the backup seemed to complete fine.
Problem 1:Next I tried encrypting my phone. The encryption worked fine, but once the phone was encrypted, I noticed that TWRP lost the ability to create a nandroid backup. As soon as I enabled encryption, TWRP now prompts for a password automatically when it is launched. However, when I typed my passphrase, it says "Password Failed, Please Try Again".
Problem 2:Given that I've lost the ability to do a nandroid backup, I decided to revert the decision to encrypt the phone. Which basically means wiping the phone and restoring my latest nandroid phone. The wipe went fine and the restore proceeded without error. However, upon booting up the phone, it acted as if it just went through a factory reset. (e.g. a cleared /data partition). Just as an experiment, I tried restoring a week-old TWRP backup that was not password-protected. Once I rebooted the phone, its state was identical to how it was when I backed it up. I tried going into TWRP to restore the more-recent password-protected backup, but this time I purposely typed the wrong passphrase. It said that the password was incorrect. So I typed the actual passphrase, restored the backup, and once the phone rebooted, it was back to the factory-reset mode.
Conclusions:
TWRP 2.8.5.0 cannot back up an encrypted phone. At least my M8.
TWRP 2.8.5.0 cannot restore password-protected backups.
While an encrypted phone and encrypted nandroid backups are a good idea from a security perspective, they appear to just not work. The fact that the features are advertised as working is frustrating.
Questions:
Will a newer TWRP version address either of the problems? I installed 2.8.5.0 as I had heard of some issues with newer versions.
If TWRP doesn't work for this, is there another recovery image that will both backup encrypted phones as well as support the creation and restore of password-protected/encrypted backups?
Note that I tried the latest 2.8.7.0 build of TWRP: https://twrp.me/devices/htconem8gsm.html . Although the title in that page says "all variants", the URI includes "GSM" which my phone is not. However, I can't imagine why there would be carrier-specific builts of TWRP in the first place. 2.8.5.0 is the latest Verizon-specific build of TWRP for the M8: https://twrp.me/devices/htconem8verizon.html
Anyway, when I try to do an encrypted backup with 2.8.7.0, I get:
createTarFork() process ended with ERROR=255
Which apparently has been reported by others:
https://github.com/TeamWin/Team-Win-Recovery-Project/issues/452
I get the impression that this stuff isn't close to ready for prime time.
Although I suppose that erroring at backup time is better than backing up w/o error and then only noticing that there's a problem at restore time (when you really need it). For what it's worth, looking at an encrypted TWRP file (e.g. data.ext4.win400) that was created by 2.8.5.0, it does indeed look to be encrypted. It has high entropy and magic bytes of "OAES". But something about the restoration of such a backup fails. It's not clear at this point if the two issues are related.

Issues with encryption on a custom ROM

Hello, I unlocked my bootloader today. Immediately after flashing the official TWRP, I booted into it through ADB, and flashed DFE. After rebooting, I went back to TWRP, wiped data, cache, dalvik, system and flashed the latest vendor with pixel experience. ROM booted just fine, but after rebooting to TWRP again, it was asking me for password. I can get into TWRP by entering my device pin, and I can get back into the ROM, but during boot it always asks me for my pin. What should I do to fix this? Should I flash DFE with the ROM?
try "Format Data"
Your Data is already Encrypted. You need to Format your data/internal storage. Make sure to backup your data first before doing that.

[Help] Disable request for factory reset/stuck in recovery loop

Hi,
I have Unnihertz Titan (Mediatek based) and I sucesfuly flashed TWRP by using a guide and got root via Magisk. Everything was working fine, I tried to restore some partial backups and it failed, so I tried Factory reset. Didn't worked from TWRP (now I know that because /data partition was encrypted), so I tried from settings. That was huge error. Now I'm stuck in the loop, bootloader tries to run recovery to do Factory reset, but the alpha TWRP I installed doesn't react and what is worse it doesn't clear the request for Factory reset so even after wiping /data and cache, I still end up in TWRP and not system. Any idea where the request for Factory reset might be stored?
Ok, found it, it was in `para` partition and all I had to do was erase it using fastboot.

Serious issue with the TWRP/Nandroid backup - twrp backup failed to mount system root structure needs cleaning - keeps looping back into TWRP

So, I can't restore my backup due to the error above. When I restore my backup, I get that error and a reboot loops me straight back into TWRP. You can read all that stuff below if you need the backstory.
(I had Lineage OS 18.1 installed and wanted to restore a backup from two weeks ago. So, I booted into TWRP, did a normal factory reset and restored the Backup of Lineage. However, it put out an error regarding something in root (structure needs cleaning). I tried rebooting into system, but it ended in fastboot mode. So I googled it and one thread said you can solve that by formatting system. "System" is backed up anyway, so I thought there was no harm, wiped it and restored the same backup once again. No error this time.
However, when I rebooted into system, the unlock pattern didn't work any more, even though I never changed it and always use the same one. I had to reboot into recovery, and now the TWRP unlock pattern didn't work either. Had to skip it and did another reset.
Now, every time I restore a backup (and those backups contain basically every partition available) it works, but when I reboot into system it just stops at the boot logo, then reboots into recovery. Basically a boot loop plus. Tried a fresh flash, same loop.
Also, all of my pictures and downloaded files are gone, because it's encrypted. I had to wipe data, which led to the whole encryption issue going away, however, I'm still stuck in that loop.
Does anyone know how to solve this cluster****? How do I get it to boot into system?
Edit: Managed to flash LIneage new after wiping data and system and it actually boots, hallelujah, but when I flash the back up I'm still at square one with the same fail and it fails to boot. )

Categories

Resources