TWRP not decrypting data


Jimnasium

Members
May 16, 2021
384
67
After I have installed the rom, I am having issues with TWRP not recognizing my pattern and decrypting the data when attempting to install OTA or upgrade. Has anyone else had this problem?
 

LOLO9393

Members
Feb 8, 2016
3,211
322
After I have installed the rom, I am having issues with TWRP not recognizing my pattern and decrypting the data when attempting to install OTA or upgrade. Has anyone else had this problem?
We are many facing this little issue. We bypassed it using OTG stick.
 
  • Like
Reactions: Jimnasium

Poney70

Donator
Oct 3, 2019
5,500
337
You can try to boot your device in Fastboot mode then use fastboot boot twrp.img command on your computer to boot in TWRP. This may help to decrypt the /data partition. ;)
 

Jimnasium

Members
May 16, 2021
384
67
You can try to boot your device in Fastboot mode then use fastboot boot twrp.img command on your computer to boot in TWRP. This may help to decrypt the /data partition. ;)
I have already tried that unfortunately when TWRP starts up it will want my lockscreen password to decrypt the data, but when I enter it, it doesn't recognize it and will not decrypt the data partition.
 

Jimnasium

Members
May 16, 2021
384
67
We are many facing this little issue. We bypassed it using OTG stick.
Mine won't recognize the OTG stick as I've tried that too. So rather than doing a dirty flash upgrade. I need to perform a back, do totally clean flash where I have to reformat the data and then do a reinstall and reconfiguration of all my data. Big hassle having to do this everytime. If they can, I wish they would bring back the fastboot versions.
 

Haxwel

Members
Jun 18, 2021
2
5
I had this same issue too. Unfortunately the only way to fix it was to flash the stock ROM using MiFlash.
So the steps I did were:
1. Flash stock ROM (but do not lock bootloader)
2. Boot to TWRP using fastboot
3. Inject TWRP
4. Format data (not wipe) and do NOT reboot
5. Move the xiaomi.eu ROM to the /sdcard. I had to use adb push since MTP did not work for whatever reason.
6. Install the ROM.
7. Boot to system and install all the things
8. (Optional) Reboot to TWRP and install magisk
 

Jimnasium

Members
May 16, 2021
384
67
I can install just fine, the issue arises when I get an OTA ugrade. TWRP doesn't decrypt data because it doesn't recognize the security pattern. I have gone so far as removing security passcodes for the device, but TWRP still asks for one and , of course, does not recognize it and will not decrpt the data making upgrading an OTA impossible.
 
  • Like
Reactions: Loofah

Loofah

Members
Jul 25, 2018
10
15
I can install just fine, the issue arises when I get an OTA ugrade. TWRP doesn't decrypt data because it doesn't recognize the security pattern. I have gone so far as removing security passcodes for the device, but TWRP still asks for one and , of course, does not recognize it and will not decrpt the data making upgrading an OTA impossible.
Same problem! Is it something wrong with TWRP?
 

duvee

Members
Jun 19, 2021
3
3
Guys,

All you have to do is to 'fastboot erase userdata'.

Than boot into twrp and you can copy rom to your phone there. It is a simple fix. I have faced this issue sow many times!
 
  • Like
Reactions: Sage222

Jimnasium

Members
May 16, 2021
384
67
Guys,

All you have to do is to 'fastboot erase userdata'.

Than boot into twrp and you can copy rom to your phone there. It is a simple fix. I have faced this issue sow many times!
But isn't the results of deleting userdata similar to factory data reset, in that it only preserves personalized content shipped with your phone, including power up message, image, wallpaper, and ringtones. That's the entire problem, not that I can't work around it, but an OTA is supposed something that doesn't wipe your personal data.
 

katerpanne

Members
Apr 19, 2014
2,594
332
Why dont you post your device model and the twrp version ? Did you move from stable to weekly or vice versa, did you format data not wipe in the past ? Was it working before?

You want to get help, but the details are missing… what did you do before you run into this issue?
 

duvee

