Hello,
I recently bought an mix 2s and wanted to have xiaomi.eu rom with encryption but didn't manage to do it on the first try. Finally I've succeded to encrypt it and want to share the steps, hoping will help someone (i owned and mi6 before and the steps are almost the same).
I've switched from global stable rom so here are the full steps:
1. unlocked bootloader with mi unlock (IT WILL ERASE YOUR DATA)
2.
-downloaded the unofficial twrp for mix2s from xda (used v11 because v12 coud not format data) + renamed as twrp.img
-downloaded xiaomi eu stable, as xiaomi.eu_multi_MIMix2S_V10.0.7.0.PDGCNFH_v10-9.zip
-downloaded putty with adb support (you'll find it on google as opensource)
-moved both in adb folder on the pc
2. rebooted in fast boot mode (power+volume down)
4. flashed recovery
fastboot flash recovery twrp.img
fastboot boot twrp.img
5. Once in twrp (these step will ERASE ALL YOUR DATA)
-Wipe > Advanced Wipe > Wipe -Dalvik/ART Cache, -Cache, -System, -Data, -Internal Storage
-Wipe > Wipe: Format Data
-Reboot > Recovey
-Once back on recovery push rom to internal storage
adb push xiaomi.eu_multi_MIMix2S_V10.0.7.0.PDGCNFH_v10-9.zip /sdcard
-Install rom from sdcard
-Wipe cache
-Reboot > Recovery
-once back in twrp MOUNT only System and Vendor (very important to mount SYSTEM and VENDOR, system was not enough)
6. Start putty , check ADB, than OPEN. You should see something like
~ #
7. In putty start editing fstab.qcom
vi /system/vendor/etc/fstab.qcom
8. For those who don't know how to use vi there are two modes in vi one is scrool and the other is edit mode.
-find the string encryptable=ice once found position yourself on it and enter edit mode by pressing i
-replace it with fileencryption=ice
-once done press ESC key twice to exit edit mode
-now to save the file write
:wq
-you should be done with putty
9. Reboot > System
10. Once in Miui10 set pin and check in Settings > Addition Settings > Privacy > Encryption & Credential (it should say Encrypted)
But verry important in the future if you want to update to newer eu version, you will have to repeat 6,7 and 8 after you install another version.
I hope these steps help some of you who want encryption on their mix2s device.