移动叔叔
标题:
5个步骤 添加ROM 内存优化控制脚本
[打印本页]
作者:
alex.h
时间:
2013-3-25 18:12
标题:
5个步骤 添加ROM 内存优化控制脚本
1.
新建一个txt文件,名称英文随意
例如:
memery.txt
2.
键入以下代码:
Here is the script :
Code :
#!/system/bin/sh
# Copyright© 2011 Juwe11
# 13.8.2011 Updated VM values - Thanks to [Kalis] for help
# 18.8.2011 Added oom_adj values
# 19.9.2011 Updated VM and LMK values
if [ -e / sys/module/lowmemorykiller/parameters/adj ]; then
echo "0,1,2, 4,6,15" > /sys/module/lowmemorykiller/parameters/adj
fi
if [ -e / sys/module/lowmemorykiller/parameters/minfree ]; then
echo "2560,4096,5632, 10240,11776,14848" > /sys/module/lowmemorykiller/para
fi
if [ -e / proc/sys/vm/swappiness ]; then
echo "20" > /proc/sys/vm/swappiness
fi
if [ -e / proc/sys/vm/vfs_cache _pressure ]; then
echo "70" > /proc/sys/vm/vfs_cache _pressure
fi
if [ -e / proc/sys/vm/dirty_expire _centisecs ]; then
echo "3000" > / proc/sys/vm/dirty_expire _centisecs
fi
if [ -e / proc/sys/vm/dirty_writeback _centisecs ]; then
echo "500" > /proc /sys/vm/dirty_writeback_ centisecs
fi
if [ -e / proc/sys/vm/dirty_ratio ]; then
echo "15" > /proc/sys/vm/dirty_ ratio
fi
INSTALLATION
1 ) Download attached file
(Juwe _Update- 19092011_ RAM_Script .zip ) unzip
S97 ramscript and put it to /system/ etc/init .d
with Root Explorer (if you don 't have init .d
folder , so create new folder and name it to
init .d ) and set perms of S97 ramscript to 777
(rwxrwxrwx )
2 ) If you have in your init. d folder other script
for RAM management (for example Darky' s
rambooster ), so delete it
3 ) Reboot your phone
ROM devs can use my script in their
ROMs, but give the proper credit.
4.
去除.txt后缀
5.
放入system/etc/init.d文件夹内
欢迎光临 移动叔叔 (http://bbs.ydss.cn/)
Powered by Discuz! X3.2