mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-12-26 07:59:30 -05:00
Add function to always ensure discard mount option is enabled
This commit is contained in:
parent
d231bd3172
commit
e5b588265c
@ -27,7 +27,7 @@ PRODUCT_PACKAGES += \
|
|||||||
LocalCalendar
|
LocalCalendar
|
||||||
|
|
||||||
# Notes
|
# Notes
|
||||||
# - Available: DNS66, K9Mail, NetMonitor, OpenKeychain, Shelter, TalkBack
|
# - Available (via PrebuiltApps submodule): DNS66, K9Mail, NetMonitor, OpenKeychain, Orbot, Orfox, Shelter, TalkBack
|
||||||
# - Official F-Droid will be included once #843 is implemented
|
# - Official F-Droid will be included once #843 is implemented
|
||||||
# - $DOS_HOSTS_BLOCKING should become a tristate and support DNS66
|
# - $DOS_HOSTS_BLOCKING should become a tristate and support DNS66
|
||||||
# - K-9 Mail Will be included after 5.5xx release
|
# - K-9 Mail Will be included after 5.5xx release
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit c6d6468c9bc54eba58921c9c2c4f59d626d41fcb
|
Subproject commit de9e4dbadab3032d09db2d14ea2d86df5f71a9b8
|
@ -206,6 +206,14 @@ enableZram() {
|
|||||||
}
|
}
|
||||||
export -f enableZram;
|
export -f enableZram;
|
||||||
|
|
||||||
|
enableDiscard() {
|
||||||
|
cd "$DOS_BUILD_BASE$1";
|
||||||
|
sed -i '/\/data/{/discard/!s|nosuid|discard,nosuid|}' fstab.* root/fstab.* rootdir/fstab.* rootdir/etc/fstab.* &>/dev/null || true;
|
||||||
|
echo "Enabled discard for $1";
|
||||||
|
cd "$DOS_BUILD_BASE";
|
||||||
|
}
|
||||||
|
export -f enableDiscard;
|
||||||
|
|
||||||
enableForcedEncryption() {
|
enableForcedEncryption() {
|
||||||
cd "$DOS_BUILD_BASE$1";
|
cd "$DOS_BUILD_BASE$1";
|
||||||
sed -i 's|encryptable=/|forceencrypt=/|' fstab.* root/fstab.* rootdir/fstab.* rootdir/etc/fstab.* &>/dev/null || true;
|
sed -i 's|encryptable=/|forceencrypt=/|' fstab.* root/fstab.* rootdir/fstab.* rootdir/etc/fstab.* &>/dev/null || true;
|
||||||
|
@ -232,6 +232,7 @@ if [ "$DOS_LOWRAM_ENABLED" = true ]; then find "device" -maxdepth 2 -mindepth 2
|
|||||||
find "hardware/qcom/gps" -name "gps\.conf" -type f -exec bash -c 'enhanceLocation "$0"' {} \;;
|
find "hardware/qcom/gps" -name "gps\.conf" -type f -exec bash -c 'enhanceLocation "$0"' {} \;;
|
||||||
find "device" -name "gps\.conf" -type f -exec bash -c 'enhanceLocation "$0"' {} \;;
|
find "device" -name "gps\.conf" -type f -exec bash -c 'enhanceLocation "$0"' {} \;;
|
||||||
find "device" -maxdepth 2 -mindepth 2 -type d -exec bash -c 'enableDexPreOpt "$0"' {} \;;
|
find "device" -maxdepth 2 -mindepth 2 -type d -exec bash -c 'enableDexPreOpt "$0"' {} \;;
|
||||||
|
find "device" -maxdepth 2 -mindepth 2 -type d -exec bash -c 'enableDiscard "$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 'enableForcedEncryption "$0"' {} \;;
|
||||||
#if [ "$STRONG_ENCRYPTION_ENABLED" = true ]; then find "device" -maxdepth 2 -mindepth 2 -type d -exec bash -c 'enableStrongEncryption "$0"' {} \;; fi;
|
#if [ "$STRONG_ENCRYPTION_ENABLED" = true ]; then find "device" -maxdepth 2 -mindepth 2 -type d -exec bash -c 'enableStrongEncryption "$0"' {} \;; fi;
|
||||||
find "kernel" -maxdepth 2 -mindepth 2 -type d -exec bash -c 'hardenDefconfig "$0"' {} \;;
|
find "kernel" -maxdepth 2 -mindepth 2 -type d -exec bash -c 'hardenDefconfig "$0"' {} \;;
|
||||||
|
@ -85,7 +85,6 @@ patchWorkspace() {
|
|||||||
if [ "$DOS_MALWARE_SCAN_ENABLED" = true ]; then scanForMalware false "$DOS_PREBUILT_APPS $DOS_BUILD_BASE/build $DOS_BUILD_BASE/device $DOS_BUILD_BASE/vendor/lineage"; fi;
|
if [ "$DOS_MALWARE_SCAN_ENABLED" = true ]; then scanForMalware false "$DOS_PREBUILT_APPS $DOS_BUILD_BASE/build $DOS_BUILD_BASE/device $DOS_BUILD_BASE/vendor/lineage"; fi;
|
||||||
|
|
||||||
source build/envsetup.sh;
|
source build/envsetup.sh;
|
||||||
#repopick -t android-8.1.0_r46;
|
|
||||||
#repopick 219020 219022; #ab-neverallow-user
|
#repopick 219020 219022; #ab-neverallow-user
|
||||||
repopick -f 214824 209584 209585 215010 214300; #g3-common
|
repopick -f 214824 209584 209585 215010 214300; #g3-common
|
||||||
repopick -f 211404 211405 211406 211407 211408 211409; #d852
|
repopick -f 211404 211405 211406 211407 211408 211409; #d852
|
||||||
|
@ -214,6 +214,7 @@ if [ "$DOS_LOWRAM_ENABLED" = true ]; then find "device" -maxdepth 2 -mindepth 2
|
|||||||
find "hardware/qcom/gps" -name "gps\.conf" -type f -exec bash -c 'enhanceLocation "$0"' {} \;;
|
find "hardware/qcom/gps" -name "gps\.conf" -type f -exec bash -c 'enhanceLocation "$0"' {} \;;
|
||||||
find "device" -name "gps\.conf" -type f -exec bash -c 'enhanceLocation "$0"' {} \;;
|
find "device" -name "gps\.conf" -type f -exec bash -c 'enhanceLocation "$0"' {} \;;
|
||||||
find "device" -maxdepth 2 -mindepth 2 -type d -exec bash -c 'enableDexPreOpt "$0"' {} \;;
|
find "device" -maxdepth 2 -mindepth 2 -type d -exec bash -c 'enableDexPreOpt "$0"' {} \;;
|
||||||
|
find "device" -maxdepth 2 -mindepth 2 -type d -exec bash -c 'enableDiscard "$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 'enableForcedEncryption "$0"' {} \;;
|
||||||
#if [ "$STRONG_ENCRYPTION_ENABLED" = true ]; then find "device" -maxdepth 2 -mindepth 2 -type d -exec bash -c 'enableStrongEncryption "$0"' {} \;; fi;
|
#if [ "$STRONG_ENCRYPTION_ENABLED" = true ]; then find "device" -maxdepth 2 -mindepth 2 -type d -exec bash -c 'enableStrongEncryption "$0"' {} \;; fi;
|
||||||
find "kernel" -maxdepth 2 -mindepth 2 -type d -exec bash -c 'hardenDefconfig "$0"' {} \;;
|
find "kernel" -maxdepth 2 -mindepth 2 -type d -exec bash -c 'hardenDefconfig "$0"' {} \;;
|
||||||
|
Loading…
Reference in New Issue
Block a user