Problem updating custom ROM - TWRP won't decrypt data - Redmi K20 Pro / Xiaomi Mi 9T Pro Questions & Answe

After trying to update to a newer version of a custom rom, crDroid 6.4, I can no longer boot into the system. The phone only boots into recovery. TWRP no longer asks for a password in order to decrypt the phone, as it has done before. I have tried wiping Data, Cache, and Dalvik, and flashed the rom again, with no luck. Is it a way for me to force decrytion or something?
Any help is much appreciated! I am new to this, and still learning.

Ukulelen said:
After trying to update to a newer version of a custom rom, crDroid 6.4, I can no longer boot into the system. The phone only boots into recovery. TWRP no longer asks for a password in order to decrypt the phone, as it has done before. I have tried wiping Data, Cache, and Dalvik, and flashed the rom again, with no luck. Is it a way for me to force decrytion or something?
Any help is much appreciated! I am new to this, and still learning.
Click to expand...
Click to collapse
I assume that the data partition is actually still encrypted and you see random folder names in TWRP. If so, try formatting data in TWRP (not wipe, but format) then reboot to the ROM.

Robbo.5000 said:
I assume that the data partition is actually still encrypted and you see random folder names in TWRP. If so, try formatting data in TWRP (not wipe, but format) then reboot to the ROM.
Click to expand...
Click to collapse
Will this delete all my files?
Also, I'm not sure if I am flashing the ROM correctly. I have the ROM, magisk and other files on my computer. I use "ADB Sideload" under advanced in TWRP and "adb sideload romname.zip" on my computer.

Ukulelen said:
Will this delete all my files?
Also, I'm not sure if I am flashing the ROM correctly. I have the ROM, magisk and other files on my computer. I use "ADB Sideload" under advanced in TWRP and "adb sideload romname.zip" on my computer.
Click to expand...
Click to collapse
Yes it will delete all your files. If you boot to TWRP and it doesn't ask for the PIN, etc., but you see all your folders have random encrypted names, then everything is lost anyway. There is nothing you can do to recover that data.
In future just copy the ROMs onto the phone and flash them directly off the phone in TWRP, using the install menu.

Robbo.5000 said:
Yes it will delete all your files. If you boot to TWRP and it doesn't ask for the PIN, etc., but you see all your folders have random encrypted names, then everything is lost anyway. There is nothing you can do to recover that data.
In future just copy the ROMs onto the phone and flash them directly off the phone in TWRP, using the install menu.
Click to expand...
Click to collapse
Thanks for your help. Luckily I had backed up all my photos. I am up and running with a new rom. I am testing omni rom as it now comes with microg prebuild.

Related

[Q] Forced encryption question

