Howto - Encryption On A Mi 6 With Xiaomi.eu Roms


th0mas

Members
Feb 7, 2018
5
1
Hi all :)

After two weeks of using my new Mi 6 with a Xiaomi.eu stable ROM, I realized that the encryption was not enabled, so I decided to enable it.... Huge mistake, the encryption got stuck, I waited 4 hours, and at the end I restarted my phone and I lost all my data ! :(

So I decided to try to find a way anyway to encrypt my phone.

After searching on the forum and on Internet, I realized that many people were also asking and complaining that the encryption is not working on their phone with the Xiaomi.eu ROMs.

I found some informations here and there, so I tried, and it's working, so I'll share the method that I've been using to enable the encryption :)

Reminder : You're the only one responsible for what append to your phones. I'm not providing any warranty :)

Most of what is written here has been inspired by the following post, written for Mi Mix 2
xiaomi.eu/community/threads/mi-mix-2-encryption-bug.42187


1) Download and install the cofface version of TWRP for Xiaomi Mi 6 (that supports encryption/decryption) :

Download the file from the following link :
[cofface][3.1.1-0]Xiaomi 6 Twrp recovery[DECRYPTION SUPPORT]
forum.xda-developers.com/mi-6/development/cofface-xiaomi-6-twrp-recovery-t3608523

With ADB / Fastboot tools, install the package and reboot in recovery :
fastboot flash recovery cofface_recovery_sagit_en.img
fastboot boot cofface_recovery_sagit_en.img

2) Install the ROM from TWRP Recovery :
- Install the ZIP file from ROM that you want (for me, the Xiaomi.eu Stable ROM for Mi 6)
- do not reboot directly after the install, but instead, go back to the main menu, click on reboot, and click to reboot in recovery (basically the goal is just to restart TWRP. I had to that because after the install of the ROM, TWRP was unable to see the storage)

PS : if your phone boot now, it's too late and the encryption will not be enabled

4) Once back in the TWRP recovery (so before the first boot of the ROM) :
- Download and install the ZIP file "mix2-force-encrypt.zip" that enable the encryption

The file has been taken from this post / links (big thanks to qwertyman) :
xiaomi.eu/community/threads/mi-mix-2-encryption-bug.42187
goo.gl/N6WviS

PS : yeah, i know, it's written "mix2" but it's working with my Mi 6 :)

5) Still from TWRP : Wipe Dalvik Cache and usual stuff to do after a ROM install

6) Now, start the phone normally, do the first boot/config and chose a password/schema to encrypt your phone

7) once started, go in the settings/privacy and verify that the partition is encrypted

8) reboot in recovery and verify that if you don't type your password/schema, your files are encrypted

9) Since the Xiaomi.eu ROM that I've installed was not the last one, the phone suggested to download the last version and install it using the recovery. I did it, but the phone stayed stuck on boot

10) So I forced a restart, went back to TWRP recovery, and installed again the ZIP file mix2-force-encrypt.zip (on top of the new ROM update, basically), and then the phone was able to boot, and everything is working (the data of before the ROM update is still here, and encryption is still enabled)

11) don't forget to backup your data somewhere else, in case something goes wrong with the encryption or the updates !!

Enjoy :)

Thomas
 
  • Like
Reactions: morbid89
Yes, I know, it's far from being perfect, but at least it's making encryption working :)

I will be very happy to know when Xiaomi.eu ROMs will support encryption by default
 
  • Like
Reactions: Zunap
Hi all :)

After two weeks of using my new Mi 6 with a Xiaomi.eu stable ROM, I realized that the encryption was not enabled, so I decided to enable it.... Huge mistake, the encryption got stuck, I waited 4 hours, and at the end I restarted my phone and I lost all my data ! :(

So I decided to try to find a way anyway to encrypt my phone.

After searching on the forum and on Internet, I realized that many people were also asking and complaining that the encryption is not working on their phone with the Xiaomi.eu ROMs.

I found some informations here and there, so I tried, and it's working, so I'll share the method that I've been using to enable the encryption :)

Reminder : You're the only one responsible for what append to your phones. I'm not providing any warranty :)

Most of what is written here has been inspired by the following post, written for Mi Mix 2
xiaomi.eu/community/threads/mi-mix-2-encryption-bug.42187


1) Download and install the cofface version of TWRP for Xiaomi Mi 6 (that supports encryption/decryption) :

Download the file from the following link :
[cofface][3.1.1-0]Xiaomi 6 Twrp recovery[DECRYPTION SUPPORT]
forum.xda-developers.com/mi-6/development/cofface-xiaomi-6-twrp-recovery-t3608523

With ADB / Fastboot tools, install the package and reboot in recovery :
fastboot flash recovery cofface_recovery_sagit_en.img
fastboot boot cofface_recovery_sagit_en.img

2) Install the ROM from TWRP Recovery :
- Install the ZIP file from ROM that you want (for me, the Xiaomi.eu Stable ROM for Mi 6)
- do not reboot directly after the install, but instead, go back to the main menu, click on reboot, and click to reboot in recovery (basically the goal is just to restart TWRP. I had to that because after the install of the ROM, TWRP was unable to see the storage)

PS : if your phone boot now, it's too late and the encryption will not be enabled

4) Once back in the TWRP recovery (so before the first boot of the ROM) :
- Download and install the ZIP file "mix2-force-encrypt.zip" that enable the encryption

The file has been taken from this post / links (big thanks to qwertyman) :
xiaomi.eu/community/threads/mi-mix-2-encryption-bug.42187
goo.gl/N6WviS

PS : yeah, i know, it's written "mix2" but it's working with my Mi 6 :)

5) Still from TWRP : Wipe Dalvik Cache and usual stuff to do after a ROM install

6) Now, start the phone normally, do the first boot/config and chose a password/schema to encrypt your phone

7) once started, go in the settings/privacy and verify that the partition is encrypted

8) reboot in recovery and verify that if you don't type your password/schema, your files are encrypted

9) Since the Xiaomi.eu ROM that I've installed was not the last one, the phone suggested to download the last version and install it using the recovery. I did it, but the phone stayed stuck on boot

10) So I forced a restart, went back to TWRP recovery, and installed again the ZIP file mix2-force-encrypt.zip (on top of the new ROM update, basically), and then the phone was able to boot, and everything is working (the data of before the ROM update is still here, and encryption is still enabled)

11) don't forget to backup your data somewhere else, in case something goes wrong with the encryption or the updates !!

Enjoy :)

Thomas
Hey th0mas, does this work on Oreo too??

At least... good working on Nougat
 
Hey th0mas, does this work on Oreo too??

At least... good working on Nougat

There were some changes in Oreo according to qwertyman who created the original patch:

For Oreo-based MIUI (Android 8.x), the location of "fstab.qcom" has been moved to /system/vendor/etc/fstab.qcom. You need to modify that file accordingly, by changing "encryptable=ice" to "fileencryption=ice".

So the original patch will not work because it was designed to work on boot.img but the same can be accomplished by modifying fstab.qcom file in the new location.
 
Try this :
xiaomi.eu/community/threads/mi-mix-2-encryption-bug.42187/#post-420757

Works on Mi Mix 2 under Android Oreo 8.