mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2025-01-12 16:09:36 -05:00
Enable AES-256 encryption for most devices
This commit is contained in:
parent
ffa80a1341
commit
f57f77662b
@ -86,7 +86,7 @@ export -f enableZram;
|
||||
|
||||
enableForcedEncryption() {
|
||||
cd $base$1;
|
||||
if [[ $1 != *"mako"* ]]; then #Forced encryption seems to prevent some devices from booting
|
||||
if [[ $1 != "device/lge/mako" ]]; then #Forced encryption seems to prevent some devices from booting
|
||||
sed -i 's|encryptable=/|forceencrypt=/|' fstab.* root/fstab.* rootdir/fstab.* rootdir/etc/fstab.* &>/dev/null || true;
|
||||
echo "Enabled forceencrypt for $1";
|
||||
fi;
|
||||
@ -96,8 +96,12 @@ export -f enableForcedEncryption;
|
||||
|
||||
enableStrongEncryption() {
|
||||
cd $base$1;
|
||||
echo "TARGET_WANTS_STRONG_ENCRYPTION := true" >> BoardConfig.mk;
|
||||
echo "Enabled AES-256 encryption for $1";
|
||||
if [ -f BoardConfig.mk ]; then
|
||||
if [ $1 != "device/oneplus/bacon" ] && [ $1 != "device/motorola/clark" ] && [ $1 != "device/lge/d852" ]; then #These test devices currently have encryption enabled, don't break them
|
||||
echo "TARGET_WANTS_STRONG_ENCRYPTION := true" >> BoardConfig.mk;
|
||||
echo "Enabled AES-256 encryption for $1";
|
||||
fi;
|
||||
fi;
|
||||
cd $base;
|
||||
}
|
||||
export -f enableStrongEncryption;
|
||||
|
@ -215,10 +215,9 @@ disableDexPreOpt #bootloops
|
||||
cd $base
|
||||
find "device" -maxdepth 2 -mindepth 2 -type d -exec bash -c 'enhanceLocation "$0"' {} \;
|
||||
find "device" -maxdepth 2 -mindepth 2 -type d -exec bash -c 'enableForcedEncryption "$0"' {} \;
|
||||
#find "device" -maxdepth 2 -mindepth 2 -type d -exec bash -c 'enableStrongEncryption "$0"' {} \;
|
||||
find "device" -maxdepth 2 -mindepth 2 -type d -exec bash -c 'enableStrongEncryption "$0"' {} \;
|
||||
find "kernel" -maxdepth 2 -mindepth 2 -type d -exec bash -c 'hardenDefconfig "$0"' {} \;
|
||||
cd $base
|
||||
enableStrongEncryption device/lge/mako #Enable experimental strong encryption for mako for testing
|
||||
sed -i "s/CONFIG_DEBUG_RODATA=y/# CONFIG_DEBUG_RODATA is not set/" kernel/google/msm/arch/arm/configs/lineageos_flo_defconfig; #Breaks on compile
|
||||
#
|
||||
#END OF DEVICE CHANGES
|
||||
|
Loading…
Reference in New Issue
Block a user