diff --git a/tools/update-binary-cleaner b/tools/update-binary-cleaner index c04f526..1b564d1 100644 --- a/tools/update-binary-cleaner +++ b/tools/update-binary-cleaner @@ -58,6 +58,21 @@ try_del() { fi } +force_encrypt_oreo() { + fstab=/system/vendor/etc/fstab.qcom + if ! [ -f "$fstab" ]; then + print "No fstab.qcom in vendor, skipping..." + else + sed -i " + s/\b\(encryptable\)=/fileencryption=/g + " "$fstab" + if ! grep -q '=ice,quota' "$fstab"; then + sed -i "s/=ice/=ice,quota/g" "$fstab" + fi + echo "Enabled force encryption for /data" + fi +} + print "***************************" print "* MIUI 9 (EU) Cleaner Fix *" print "***************************" @@ -95,6 +110,9 @@ done print "Removing evil apps..." try_del app/MiuiDaemon +print "Enabling force encryption for Oreo..." +force_encrypt_oreo + umount /system cleanup print "Finished!"