Members
Jun 19, 2021
3
3
But isn't the results of deleting userdata similar to factory data reset, in that it only preserves personalized content shipped with your phone, including power up message, image, wallpaper, and ringtones. That's the entire problem, not that I can't work around it, but an OTA is supposed something that doesn't wipe your personal data.
I assumed the people have the same issue as me, where it asks for a password which never works to decrypt/encrypt the data.

If that is the issue, you will never be able to format data unfortunately. The only way to bypass that, is to erase userdate by fastboot. Then you can enter and fully use twrp again.

That was my issue, several times. No password worked, tried everything. Changing to pin, changing to word, turning it off. Nothing worked to access twrp with the decrypted data. Therefore format data in twrp didnt work, and as a result i couldnt flash anything.
 

LOLO9393

Members
Feb 8, 2016
3,211
322
I assumed the people have the same issue as me, where it asks for a password which never works to decrypt/encrypt the data.

If that is the issue, you will never be able to format data unfortunately. The only way to bypass that, is to erase userdate by fastboot. Then you can enter and fully use twrp again.

That was my issue, several times. No password worked, tried everything. Changing to pin, changing to word, turning it off. Nothing worked to access twrp with the decrypted data. Therefore format data in twrp didnt work, and as a result i couldnt flash anything.
NO!
You easily by pass TWRP encryption by flashing the rom zip via OTG stick or external SD if any.
 

Jimnasium

Members
May 16, 2021
384
67
Why dont you post your device model and the twrp version ? Did you move from stable to weekly or vice versa, did you format data not wipe in the past ? Was it working before?

You want to get help, but the details are missing… what did you do before you run into this issue?
I mention the issue is with the TWRP for my Mi 11 Ultra in previous posts. I believe there is only one version for that right now. I mention that the issue is that TWRP asks for the password/pattern in order to decrypt the data partition, so that the OTA can be performed, but doesn't recognize it and won't allow me to access my data partion. If I am using TWRP, I am using the Xiaomi.EU rom and there has not been any stable releases for the EU rom since 5/20, so that means I am referring to the weekly OTA's. However, this is not an issue with development of the rom, as there isn't an issue with the rom, but rather TWRP not decryting the data partition properly. That fact has very little to do with which version of phone I have, unless there are multiple versions of TWRP or which Xiaomi.eu rom I am using, it's TWRP that is the issue.

When it fails to decrypt the data partition, a wipe is all I can do. That means backing up my data first, wiping all, then doing fresh install, reinstalling backup and then reconfiguring that version and data. An OTA is supposed to be an upgrade without having to do all that. The issue is with TWRP, not anything else.

BTW, before TWRP, I did what every other user that has this phone did, I used the fastboot method provided by the devs.
 
Last edited:

Poney70

Donator
Oct 3, 2019
5,500
337
I mention the issue is with the TWRP for my Mi 11 Ultra in previous posts. I believe there is only one version for that right now. I mention that the issue is that TWRP asks for the password/pattern in order to decrypt the data partition, so that the OTA can be performed, but doesn't recognize it and won't allow me to access my data partion. If I am using TWRP, I am using the Xiaomi.EU rom and there has not been any stable releases for the EU rom since 5/20, so that means I am referring to the weekly OTA's. However, this is not an issue with development of the rom, as there isn't an issue with the rom, but rather TWRP not decryting the data partition properly. That fact has very little to do with which version of phone I have, unless there are multiple versions of TWRP or which Xiaomi.eu rom I am using, it's TWRP that is the issue.

When it fails to decrypt the data partition, a wipe is all I can do. That means backing up my data first, wiping all, then doing fresh install, reinstalling backup and then reconfiguring that version and data. An OTA is supposed to be an upgrade without having to do all that. The issue is with TWRP, not anything else.
Hello,

@velqn gave a workaround to install ROM when you can't decrypt internal storage of your Mi 11 Ultra in TWRP => https://xiaomi.eu/community/threads/guide-install-twrp-for-mi-11-pro-ultra.61239/post-613593

Hope it will work for you. :)
 

Jimnasium

Members
May 16, 2021
384
67

Poney70

Donator
Oct 3, 2019
5,500
337
I have tried the OTG, but it failed to mount as well, but I can copy the rom from the PC to the device using ADB, but I can not flash it if the data partition can not read it in TWRP due to the partition not being decrypted.
If you can use ADB push command, try to push in /data/media => adb push rom.zip /data/media/

