After wiping data, TWRP no longer asks to descypt storage. Cant access files. - Xiaomi Mi CC9 / Mi 9 Lite Questions & Answers

I switched over from xiaomi.eu to MI Room. Seemed to work fine until a magisk module uninstall screwed up my ROM and caused a bootloop.
Figured I would do a factory reset, however now Orangefox recovery no longer asks for a decryption password. I know the password, so how do I decrypt my storage?
Thanks

It doesn't ask for a password because the encryption files were deleted so twrp would not know what the encryption data is. But miui encrypts your data when you set your pin/pattern and the userdata remains encrypted when the encryption keys get deleted. The only way is to format userdata.
I also want to know a workaround for this. If you format userdata and flash recovery version of your rom, will your data get encrypted again when you set a password? Because then, any backup made with your data encrypted is unusable. Is data encrypted only on official roms but not for lineageOS etc?

editheraven said:
It doesn't ask for a password because the encryption files were deleted so twrp would not know what the encryption data is. But miui encrypts your data when you set your pin/pattern and the userdata remains encrypted when the encryption keys get deleted. The only way is to format userdata.
I also want to know a workaround for this. If you format userdata and flash recovery version of your rom, will your data get encrypted again when you set a password? Because then, any backup made with your data encrypted is unusable. Is data encrypted only on official roms but not for lineageOS etc?
Click to expand...
Click to collapse
My encryption files actually weren't deleted. I did a factory reset and reinstalled the previous ROM I was encrypted on a few times and somehow it decided to allow me to decrypt my storage again... So I managed to back things up, then format and wipe all storage and flash the new ROM. Working fine since.
Thanks for the help though.

Related

[Q] How to wipe Data partition after it's been encrypted?

Hey guys,
My work switched to Google Apps for their email so i wanted to test it out on my phone. Doing so required them to encrypt my phone. What this appears to have done is encrypt the data partition. So now when i go into (TWRP) recovery and try to do a backup / wipe / or anything else, it says it is "Unable to mount /sdcard" I'm unable to do a factory reset of any kind so i'm essentially stuck on this rom (ARHD) until i can figure out how to wipe data and get the /sdcard to be not encrypted. Does anyone have any ideas? I'm imagining that with the modified recovery not being able to access the data partition that i'm going to have to do some adb type stuff?
Please help! I want to keep flashing new roms!
Anyone??
I think you can't decrypt your data partition...
Did you try to wipe your data partition with the latest TWRP?
Guich said:
I think you can't decrypt your data partition...
Did you try to wipe your data partition with the latest TWRP?
Click to expand...
Click to collapse
That's the thing, the recovery can't mount /sdcard so wiping isn't an option from recovery
jrun said:
That's the thing, the recovery can't mount /sdcard so wiping isn't an option from recovery
Click to expand...
Click to collapse
Hi! Only TWRP recovery can solve your issue just do this...
Boot to TWRP recovery->Wipe
From there there are 2 options the left is the advance wipe and on the right is Format Data
Just select the format data button and it should reformat the whole data partition.
1st one would prompt so many errors and reformat then reformat it again 1 time and it should fully reformat your phone.
In theory it should reformat data partition even when encrypted but just in case it fails and I won't be able to go back to this thread just boot in bootloader and type
"fastboot erase userdata"
Well none of that works. TWRP doesn't support decryption yet for this device.
sevenalive said:
Well none of that works. TWRP doesn't support decryption yet for this device.
Click to expand...
Click to collapse
What I instructed basically doesn't decrypt the partition. It reformats it.
Riyal said:
What I instructed basically doesn't decrypt the partition. It reformats it.
Click to expand...
Click to collapse
I know what you instructed, it doesn't work. Only way I got it to work. Flash the stock recovery. Boot into system. Take off the encryption, phone reboots and removes the encryption, data is formatted. Then flash TWRP again.
I basically ran into this exact problem. I was hoping that I'd still be able to back up the encrypted device, but forget about it. What a pain in the ass.
Someone should make add something to the guides about how encrypting your device makes nandroid backups impossible.

Encryption and Kernel flash fails

