mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-10-01 01:35:54 -04:00
Adjust zram defaults
Signed-off-by: Tavi <tavi@divested.dev>
This commit is contained in:
parent
f4e498a956
commit
5a9f63caaa
@ -40,32 +40,32 @@ fi;
|
||||
if enter "device"; then
|
||||
echo "Starting zram tweaks";
|
||||
#Note: 14.1 uses zramstreams instead of max_comp_streams
|
||||
#1GB (768MB)
|
||||
sed -i 's/zramsize=.*/zramsize=75%,max_comp_streams=4/' asus/fugu/fstab.fugu &>/dev/null || true;
|
||||
#1/2GB (768MB/1.5GB)
|
||||
sed -i 's/zramsize=.*/zramsize=75%,max_comp_streams=4/' motorola/msm8916-common/rootdir/etc/fstab.qcom &>/dev/null || true;
|
||||
#2GB (1GB)
|
||||
sed -i 's/zramsize=.*/zramsize=50%,max_comp_streams=2/' htc/flounder/fstab.flounder &>/dev/null || true;
|
||||
sed -i 's/zramsize=.*/zramsize=50%,max_comp_streams=4/' asus/flox/rootdir/etc/fstab.flox asus/debx/rootdir/etc/fstab.debx htc/msm8974-common/rootdir/etc/fstab.qcom lge/g2-common/rootdir/etc/fstab.g2 lge/mako/rootdir/etc/fstab.mako motorola/victara/rootdir/etc/fstab.qcom samsung/hlte-common/rootdir/etc/fstab.qcom samsung/klte-common/rootdir/etc/fstab.qcom &>/dev/null || true;
|
||||
#2/3GB (1/1.5GB)
|
||||
sed -i 's/zramsize=.*/zramsize=50%,max_comp_streams=4/' lge/d850/rootdir/etc/fstab.g3 lge/d851/rootdir/etc/fstab.g3 lge/d852/rootdir/etc/fstab.g3 lge/d855/rootdir/etc/fstab.g3 motorola/athene/rootdir/etc/fstab.qcom samsung/apq8084-common/rootdir/etc/fstab.qcom &>/dev/null || true;
|
||||
sed -i 's/zramsize=.*/zramsize=50%,max_comp_streams=6/' lge/bullhead/fstab*.bullhead &>/dev/null || true;
|
||||
sed -i 's/zramsize=.*/zramsize=50%,max_comp_streams=8/' asus/msm8916-common/rootdir/etc/fstab.qcom &>/dev/null || true;
|
||||
#3GB (1.5GB)
|
||||
sed -i 's/zramsize=.*/zramsize=50%,max_comp_streams=4/' google/dragon/fstab.dragon* lge/f400/rootdir/etc/fstab.g3 ls990/rootdir/etc/fstab.g3 lge/vs985/rootdir/etc/fstab.g3 moto/shamu/rootdir/etc/fstab.shamu &>/dev/null || true;
|
||||
sed -i 's/zramsize=.*/zramsize=50%,max_comp_streams=6/' motorola/clark/rootdir/fstab.qcom &>/dev/null || true;
|
||||
sed -i 's/zramsize=.*/zramsize=50%,max_comp_streams=8/' huawei/angler/fstab*.angler &>/dev/null || true;
|
||||
#3/4GB (1.5/2GB)
|
||||
sed -i 's/zramsize=.*/zramsize=50%,max_comp_streams=4/' zuk/msm8996-common/rootdir/etc/fstab.qcom &>/dev/null || true;
|
||||
sed -i 's/zramsize=.*/zramsize=50%,max_comp_streams=8/' oneplus/oneplus2/rootdir/etc/fstab.qcom &>/dev/null || true;
|
||||
#4GB (2GB)
|
||||
sed -i 's/zramsize=.*/zramsize=50%,max_comp_streams=4/' google/marlin/fstab.common lge/msm8996-common/rootdir/etc/fstab.qcom motorola/griffin/rootdir/etc/fstab.qcom &>/dev/null || true;
|
||||
sed -i 's/zramsize=.*/zramsize=50%,max_comp_streams=8/' essential/mata/rootdir/etc/fstab.mata google/bonito/fstab.hardware google/coral/fstab.hardware google/crosshatch/fstab*.hardware google/wahoo/fstab.hardware &>/dev/null || true;
|
||||
#4GB/4GB+ (2GB/2GB+)
|
||||
sed -i 's/zramsize=.*/zramsize=50%,max_comp_streams=4/' zte/axon7/rootdir/etc/fstab.qcom &>/dev/null || true;
|
||||
sed -i 's/zramsize=.*/zramsize=50%,max_comp_streams=8/' sony/tama-common/rootdir/etc/fstab.qcom &>/dev/null || true;
|
||||
#4GB+ (2GB+)
|
||||
sed -i 's/zramsize=.*/zramsize=50%,max_comp_streams=8/' google/redbull/fstab.hardware google/sunfish/fstab.hardware oneplus/msm8998-common/rootdir/etc/fstab.qcom oneplus/sdm845-common/rootdir/etc/fstab.qcom xiaomi/sm6150-common/rootdir/etc/fstab*.qcom &>/dev/null || true;
|
||||
#1GB (256MB)
|
||||
sed -i 's/zramsize=.*/zramsize=25%,max_comp_streams=4/' asus/fugu/fstab.fugu &>/dev/null || true;
|
||||
#1/2GB (256MB/512MB)
|
||||
sed -i 's/zramsize=.*/zramsize=25%,max_comp_streams=4/' motorola/msm8916-common/rootdir/etc/fstab.qcom &>/dev/null || true;
|
||||
#2GB (512MB)
|
||||
sed -i 's/zramsize=.*/zramsize=25%,max_comp_streams=2/' htc/flounder/fstab.flounder &>/dev/null || true;
|
||||
sed -i 's/zramsize=.*/zramsize=25%,max_comp_streams=4/' asus/flox/rootdir/etc/fstab.flox asus/debx/rootdir/etc/fstab.debx htc/msm8974-common/rootdir/etc/fstab.qcom lge/g2-common/rootdir/etc/fstab.g2 lge/mako/rootdir/etc/fstab.mako motorola/victara/rootdir/etc/fstab.qcom samsung/hlte-common/rootdir/etc/fstab.qcom samsung/klte-common/rootdir/etc/fstab.qcom &>/dev/null || true;
|
||||
#2/3GB (512MB/768MB)
|
||||
sed -i 's/zramsize=.*/zramsize=25%,max_comp_streams=4/' lge/d850/rootdir/etc/fstab.g3 lge/d851/rootdir/etc/fstab.g3 lge/d852/rootdir/etc/fstab.g3 lge/d855/rootdir/etc/fstab.g3 motorola/athene/rootdir/etc/fstab.qcom samsung/apq8084-common/rootdir/etc/fstab.qcom &>/dev/null || true;
|
||||
sed -i 's/zramsize=.*/zramsize=25%,max_comp_streams=6/' lge/bullhead/fstab*.bullhead &>/dev/null || true;
|
||||
sed -i 's/zramsize=.*/zramsize=25%,max_comp_streams=8/' asus/msm8916-common/rootdir/etc/fstab.qcom &>/dev/null || true;
|
||||
#3GB (768MB)
|
||||
sed -i 's/zramsize=.*/zramsize=25%,max_comp_streams=4/' google/dragon/fstab.dragon* lge/f400/rootdir/etc/fstab.g3 ls990/rootdir/etc/fstab.g3 lge/vs985/rootdir/etc/fstab.g3 moto/shamu/rootdir/etc/fstab.shamu &>/dev/null || true;
|
||||
sed -i 's/zramsize=.*/zramsize=25%,max_comp_streams=6/' motorola/clark/rootdir/fstab.qcom &>/dev/null || true;
|
||||
sed -i 's/zramsize=.*/zramsize=25%,max_comp_streams=8/' huawei/angler/fstab*.angler &>/dev/null || true;
|
||||
#3/4GB (768MB/1GB)
|
||||
sed -i 's/zramsize=.*/zramsize=25%,max_comp_streams=4/' zuk/msm8996-common/rootdir/etc/fstab.qcom &>/dev/null || true;
|
||||
sed -i 's/zramsize=.*/zramsize=25%,max_comp_streams=8/' oneplus/oneplus2/rootdir/etc/fstab.qcom &>/dev/null || true;
|
||||
#4GB (1GB)
|
||||
sed -i 's/zramsize=.*/zramsize=25%,max_comp_streams=4/' google/marlin/fstab.common lge/msm8996-common/rootdir/etc/fstab.qcom motorola/griffin/rootdir/etc/fstab.qcom &>/dev/null || true;
|
||||
sed -i 's/zramsize=.*/zramsize=25%,max_comp_streams=8/' essential/mata/rootdir/etc/fstab.mata google/bonito/fstab.hardware google/coral/fstab.hardware google/crosshatch/fstab*.hardware google/wahoo/fstab.hardware &>/dev/null || true;
|
||||
#4GB/4GB+ (1GB/1GB+)
|
||||
sed -i 's/zramsize=.*/zramsize=25%,max_comp_streams=4/' zte/axon7/rootdir/etc/fstab.qcom &>/dev/null || true;
|
||||
sed -i 's/zramsize=.*/zramsize=25%,max_comp_streams=8/' sony/tama-common/rootdir/etc/fstab.qcom &>/dev/null || true;
|
||||
#4GB+ (1GB+)
|
||||
sed -i 's/zramsize=.*/zramsize=25%,max_comp_streams=8/' google/redbull/fstab.hardware google/sunfish/fstab.hardware oneplus/msm8998-common/rootdir/etc/fstab.qcom oneplus/sdm845-common/rootdir/etc/fstab.qcom xiaomi/sm6150-common/rootdir/etc/fstab*.qcom &>/dev/null || true;
|
||||
echo "Finished zram tweaks";
|
||||
fi;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user