20.0 doesn't support FDE

Should fix boot on some LGE devices

Signed-off-by: Tavi <tavi@divested.dev>
This commit is contained in:
Tavi 2024-02-13 17:04:24 -05:00
parent b7ce879d83
commit 01f9defd2b
No known key found for this signature in database
GPG Key ID: E599F62ECBAEAF2E

View File

@ -620,7 +620,7 @@ hardenUserdata() {
#TODO: Ensure: noatime,nosuid,nodev #TODO: Ensure: noatime,nosuid,nodev
sed -i '/\/data/{/discard/!s|nosuid|discard,nosuid|}' *fstab* */*fstab* */*/*fstab* &>/dev/null || true; sed -i '/\/data/{/discard/!s|nosuid|discard,nosuid|}' *fstab* */*fstab* */*/*fstab* &>/dev/null || true;
if [ "$1" != "device/samsung/tuna" ] && [ "$1" != "device/amazon/hdx-common" ] && [ "$1" != "device/motorola/athene" ]; then #tuna needs first boot to init, hdx-c has broken encryption if [ "$1" != "device/samsung/tuna" ] && [ "$1" != "device/amazon/hdx-common" ] && [ "$1" != "device/motorola/athene" ] && [[ "$DOS_VERSION" != "LineageOS-20.0" ]]; then #tuna needs first boot to init, hdx-c has broken encryption
sed -i 's|encryptable=/|forceencrypt=/|' *fstab* */*fstab* */*/*fstab* &>/dev/null || true; sed -i 's|encryptable=/|forceencrypt=/|' *fstab* */*fstab* */*/*fstab* &>/dev/null || true;
fi; fi;
echo "Hardened /data for $1"; echo "Hardened /data for $1";