Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
crok authored Feb 15, 2021
1 parent 2bb89bb commit fa7ec3e
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 0 deletions.
8 changes: 8 additions & 0 deletions customize.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
ui_print ""
ui_print "################################"
ui_print "# #"
ui_print "# crok's RAM management tweaks #"
ui_print "# #"
ui_print "################################"
ui_print ""

20 changes: 20 additions & 0 deletions service.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/system/bin/sh
# Virtual memory tweaks
stop perfd
echo '100' > /proc/sys/vm/swappiness
echo '0' > /sys/module/lowmemorykiller/parameters/enable_adaptive_lmk
echo '100' > /proc/sys/vm/vfs_cache_pressure
echo '128' > /sys/block/mmcblk0/queue/read_ahead_kb
echo '128' > /sys/block/mmcblk1/queue/read_ahead_kb
echo '8000' > /proc/sys/vm/min_free_kbytes
echo '0' > /proc/sys/vm/oom_kill_allocating_task
echo '5' > /proc/sys/vm/dirty_ratio
echo '20' > /proc/sys/vm/dirty_background_ratio
chmod 666 /sys/module/lowmemorykiller/parameters/minfree
chown root /sys/module/lowmemorykiller/parameters/minfree
echo '21816,29088,36360,43632,50904,65448' > /sys/module/lowmemorykiller/parameters/minfree
rm /data/system/perfd/default_values
start perfd
sleep 20
# Set Activity Manager's max. cached app number -> 160 (instead of the default 32 (or even lower 24):
settings put global activity_manager_constants max_cached_processes=160
1 change: 1 addition & 0 deletions skip_mount
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#skip_mount
6 changes: 6 additions & 0 deletions system.prop
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Tweak the memory management of the device, enable more background apps.. et cetera..
ro.sys.fw.bg_apps_limit=128
ro.vendor.qti.sys.fw.bg_apps_limit=128
ro.vendor.qti.sys.fw.bservice_enable=true
ro.vendor.qti.sys.fw.bservice_age=10000
ro.vendor.qti.sys.fw.bservice_limit=128
5 changes: 5 additions & 0 deletions uninstall.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/system/bin/sh

# Delete Activity Manager's max. cached app number variable and system will use the Activity Manager's default
settings delete global activity_manager_constants

0 comments on commit fa7ec3e

Please sign in to comment.