Hi guys,
Forgive me If this is a repetitive post, i promise i tried searching.
When i installed nougat i accidentally encrypted the phone, and it asks me for an encryption pin whenever I boot in. I don't mind this but flashing a new kernel always puts the phone into an infinite boot. I have to dirty flash the installed rom in order to restore the kernel without losing my data. Is there any way to decrypt the device so i can flash a custom kernel? Or have i got the entire thing wrong? I can't seem to find a decrypt option and i don't want to flash MIUI so to remove encryption. I don't mind losing all the data but flashing a new rom doesn't seem to remove the encryption.
Thank you so much for reading this.
Kernel bootloop because you wipe dalvik and chace, whan you install the kernel just flash it without wipe anything.
if you want to remove encryption just backup your things on pc.
than go to TWRP wipe section:
FORMAT DATA and write "yes".... now you wont have encryption problems never again (NOTE: this wipes your internal storage)
AFTER:
go back to TWRP wipe section:
ADVANCED WIPE
select:
DALVIK
CACHE
DATA
SYSTEM
INTERNAL STORAGE
swipe to confirm!!! NOW YOU HAVE A CLEAN AND FRESH PHONE
while you still are in twrp connect your phone to pc and put in to it, rom and gapps.... flash those.
FINISHED

decrypt without data lose

Hello everybody,
I flashed some rom from other forum which changed my vendor(i guess by twrp messages) and I forgot to flash disable force encryption zip, so now i have encrypted storage, no system and some different vendor which wasn't on my device by default. I have access on twrp and fastboot and all but how can I install system on encrypted device without losing my data(factory reset to decrypt storage) phone?
Edit: by data I mean internal storage not app and rom data. I already wiped them.
copy data to pc or in pendrive using otg then proceed

I think I lost all my data

Hi, I want to install custom rom but I think because of encryption I lost my all internal storage :/
Before mi 9t pro, I used an old android phone. Because of that I didn't know too much about encrption.
When I open OrangeFox it asks my password. So I thought remove my password before any rom installation should be enough.
I remove my password. After dirty rom flash my phone didn't boot to system but did boot to recovery.
Guess what? All my file names are random
Before anyone say, I have a backup. But where Yesss it is in internal storage with encryption :angel:
I tried to wipe data, didn't work. I flash my rom mi flash with keeping data, didn't work.
Now my phone boot up, I can see my files with random names.
Why I didn't backup to computer? Because I was lazy.
My big question;
Can I recover my files (~70 gb), I know my old password.
It's a good thing your data wasn't important then, if it was you would have a backup stored on a PC or cloud. First rule of flashing, have a backup. You can't recover it's gone, format data In twrp to remove encryption and wipe your internal storage then flash your rom.
hoopsnake said:
It's a good thing your data wasn't important then, if it was you would have a backup stored on a PC or cloud. First rule of flashing, have a backup. You can't recover it's gone, format data In twrp to remove encryption and wipe your internal storage then flash your rom.
Click to expand...
Click to collapse
Yes, it isn't too much important but I'm a little sad. I just lost few whatsapp message.
I will delete everything now. After that, I will disable this encryption.
Thanks
P.S: Whoever read this don't be lazy like me

[Solved] How to reset / clear TWRP's password

Hello everyone, I changed my Redmi K20 Pro password but I stopped using it and forgot the password. Is there a way to clear TWRP's password, uninstall TWRP or even change the phone's recovery back to stock? Anything to regain access to the phone. Thanks for the help!
HenriqueMarrocos said:
Hello everyone, I changed my Redmi K20 Pro password but I stopped using it and forgot the password. Is there a way to clear TWRP's password, uninstall TWRP or even change the phone's recovery back to stock? Anything to regain access to the phone. Thanks for the help!
Click to expand...
Click to collapse
If you mean the lockscreen security password/PIN, then there's no solution that won't allow you to keep the data currently on the phone. The simplest solution is to format the data partition in TWRP. In this case is doesn't matter that you don't know the lockscreen password when entering TWRP. Just hit OK and you'll get a message saying it failed to decrypt the partition, but afterwards you'll still be able to format the data partition.
Robbo.5000 said:
If you mean the lockscreen security password/PIN, then there's no solution that won't allow you to keep the data currently on the phone. The simplest solution is to format the data partition in TWRP. In this case is doesn't matter that you don't know the lockscreen password when entering TWRP. Just hit OK and you'll get a message saying it failed to decrypt the partition, but afterwards you'll still be able to format the data partition.
Click to expand...
Click to collapse
Thank you Robbo.5000. I had already formatted Dalvik, Cache, System, Vendor, Data and Internal Storage but I didn't pay attention to the Format Data button on the previous screen. Problem solved!

Categories

Resources