Then, in "Install" menu of TWRP, navigate in "/data/media" folder and install ROM. :)

EDIT: Delete the ROM after installation via TWRP's File Manager (in "Advanced" menu). ;)
 
  • Like
Reactions: katerpanne

katerpanne

Members
Apr 19, 2014
2,594
332
I mention the issue is with the TWRP for my Mi 11 Ultra in previous posts. I believe there is only one version for that right now. I

Is it so difficult to answer the questions when people want help you?

There is more than one twrp for mi11 ultra, so I have asked you which version you are using. In another thread somebody used another one and everything is working now like a charme.

Sorry for asking and I believe you mean format instead of wipe :cool:
 
Last edited:

Jimnasium

Members
May 16, 2021
384
67
Is it so difficult to answer the questions when people want help you?

There is more than one twrp for mi11 ultra, so I have asked you which version you are using. In another thread somebody used another one and everything is working now like a charme.

Sorry for asking and I believe you mean format instead of wipe :cool:
Is not wiping your ENTIRE disk (not just a file or partition only) not also the same as formating your disk, as it is deleting everything? BTW, I wasn't asking for help, I was mentioning that I would appreciate it if the devs went back to creating fastboot roms, at least until a more stable TWRP is developed. However, if you had done a search on previous posts, you would have been able to see that is what I was requesting. Sorry that you misunderstood me, but if you had read from myself and others, you would have had a better idea of what was actually happening.
 

JiaiJ

Members
Jun 11, 2020
838
257
Is not wiping your ENTIRE disk (not just a file or partition only) not also the same as formating your disk, as it is deleting everything? BTW, I wasn't asking for help, I was mentioning that I would appreciate it if the devs went back to creating fastboot roms, at least until a more stable TWRP is developed. However, if you had done a search on previous posts, you would have been able to see that is what I was requesting. Sorry that you misunderstood me, but if you had read from myself and others, you would have had a better idea of what was actually happening.
We are just trying to help, you can't expect people to search your entire post history to understand the meaning of your thread
 

duvee

Members
Jun 19, 2021
3
3
NO!
You easily by pass TWRP encryption by flashing the rom zip via OTG stick or external SD if any.
You mean, flash the zip via adb when i cant access data because of the password error? Or just push the zip with adb in that case?

I have not tried to flash it with adb when i couldnt access my data, because i assumed it wouldnt work.

Please explain a little bit more, as it would really save some time for me next time.
 

Mrboombastixx

Members
Feb 14, 2021
126
40
Mine TWRP on Mi 11 at first does not decrypt data only succeed to decrypt on the first installation of EU ROM. Then, I tried flashing stock ROM back via fastboot and then flash EU ROM again. At last, TWRP succeed to decrypt data until now and I managed to flash other ROM and still it decrypt data very well without any problems anymore. Cheers.
 
Last edited:

Jimnasium

Members
May 16, 2021
384
67
We are just trying to help, you can't expect people to search your entire post history to understand the meaning of your thread
Then it is impossible to understand what anyone means if you don't follow the entire context. Not in any of my posts did I say help me. I merely stated an issue I had discovered with TWRP for STAR not decrypting properly. The software version or model (Global or CN) has nothing to do with TWRP and I was asking that the devs bring back the fastboot roms until a more stable version of TWRP can be found. It isn't my fault people do not understand.
 

hoangsang

Members
Aug 12, 2016
252
67
Then it is impossible to understand what anyone means if you don't follow the entire context. Not in any of my posts did I say help me. I merely stated an issue I had discovered with TWRP for STAR not decrypting properly. The software version or model (Global or CN) has nothing to do with TWRP and I was asking that the devs bring back the fastboot roms until a more stable version of TWRP can be found. It isn't my fault people do not understand.
The best way to ensure success is:
1. Flash xiaomi.eu rom for fastboot (please use last version).
2. Install TWRP and then flash the rom
This ensures success always :D
However, when using the fastboot rom, the percentage of your phone into a brick is quite high :D
 
Last edited:
  • Like
Reactions: Poney70