Problematic Xiaomi MI 9T - can't flash due to encrypted partition

Search This thread

johan.drykke

New member
Jul 25, 2022
2
0
Hi everyone, I just bought myself a MI 9T davinci global version. I wanted to make it so that it is nethunter, but It just doesn't work. I try everytime to flash recovery first then image, but when I try to copy images for flashing this **** comes up.

vqToqkd[1].png


I can't copy anything inside. I am looking for any image of a ROM but when I choose MIUI 11 for 9T, the official one, just so I can flash it somehow I can't do it, becuase Chinese little hands did something unexpected, I have to LOG IN to flash MY hardware with software I want.

What the f is going on? I can't flash dm-verify because I can't put it on the phone anywhere, I can't flash ****. What can I do? I have currently MIUI 12.4 I think.
 

zgfg

Senior Member
Oct 10, 2016
7,810
5,220
Hi everyone, I just bought myself a MI 9T davinci global version. I wanted to make it so that it is nethunter, but It just doesn't work. I try everytime to flash recovery first then image, but when I try to copy images for flashing this **** comes up.

View attachment 5668491

I can't copy anything inside. I am looking for any image of a ROM but when I choose MIUI 11 for 9T, the official one, just so I can flash it somehow I can't do it, becuase Chinese little hands did something unexpected, I have to LOG IN to flash MY hardware with software I want.

What the f is going on? I can't flash dm-verify because I can't put it on the phone anywhere, I can't flash ****. What can I do? I have currently MIUI 12.4 I think.
Very simple. When you open TWRP, it should ask you for the PIN. You have to enter the same PIN/Pattern you use the same for unlocking the screen in Android

Use the latest official TWRP from TWRP.me

It's nothing specific to Mi 9T or Xiaomi, it's a very good protection enforced by Google couple of years ago with A10 - TWRP cannot decrypt your Internal memory data without your pin.
Just consider your phone gets lost and somebody boots to TWRP - would you like him to be able to see your photos, documents, etc
 

johan.drykke

New member
Jul 25, 2022
2
0
The thing is, I had pin, 1234, I flashed twrp official through fastboot, It didn't ask for it, partition is still encrypted. Whet next? I tried wiping **** out of sdcard putting image there and flashing it, PicselExp, bootloop willkomen. Nothing is working, I am glad I flashed recovery though.

Please stop moralizing, I bought this phone because I want to play with it, not to store DEFCON 2 documents on it.

EDIT1: Sorry for beeing harsh, just I think that this 'davinci' is different than other 'davinci' and for the love of God, I hate TiVoization.
 
Last edited:

yaro666

Senior Member
Feb 16, 2008
1,287
206
Królewska Huta
use fastboot to flash stock ROM (fastboot ROM). then from stock removeall safety patterns, fingers, go to flashing twrp with fastboot, boot to twrp, format data, flash whatever you want

be polite or get the f...out of this forum
 

Crikripex

New member
Aug 14, 2022
3
1
Hi!
I'm having a somewhat similar yet kind of different problem : long story short I was able to flash a ROM once last week, it bricked my device and the internal storage got encrypted just like that, I somehow managed to manually flash a stock ROM from ADB and now my device boots properly on a stock MIUI.
The issue is I have no lock pattern anymore and the internal storage is still encrypted so I still can't flash from recovery.

Am I doomed to rock MIUI until my device dies? At what point should TWRP ask me for a pattern?
 

yaro666

Senior Member
Feb 16, 2008
1,287
206
Królewska Huta
can't you format data in recovery?
wipe everything in recovery, try to install desired ROM. Hope you have made a backup before encryption
 

Crikripex

New member
Aug 14, 2022
3
1
I have not tried yet, does wiping data remove encryption and "read only" ?
I had not backed up before encryption but as long as I have fastboot I have a stock MIUI I could flash with adb, it's kind of tedious but better than nothing.
 

zgfg

Senior Member
Oct 10, 2016
7,810
5,220
I have not tried yet, does wiping data remove encryption and "read only" ?
I had not backed up before encryption but as long as I have fastboot I have a stock MIUI I could flash with adb, it's kind of tedious but better than nothing.
There are two things:

