Accidentally flashed Android 11. Can I restore decryption?


Redsandro

Members
Mar 1, 2021
4
3
Made a mistake dirty flashing Android 11 over 10.

I made a full TWRP backup on internal memory before flashing xiaomi.eu_multi_HMK20ProMI9TPro_21.2.24_v12-11.zip over xiaomi.eu_multi_HMK20ProMI9TPro_V12.0.1.0.QFKCNXM_v12-10.zip.

Now I cannot restore my backup because I am not asked for decryption pattern in TWRP. I can only boot into fastboot or TWRP. I cannot flash old ROM back because I cannot decrypt data. Is there any file from the old ROM I can manually push back in order for decryption to work again?
 
Hello,

That's really useless to keep a TWRP backup on your device (or are you copy it to your computer after that?).

It's nice to have a USB-OTG device to create backup and also avoid a possible decryption issue. :)

Also your mistake is not "dirty flashing Android 11 over 10", it's dirty flashing a Weekly ROM version overt Stable one. ;)

I guess your only solution is to format data in TWRP now... But can you tell what TWRP version is currently installed?
 
  • Like
Reactions: geoorg
can you tell what TWRP version is currently installed?
I have twrp-3.5.0_9-0-raphael.img installed, but I can fastboot into any TWRP. I've also tried twrp-3.4.0-10-raphael-mauronofrio.img and twrp-3.5.A9-raphael-geoanto555.img but no difference.

That's really useless to keep a TWRP backup on your device
I guess I'm old. It didn't used to be useless. I used to have multiple backups like this. Could instantly restore. Even when encryption was first introduced, it was never a problem for me. I just enter the login pattern and all was fine.

This is the first time in 10 years that I have a problem. It's time to learn new best practices. One problem is that I don't know how the encryption key is derived. I don't understand what files that were updated cause the old encryption to be broken.

I guess your only solution is to format data in TWRP now...

You are probably right, but I still wonder if some files from the new ROM break the fscrypt key, can't I just restore those files from the old ROM?
 
You are probably right, but I still wonder if some files from the new ROM break the fscrypt key, can't I just restore those files from the old ROM?
I can't help you, I don't know how ROM encryption works. :(