--------------------------------------------------

#!/system/bin/sh
#By TN-Man
#MediaTek MMC I/O Tweaks - SD Booster

#mmc0
MMC0=`ls -d /sys/devices/platform/mtk-sd.0/mmc_host/mmc0/mmc0:0001/block/mmcblk0`;

if [ -e $MMC0/queue/read_ahead_kb ]; then
   echo "1024" > $MMC0/queue/read_ahead_kb;
fi;

if [ -e $MMC0/queue/nr_requests ]; then
   echo "1024" > $MMC0/queue/nr_requests;
fi;

if [ -e $MMC0/queue/scheduler ]; then
   echo "deadline" > $MMC0/queue/scheduler;
fi;

if [ -e $MMC0/queue/rotational ]; then
   echo "0" > $MMC0/queue/rotational;
fi;

if [ -e $MMC0/queue/iostats ]; then
   echo "0" > $MMC0/queue/iostats;
fi;

if [ -e $MMC0/queue/iosched/fifo_batch ]; then
   echo "1" > $MMC0/queue/iosched/fifo_batch;
fi;

if [ -e $MMC0/queue/iosched/writes_starved ]; then
   echo "1" > $MMC0/queue/iosched/writes_starved;
fi;

#mmc1
MMC1=`ls -d /sys/devices/platform/mtk-sd.1/mmc_host/mmc1/mmc1:0002/block/mmcblk1`;

if [ -e $MMC1/queue/read_ahead_kb ]; then
   echo "1024" > $MMC1/queue/read_ahead_kb;
fi;

if [ -e $MMC1/queue/nr_requests ]; then
   echo "1024" > $MMC1/queue/nr_requests;
fi;

if [ -e $MMC1/queue/scheduler ]; then
   echo "deadline" > $MMC1/queue/scheduler;
fi;

if [ -e $MMC1/queue/rotational ]; then
   echo "0" > $MMC1/queue/rotational;
fi;

if [ -e $MMC1/queue/iostats ]; then
   echo "0" > $MMC1/queue/iostats;
fi;

if [ -e $MMC1/queue/iosched/fifo_batch ]; then
   echo "1" > $MMC1/queue/iosched/fifo_batch;
fi;

if [ -e $MMC1/queue/iosched/writes_starved ]; then
   echo "1" > $MMC1/queue/iosched/writes_starved;
fi;
--------------------------------------------------

Download from mega space

Error001 發表在 痞客邦 PIXNET 留言(0) 人氣()