Hi,
I have a few questions about the forced encryption on the nexus 6. I have an unlocked bootloader, and have cm12.1 installed. SELinux is Enforcing and I have no password/pin on the lockscreen.
How do I know if it is encrypted?
If it is how can I decrypt?
If I decrypt will it erase my files?
What about updating to the latest CM nightly?
Thanks
kevkid said:
Hi,
I have a few questions about the forced encryption on the nexus 6. I have an unlocked bootloader, and have cm12.1 installed. SELinux is Enforcing and I have no password/pin on the lockscreen.
How do I know if it is encrypted?
If it is how can I decrypt?
If I decrypt will it erase my files?
What about updating to the latest CM nightly?
Thanks
Click to expand...
Click to collapse
first off, the n6 encrypts at first boot. you can go into your main settings, security, and see that its encrypted. you can decrypt by flaahing a kernel that allows for decryption, and then format your storage. this will delete everything in your storage, so make a backup. this kernel has to be cm compatible, or cm wont boot up with it. after, you can update in recovery, by flashing the update, gapps, and that same kernel.
kevkid said:
Hi,
I have a few questions about the forced encryption on the nexus 6. I have an unlocked bootloader, and have cm12.1 installed. SELinux is Enforcing and I have no password/pin on the lockscreen.
How do I know if it is encrypted?
If it is how can I decrypt?
If I decrypt will it erase my files?
What about updating to the latest CM nightly?
Thanks
Click to expand...
Click to collapse
Like @simms22 already said, you need to find a kernel that doesn't force encryption and is CM compatible. Once you've found that, here's what you need to do:
1) Connect your device to your PC
2) Backup anything and everything you are not willing to erase
3) Reboot to recovery
4) Format Data in recovery
5) Reboot back into recovery
6) Flash ROM
7) Flash Gapps
8) Flash SuperSu (if you need it)
9) Flash Kernel
10) Reboot system
At this point if you navigate to the security options in your settings, you should have the option to encrypt rather than it saying the device is encrypted.
You mentioned SELinux set to enforcing. While this won't cause any issues at all with decrypting the device, it can cause issues with some apps. If you'd like to change it, get a terminal emulator from the playstore and type the following:
Code:
su 0 setenforce 0
Or get the SELinus ModeChanger app from here http://forum.xda-developers.com/showthread.php?t=2524485 to change selinux from enforcing to permissive.
when you format Data in recovery does this mean it will erase ALL files in internal storage? if yes does that mean the rom in Download will be delete as well?
kalali said:
when you format Data in recovery does this mean it will erase ALL files in internal storage? if yes does that mean the rom in Download will be delete as well?
Click to expand...
Click to collapse
everything in your storage gets deleted. it wont discriminate, and save your rom. itll just clear everything out. thats why you should flash the rom, gapps, and the kernel BEFORE you format storage.
simms22 said:
everything in your storage gets deleted. it wont discriminate, and save your rom. itll just clear everything out. thats why you should flash the rom, gapps, and the kernel BEFORE you format storage.
Click to expand...
Click to collapse
thanks for quick reply but my question is if it delete everything then i have to transfer rom, gapps kernel from computer to phone again before i can follow step 6 as PryorDaniel posted above.
1) Connect your device to your PC
2) Backup anything and everything you are not willing to erase
3) Reboot to recovery
4) Format Data in recovery
5) Reboot back into recovery
6) Flash ROM
7) Flash Gapps
8) Flash SuperSu (if you need it)
9) Flash Kernel
10) Reboot system
kalali said:
thanks for quick reply but my question is if it delete everything then i have to transfer rom, gapps kernel from computer to phone again before i can follow step 6 as PryorDaniel posted above.
1) Connect your device to your PC
2) Backup anything and everything you are not willing to erase
3) Reboot to recovery
4) Format Data in recovery
5) Reboot back into recovery
6) Flash ROM
7) Flash Gapps
8) Flash SuperSu (if you need it)
9) Flash Kernel
10) Reboot system
Click to expand...
Click to collapse
if you follow that way, youll have to push everything to your phone after. or, you can flash the rom, gapps, supersu, and the kernel then format your storage after, then boot up. either way, both work except youd have to push it all to your phone then flash.
i would prefer your way better. i didn't know we can format the storage/data after flashing rom, gapps, kernel and it will boot up.
thanks again.
kalali said:
i would prefer your way better. i didn't know we can format the storage/data after flashing rom, gapps, kernel and it will boot up.
thanks again.
Click to expand...
Click to collapse
yea, you can. i know others have done it this way, but my device is still encrypted. formatting your storage actually wont remove your rom(gapps, supersu, and kernel), so youll be alright. what id do is flash everything, then boot up to make sure it boots, then go back and format your storage.
---------- Post added at 06:38 PM ---------- Previous post was at 06:36 PM ----------
if, in the worst case scenario it wont boot, then id go back and push everything to the phone and flash again. but thats just a worst case scenario.
simms22 said:
yea, you can. i know others have done it this way, but my device is still encrypted. formatting your storage actually wont remove your rom(gapps, supersu, and kernel), so youll be alright. what id do is flash everything, then boot up to make sure it boots, then go back and format your storage.
---------- Post added at 06:38 PM ---------- Previous post was at 06:36 PM ----------
if, in the worst case scenario it wont boot, then id go back and push everything to the phone and flash again. but thats just a worst case scenario.
Click to expand...
Click to collapse
I can assure you that this does work.
You can use simms22 way, and to be honest that's how I'd prefer to do it. My device just didn't play nice when I initially tried decrypting that way :/
Hence how/why I went with the other more tedious route.
PryorDaniel said:
You can use simms22 way, and to be honest that's how I'd prefer to do it. My device just didn't play nice when I initially tried decrypting that way :/
Hence how/why I went with the other more tedious route.
Click to expand...
Click to collapse
more tedious, i wont really call it that. as it takes a few extra seconds to adb push it to the phone(or other ways). id just say its another option instead
Thank you very much. Worked perfectly
simms22 said:
more tedious, i wont really call it that. as it takes a few extra seconds to adb push it to the phone(or other ways). id just say its another option instead
Click to expand...
Click to collapse
Funny thing i read is that users spend an hour to decrypt and setup the phone and then flash CM12.1 wich encrypts the phone again