- Data and Internal memory are FBE encrypted:

- System As Root (SAR) = System, Vendor, Product are Read-only

Do not mix/mess-up one with another

---

Format Data does not remove one or another

FORMAT - not Wipe, there are two different buttons in TWRP.
And Format Data only (not System, etc)

After that, reboot to Android, setup your screen unlock pin

Then reboot to TWRP, it must ask you for pin - enter that same pin you did set in Android for screen unlocking

The TWRP (by the FBE mechanism) will be able to decrypt Data and Internal storage.
On a folder or file by file base - just like it works in Android (seemless for you)

Same way you have to enter your pin every time when you reboot to Android - samw you have to enter the pin every time you reboot to TWRP

Because FBE ancryption cannot decrypt without your pin

And that's a good feature (enforced by Google, since Android 10). I don't understand why people are 'afraid' or whatever of that. Thinking it's something strange, unwanted, whatever

If your phone is stolen and the thief reboots to TWRP, he will see scrambled files and folders. If he copies the files to PC - your photos and documents, etc will be scrambled and of no use for him

Without FBE, the thief reboots to TWRP (he cannot to Android since not knowing our pin) and he could copy your files to PC and open them

And things work seamlessly for you, hence no problem at all

---

Read only SAR is something totally different. System filesystems are read-onl and you cannot make any (hard) changes. Even not with Magisk/root

But Magisk privides Systemless mechanism - where every time while booting and initializing Magisk, Magisk mounts the changes asked by Magisk modules.
That way once you are booted, your System appears as it was changed (AdAway hosts file, debloating, Viper4Androud, etc).
Hence again, things work for you seamlessly.
But if you disable/uninstall Magisk module(s) or Magisk itself (or you just reboot with stock Boot img - without Magisk), then you have clean/not changed/not affected System - and since that you have no problem with OTA, etc

No Xiaomi 'features' but things enforced by Google and you will find them in all new phones with new Android versions

Actually, started with Android 10 or so, hence present already for 3 years out.
No more times of KitKat, Open Bootloaders, etc 😁
 
Last edited:

yaro666

Senior Member
Feb 16, 2008
1,287
206
Królewska Huta
yes, format data wipes encryption and all of your data.
Without decryption you won't be able to restore data.
Boot to miui, make a backup if that's possible and then boot to recovery, format data and do everything to i stall desired ROM
 

Crikripex

New member
Aug 14, 2022
3
1
There are two things:

- Data and Internal memory are FBE encrypted:

- System As Root (SAR) = System, Vendor, Product are Read-only

Do not mix/mess-up one with another

---

Format Data does not remove one or another

FORMAT - not Wipe, there are two different buttons in TWRP.
And Format Data only (not System, etc)

After that, reboot to Android, setup your screen unlock pin

Then reboot to TWRP, it must ask you for pin - enter that same pin you did set in Android for screen unlocking

The TWRP (by the FBE mechanism) will be able to decrypt Data and Internal storage.
On a folder or file by file base - just like it works in Android (seemless for you)

Same way you have to enter your pin every time when you reboot to Android - samw you have to enter the pin every time you reboot to TWRP

Because FBE ancryption cannot decrypt without your pin

And that's a good feature (enforced by Google, since Android 10). I don't understand why people are 'afraid' or whatever of that. Thinking it's something strange, unwanted, whatever

If your phone is stolen and the thief reboots to TWRP, he will see scrambled files and folders. If he copies the files to PC - your photos and documents, etc will be scrambled and of no use for him

Without FBE, the thief reboots to TWRP (he cannot to Android since not knowing our pin) and he could copy your files to PC and open them

And things work seamlessly for you, hence no problem at all

---

Read only SAR is something totally different. System filesystems are read-onl and you cannot make any (hard) changes. Even not with Magisk/root

But Magisk privides Systemless mechanism - where every time while booting and initializing Magisk, Magisk mounts the changes asked by Magisk modules.
That way once you are booted, your System appears as it was changed (AdAway hosts file, debloating, Viper4Androud, etc).
Hence again, things work for you seamlessly.
But if you disable/uninstall Magisk module(s) or Magisk itself (or you just reboot with stock Boot img - without Magisk), then you have clean/not changed/not affected System - and since that you have no problem with OTA, etc

