设为首页收藏本站

移动叔叔

搜索
查看: 555|回复: 0
打印 上一主题 下一主题

[其它] 5个步骤 添加ROM 内存优化控制脚本

[复制链接]
跳转到指定楼层
楼主
发表于 2013-3-25 18:12:14 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
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文件夹内
您需要登录后才可以回帖 登录 | 注册

© 2008-2024 移动叔叔. 版权所有,专业的网络售后平台 ( 闽ICP备18006692号-3 )

商务合作点击这里给我发消息|Email:service@mobileuncle.com|手机版|移动叔叔     

GMT+8, 2024-11-10 00:17 , Processed in 0.218385 second(s), 12 queries , Gzip On, Memcache On.

返回顶部