TWRP can't decrypt /data on CM12.1

I just decided to move to CM12.1 on my Droid Turbo (XT1254) after the 1/27 Snapshot (YOG7DAO3J1) was posted. I am running this with TWRP 2.8.7.0, BHB27 Kernel, and OpenGAPPS 5.1. So far, almost everything has been fantastic and the performance of the device is like night and day compared to the Verizon software.
My problem is that the CM12.1 ROM has my device encrypted to begin with, which is nice but giving me trouble. I can't get into TWRP to install Xposed framework or other .zips via ADB. I have tried the following:
Disabling require password on startup
Changing the password in Android
Changing the password from root ADB shell
Using a pin
Trying "default_password"
Can anyone give me a solution or some advice? Any help is greatly appreciated!
Having same issue with TWRP not recognizing any decryption password given... Any ideas out there? Is TWRP incompatible with Droid Turbo HW Encryption, or ?
P_6 said:
Having same issue with TWRP not recognizing any decryption password given... Any ideas out there? Is TWRP incompatible with Droid Turbo HW Encryption, or ?
Click to expand...
Click to collapse
This thread is kinda old and I assumed nobody really knew what was going on with it either. I ended up just not using the encryption. The first time around mine was encrypted without me knowing, which was the issue. I just wiped all partitions and flashed the ROM again...
I am having a similar issue so i thought i would chime in, despite the older thread. I had a stock ROM that was encrypted and I was able to unlock and root with SunShine fine. Flashed on TWRP 2.8.7 and ran into a "Unable to mount storage. Failed to decrypt data" error. Updated to TWRP 3.0.0 and still have the same issue. Still working through a resolution as the phone is still functional if I just boot normally. When you mentioned you wiped all partitions, what process did you use? If i can just get access to the interal storage I can flash a ROM and be good to go.
Asyt said:
I am having a similar issue so i thought i would chime in, despite the older thread. I had a stock ROM that was encrypted and I was able to unlock and root with SunShine fine. Flashed on TWRP 2.8.7 and ran into a "Unable to mount storage. Failed to decrypt data" error. Updated to TWRP 3.0.0 and still have the same issue. Still working through a resolution as the phone is still functional if I just boot normally. When you mentioned you wiped all partitions, what process did you use? If i can just get access to the interal storage I can flash a ROM and be good to go.
Click to expand...
Click to collapse
So far, the only way I have been able to get encryption working with CM12.1 on the Droid Turbo is to do the folllowing (Note: This assumes you have bootloader unlocked and TWRP installed as your recovery):
Part 0: Make sure you have what you need
1. Stock Droid Turbo Firmware SU4TL for your device
2. The version of CyanogenMod 12.1 that you need. I recommend a Snapshot, but it's up to you.
3. TWRP 3.0.0 or later for your Droid Turbo.
Part 1: Final set up (Yes, we do this first)
1. Download CM12.1 & Download OpenGapps arm for 5.1
2. Wipe device (system, data, cache, internal storage), copy CM12 install zip and opengapps install zip via USB to device.
3. Flash CM12 and OpenGapps in TWRP
4. Set up device how you want it to be (install your apps, set up your accounts, etc).
5. Set whatever lock-screen PIN / Password / Pattern you are going to want on your phone in general!
6. Make a Nandroid backup of your 100% set up phone in TWRP
7. Copy your backup TWRP folder to your PC.
Part 2: Encrypt device and put everything back how we want it.
1. Flash stock Verizon firmware (SU4TL) via Fastboot. Do not flash stock Recovery, but put back TWRP if you did somehow (I use a simple bash script I have attached below).
2. Boot device, go through initial set up, don't download apps (we're going to be wiping the device soon).
3. Make sure your battery is 80%+ charged, and your device is plugged in.
4. Set a password or PIN on your phone.
5. Encrypt your device (this will be fairly fast, as /data is empty, but you should be asked for your encryption password on boot.)
6. Reboot to recovery. TWRP will ask you for your password to decrypt. It should work with no problem.
7. Copy your backed-up TWRP folder with your CM12 install to your device via USB. The TWRP folder goes in the Internal Storage root directory.
8. Still in TWRP (Do not reboot), go to Restore, and select the backup you just copied over. This will replace the stock rom with your CM12 backup.
9. Your CM12 install will be restored, but your device will remain Encrypted.
10. Reboot into CM12. Win.
You will need to decrypt your device every boot with the password that you selected when you initially encrypted your device. Your lock-screen password CAN BE DIFFERENT. That is why I do it this way. I have a fairly long password to decrypt my device on boot-up, but a pattern as my lock screen. That way I can quickly get into my phone during daily use without having to constantly type in a fairly complicated password.

