教程正式开始!先感谢一下XDA论坛的大神,你的ROM需要支持/system/etc/init.d和/data,这些可以用厨房搞定,不多赘述。
第一步:
在/system/etc/init.d文件夹下
a.建立一个文本文件,去掉扩展名,
名为:99SuperCharger
用文本方式打开,复制入以下代码:
#!/system/bin/sh
# V6 SuperCharger, OOM
Grouping&Priority Fixes created by
zeppelinrox.
execute=0;
currentadj=`cat/sys/module/
lowmemorykiller/parameters/adj`;
currentminfree=`cat/sys/module/
lowmemorykiller/parameters/
minfree`;
scadj=`cat /data/SuperChargerAdj`;
scminfree=`cat /data/
SuperChargerMinfree`;
if ["$currentadj"!="$scadj"]; then
execute=1;
elif [[ -n"$scminfree"]]&&
["$currentminfree"!="$scminfree"];
then
execute=1;
fi;
if ["$execute"-eq 1 ]; then
mount-o remount,rw /system 2>/
dev/null;
form in /dev/block/mtdblock*;
do
mount-o remount,rw $m /system
2>/dev/null;
done;
echo$scadj>/sys/module/
lowmemorykiller/parameters/adj;
echo$scminfree>/sys/module/
lowmemorykiller/parameters/
minfree;
sed-i '/.*_ADJ/d' /system/
build.prop;
sed-i '/.*_MEM/d' /system/
build.prop;
busyboxsysctl -w
vm.oom_kill_allocating_task=0;
busyboxsysctl -w
vm.panic_on_oom=0;
busyboxsysctl -w
kernel.panic_on_oops=1;
busyboxsysctl -w kernel.panic=0;
mount-o remount,ro /system 2>/
dev/null;
form in /dev/block/mtdblock*;
do
mount-o remount,ro $m /system
2>/dev/null;
done;
fi;
# End of V6 SuperCharged Entries
sh /data/99SuperCharger.sh;
保存退出。