Last active
July 19, 2022 01:18
-
-
Save MrCarb0n/0c48f942f70c811523444401e72a0b39 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/system/bin/sh | |
# set -x | |
# detect total RAM | |
RAM="$(awk -F':' '/MemTotal/{gsub(/ /,"");print int($2/1024)}' /proc/meminfo)" | |
# aggressive LMK | |
MATH() { awk "BEGIN{print int($RAM*$1)}"; } | |
LMK1="$(MATH 5.1200)" | |
LMK2="$(MATH 7.6800)" | |
LMK3="$(MATH 15.360)" | |
LMK4="$(MATH 25.600)" | |
LMK5="$(MATH 35.840)" | |
LMK6="$(MATH 38.400)" | |
# settings prop | |
resetprop sys.lmk.minfree_levels "$LMK1:0,$LMK2:100,$LMK3:200,$LMK4:250,$LMK5:900,$LMK6:950" | |
resetprop lmkd.reinit 1 | |
/system/bin/lmkd --reinit | |
# check prop | |
resetprop | awk '/sys.lmk.minfree_levels/' | |
# quit | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment