Android教程網
  1. 首頁
  2. Android 技術
  3. Android 手機
  4. Android 系統教程
  5. Android 游戲
 Android教程網 >> Android手機 >> Android刷機教程 >> 安卓刷機技巧 >> 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文件夾內

  1. 上一頁:
  2. 下一頁:
熱門文章
閱讀排行版
Copyright © Android教程網 All Rights Reserved