TWRP cannot decrypt data after full factory reset (with internal storage wipe) - Google Pixel 2 XL Questions & Answers

I've been having issues with my phone so i decided to do a full wipe and factory reset. After restoring with my google account, i boot into twrp and put in my pattern, and it says it cannot decrypt data. booting into android shows my data decrypted. tested both on Android Pie and Q with the same result. Any ideas as to why this would happen? even with a full wipe?

you have to remove the twrp pin code has problem with the code always gives it as an error

YoshiFan501 said:
I've been having issues with my phone so i decided to do a full wipe and factory reset. After restoring with my google account, i boot into twrp and put in my pattern, and it says it cannot decrypt data. booting into android shows my data decrypted. tested both on Android Pie and Q with the same result. Any ideas as to why this would happen? even with a full wipe?
Click to expand...
Click to collapse
It's been a problem since May, just remove your screen lock pin in security before using TWRP.
Only way around this is flash-all April factory image, boot up then dirty update with the OTA in TWRP.
Don't think it's worth the hassle

Related

May have figured out solution to encryption fails.

Edit: Check this whole first post, because I have made some additional entries concerning failures and potential cures to things. I will update when my current encryption test is complete.
For the short version see the tldr at the bottom.
I have been trying different combinations of things all day in my last ditch attempt to get encryption working without needing to flash my original firmware back on from odin, since I hate the thought of how long it takes and what could go wrong.
The secret that I have worked out today is I install TWRP, wipe everything out, factory reset, wipe etc. Then install the rom, in my case it was my TWRP backup of my original firmware installed and then later CM11 M12, then immediately after flashing, reboot to download mode and flash the stock recovery image (I had to get a guide and use my linux VPS to turn the extracted recovery.img into a .tar.md5 and use that for flashing my original recovery. Then boot to recovery (now the genuine original recovery) and perform a factory reset. Then boot the phone up and the encryption works. Right now CM11 is at 38% encryption! Just before I started this off, I also had 100% success with encryption using my TWRP backup of a stock firmware install, using this same method. Once it is encrypted I will flash TWRP back on here as I did before and it should be good.
My theory (I am too burned out to test it at this point, I just want my phone working...) is that the issue is not whether you have TWRP installed, but whether the final factory reset (before booting up phone for usage) is performed by an official recovery or a third party recovery. So I bet it would work if you perform the factory reset and then immediately flash TWRP back on there and then boot up and perform the encryption.
Plus, in theory since I am using CM11 encryption, TWRP should be able to access /data which means I can keep this encryption and flash what ever rom I want using TWRP and upon booting it "should" just work. I tested this once before when I lucked out and got encryption working on some rom (I forget now which it was) but I was able to do a wipe with TWRP and install a different rom and the encryption still worked, still booted up fine.
Do you have any thoughts on this topic? Maybe I am reinventing the wheel...? I have not seen any of this referenced in any of the text or video guides I have been checking out. So I thought I would share this just in case. It might work for other samsung phones too.
STAND BY. The encryption did not work and I am trying a slight modification that is also proceeding. I am 19% on encrypting CM10.2. This time I did the usual TWRP wipes and then once wiped, Immediate flash of the original stock recovery (no OS install yet), then perform a factory reset and then flash TWRP again. Then I installed CM10.2 and skipped through the setup wizard and went straight to setting up encryption. Where usually it fails, it is actually performing the encryption. I have hopes that since the factory reset from the stock firmware's recovery was performed BEFORE the OS install, that it should... should work this time. I have a feeling the prior one failed because of doing a factory reset from one rom's recovery on a different rom's OS. So doing the factory reset before the OS install might be what will make it work. I will update soon.
Edit: It worked flawlessly... Booted up, authenticated, everything is fine. I am now running the same test with CM11 (M12) Also, I am not sure if this will work, but once I performed the final factory reset via the stock recovery (before re-flashing TWRP to begin OS install) I made a backup. My hope is that instead of reflashing and re-flashing back and forth, that the backup I made will have everything ready as if I had done a stock recovery based factory reset. If I decide to ditch CM11 I will test this theory out. I should also mention that the last test I mentioned with CM10.2 worked even though TWRP was presently still installed. So the presence of the stock recovery is not required, rather it is the factory reset from a stock rom being the final step required before the OS ROM install process.
Edit: There seems to be an issue with CM11. Twice now it has failed to work on CM11. I will try CM12 next, using my backup of a freshly official factory reset. If it fails I will do the whole process on 12 and see if it works and report back.
Edit: CM12 encryption by using the TWRP backup of a freshly factory reset (via stock recovery) failed. I am in the process of waiting for the first initial boot and setup wizard to complete of my second attempt at CM12 encryption via the full final step of actual stock recovery factory reset before CM12 installation via TWRP that is flashed after the stock recovery factory reset. I will update if this works. If it works and boots up correctly while encrypted, then it means a TWRP of a stock recovery factory reset is not adequate to replicate a true factory reset and the developers of TWRP should be made aware of this so they can enhance their own factory reset feature to allow encryption to work. If it doesn't work then there is something definitely wrong with CM11 and CM12 since both the stock firmware and CM10.2 encrypt using this full factory reset method. Stay tuned, wizard just came on screen...
Edit: Ok, weird... this time the encryption process has begun, whereas using my TWRP backup that was made after doing the stock factory reset did not get to this point, although the percentage counter started from 100% and counting... Right now the encryption is at 146% completed. That is very odd... I will report back if the encryption process actually ends up with a successfully booting phone or not, since CM11 failed at the booting phase. Before I save this edit, ne thing I am noticing is the progress percentage is going up rather fast compared to any other ROM. Right now it is at 177% and right now it is 179%, now it is 183% and I type fast... Stay tuned.
Edit: The encryption process worked and rebooted, asked for authentication and came up, however upon unlocking verious apps like CM bug reporter and whisper and others crash sometimes resulting in a OS loading screen and a fresh unlock needing to be performed.
tldr: When installing ANY rom, you need to wipe the file systems with TWRP or other similar recovery, then flash your stock firmware's recovery image (not the whole firmware, just the recovery, which means you need to extract the recovery.img from your flash file using 7zip and then follow these instructions: http://www.w0lfdroid.com/2013/04/android-how-to-convert-img-recovery-to.html to create a .tar.md5 file that odin can use to flash your recovery rom. (load odin, click AP or PDA and set your recovery tar.md5 and untick the two boxes that are always on by default. I use Odin v3.09). Then after you have wiped the file systems with TWRP (format data, then wipe the other mount points) then with your stock recovery perform a factory reset. Then flash TWRP or what ever custom recovery you use and just install your ROM, no other formatting or anything else, just install (not restore). Then the encryption will work, assuming there are no bugs in the rom that prevent it working on your handset, as seen on my handset with CM11 and the weird bugs with apps crashing on CM12.
So my recommendation is that the developer(s) of TWRP change the way they perform the factory reset, to emulate the actual process that a stock recovery uses, so that you do not need to keep reflashing your recovery images over and over when you need a fresh install.
Notes: CM11 M12 fails to boot, post successful encryption process, while CM12 nightly (18th March 2015) has bugs with apps crashing after successful bootup post encryption.
I have verified all this twice since. It is the stock recovery factory format that is needed before you install your ROM. I hope this helps the other people that I have seen having encryption problems.

Phone Requests Passwort after setting security to none from pattern

Hello!
Yesterday I installed Resurrection Remix Rom and it worked great. So I configured everything to my needs including setting the security to ask for a pattern on Restart. So everything is encrypted.
After a reboot the phone kept crashing and I tried to go back to my old system. Somehow I managed to set the security to none so I can revert to my old system. I then rebooted to Recovery but in Recovery it asked me for a password. I never set a password so I don’t know what to insert in here. I tried various stuff but nothing worked. I also can’t reboot back into the system without a password. It looks like my phone is still encrypted.
Is there any way how I can decrypt my files?
Can i "convert" my old pattern into a password and this will decrypt everything?
And if I am ok with losing my data, how can I just wipe everything and install a new rom?
Thank you for your help!
easiest way to delete all your data is via twrp, select everything in twrp wipe section and execute. your phone will be completely empty now. reconnect your phone to your pc and copy paste the rom and gapps and flash.
bonham1988 said:
easiest way to delete all your data is via twrp, select everything in twrp wipe section and execute. your phone will be completely empty now. reconnect your phone to your pc and copy paste the rom and gapps and flash.
Click to expand...
Click to collapse
I was in TWRP and tried to Wipe just the Data and Cache partitions but it told me that it was unable to mount storage.
I thinkt that since don't know the password i don't have permission to mount partitions.
An0nYm3 said:
I was in TWRP and tried to Wipe just the Data and Cache partitions but it told me that it was unable to mount storage.
I thinkt that since don't know the password i don't have permission to mount partitions.
Click to expand...
Click to collapse
Have you reflashing the stock recovery and doing a factory reset? After that you can reflash twrp and delete data. You can try if that works.
Sent from my OnePlus3 using XDA Labs
bonham1988 said:
Have you reflashing the stock recovery and doing a factory reset? After that you can reflash twrp and delete data. You can try if that works.
Sent from my OnePlus3 using XDA Labs
Click to expand...
Click to collapse
So you think i can mount the data partition again after a factory reset from the stock recovery?
I will try to flash the stock recovery when i get home.
I suppose i have to flash it via fastboot?
An0nYm3 said:
So you think i can mount the data partition again after a factory reset from the stock recovery?
I will try to flash the stock recovery when i get home.
I suppose i have to flash it via fastboot?
Click to expand...
Click to collapse
I read it on xda that this process resolves the issue and yes it has to be done via fastboot in bootloader mode. Stock recovery is available on oneplus's website.
Sent from my OnePlus3 using XDA Labs
bonham1988 said:
I read it on xda that this process resolves the issue and yes it has to be done via fastboot in bootloader mode. Stock recovery is available on oneplus's website.
Sent from my OnePlus3 using XDA Labs
Click to expand...
Click to collapse
I just flased the stock recovery via fastboot and made a factory reset.
After that I could reboot back into the system without any security question.
Sadly, all data are gone, meaning it did also wipe the internal storage partition. This is a pity but I'm really glad to have my phone back.
Thank you for your support
An0nYm3 said:
I just flased the stock recovery via fastboot and made a factory reset.
After that I could reboot back into the system without any security question.
Sadly, all data are gone, meaning it did also wipe the internal storage partition. This is a pity but I'm really glad to have my phone back.
Thank you for your support
Click to expand...
Click to collapse
Good to know it worked and sorry i forgot to tell you that it would delete all your data too.
Sent from my OnePlus3 using XDA Labs
An0nYm3 said:
I just flased the stock recovery via fastboot and made a factory reset.
After that I could reboot back into the system without any security question.
Sadly, all data are gone, meaning it did also wipe the internal storage partition. This is a pity but I'm really glad to have my phone back.
Thank you for your support
Click to expand...
Click to collapse
That's what a factory reset does, it wipes /Data
ghostofcain said:
That's what a factory reset does, it wipes /Data
Click to expand...
Click to collapse
That’s right, but not always /sdcard
TWRP asks for a password even if you set a PIN.
enter your PIN - it should work.
my phone is encrypted running sultan's CM and TWRP asks me for a password when I go in, and my PIN works
2x4 said:
TWRP asks for a password even if you set a PIN.
enter your PIN - it should work.
my phone is encrypted running sultan's CM and TWRP asks me for a password when I go in, and my PIN works
Click to expand...
Click to collapse
I definitely going to try this next time.

How to enable encryption

I am currently running a decrypted MM stock build on my 5X.
I want to upgrade to Noughat and then re-decrypt my phone. I think that flashing the factory image is the best way to do, but first, how can I re-enable encryption, so nothing bad can happen while flashing the factory image?
Just backup your data beforehand.
Flash factory image will format all your data, so the next time you boot up the device will be encrypted because encryption on by default in stock ROM.
To turn on encryption do these....
Go to settings then in security select Encrypt Phone,anyways there will not be any error in flashing factory due to decryption until and unless you have a bad config of fastboot adb etc or have a bad usb cable..if you want to decrypt again in Nougat I think you know how to..flash Elemental X/ Franco / some kernel with force encrypt disabled then go to fastboot mode and wipe userdata.
dkreventon said:
I am currently running a decrypted MM stock build on my 5X.
I want to upgrade to Noughat and then re-decrypt my phone. I think that flashing the factory image is the best way to do, but first, how can I re-enable encryption, so nothing bad can happen while flashing the factory image?
Click to expand...
Click to collapse
You're trying to do too much. It's pointless to encrypt, upgrade to 7.0, then decrypt. Factory reset and wipe system, upgrade via fastboot, flash SuperSU or a modified boot.img to stay decrypted, then boot up. Update your adb and platform tools before all this.
Sent from my Nexus 5X using Tapatalk
Ken.Adams said:
Go to settings then in security select Encrypt Phone
Click to expand...
Click to collapse
I agree with the other posters that there is no need to encrypt, but if one were to encrypt, this doesn't work if you have TWRP installed, it just hangs on reboot.
Best way to re-encrypt is to install stock boot.img and let it encrypt on its own.

Need help! Lost 29GB of storage after decrypting!

So I was running my Op3 encrypted since I bought it, and got sick of twrp asking me for password every time I want to flash something and I decrypted it, formated userdata, flashed ROM and flashed elementalx kernel to avoid encryption upon first boot, and now, my phone has only about ~24gb storage left, when I go into settings>storage my system is occupating about 29gb, can someone tell me how to solve this?
Bump! Anyone please?
Nothing?
Try doing a factory reset.
Had a similar issue after returning my nexus 5x to stock (~10gb free instead of ~25). Factory reset from Settings > Backup and Reset fixed it. Not sure if a wipe from TWRP will do the same, but you can give it a shot.
coomac said:
Try doing a factory reset.
Had a similar issue after returning my nexus 5x to stock (~10gb free instead of ~25). Factory reset from Settings > Backup and Reset fixed it. Not sure if a wipe from TWRP will do the same, but you can give it a shot.
Click to expand...
Click to collapse
Tried wipe from twrp, and fastboot format userdata, and it didnt work, nevermind, im back CB, waiting for Nougat...
ach3fck said:
So I was running my Op3 encrypted since I bought it, and got sick of twrp asking me for password every time I want to flash something and I decrypted it, formated userdata, flashed ROM and flashed elementalx kernel to avoid encryption upon first boot, and now, my phone has only about ~24gb storage left, when I go into settings>storage my system is occupating about 29gb, can someone tell me how to solve this?
Click to expand...
Click to collapse
I also faced this problem few days back..
I think problem comes when i do format data with fastboot command.
Then i do this..
1 Flash stock rom any
2 Flash superuser, ex kernel/bluspark.
3 Reboot phone
I got whole storage about 54 gb but phone is still encrypted.
4 Then reboot to recovery i wiped whole data including internal storage via twrp.
5 Than flash any custom rom.

Fix phone stuck in boot screen

Hi,
My moto one Action with stock firmware is stack at the Android One boot screen.
Is there a way to reset the system without loosing apps and data?
The recovery mode is not having the option to wipe the cache…
Flashing firmwares usually don't wipe data, unless it was triggered by a file, or an option. I doubt it'll be of help even if you have TWRP installed, cause the data partition may be encrypted.
If you have bootloader unlocked, you can use TWRP to take a backup of your files/apps.

Categories

Resources