Install Android 6 so that user DATA partition is not getting encrypted

In Android 6 there’s a default encryption of user DATA partition. This is actually done for security reasons. Those of you who would like to use TWRP custom recovery will get a problem with unreadable Data partition, and hence more problems with backups and other tweaks.

Install Guide

What’s required?

  • Unlocked bootloader
  • Make backups and save them to external drivers.

1. If you are flashing using TWRP

Flash custom rom and before rebooting your device run “patch boot” and encryption will be disabled.

2. Flashing with MiFlash

  1. Flash custom rom
  2. Disconnect your device from USB
  3. Hold “Vol -” (volume button down) and power button, so that your device could start in fastboot mode (rabbit logo with “fastboot” written in red color)
  4. Most important! Don’t let your device start the system. Otherwise you’ll need to flash again or else TWRP won’t show your encrypted partitions.
  5. In case you’ve missed device startup just hold the power button and the volume down at the same time, and smartphone will be rebooted again.
  6. After starting the fastboot mode, you’ll need to install TWRP and run the boot patch.

Remember! All need to be done before the first device startup!

Before flashing your device with MiFlash you can replace recovery.img file with custom recovery TWRP Rom images (rename ROM file and replace recovery.img). This way TWRP will be flashed with new rom and you can immediately use it.

In case you’re flashed without patch and DATA partition is encrypted

With got two methods here. Both methods will result full data removal, so before doing any operations you need to make a full backup and save it on your PC or other external device.

First method: Patch boot in TWRP and format the Data partition (“Cleaning” > “Format Data”).
The patch is included in the TWRP, it’s the same patch that we use to unlock the boot. Read how to patch boot in TWRP official guides.

Second method: Reinstall ROM using MiFlash and select “Clear All”, which will also overwrite the Data partition.