How to go from OOS 5.0 to Stock Nouga

How to go from OOS 5.0 to Stock Nouga
Since you've made the spelling error twice, its Nougat, not "Nouga.".
I think the best way you could do it is flash the special Open Beta build on the Open Beta thread and then flash the stable build zip.
Whichever way you do the reversion, you will lose partial data, as N and O do not support each others app installations.
Z.boy said:
How to go from OOS 5.0 to Stock Nougat
Click to expand...
Click to collapse
If you are unlocked bootloader, flash twrp 3.1.1-2 and clear dalvik data cache and system, and just flash them through twrp
dont use twrp 3.2.0-0 because you cant install magisk, it shows installed but magisk doesnt seem to be recognized in apps
I've just done that, and everything seems working flawlessly
Pls do hit thanks if i help you
izukamikain said:
If you are unlocked bootloader, flash twrp 3.1.1-2 and clear dalvik data cache and system, and just flash them through twrp
dont use twrp 3.2.0-0 because you cant install magisk, it shows installed but magisk doesnt seem to be recognized in apps
I've just done that, and everything seems working flawlessly
Pls do hit thanks if i help you
Click to expand...
Click to collapse
Does your solution avoid erasing internal storage? Because that's the part that's preventing me as it can take too long getting my backups into the phone again.
rebelpixel said:
Does your solution avoid erasing internal storage? Because that's the part that's preventing me as it can take too long getting my backups into the phone again.
Click to expand...
Click to collapse
i never format my internal sdcard partition
it's taking too long time to backup and restore it again
as i said, only format dalvik cache data and system thru twrp and you're good to go
download special edition nougat revert zip file and flash it via recovery
http://oneplusroms.s3.amazonaws.com...337224&Signature=BEA4IHd/rVFqoPd2gh7EvwaoSeg=
notes :
The build will wipe app and cache data, but Internal Storage will be saved (ie: pictures and files)
Users who revert their device back to the special build can still OTA update the device to Android O build at a later date.
Steps to revert:
Download special build
Copy to Internal storage
Reboot to recovery Mode to install
Choose “Install from Local”
Choose the downloaded build to install

Problem with installing TWRP and rooting with Magisk