No Xiaomi 'features' but things enforced by Google and you will find them in all new phones with new Android versions

Actually, started with Android 10 or so, hence present already for 3 years out.
No more times of KitKat, Open Bootloaders, etc 😁
yes, format data wipes encryption and all of your data.
Without decryption you won't be able to restore data.
Boot to miui, make a backup if that's possible and then boot to recovery, format data and do everything to i stall desired ROM

Thank you both so much for your time, help and explainations!
I finally understand what was happening, I had a hard time pinpointing exactly what made my partition encrypted but it does make a whole lot of sense.

I managed to successfully flash ArrowOS 12.1 using sideload after formating. I now know both that my system is naturally encrypted and that it is completely normal and not a result of a flashing error 😅
Last time I flashed a ROM the newest and flashiest android was 9.0 so it's all new to me.

Thanks again!
 
  • Like
Reactions: zgfg

Kogar

Senior Member
Nov 22, 2008
51
14
There is a TWRP (TWRP 3.6.2+ - UNOFFICIAL | Android 12.) specially made to work with android 12 enryption. (The version from Adi is only needed for his supported roms. Otherwise always use the TWRP 3.6.2+ if not declared differently)
Could be useful if you want to OTA update your rom. Otherwise you could be forced to sideload over adb or even make a complete clean flash again.

Selfquote:
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    There are two things:

    - Data and Internal memory are FBE encrypted:

    - System As Root (SAR) = System, Vendor, Product are Read-only

    Do not mix/mess-up one with another

    ---

    Format Data does not remove one or another

    FORMAT - not Wipe, there are two different buttons in TWRP.
    And Format Data only (not System, etc)

    After that, reboot to Android, setup your screen unlock pin

    Then reboot to TWRP, it must ask you for pin - enter that same pin you did set in Android for screen unlocking

    The TWRP (by the FBE mechanism) will be able to decrypt Data and Internal storage.
    On a folder or file by file base - just like it works in Android (seemless for you)

    Same way you have to enter your pin every time when you reboot to Android - samw you have to enter the pin every time you reboot to TWRP

    Because FBE ancryption cannot decrypt without your pin

    And that's a good feature (enforced by Google, since Android 10). I don't understand why people are 'afraid' or whatever of that. Thinking it's something strange, unwanted, whatever

    If your phone is stolen and the thief reboots to TWRP, he will see scrambled files and folders. If he copies the files to PC - your photos and documents, etc will be scrambled and of no use for him

    Without FBE, the thief reboots to TWRP (he cannot to Android since not knowing our pin) and he could copy your files to PC and open them

    And things work seamlessly for you, hence no problem at all

    ---

    Read only SAR is something totally different. System filesystems are read-onl and you cannot make any (hard) changes. Even not with Magisk/root

    But Magisk privides Systemless mechanism - where every time while booting and initializing Magisk, Magisk mounts the changes asked by Magisk modules.
    That way once you are booted, your System appears as it was changed (AdAway hosts file, debloating, Viper4Androud, etc).
    Hence again, things work for you seamlessly.
    But if you disable/uninstall Magisk module(s) or Magisk itself (or you just reboot with stock Boot img - without Magisk), then you have clean/not changed/not affected System - and since that you have no problem with OTA, etc

    No Xiaomi 'features' but things enforced by Google and you will find them in all new phones with new Android versions

    Actually, started with Android 10 or so, hence present already for 3 years out.
    No more times of KitKat, Open Bootloaders, etc 😁
    yes, format data wipes encryption and all of your data.
    Without decryption you won't be able to restore data.
    Boot to miui, make a backup if that's possible and then boot to recovery, format data and do everything to i stall desired ROM

    Thank you both so much for your time, help and explainations!
    I finally understand what was happening, I had a hard time pinpointing exactly what made my partition encrypted but it does make a whole lot of sense.

    I managed to successfully flash ArrowOS 12.1 using sideload after formating. I now know both that my system is naturally encrypted and that it is completely normal and not a result of a flashing error 😅
    Last time I flashed a ROM the newest and flashiest android was 9.0 so it's all new to me.

    Thanks again!