[Solved] How to reset / clear TWRP's password - Redmi K20 Pro / Xiaomi Mi 9T Pro Questions & Answe

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!

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.

How to decrypt storage

How to remove decryption in storage? I tried Andy Yans script but it doesn't work for me. It stays on the Android splash page but doesn't boot into system. I installed the script after I wiped data.
I would like to try custom kernals.
hanzzi said:
How to remove decryption in storage? I tried Andy Yans script but it doesn't work for me. It stays on the Android splash page but doesn't boot into system. I installed the script after I wiped data.
I would like to try custom kernals.
Click to expand...
Click to collapse
Format data, the one where u need to type yes(you lose all internal)
disable force encryption is used before first boot of a new vendor firmware to prevent encryption, it wont decrypt.
Mooatreides said:
Format data, the one where u need to type yes(you lose all internal)
disable force encryption is used before first boot of a new vendor firmware to prevent encryption, it wont decrypt.
Click to expand...
Click to collapse
Thanks for the reply but I'm still a little unsure. I can't seem to find format data where you have to type yes. In Twrp I go to advance wipe and just select data and I have to slide the bar to the right. Then I install the script. Is this wrong?
hanzzi said:
Thanks for the reply but I'm still a little unsure. I can't seem to find format data where you have to type yes. In Twrp I go to advance wipe and just select data and I have to slide the bar to the right. Then I install the script. Is this wrong?
Click to expand...
Click to collapse
Yeah it says advanced wipe, and format data, tap format data and type yes.

After wiping data, TWRP no longer asks to descypt storage. Cant access files.

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.

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

Question Unable to mount /system.

So I was trying to install viper4arise using their own tutorial [https://forum.xda-developers.com/t/...ditory-research-in-sound-enhancement.3379709/] using Orange Fox Recovery. Also, since I can't access the /sdcard partition using the recovery, I used adb push to transfer the zip file to be flashed.
Then while flashing the zip, it requires access to /system and hence while flashing, it shows "ERROR:1, unable to mount /system."
I've heard that data is some kind of encrypted and to remove it I have to do "Format Data".
1 - Is there any other way to decrypt than doing a format data?
2 - Also once i do format data can i keep my storage unencrypted someway?
3 - And most importantly, what exactly does "Format Data" do? Which files does it remove and will I have to reinstall my stock ROM after doing it.
Thanks a lot and I'd love if you answer my questions part-by-part.
doughnut9 said:
So I was trying to install viper4arise using their own tutorial [https://forum.xda-developers.com/t/...ditory-research-in-sound-enhancement.3379709/] using Orange Fox Recovery. Also, since I can't access the /sdcard partition using the recovery, I used adb push to transfer the zip file to be flashed.
Then while flashing the zip, it requires access to /system and hence while flashing, it shows "ERROR:1, unable to mount /system."
I've heard that data is some kind of encrypted and to remove it I have to do "Format Data".
1 - Is there any other way to decrypt than doing a format data?
2 - Also once i do format data can i keep my storage unencrypted someway?
3 - And most importantly, what exactly does "Format Data" do? Which files does it remove and will I have to reinstall my stock ROM after doing it.
Thanks a lot and I'd love if you answer my questions part-by-part.
Click to expand...
Click to collapse
Probably needs to root the device.
1 - Is there any other way to decrypt than doing a format data?
Remove all lock screen security
2 - Also once i do format data can i keep my storage unencrypted someway?
Once you have installed a rom and added a security on the lock screen.
3 - And most importantly, what exactly does "Format Data" do?
Format data delete all your content and create a new partition if necessary.
will I have to reinstall my stock ROM after doing it?
yes.
NOSS8 said:
Probably needs to root the device.
1 - Is there any other way to decrypt than doing a format data?
Remove all lock screen security
2 - Also once i do format data can i keep my storage unencrypted someway?
Once you have installed a rom and added a security on the lock screen.
3 - And most importantly, what exactly does "Format Data" do?
Format data delete all your content and create a new partition if necessary.
will I have to reinstall my stock ROM after doing it?
yes.
Click to expand...
Click to collapse
Thanks a lot!

Categories

Resources