Owners of smartphones Xiaomi, Redmi and POCO Often faced with a problem: after installing custom recavery TWRP section /data It gets locked, and the system refuses to mount it, and when you try to flash it, it's locked. ZIP-The file appears as an Unable to mount error. /data It's called Data Decryption unsuccessful, because it's hardware-based. FBE (File-Based Encryption, which Xiaomi has been actively using since Android 9 and MIUI 10.
This article will not just list the steps to unlock โ we will break down three basic methods (via fastboot, ADB We will explain why they work and provide solutions for common errors, with a special focus on Qualcomm Snapdragon chipset models (e.g. Redmi Note). 10 Pro, Xiaomi 11T) and MediaTek (POCO X3 Pro, Redmi Note 12), where the unlock algorithms are different. disable_dm-verity_forceencrypt.zip And it didn't work -- you'll find alternative approaches here.
Why is the Data partition blocked in TWRP?
The problem arises from a combination of three factors:
- ๐ Hardware encryption FBE: Starting with Android 9, Xiaomi encrypts partition /data with a hardware key binding in a Qualcomm or MediaTek chip. TWRP It does not have access to this key by default.
- ๐ฑ bootloader lock: Even if you unlocked the bootloader through the Mi Unlock Tool, some models (Xiaomi) 12/13 series, Redmi K50) You need to unlock the anti-rollback.
- ๐ ๏ธ Version incompatibility TWRP: Outdated Recavery assemblies (for example, for Redmi Note) 8 Pro) do not support new encryption schemes MIUI 14/15.
As a result, TWRP sees the /data partition, but can't mount it because it doesn't have a decryption key. Attempts to flash Magisk or custom firmware end in error. The decision depends on whether the bootloader is unlocked and which version of MIUI is installed.
Preparation: What to do before unlocking
Before you start manipulating /data, follow the mandatory steps:
Unlock the bootloader via Mi Unlock Tool (even if already unlocked โ check status)
Download the current version of TWRP for your model (e.g. from [twrp.me](https://twrp.me)
Install ADB/Fastboot drivers (Instructions for Windows: [link](https://developer.android.com/studio/run/win-usb))
Backup your important data (unlocking will result in a reset!)
Charge your phone at least 70% (the process can take up to 30 minutes)
-->
Pay special attention to the choice of version TWRP. For example, for Redmi Note 10 Pro (sweet) suitable official assembly, and for POCO F3 (Alioth โ modified version with support FBE. Using an inappropriate assembly will lead to an error:
Failed to mount '/data' (Invalid argument)
E: Unable to mount storageโ ๏ธ Note: If you are updating MIUI through OTA After unlocking the bootloader, the system could automatically block the partition /data In this case, you will need a full reset via fastboot.
Method 1: Unlock Data via fastboot (recommended)
This is a method that works for most Xiaomi/Redmi/POCO models on Qualcomm and MediaTek chipsets, and involves fully formatting the /data partition with decryption. All data will be erased โ copy important files in advance.
Steps:
- Turn off the phone and press Volume Down + Power to log into fastboot.
- Connect the device to your PC and execute the command to check the connection: fastboot devices must display your phoneโs serial number.
- Perform userdata (this is /data): fastboot erase userdata fastboot format:ext4 userdata For some models (Redmi Note 9 Pro, POCO X3 NFC) you may need to command: fastboot format userdata
- TWRP: Fastboot Reboot Recovery
Once rebooted, the /data partition should be error-free. If the TWRP still can't see the partition, try flashing the TWRP again or using an alternative build with FBE support (e.g., OrangeFox Recovery).
๐ก
If the fastboot format userdata command doesnโt work, try running fastboot erase userdata first, then fastboot format:ext4 userdata. Some devices (e.g. Xiaomi Mi 11) require this sequence.
Method 2: Unlocking through ADB (without data loss)
This is a good way to do this if you don't want to lose data on your internal drive, and it only works if you know the password/pattern lock of your device and have logged in before after unlocking the bootloader.
Instructions:
- In TWRP, go to Advanced โ Terminal.
- Run the command to mount /data partition manually: mount -o bind /dev/block/by-name/userdata /data If mount error: '/data' not in /proc/mounts appears, try the alternative: mount /dev/block/mmcblk0pXX /data (where XX is the partition number, specify it using ls /dev/block/mmcblk0*).
- If the mounting is successful, do: adb pull /data/media/0 /backup This will copy your data to the PC. After that, you can format /data via fastboot (see Method 1).
For Android devices 11+ and MIUI 12.5+ You may need to take an additional step, which is to turn off dm-verity. TWRP file disable_dm-verity_forceencrypt.zip, Note that the new models are available (Xiaomi) 13, Redmi Note 12 Pro+) This method may not work due to hardware key binding.
โ ๏ธ Note: On devices with MediaTek (e.g. Redmi Note 10, POCO M3 Pro) teams ADB You may not work because of driver limitations, but use fastboot only (Method 1).
Method 3: Manual formatting via TWRP (for experienced)
If previous methods have failed, you can try formatting the /data partition directly into TWRP. This method is risky - if the device fails, it can stop booting.
Step-by-step:
- In TWRP, go to Wipe โ Format Data.
- Enter yes to confirm (some versions of TWRP require you to enter YES in capital letters).
- After formatting, restart to fastboot and execute: fastboot flash vbmeta vbmeta.img fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img (the vbmeta.img file can be extracted from the official firmware for your model).
- Reboot to TWRP and check if the /data partition is mounted.
If TWRP doesnโt see /data after formatting, the problem may be:
- ๐ง Wrong version TWRP (download the assembly marked FBE or Decryption).
- ๐ Hardware lock at bootloader level (requires re-unlocking via Mi Unlock Tool).
- ๐ Partition damage (try to recover via fastboot flash userdata) userdata.img, where userdata.img โ firmware).
What if the phone doesnโt turn on after formatting?
Solving Errors When Unlocking Data
Even if you follow the instructions correctly, you can get errors, and here's a table of typical problems and solutions:
| Mistake. | Reason. | Decision |
|---|---|---|
| Unable to mount /data (Invalid argument) | TWRP does not support FBE encryption scheme | Install TWRP with FBE support or use fastboot format userdata |
| Data decryption unsuccessful | Incorrect password or corrupted encryption key | Format /data via fastboot (Method 1). If you want to save data, try adb pull (Method 2). |
| E: Unable to mount storage | The metadata or userdata section is damaged | Run in fastboot: fastboot erase metadata fastboot format:ext4 userdata |
| This package is for "Xiaomi;XXX" devices; this is a "XXX". | The inconsistency of the model in ZIP-file | Download the correct version disable_dm-verity For your model or edit the updater-script in ZIP-file |
| TWRP asks for password but doesnโt accept it | The encryption key is damaged or the lock screen is broken | Format /data via fastboot. If you want to save data, connect via ADB and copy files manually. |
If your error is not listed in the table, check the TWRP (Advanced โ Copy Log) logs and look for a solution on XDA Developers or 4PDA, specifying the exact device model and MIUI version.
๐ก
On Android 12+ and MIUI 13/14 devices, standard methods of unlocking Data may not work due to hardware key binding, in which case the only reliable way is to format fully via fastboot and then install custom firmware (such as LineageOS or Pixel Experience), which bypasses Xiaomiโs restrictions.