2013-07-10 14:36:11
分享

ROM之家教你如何添加ROM内存优化控制脚本

标签:ROM之家,内存优化

  rom之家小编今天将教机油们如何添加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文件夹内