Tweaks ini saya comot dari berbagai sumber, baik itu di xda, modaco,
maupun saya extract dari berbagai custom rom yg pernah saya test maupun
saya donlot dg maksud mencari tahu setingannya...
Tapi semua setingan dan value atau nilai dari tweaks saya costumized sendiri, dg sedikit analogi dan baca2 tentunya..
Mohon untuk review dan kritikan yg membangun, jika ada yg kurang atau
memiliki setingan yg lebih yahuud, silahkan langsung koreksi setingan
saya...
Berikut beberapa list tweaks..
Virtual Memory - Sysctl
echo 10 > /proc/sys/vm/swappiness
echo 90 > /proc/sys/vm/dirty_ratio
echo 20 > /proc/sys/vm/vfs_cache_pressure
echo 8192 > /proc/sys/vm/min_free_kbytes
echo 1 > /proc/sys/vm/oom_kill_allocating_task
echo 55 > /proc/sys/vm/dirty_background_ratio
echo 500 > /proc/sys/vm/dirty_expire_centisecs
echo 1000 > /proc/sys/vm/dirty_writeback_centisecs
Boost sdcard speed
echo 512 > /sys/devices/virtual/bdi/7:0/read_ahead_kb
echo 512 > /sys/devices/virtual/bdi/7:1/read_ahead_kb
echo 512 > /sys/devices/virtual/bdi/7:2/read_ahead_kb
echo 512 > /sys/devices/virtual/bdi/7:3/read_ahead_kb
echo 512 > /sys/devices/virtual/bdi/7:4/read_ahead_kb
echo 512 > /sys/devices/virtual/bdi/7:5/read_ahead_kb
echo 512 > /sys/devices/virtual/bdi/7:6/read_ahead_kb
echo 512 > /sys/devices/virtual/bdi/7:7/read_ahead_kb
echo 3072 > /sys/devices/virtual/bdi/179:0/read_ahead_kb
echo 97 > /sys/devices/virtual/bdi/179:0/max_ratio
echo 3072 > /sys/devices/virtual/bdi/default/read_ahead_kb
echo 97 > /sys/devices/virtual/bdi/default/max_ratio
echo 3072 > /sys/devices/virtual/bdi/mmcblk0p2/read_ahead_kb
Scheduler
SCHEDULER="deadline"
STL=`ls -d /sys/block/stl*`;
BML=`ls -d /sys/block/bml*`;
MMC=`ls -d /sys/block/mmc*`;
TFSR=`ls -d /sys/block/tfsr*`;
DM=`ls -d /sys/block/dm*`;
MTD=`ls -d /sys/block/mtd*`;
LOOP=`ls -d /sys/block/loop*`;
RAM=`ls -d /sys/block/ram*`;
for i in $LOOP $MTD $MMC;
do
echo $SCHEDULER > $i/queue/scheduler;
done;
# deadline
for i in $LOOP $MTD $MMC;
do
echo 0 > $i/queue/rotational
echo 1 > $i/queue/iosched/back_seek_penalty
echo 1 > $i/queue/iosched/low_latency
echo 3 > $i/queue/iosched/slice_idle
echo 16 > $i/queue/iosched/quantum
echo 1024 > $i/queue/iosched/nr_requests
echo 4 > $i/queue/iosched/writes_starved
echo 500 > $i/queue/iosched/read_expire
echo 5000 > $i/queue/iosched/write_expire
echo 8 > $i/queue/iosched/fifo_batch
echo 1 > $i/queue/iosched/front_merges
done;
Android Internal TaskKiller - Minfree
echo 2048,3072,4096,6144,8192,9728 > /sys/module/lowmemorykiller/parameters/minfree
echo 0,1,2,4,7,15 > /sys/module/lowmemorykiller/parameters/adj
echo 0 > /sys/module/lowmemorykiller/parameters/debug_level
echo 48 > /sys/module/lowmemorykiller/parameters/cost
Internet speed tweak
echo 0 > /proc/sys/net/ipv4/tcp_timestamps
echo 1 > /proc/sys/net/ipv4/tcp_tw_reuse
echo 1 > /proc/sys/net/ipv4/tcp_sack
echo 1 > /proc/sys/net/ipv4/tcp_tw_recycle
echo 1 > /proc/sys/net/ipv4/tcp_window_scaling
echo 5 > /proc/sys/net/ipv4/tcp_keepalive_probes
echo 30 > /proc/sys/net/ipv4/tcp_keepalive_intvl
echo 30 > /proc/sys/net/ipv4/tcp_fin_timeout
echo 404480 > /proc/sys/net/core/wmem_max
echo 404480 > /proc/sys/net/core/rmem_max
echo 256960 > /proc/sys/net/core/rmem_default
echo 256960 > /proc/sys/net/core/wmem_default
echo 4096 16384 404480 > /proc/sys/net/ipv4/tcp_wmem
echo 4096 16384 404480 > /proc/sys/net/ipv4/tcp_rmem
setprop net.tcp.buffersize.default 4096,87380,256960,4096,16384,256960
setprop net.tcp.buffersize.wifi 4095,87380,256960,4096,16384,256960
setprop net.tcp.buffersize.umts 4094,87380,256960,4096,16384,256960
Kernel Tweak
echo 8 > /proc/sys/vm/page-cluster
echo 64000 > /proc/sys/kernel/msgmni
echo 64000 > /proc/sys/kernel/msgmax
echo 10 > /proc/sys/fs/lease-break-time
echo 500 512000 64 2048 > /proc/sys/kernel/sem
Deep Sleep optimisation
#mengaktivkan deep sleep prosesor saat idle, dan berguna untuk menghemat batrei
mount -t debugfs none /sys/kernel/debug
echo NO_NORMALIZED_SLEEPER > /sys/kernel/debug/sched_features
Zip align aplication
LOG_FILE=/data/zipalign.log
ZIPALIGNDB=/data/zipalign.db
if [ -e $LOG_FILE ]; then
rm $LOG_FILE;
fi;
if [ ! -f $ZIPALIGNDB ]; then
touch $ZIPALIGNDB;
fi;
echo "Starting FV Automatic ZipAlign $( date +"%m-%d-%Y %H:%M:%S" )" | tee -a $LOG_FILE
for DIR in /system/app /data/app ; do
cd $DIR
for APK in *.apk ; do
if [ $APK -ot $ZIPALIGNDB ] && [ $(grep "$DIR/$APK" $ZIPALIGNDB|wc -l) -gt 0 ] ; then
echo "Already checked: $DIR/$APK" | tee -a $LOG_FILE
else
zipalign -c 4 $APK
if [ $? -eq 0 ] ; then
echo "Already aligned: $DIR/$APK" | tee -a $LOG_FILE
grep "$DIR/$APK" $ZIPALIGNDB > /dev/null || echo $DIR/$APK >> $ZIPALIGNDB
else
echo "Now aligning: $DIR/$APK" | tee -a $LOG_FILE
zipalign -f 4 $APK /cache/$APK
busybox mount -o rw,remount /system
cp -f -p /cache/$APK $APK
busybox rm -f /cache/$APK
grep "$DIR/$APK" $ZIPALIGNDB > /dev/null || echo $DIR/$APK >> $ZIPALIGNDB
fi
fi
done
done
busybox mount -o ro,remount /system
touch $ZIPALIGNDB
echo "Automatic ZipAlign finished at $( date +"%m-%d-%Y %H:%M:%S" )" | tee -a $LOG_FILE
Mount option - like ext4 partition
#perfect mount options
busybox mount -o remount,noatime,noauto_da_alloc,nodiratime,barrier =0,nobh /system
busybox mount -o remount,noatime,noauto_da_alloc,nosuid,nodev,nodiratime,barrier=0,nobh /data
busybox mount -o remount,noatime,noauto_da_alloc,nosuid,nodev,nodiratime,barrier=0,nobh /cache
#removes journalism
tune2fs -o journal_data_writeback /block/path/to/system
tune2fs -O ^has_journal /block/path/to/system
tune2fs -o journal_data_writeback /block/path/to/cache
tune2fs -O ^has_journal /block/path/to/cache
tune2fs -o journal_data_writeback /block/path/to/data
tune2fs -O ^has_journal /block/path/to/data
Metode yg digunakan adalah sama dg inject script di folder init.d di /system/ect/init.d
File mentahan, silahkan di download disini...
http://www.esnips.com/doc/a625b2db-f9ac-4f48-b854-eda0cc443ab9/All-in-One-Android-tweaks
Untuk metode inject ke systemnya, cukup mudah hanya berbekar root, dan aplikasi root explorer..
Cara instal / inject script:
Bahan yg dibutuhkan;
- ponsel Android yg udah rooted (wajib)
- aplkasi root Explorer dah terinstal
download All-in-One-Android-tweaks di link di atas, extract
ada beberapa file, nah berikut pembagiannya..
melalui root explorer, masuk ke /system/etc
buat folder init.d, kemdian jangan lupa set permission 777
v v v
v v v
v v v
copas semua file yg hasil donlot tsb yg ada di folder init.d ke /system/ect/init.d
jangan lupa set permission semua file satu per satu, ke 777
v v v
v v v
v v v
Nah yg juga penting adalah, copas file install-recovery.sh ke /system/etc,
dan juga set permission
v v v
v . v
v . v
untuk build.prop dan gpsconfig itu optional, silahkan pakai jika dirasa perlu
dan ingat itu bkan untuk replace yg asli, hanya edit dan tambahkan line di bawahnya
tambahkan jika belum ada, dan edit jika telah ada
Sumber: Tutorial Kelas Berat All Android Brand (Group Facebook)
Tidak ada komentar:
Posting Komentar