I am trying to install TWRP and root my Mi Mix. I have followed the steps below without encountering any error messages.
1. Go into fastboot
2. Flash TWRP recovery
3. Boot into recovery.
But at the end when I boot into recovery I see Mi Recovery 3.0 instead of TWRP. Am I missing anything? My device is unlocked. I am currently running MiUI 9.6.1 Global stable Android 8.0
sofene said:
I am trying to install TWRPA on my Mi Mix. I have followed the steps below without encountering any error messages.
1. Go into fastboot
2. Flash TWRP recovery
3. Boot into recovery.
But at the end when I boot into recovery I see Mi Recovery 3.0 instead of TWRP. Am I missing anything? My device is unlocked. I am currently running MiUI 9.6.1 Global stable Android 8.0
Click to expand...
Click to collapse
Never mind I solved the problem by booting from the pc. But I have a new problem. Two problems really. First of all I can't seem to get the data partition backed up. I get the error unable to mount *\data *. Secondly I cannot install magisk.zip. I cannot find the file in twrp though it is in main storage in the device. Do I need to copy it to any specific location for the twrp to use it?
Same like your firs post. But i not try instal magisk. I using SU. Now not root and not cusum recovery
sofene said:
Never mind I solved the problem by booting from the pc. But I have a new problem. Two problems really. First of all I can't seem to get the data partition backed up. I get the error unable to mount *\data *. Secondly I cannot install magisk.zip. I cannot find the file in twrp though it is in main storage in the device. Do I need to copy it to any specific location for the twrp to use it?
Click to expand...
Click to collapse
You can install it using a usb stick or via sideload.
You cant backup because the twrp's dont let you enter the password for the encryption on the device thus leaving it encrypted.
If u dont want to delete everything then use sideload for the Magisk installer, if u dont mind then u can go ahead and format data and the encryption will be gone untill you go back to system, then the device will encrypt the data again.
sexlord89 said:
You can install it using a usb stick or via sideload.
You cant backup because the twrp's dont let you enter the password for the encryption on the device thus leaving it encrypted.
If u dont want to delete everything then use sideload for the Magisk installer, if u dont mind then u can go ahead and format data and the encryption will be gone untill you go back to system, then the device will encrypt the data again.
Click to expand...
Click to collapse
I tried to install magisk using sideload enabled but still got error unable to mount storage at the end so I deleted data. And then I was able to install magisk without error. However, when I check root status with root checker it says root was not properly installed. When I went back to twrp I was presented with a screen to enter password to mount I guess the storage or partition. Does this mean that ruth has been installed even though root checker says its not.? Secondly which password is being requested because when I entered my screen unlock password it says password failed. Is it asking for the mi account password or with other password? Thanks for your assistance.
Hi, the only thing that worked for me is to install right after the rom the encryption disabler and you'll be able to use trwp. Just follow the steps in the link below. last thing, when you'll make an update you'll loose again the trwp access.
https://forum.xda-developers.com/mi-mix/development/rom-global-miui9-oreo-mi-mix-t3783869
lnt976 said:
Hi, the only thing that worked for me is to install right after the rom the encryption disabler and you'll be able to use trwp. Just follow the steps in the link below. last thing, when you'll make an update you'll loose again the trwp access.
https://forum.xda-developers.com/mi-mix/development/rom-global-miui9-oreo-mi-mix-t3783869
Click to expand...
Click to collapse
Thanks for your reply. One question, though. Would this then allow you to backup data using twrp?
sofene said:
Thanks for your reply. One question, though. Would this then allow you to backup data using twrp?
Click to expand...
Click to collapse
Yes you can make a backup, but in case of update you'll loose the access on your files in trwp.
A couple things :
1. You can't install magisk if your data partition is encrypted, because magisk needs to put the file in the data partition. so you need to disable the encrypt first, and then you can install magisk.
2. If your data partition is encrypted, don't bother to backup from twrp. Boot to system, connect to pc, and backup using regular way (copy and paste files).
3. Backup your data before you do any encrypt/decrypt process.

Update Xiaomi.eu manually?

Hi
I have a problem with my twrp recovery when i want update the rom via updater app and i choose file package then reboot to update it will show twrp logo then it reboot again and twrp logo display again and twrp open normally without updating anything, im on 9.8.15 and wanna install 9.8.22 ,i installed twrp and the rom with this guide https://forum.xda-developers.com/Mi-9/how-to/guide-how-flashed-twrp-xiaomi-eu-rom-t3912952[/URL] is that twrp img wrong ?
If yes show me the right one
If no tell me what should i wipe while i install the rom ? System,data,dalvik,cache.... ???
It sounds like your device is encrypted, so you need to format the device before installing anything. Make sure to have the latest TWRP installed (you can find it in another thread) and afterwards you can install whatever you want.
when you boot into TWRP, can you see files and folders or can you see foldernames with alot off numbers?
if the second is the case, yeah you are encrypted and need to format data in TWRP.
first you can copy and save all the needed data in normal use off the phone or usb otg, or aus cable connected to laptop
catalindobre said:
It sounds like your device is encrypted, so you need to format the device before installing anything. Make sure to have the latest TWRP installed (you can find it in another thread) and afterwards you can install whatever you want.
Click to expand...
Click to collapse
I formated it before like in the guide said!
When i was in global i installed twrp then inside twrp i did format data then facrory reset then i installed eu , do i need to do that again ??
marcel112 said:
when you boot into TWRP, can you see files and folders or can you see foldernames with alot off numbers?
if the second is the case, yeah you are encrypted and need to format data in TWRP.
first you can copy and save all the needed data in normal use off the phone or usb otg, or aus cable connected to laptop
Click to expand...
Click to collapse
Yeah i dont see my folders like downloads android and others i just see 6 or 7 folders with lots of numbers and letters, but i formated data before i install the eu version do i need to do that again ? Will that change it to normal ?
sounds like encryption, most likely you've deleted the system and the device became encrypted again. format it again and then copy the installation files in the device . after this follow normal installation steps.

Categories

Resources