Hello I found this flashable tweak from franco dev team, 2013 , but they are working good just sharing then. Credits to the awesome franco and his dev team.
Just flash it in recovery, to remove them just dirty flash your current ROM, enjoy.
875mntsettings
Code:
#!/system/bin/sh
# chmod -R 755 /system/etc/init.d
# 12-May-2013 by Franco's Dev Team
# malaroth, osm0sis, joaquinf, The Gingerbread Man, pkgnex, Khrushy, shreddintyres
# sysfs+sdcard tweaks
busybox mount -o remount,nosuid,nodev,noatime,nodiratime -t auto /;
busybox mount -o remount,nosuid,nodev,noatime,nodiratime -t auto /proc;
busybox mount -o remount,nosuid,nodev,noatime,nodiratime -t auto /sys;
busybox mount -o remount,nosuid,nodev,noatime,nodiratime -t auto /sys/kernel/debug;
busybox mount -o remount,nosuid,nodev,noatime,nodiratime -t auto /mnt/shell/emulated;
for i in /storage/emulated/*; do
busybox mount -o remount,nosuid,nodev,noatime,nodiratime -t auto $i;
busybox mount -o remount,nosuid,nodev,noatime,nodiratime -t auto $i/Android/obb;
done;
# partition tweaks
busybox mount -o remount,nosuid,nodev,noatime,nodiratime,barrier=0,noauto_da_alloc,discard -t auto /data;
busybox mount -o remount,nosuid,nodev,noatime,nodiratime,barrier=0,noauto_da_alloc,discard -t auto /cache;
busybox mount -o remount,nodev,noatime,nodiratime,barrier=0,noauto_da_alloc,discard -t auto /system;
925vmsettings
Code:
#!/system/bin/sh
# chmod -R 755 /system/etc/init.d
# 26-Jun-2013 by Franco's Dev Team
# malaroth, osm0sis, joaquinf, The Gingerbread Man, pkgnex, Khrushy, shreddintyres
# disable sysctl.conf to prevent ROM interference
if [ -e /system/etc/sysctl.conf ]; then
mount -o remount,rw /system;
mv /system/etc/sysctl.conf /system/etc/sysctl.conf.fkbak;
mount -o remount,ro /system;
fi;
# vm tweaks
echo 5 > /proc/sys/vm/dirty_background_ratio;
echo 200 > /proc/sys/vm/dirty_expire_centisecs;
echo 20 > /proc/sys/vm/dirty_ratio;
echo 500 > /proc/sys/vm/dirty_writeback_centisecs;
echo 2884 > /proc/sys/vm/min_free_kbytes;
echo 4 > /proc/sys/vm/min_free_order_shift;
echo 3 > /proc/sys/vm/page-cluster;
echo 0 > /proc/sys/vm/swappiness;
echo 100 > /proc/sys/vm/vfs_cache_pressure;
# lmk tweaks
minfree=6144,8192,12288,16384,24576,40960;
lmk=/sys/module/lowmemorykiller/parameters/minfree;
minboot=`cat $lmk`;
while sleep 1; do
if [ `cat $lmk` != $minboot ]; then
[ `cat $lmk` != $minfree ] && echo $minfree > $lmk || exit;
fi;
done&
# fs tweaks
echo 10 > /proc/sys/fs/lease-break-time;
# entropy tweaks
echo 128 > /proc/sys/kernel/random/read_wakeup_threshold;
echo 256 > /proc/sys/kernel/random/write_wakeup_threshold;
# tcp tweaks
echo "westwood" > /proc/sys/net/ipv4/tcp_congestion_control;
950iosettings
Code:
#!/system/bin/sh
# chmod -R 755 /system/etc/init.d
# 11-Jun-2013 by Franco's Dev Team
# malaroth, osm0sis, joaquinf, The Gingerbread Man, pkgnex, Khrushy, shreddintyres
# disable sysctl.conf to prevent ROM interference
if [ -e /system/etc/sysctl.conf ]; then
mount -o remount,rw /system;
mv /system/etc/sysctl.conf /system/etc/sysctl.conf.fkbak;
mount -o remount,ro /system;
fi;
# general queue tweaks
for i in /sys/block/*/queue; do
echo 512 > $i/nr_requests;
echo 512 > $i/read_ahead_kb;
echo 2 > $i/rq_affinity;
echo 0 > $i/nomerges;
echo 0 > $i/add_random;
echo 0 > $i/rotational;
done;
# override scheduler defaults with tweaked values
scheduler=reset;
while sleep 1; do
current=`cut -d\[ -f2 /sys/block/mmcblk0/queue/scheduler | cut -d\] -f1`;
if [ $scheduler != $current ]; then
scheduler=$current;
if [ $scheduler == "deadline" ]; then
# deadline tweaks
echo 250 > /sys/block/mmcblk0/queue/iosched/read_expire;
echo 2500 > /sys/block/mmcblk0/queue/iosched/write_expire;
echo 1 > /sys/block/mmcblk0/queue/iosched/writes_starved;
echo 1 > /sys/block/mmcblk0/queue/iosched/front_merges;
echo 8 > /sys/block/mmcblk0/queue/iosched/fifo_batch;
elif [ $scheduler == "row" ]; then
# row tweaks
echo 100 > /sys/block/mmcblk0/queue/iosched/hp_read_quantum;
echo 75 > /sys/block/mmcblk0/queue/iosched/rp_read_quantum;
echo 5 > /sys/block/mmcblk0/queue/iosched/hp_swrite_quantum;
echo 4 > /sys/block/mmcblk0/queue/iosched/rp_swrite_quantum;
echo 4 > /sys/block/mmcblk0/queue/iosched/rp_write_quantum;
echo 3 > /sys/block/mmcblk0/queue/iosched/lp_read_quantum;
echo 12 > /sys/block/mmcblk0/queue/iosched/lp_swrite_quantum;
echo 10 > /sys/block/mmcblk0/queue/iosched/read_idle;
echo 25 > /sys/block/mmcblk0/queue/iosched/read_idle_freq;
## N4 and N10 row adds lsl and rsl, which were hardcoded previously
echo 10000 > /sys/block/mmcblk0/queue/iosched/low_starv_limit;
echo 5000 > /sys/block/mmcblk0/queue/iosched/reg_starv_limit;
## N4 and N10 have a new version of row with corrected entry for lsq and renamed ri and rif
[ `cat /sys/block/mmcblk0/queue/iosched/lp_swrite_quantum` != "2" ] && echo 2 > /sys/block/mmcblk0/queue/iosched/lp_swrite_quantum;
echo 10 > /sys/block/mmcblk0/queue/iosched/rd_idle_data;
echo 25 > /sys/block/mmcblk0/queue/iosched/rd_idle_data_freq;
elif [ $scheduler == "cfq" ]; then
# cfq tweaks
echo 4 > /sys/block/mmcblk0/queue/iosched/quantum;
echo 80 > /sys/block/mmcblk0/queue/iosched/fifo_expire_sync;
echo 330 > /sys/block/mmcblk0/queue/iosched/fifo_expire_async;
echo 12582912 > /sys/block/mmcblk0/queue/iosched/back_seek_max;
echo 1 > /sys/block/mmcblk0/queue/iosched/back_seek_penalty;
echo 60 > /sys/block/mmcblk0/queue/iosched/slice_sync;
echo 50 > /sys/block/mmcblk0/queue/iosched/slice_async;
echo 2 > /sys/block/mmcblk0/queue/iosched/slice_async_rq;
echo 0 > /sys/block/mmcblk0/queue/iosched/slice_idle;
echo 0 > /sys/block/mmcblk0/queue/iosched/group_idle;
echo 1 > /sys/block/mmcblk0/queue/iosched/low_latency;
## N4 and N10 cfq adds tl, which was hardcoded previously
echo 300 > /sys/block/mmcblk0/queue/iosched/target_latency;
fi;
fi;
# loop forever independently
done&
Flash an unidentified 3-year-old zip? Thank you, but I'll pass...
fedef12evo said:
Hello I found this flashable tweak from franco dev team, 2013 , but they are working good just sharing then. Credits to the awesome franco and his dev team.
Just flash it in recovery, to remove them just dirty flash your current ROM, enjoy.
Click to expand...
Click to collapse
Why should anyone flash this?
Can you also post a Ice Cream Sandwich rom to go with it
fedef12evo said:
Hello I found this flashable tweak from franco dev team, 2013 , but they are working good just sharing then. Credits to the awesome franco and his dev team.
Just flash it in recovery, to remove them just dirty flash your current ROM, enjoy.
Click to expand...
Click to collapse
Don't you think you should at least explain exactly what these tweaks do?!
download the zip with pc, then open it and read every of 3 tweak what do, im gonna post it for you
first off, what do these "tweaks" do do you know? as nd Franco isnt a dev team, its an individual person.
simms22 said:
first off, what do these "tweaks" do do you know? as nd Franco isnt a dev team, its an individual person.
Click to expand...
Click to collapse
Read them tweak, back in thr day franco had a team
fedef12evo said:
Read them tweak, back in thr day franco had a team
Click to expand...
Click to collapse
no, he doesnt. he has people test out his kernels, but he IS alone. i know, im friends with him. i dont need to read the tweaks, you posted them here and you have to post what they do. if not, your thread will kust get closed down.
Thread closed. No-one with any sense would try this considering absolutely no info on resultant effects has been given, and the sheer age of the "tweaks".
Anyone wishing to try does so bearing the above caveat in mind.
Related
Create 00tweaks and put all the codes inside 00tweaks then put the file to system/etc/init.d
This universal script boost RAM performance.
This universal script mounts all partition as NOATIME
This universal script lessen lags on selected applications (MMS / Handcent / DialerOne)
This universal script enhances deadline scheduler
This universal script performs background process to check screen state
Click to expand...
Click to collapse
Code:
#!/system/bin/sh
#remounting the file systems with noatime and nodiratime flags to save battery and CPU cycles
for k in $(busybox mount | grep relatime | cut -d " " -f3)
do
sync
busybox mount -o remount,noatime,nodiratime $k
done
#if mounting is not successful then manual mounting will do the thing for you
mount -o remount,noatime,nodiratime auto /
mount -o remount,noatime,nodiratime auto /dev
mount -o remount,noatime,nodiratime auto /proc
mount -o remount,noatime,nodiratime auto /sys
mount -o remount,noatime,nodiratime auto /mnt/asec
mount -o remount,noatime,nodiratime auto /system
mount -o remount,noatime,nodiratime auto /data
mount -o remount,noatime,nodiratime auto /cache
mount -o remount,noatime,nodiratime auto /mnt/sdcard
mount -o remount,noatime,nodiratime auto /mnt/secure/asec
mount -o remount,noatime,nodiratime auto /mnt/sdcard/.android_secure
#flags every mounted partition as non rotational and increases it's cache size for more read speed
MTD=`ls -d /sys/block/mtd*`;
LOOP=`ls -d /sys/block/loop*`;
RAM=`ls -d /sys/block/ram*`;
MMC=`ls -d /sys/block/mmc*`;
for j in $MTD $LOOP $RAM
do
echo "0" > $j/queue/rotational;
echo "4096" > $j/queue/read_ahead_kb;
done
echo "4096" > /sys/devices/virtual/bdi/179:0/read_ahead_kb;
for a in $MTD $MMC
do
echo "512" > $a/queue/nr_requests;
done
#internet speed tweaks
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 87380 404480 > /proc/sys/net/ipv4/tcp_rmem;
#vm management tweaks
echo "0" > /proc/sys/vm/swappiness;
echo "95" > /proc/sys/vm/dirty_ratio;
echo "10" > /proc/sys/vm/vfs_cache_pressure;
echo "20480" > /proc/sys/vm/min_free_kbytes;
echo "1" > /proc/sys/vm/oom_kill_allocating_task;
echo "0" > /proc/sys/vm/laptop_mode;
echo "60000" > /proc/sys/vm/dirty_expire_centisecs;
echo "60" > /proc/sys/vm/dirty_background_ratio;
echo "6000" > /proc/sys/vm/dirty_writeback_centisecs;
echo "3" > /proc/sys/vm/drop_caches;
#kernel tweaks
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;
# use deadline scheduler
echo deadline > /sys/class/block/mmcblk0/queue/scheduler;
echo deadline > /sys/class/block/stl14/queue/scheduler;
echo deadline > /sys/class/block/stl13/queue/scheduler;
echo deadline > /sys/class/block/stl12/queue/scheduler;
echo 8 > /sys/class/block/mmcblk0/queue/iosched/fifo_batch;
echo 8 > /sys/class/block/stl14/queue/iosched/fifo_batch;
echo 8 > /sys/class/block/stl13/queue/iosched/fifo_batch;
echo 8 > /sys/class/block/stl12/queue/iosched/fifo_batch;
echo 400 > /sys/class/block/mmcblk0/queue/iosched/read_expire;
echo 400 > /sys/class/block/stl14/queue/iosched/read_expire;
echo 400 > /sys/class/block/stl13/queue/iosched/read_expire;
echo 400 > /sys/class/block/stl12/queue/iosched/read_expire;
echo 4 > /sys/class/block/mmcblk0/queue/iosched/writes_starved;
echo 4 > /sys/class/block/stl14/queue/iosched/writes_starved;
echo 4 > /sys/class/block/stl13/queue/iosched/writes_starved;
echo 4 > /sys/class/block/stl12/queue/iosched/writes_starved;
#setprop
setprop wifi.supplicant_scan_interval 600;
setprop windowsmgr.max_events_per_sec 260;
setprop ro.lge.proximity.delay 25;
setprop mot.proximity.delay 75;
setprop net.tcp.buffersize.default 4096,87380,256960,4096,16384,256960;
setprop net.tcp.buffersize.wifi 4096,87380,256960,4096,16384,256960;
setprop net.tcp.buffersize.umts 4096,87380,256960,4096,16384,256960;
setprop ro.HOME_APP_ADJ 1;
setprop ro.mot.eri.losalert.delay 1000;
setprop video.accelerate.hw 1;
setprop ro.ril.disable.power.collapse 0;
setprop pm.sleep_mode 1;
setprop media.stagefright.enable-player true;
#lowmemory
FOREGROUND_APP_MEM="2560";
VISIBLE_APP_MEM="4096";
SECONDARY_SERVER_MEM="6144";
HIDDEN_APP_MEM="17408";
CONTENT_PROVIDER_MEM="19456";
EMPTY_APP_MEM="23552";
#governor scaling awake
GOVERNOR_SCALE="ondemand";
GOVERNOR_FREQENCY_MAX="800000";
GOVERNOR_FREQENCY_MIN="245760";
SAMPLING_RATE="50000";
FREQ_STEP="40";
UP_THRESHOLD="90";
DOWN_THRESHOLD="20";
#governor scaling sleep
SLEEP_SCALE="ondemand";
SLEEP_FREQENCY_MAX="480000";
SLEEP_FREQENCY_MIN="245760";
XSAMPLING_RATE="100000";
XFREQ_STEP="15";
XUP_THRESHOLD="90";
XDOWN_THRESHOLD="20";
#locking app
LOCK_APP_IN_MEMORY_ENABLED="0"
LOCK_APP_SU="1"
LOCK_APP_DIALER="0"
LOCK_APP_MMS="0"
LOCK_APP_HANDCENT="0"
# =========
# remove lag when answering phone calls
# =========
MAX_PHONE()
{
pidphone=`pidof com.android.phone`;
if [ $pidphone ];
then
/system/xbin/echo "-17" > /proc/$pidphone/oom_adj;
renice -20 $pidphone;
if [ $MAX_APP -eq "1" ];
then
exit;
else
MAX_APP_STARTER;
MAX_APP=1;
exit;
fi;
else
sleep 3;
MAX_PHONE;
fi;
}
# =========
# remove lag from su (root)
# =========
MAX_SU()
{
pidsu=`pidof com.noshufou.android.su`;
if [ $pidsu ];
then
/system/xbin/echo "-17" > /proc/$pidsu/oom_adj;
renice -20 $pidsu;
exit;
else
sleep 3;
MAX_SU;
fi;
}
# =========
# remove lag from Clock
# =========
MAX_DIALER()
{
piddialer=`pidof kz.mek.DialerOne`;
if [ $piddialer ];
then
/system/xbin/echo "-17" > /proc/$piddialer/oom_adj;
renice -10 $piddialer;
exit;
else
sleep 3;
MAX_DIALER;
fi;
}
# =========
# remove lag from MMS
# =========
MAX_MMS()
{
pidmms=`pidof com.android.mms`;
if [ $pidmms ];
then
/system/xbin/echo "-17" > /proc/$pidmms/oom_adj;
renice -10 $pidmms;
exit;
else
sleep 3;
MAX_MMS;
fi;
}
# =========
# remove lag from HANDCENT
# =========
MAX_HANDCENT()
{
pidhandcent=`pidof com.handcent.nextsms`;
if [ $pidhandcent ];
then
/system/xbin/echo "-17" > /proc/$pidhandcent/oom_adj;
renice -10 $pidhandcent;
exit;
else
sleep 3;
MAX_HANDCENT;
fi;
}
# =========
# Background process to optimize process
# =========
MAX_APP_STARTER()
{
if [ $LOCK_APP_IN_MEMORY_ENABLED -eq "1" ];
then
if [ $LOCK_APP_SU -eq "1" ];
then
(while [ 1 ];
do
sleep 5;
MAX_SU;
done &);
fi;
if [ $LOCK_APP_MMS -eq "1" ];
then
(while [ 1 ];
do
sleep 3;
MAX_MMS;
done &);
fi;
if [ $LOCK_APP_HANDCENT -eq "1" ];
then
(while [ 1 ];
do
sleep 3;
MAX_HANDCENT;
done &);
fi;
if [ $LOCK_APP_DIALER -eq "1" ];
then
(while [ 1 ];
do
sleep 3;
MAX_DIALER;
done &);
fi;
exit;
else
(while [ 1 ];
do
sleep 3;
MAX_APP_STARTER;
done &);
fi;
}
if [ $LOCK_APP_IN_MEMORY_ENABLED -eq "1" ];
then
(while [ 1 ];
do
sleep 3;
MAX_PHONE;
done &);
fi;
GOV_MODE()
{
echo "1" >/proc/sys/vm/overcommit_memory;
echo "4" > /proc/sys/vm/min_free_order_shift;
echo $FOREGROUND_APP_MEM,$VISIBLE_APP_MEM,$SECONDARY_SERVER_MEM,$HIDDEN_APP_MEM,$CONTENT_PROVIDER_MEM,$EMPTY_APP_MEM > /sys/module/lowmemorykiller/parameters/minfree;
echo $GOVERNOR_SCALE > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor;
echo $GOVERNOR_FREQENCY_MAX > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq;
echo $GOVERNOR_FREQENCY_MIN > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq;
echo $SAMPLING_RATE > /sys/devices/system/cpu/cpu0/cpufreq/$GOVERNOR_SCALE/sampling_rate;
echo $FREQ_STEP > /sys/devices/system/cpu/cpu0/cpufreq/$GOVERNOR_SCALE/freq_step;
echo $UP_THRESHOLD > /sys/devices/system/cpu/cpu0/cpufreq/$GOVERNOR_SCALE/up_threshold;
echo $DOWN_THRESHOLD > /sys/devices/system/cpu/cpu0/cpufreq/$GOVERNOR_SCALE/down_threshold;
}
SLEEP_MODE()
{
echo "1" >/proc/sys/vm/overcommit_memory;
echo "4" > /proc/sys/vm/min_free_order_shift;
echo $FOREGROUND_APP_MEM,$VISIBLE_APP_MEM,$SECONDARY_SERVER_MEM,$HIDDEN_APP_MEM,$CONTENT_PROVIDER_MEM,$EMPTY_APP_MEM > /sys/module/lowmemorykiller/parameters/minfree;
echo $SLEEP_SCALE > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor;
echo $SLEEP_FREQENCY_MAX > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq;
echo $SLEEP_FREQENCY_MIN > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq;
echo $XSAMPLING_RATE > /sys/devices/system/cpu/cpu0/cpufreq/$SLEEP_SCALE/sampling_rate;
echo $XFREQ_STEP > /sys/devices/system/cpu/cpu0/cpufreq/$SLEEP_SCALE/freq_step;
echo $XUP_THRESHOLD > /sys/devices/system/cpu/cpu0/cpufreq/$SLEEP_SCALE/up_threshold;
echo $XDOWN_THRESHOLD > /sys/devices/system/cpu/cpu0/cpufreq/$SLEEP_SCALE/down_threshold;
}
# =========
# Background process to check screen state
# =========
(while [ 1 ];
do
STATE=`cat /sys/power/wait_for_fb_wake`;
GOV_MODE;
sleep 3;
STATE=`cat /sys/power/wait_for_fb_sleep`;
SLEEP_MODE;
sleep 3;
done &);
Some brief explanation for the contents of the script
1. /proc/sys/vm/laptop_mode
How many seconds after a read should a writeout of changed files start (this is based on the assumption that a read will cause an otherwise spun down disk to spin up again).
2. /proc/sys/vm/dirty_writeback_centisecs
How often the kernel should check if there is "dirty" (changed) data to write out to disk (in centiseconds).
3./proc/sys/vm/dirty_expire_centisecs
How old "dirty" data should be before the kernel considers it old enough to be written to disk. It is in general a good idea to set this to the same value as dirty_writeback_centisecs above.
4./proc/sys/vm/dirty_ratio
The maximum amount of memory (in percent) to be used to store dirty data before the process that generates the data will be forced to write it out. Setting this to a high value should not be a problem as writeouts will also occur if the system is low on memory.
5./proc/sys/vm/dirty_background_ratio
The lower amount of memory (in percent) where a writeout of dirty data to disk is allowed to stop. This should be quite a bit lower than the above dirty_ratio to allow the kernel to write out chunks of dirty data in one go.
I thought I should return the Tweak Manager's 00tweaks script back to initramfs
let me give it a try
what if i already have 00tweaks? should i had this script to the current file or substitute?
Hey, the values are similar to CF-Root Great then, gonna try it out
What should I do if I want to try your script, but I have already used CF-Root With Tweak Manager that also using another script in 00tweaks file
Wow I just ran this on GSB 3.8 workshed for the eris. And WOW the phone rings on 1 1/2 rings with a ringtone and the screen lights up. Very nice work. I hope you don't mind but i posted a link from the eris fourms to this file. I been looking for for so long on how to get rid of the rintone LAG and WOW i think you got it! Thank you
How to create the script?
Thnx
A lil question, this wont collide with the V6 Supercharger?
Hey guys,
can somebody please tell me how to make a script of this? I really want to know, but i'm new to this.
I can't find anything on the "search".
Cheers
QNBT said:
A lil question, this wont collide with the V6 Supercharger?
Click to expand...
Click to collapse
I think something does because I am getting complete homescreen redraws since I started using this a couple days ago. The phone seems to boot way faster and seems to run a little better but I think there is a conflict somewhere.
Sgace said:
Hey guys,
can somebody please tell me how to make a script of this? I really want to know, but i'm new to this.
I can't find anything on the "search".
Cheers
Click to expand...
Click to collapse
You don't have to make a script just copy it all to a text document on your desktop and after you save it delete the .txt at the end. Then put it on your SD card and use Root Explorer, or similar, to move it the proper location. I set the ownership and permissions the same as other files in the same location and rebooted. Just be sure to tap the "R/W" button at the top of the screen if you are using Root Explorer so you have read/write permission to work in the folder.
PieceKeepr said:
You don't have to make a script just copy it all to a text document on your desktop and after you save it delete the .txt at the end. Then put it on your SD card and use Root Explorer, or similar, to move it the proper location. I set the ownership and permissions the same as other files in the same location and rebooted. Just be sure to tap the "R/W" button at the top of the screen if you are using Root Explorer so you have read/write permission to work in the folder.
Click to expand...
Click to collapse
Hey,
thnx man. Found notepad++ and made a text file with that.
Tried the script for a couple of ours and for my personal feeling it made my phone slower at multiple points. Also Quadrant standard gave me a lower score (11-13) then when i'm using 00tweaks/v4 tt.
So this goes out the door.
Cheers
I hate bringing things back from the dead, so I apologize in advance.
If I want just the atime section of this script, do I just keep the first part? Where does it stop?
AUTO
what does the auto do in the mounting script?
Originally by knzo, I have tried many on my phone and thought I should share with my fellow streakers...
On my ROMs adventure I've been collecting some tweaks and scripts and seems to me it's now time to share it. While some values in terms of optimization might fluctuate from device to device, I've found these pretty consistent throughout many.
Build.prop
(edit your /system/build.prop with a file manager with root access)
Careful for already existing settings. In this case, just change the values.
1. Force launcher into memory
Code:
ro.HOME_APP_ADJ=1
2. Raise JPG quality to 100%
Code:
ro.media.enc.jpeg.quality=100
3. VM Heapsize; higher the RAM, higher the hp can be
Code:
dalvik.vm.heapsize=48m
4. Render UI with GPU
Code:
debug.sf.hw=1
5. Decrease dialing out delay
Code:
ro.telephony.call_ring.delay=0
6. Helps scrolling responsiveness
Code:
windowsmgr.max_events_per_sec=150
7. Save battery
Code:
wifi.supplicant_scan_interval=180
pm.sleep_mode=1
ro.ril.disable.power.collapse=0
8. Disable debugging notify icon on statusbar
Code:
persist.adb.notify=0
9. Increase overall touch responsiveness
Code:
debug.performance.tuning=1
video.accelerate.hw=1
10. Raise photo and video recording quality
Code:
ro.media.dec.jpeg.memcap=8000000
ro.media.enc.hprof.vid.bps=8000000
11. Signal (3G) tweaks
Code:
ro.ril.hsxpa=2
ro.ril.gprsclass=10
ro.ril.hep=1
ro.ril.enable.dtm=1
ro.ril.hsdpa.category=10
ro.ril.enable.a53=1
ro.ril.enable.3g.prefix=1
ro.ril.htcmaskw1.bitmask=4294967295
ro.ril.htcmaskw1=14449
ro.ril.hsupa.category=5
12. Net speed tweaks
Code:
net.tcp.buffersize.default=4096,87380,256960,4096,16384,256960
net.tcp.buffersize.wifi=4096,87380,256960,4096,16384,256960
net.tcp.buffersize.umts=4096,87380,256960,4096,16384,256960
net.tcp.buffersize.gprs=4096,87380,256960,4096,16384,256960
net.tcp.buffersize.edge=4096,87380,256960,4096,16384,256960
13. Disable blackscreen issue after a call
Code:
ro.lge.proximity.delay=25
mot.proximity.delay=25
14. Fix some application issues
Code:
ro.kernel.android.checkjni=0
15. Phone will not wake up from hitting the volume rocker
Code:
ro.config.hwfeature_wakeupkey=0
16. Force button lights on when screen is on
Code:
ro.mot.buttonlight.timeout=0
17. Disable boot animation for faster boot
Code:
debug.sf.nobootanimation=1
18. Miscellaneous flags
Code:
ro.config.hw_menu_unlockscreen=false
persist.sys.use_dithering=0
persist.sys.purgeable_assets=1
dalvik.vm.dexopt-flags=m=y
ro.mot.eri.losalert.delay=1000
19. Specifics to some LG devices
Code:
persist.service.pcsync.enable=0
persist.service.lgospd.enable=0
user.feature.flex=true
user.feature.lgdrm=false
user.feature.lgresource=false
user.feature.lgpoweroff=false
user.feature.ls_event=false
user.feature.ls_normal=false
user.feature.sui=false
Init.d
(needs ROM with init.d access and busybox, open empty file, insert header #!/system/bin/sh and put these there, save in /system/etc/init.d and name it something like 77tweaks)
1. strict minfree handler tweak
Code:
echo "2048,3072,6144,15360,17920,20480" > /sys/module/lowmemorykiller/parameters/minfree
2. internet speed tweaks
Code:
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,87380,404480" > /proc/sys/net/ipv4/tcp_rmem;
3. vm management tweaks
Code:
echo "4096" > /proc/sys/vm/min_free_kbytes
echo "0" > /proc/sys/vm/oom_kill_allocating_task;
echo "0" > /proc/sys/vm/panic_on_oom;
echo "0" > /proc/sys/vm/laptop_mode;
echo "0" > /proc/sys/vm/swappiness
echo "50" > /proc/sys/vm/vfs_cache_pressure
echo "90" > /proc/sys/vm/dirty_ratio
echo "70" > /proc/sys/vm/dirty_background_ratio
4. misc kernel tweaks
Code:
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;
5. battery tweaks
Code:
echo "500" > /proc/sys/vm/dirty_expire_centisecs
echo "1000" > /proc/sys/vm/dirty_writeback_centisecs
6. EXT4 tweaks (greatly increase I/O)
(needs /system, /cache, /data partitions formatted to EXT4)
a) removes journalism
Code:
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
b) perfect mount options
Code:
busybox mount -o remount,noatime,noauto_da_alloc,nosuid,nodev,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
7. Flags blocks as non-rotational and increases cache size
Code:
LOOP=`ls -d /sys/block/loop*`;
RAM=`ls -d /sys/block/ram*`;
MMC=`ls -d /sys/block/mmc*`;
for j in $LOOP $RAM
do
echo "0" > $j/queue/rotational;
echo "2048" > $j/queue/read_ahead_kb;
done
8. microSD card speed tweak
Code:
echo "2048" > /sys/devices/virtual/bdi/179:0/read_ahead_kb;
9. Defrags database files
Code:
for i in \
`find /data -iname "*.db"`
do \
sqlite3 $i 'VACUUM;';
done
9. Remove logger
Code:
rm /dev/log/main
10. Ondemand governor tweaks
Code:
SAMPLING_RATE=$(busybox expr `cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_transition_latency` \* 750 / 1000)
echo 95 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
echo $SAMPLING_RATE > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate
11. Auto change governor and I/O Scheduler
a) I/O Scheduler (Best: MTD devices - VR; EMMC devices - SIO) - needs kernel with these
Code:
echo "vr" > /sys/block/mmcblk0/queue/scheduler
or
echo "sio" > /sys/block/mmcblk0/queue/scheduler
b) Governor (Best: Minmax > SavagedZen > Smoothass > Smartass > Interactive) - needs kernel with these
Code:
echo "governor-name-here" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
12. Auto-zipalign on boot
(needs zipalign bin)
Code:
[url]http://forum.xda-developers.com/showthread.php?t=860586[/url]
13. Loopy Smoothness tweak
Code:
[url]http://forum.xda-developers.com/showthread.php?t=1137554[/url]
[url]http://forum.xda-developers.com/showthread.php?t=1205744[/url]
14. Move dalvik-cache to cache partition (if it's big enough) to free up data partition space
Code:
CACHESIZE=$(df -k /cache | tail -n1 | tr -s ' ' | cut -d ' ' -f2)
if [ $CACHESIZE -gt 80000 ]
then
echo "Large cache detected, moving dalvik-cache to /cache"
if [ ! -d /cache/dalvik-cache ]
then
busybox rm -rf /cache/dalvik-cache /data/dalvik-cache
mkdir /cache/dalvik-cache /data/dalvik-cache
fi
busybox chown 1000:1000 /cache/dalvik-cache
busybox chmod 0771 /cache/dalvik-cache
# bind mount dalvik-cache so we can still boot without the sdcard
busybox mount -o bind /cache/dalvik-cache /data/dalvik-cache
busybox chown 1000:1000 /data/dalvik-cache
busybox chmod 0771 /data/dalvik-cache
else
echo "Small cache detected, dalvik-cache will remain on /data"
fi
15. Disable normalize sleeper
Code:
mount -t debugfs none /sys/kernel/debug
echo NO_NORMALIZED_SLEEPER > /sys/kernel/debug/sched_features
16. OOM groupings and priorities tweaks - SuperCharger
Code:
[url]http://forum.xda-developers.com/showthread.php?t=991276[/url]
GPS.conf
(create or edit your /system/etc/gps.conf with a file manager with root access)
For improving GPS lock time and signal.
a) European NTP server (replace for america or asia in your case)
Code:
NTP_SERVER=europe.pool.ntp.org
XTRA_SERVER_1=http://xtra1.gpsonextra.net/xtra.bin
XTRA_SERVER_2=http://xtra2.gpsonextra.net/xtra.bin
XTRA_SERVER_3=http://xtra3.gpsonextra.net/xtra.bin
b) SE supl for A-GPS (better than Nokia's or Google's)
Code:
SUPL_HOST=supl.sonyericsson.com
SUPL_PORT=7275
Other tweaks or guidelines
1. Patch your hosts file for blocking Ads
(please think before doing this; many developers are supported through this way)
Code:
You can use AdFree application for this or changing manually your hosts file.
Here are some databases:
http://www.mvps.org/winhelp2002/hosts.txt
http://pgl.yoyo.org/adservers/serverlist.php?showintro=0;hostformat=hosts
2. Use CyanogenMOD's APN list file - it's one of the most complete.
Code:
It's located in /system/etc/apns-conf.xml
3. Use UOT kitchen for basic theming on your device.
Code:
http://uot.dakra.lt/
4. Use Google's dns servers
Code:
Create an empty file, name it resolv.conf and put there these 2 lines:
nameserver 8.8.8.8
nameserver 8.8.4.4
Save to /system/etc/.
5. Update Superuser and su binary to latest version (3.0 beta)
Code:
http://goo-inside.me/superuser/
6. Disable sync feature in sqlite
(author: ownhere - needs a source for your device so you can compile the /system/lib/libsqlite.so)
Code:
Patch file here: http://forum.xda-developers.com/showthread.php?t=903507
7. Do not use task killers.
Alright, I think this is it for now.
If you have any other tweaks or better values, you can PM me and I'll include them.
Edit: took out quote for easier copy-paste ability.
Sent from my Dell Streak using xda premium
nice awesome tweak values there
i'll try it soon
thanks for the tips my friend
WOW!!! Nice going! keep them coming.
scripts
do these only work on custom roms, or can they be used on stock? i think the files called system.prop or something instead of build.prop, hence why i ask before i start attempring to alter anything ?
gazza35 said:
do these only work on custom roms, or can they be used on stock? i think the files called system.prop or something instead of build.prop, hence why i ask before i start attempring to alter anything ?
Click to expand...
Click to collapse
System.prop is something completely differenr...the build.prop file is in the system folder.
Sent from my Dell Streak using xda premium
one of these scripts destroys wifi connection. it connects and shows the symbol but theres no internet. upon removing a few of them i now reboot to a black screen and have to restore my device.
chuuw33 said:
one of these scripts destroys wifi connection. it connects and shows the symbol but theres no internet. upon removing a few of them i now reboot to a black screen and have to restore my device.
Click to expand...
Click to collapse
Which rom are you using? I know many gb roms have had wifi reconnection problems...
Sent from my Dell Streak using xda premium
backcover sensor
Is there any way to stop dell streak to shut down when remove back cover?
Its a kernel hack, unfortunately. DJSteve's Streakdroid and DSC are the only ones I know of that have this.
beginner said:
Is there any way to stop dell streak to shut down when remove back cover?
Click to expand...
Click to collapse
Just answered in this thread..its a lever under the plate... http://forum.xda-developers.com/showthread.php?t=1393650
Sent from my Dell Streak using xda premium
/sys/devices/virtual/bdi/179:0/read_ahead_kb
is for the external SD/USB
What about the internal one?
Wow, blast from the past! You're
gianmaxfactor said:
/sys/devices/virtual/bdi/179:0/read_ahead_kb
is for the external SD/USB
What about the internal one?
Click to expand...
Click to collapse
Wow, what a blast from the past - you still have a Dell Streak 5 in 2023?
Sorry, I don't have anything useful to add I don't recall what the ID was for the internal storage on my Streak, I replaced it a decade ago.
smnc said:
Wow, blast from the past! You're
Wow, what a blast from the past - you still have a Dell Streak 5 in 2023?
Sorry, I don't have anything useful to add I don't recall what the ID was for the internal storage on my Streak, I replaced it a decade ago.
Click to expand...
Click to collapse
@smnc you seem to be a Senior Member. With any respect, is it that difficult for you to understand that was nothing about the Streak (I don't even know what you are talking about) but a "generic" android/linux setting?
gianmaxfactor said:
@smnc you seem to be a Senior Member. With any respect, is it that difficult for you to understand that was nothing about the Streak (I don't even know what you are talking about) but a "generic" android/linux setting?
Click to expand...
Click to collapse
I'll assume we have a language barrier here and that you weren't being intentionally disrespectful.
1) You posted in a thread that has been dead for 11 years+, for a specific device that has been out of production for just as long. Expecting any response should have been a long-shot, but expecting a non-device-specific response is just odd. The only reason I saw your post was because by sheer dumb luck, I happened to have notifications turned on for this thread from way back then.
2) While read_ahead_kb may be a "generic setting", storage device paths such as /sys/devices/virtual/bdi/179:0/ are not. Different Android/Linux/Unix devices, and even differnt builds for the same device may arrange storage devices in different configurations, so finding out the path for the internal storage on a Dell Streak 5 running Android Gingerbread will likely not apply to whatever device you're working on.
3) The actual read-ahead cache size from a 12-year-old device is not likely to be useful on a modern device as storage technology and speeds have changed dramatically since then.
Perhaps if you posted in a general channel, or one specific to your device, someone might be able to give you more useful information fort whatever your project is.
Hopefully that helps you.
First I want to apologize for my strange English (Google translator)
Returning to Questions, I would like to Know how to Remove the vibration when the screen Unlock
I also like to know how to do DroidxGovernos work on my machine because the installation is completed via CMW put the Set CPU does not recognize them, any thoughts?
Brazil to Use Retail 2.3.6 Root, Boot menu, and CMW working
Thanks
Not sure on the lockscreen vibration.
DX govs work by adding in the modules into /system/lib/modules/ and loading them with an init script. So far, they've worked on Bravo, Defy, and Defy+. Did you enable overclocking in the bootmenu? Its necessary. Some users even have to enable "Load All Modules". I've never had to, but some have. I can tell you the Boostedass works wonders on ICS with battery time. Added 16 hours of battery life on Quarx 2012\05\12. Miui runs for 2 days with about 4-5 hours of mp3 playing a day, 1 hour of wifi browsing, and being a bit anal with disabling what I'm not using with the power widget (3g, wifi, gps, etc...)
There is that chance that they just don't work. InteractiveX, from the same rom I found these governors in, won't work at all on my Bravo. I know that on CM7\MIUI\CM9 on the Bravo all that I have to do is flash the zip and enable them in No Frills and they just work.
Boosted, as well as SIO, are now built into the latest bootmenus for the Defy and Bravo now because of how well they work.
The full init script I'm using, and included with DX Gov 2.2.
Code:
#!/system/bin/sh
#Load Modules for IO Scheduler and Governors
insmod /system/lib/modules/cpufreq_smartassv2.ko
insmod /system/lib/modules/cpufreq_BOOSTEDassV2.ko
insmod /system/lib/modules/sio-iosched.ko
#Set IO Scheduler, use "sio" "noop" or "cfs" (sio and noop recommended)
for i in /sys/block/mmc*/queue; do
echo "sio" > $i/scheduler
done
#Tweak IO Parameters
for i in /sys/block/*/queue; do
[ -f "$i/rotational" ] && [ "`cat $i/rotational`" -ne "0" ] && echo "0" > $i/rotational
[ -f "$i/read_ahead_kb" ] && echo "2048" > $i/read_ahead_kb
[ -f "$i/iosched/async_read_expire" ] && echo "4000" > $i/iosched/async_read_expire
[ -f "$i/iosched/async_write_expire" ] && echo "16000" > $i/iosched/async_write_expire
[ -f "$i/iosched/fifo_batch" ] && echo "1" > $i/iosched/fifo_batch;
[ -f "$i/iosched/sync_read_expire" ] && echo "500" > $i/iosched/sync_read_expire
[ -f "$i/iosched/sync_write_expire" ] && echo "2000" > $i/iosched/sync_write_expire
[ -f "$i/iosched/writes_starved" ] && echo "0" > $i/iosched/writes_starved
[ -f "$i/nr_requests" ] && echo "2048" > $i/nr_requests
[ -f "$i/iostats" ] && [ "`cat $i/iostats`" -ne "0" ] && echo "0" > $i/iostats
done
#Set SD Card read ahead cache
echo "2048" > /sys/devices/virtual/bdi/179:0/read_ahead_kb
You can remove the smartassv2 insmod line (script above, 5th line) to save a tiny bit of ram; and the last line is the SD Speed Tweak (also script above, last 2 lines). It can be removed if you use other values or another mod with them included. I only included it so all the read ahead values were the same.
You can also use the following script to load and configure Boosted or SmartassV2. It doesn't work on the Bravo. Some reason echoing boostedass causes my phone to freeze on boot. Perhaps you'll have better luck than me.
Code:
#!/system/bin/sh
#Use either BOOSTEDassV2 or smartassV2. Comment out (# at beginning) all lines if using stock governors.
echo "BOOSTEDassV2" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
#Only use one or the other, and only if you plan on using BOOSTEDassV2 or smartassv2
#Tweak BOOSTEDassV2
echo "600000" > /sys/devices/system/cpu/cpufreq/BOOSTEDass/awake_ideal_freq
echo "300000" > /sys/devices/system/cpu/cpufreq/BOOSTEDass/sleep_ideal_freq
echo "600000" > /sys/devices/system/cpu/cpufreq/BOOSTEDass/sleep_wakeup_freq
echo "70" > /sys/devices/system/cpu/cpufreq/BOOSTEDass/max_cpu_load
echo "40" > /sys/devices/system/cpu/cpufreq/BOOSTEDass/min_cpu_load
echo "300000" > /sys/devices/system/cpu/cpufreq/BOOSTEDass/ramp_up_step
echo "300000" > /sys/devices/system/cpu/cpufreq/BOOSTEDass/ramp_down_step
echo "49000" > /sys/devices/system/cpu/cpufreq/BOOSTEDass/up_rate_us
echo "97000" > /sys/devices/system/cpu/cpufreq/BOOSTEDass/down_rate_us
#Tweak smartassV2
#echo "600000" > /sys/devices/system/cpu/cpufreq/smartass/awake_ideal_freq
#echo "300000" > /sys/devices/system/cpu/cpufreq/smartass/sleep_ideal_freq
#echo "600000" > /sys/devices/system/cpu/cpufreq/smartass/sleep_wakeup_freq
#echo "85" > /sys/devices/system/cpu/cpufreq/smartass/max_cpu_load
#echo "45" > /sys/devices/system/cpu/cpufreq/smartass/min_cpu_load
#echo "300000" > /sys/devices/system/cpu/cpufreq/smartass/ramp_up_step
#echo "300000" > /sys/devices/system/cpu/cpufreq/smartass/ramp_down_step
#echo "50000" > /sys/devices/system/cpu/cpufreq/smartass/up_rate_us
#echo "65000" > /sys/devices/system/cpu/cpufreq/smartass/down_rate_us
1 i DIDNT made this all tweaks ... Credit goes to their Developers...
I am not responsible for your bricked phone/sd if u pointed on me i will laugh at u
Forever king Tweaks....
Build.prop tweaks
1 VM Heapsize; higher the RAM
Code:
dalvik.vm.heapsize=48m
2 Good JPG quality
Code:
ro.media.enc.jpeg.quality=100
3 Render UI with GPU
Code:
debug.sf.hw=1
4 Best Scrolling
Code:
windowsmgr.max_events_per_sec=150
5 Decrease dialing out delay
Code:
ro.telephony.call_ring.delay=0
6 battery Saving
Code:
wifi.supplicant_scan_interval=180
pm.sleep_mode=1
ro.ril.disable.power.collapse=0
7 Disable debugging notify icon on statusbar
Code:
persist.adb.notify=0
8 Increase touch responsiveness
Code:
debug.performance.tuning=1
video.accelerate.hw=1
9 Awesome photo and video recording quality
Code:
ro.media.dec.jpeg.memcap=8000000
ro.media.enc.hprof.vid.bps=8000000
10 Network tweaks
Code:
Code:
ro.ril.hsxpa=2
ro.ril.gprsclass=10
ro.ril.hep=1
ro.ril.enable.dtm=1
ro.ril.hsdpa.category=10
ro.ril.enable.a53=1
ro.ril.enable.3g.prefix=1
ro.ril.htcmaskw1.bitmask=4294967295
ro.ril.htcmaskw1=14449
ro.ril.hsupa.category=5
11 Internet fast tweaks
Code:
net.tcp.buffersize.default=6144,87380,1048576,6144,87380,524288
net.tcp.buffersize.wifi=524288,1048576,2097152,524288,1048576,2097152
net.tcp.buffersize.umts=6144,87380,1048576,6144,87380,524288
net.tcp.buffersize.gprs=6144,87380,1048576,6144,87380,524288
net.tcp.buffersize.edge=6144,87380,524288,6144,16384,262144
net.tcp.buffersize.hspa=6144,87380,524288,6144,16384,262144
net.tcp.buffersize.lte=524288,1048576,2097152,524288,1048576,2097152
net.tcp.buffersize.hsdpa=6144,87380,1048576,6144,87380,1048576
net.tcp.buffersize.evdo_b=6144,87380,1048576,6144,87380,1048576
12 Fix some application issues (FC)
ro.kernel.android.checkjni=0
13 Phone will not wake up from hitting the volume rocker
Code:
ro.config.hwfeature_wakeupkey=0
14 Disable boot animation for faster boot
Code:
debug.sf.nobootanimation=1
15 faster streaming
Code:
media.stagefright.enable-meta=true
media.stagefright.enable-record=false
16 Miscellaneous Tweaks for performance
Code:
ro.config.hw_menu_unlockscreen=false
persist.sys.use_dithering=0
persist.sys.purgeable_assets=1
dalvik.vm.dexopt-flags=m=y
ro.mot.eri.losalert.delay=1000
17 Use Google DNS
Code:
net.ppp0.dns1=8.8.8.8
net.ppp0.dns2=8.8.4.4
net.dns1=8.8.8.8
net.dns2=8.8.4.4
Init.d tweaks
(needs ROM with init.d access and busybox, open empty file, insert header "#!/system/bin/sh" and put these there, save in /system/etc/init.d and name it something like tweak1)
1 strict minfree handler tweak
Code:
echo "2048,3072,6144,15360,17920,20480" > /sys/module/lowmemorykiller/parameters/minfree
2 internet speed hack tweaks
Code:
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,87380,404480" > /proc/sys/net/ipv4/tcp_rmem;
3 kernel tweaks
Code:
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;
4 vm management tweaks
Code:
echo "4096" > /proc/sys/vm/min_free_kbytes
echo "0" > /proc/sys/vm/oom_kill_allocating_task;
echo "0" > /proc/sys/vm/panic_on_oom;
echo "0" > /proc/sys/vm/laptop_mode;
echo "0" > /proc/sys/vm/swappiness
echo "50" > /proc/sys/vm/vfs_cache_pressure
echo "90" > /proc/sys/vm/dirty_ratio
echo "70" > /proc/sys/vm/dirty_background_ratio
5 battery tweaks
Code:
echo "500" > /proc/sys/vm/dirty_expire_centisecs
echo "1000" > /proc/sys/vm/dirty_writeback_centisecs
6 removes journalism
Code:
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
7 increases cache size and increases speed
Code:
LOOP=`ls -d /sys/block/loop*`;
RAM=`ls -d /sys/block/ram*`;
MMC=`ls -d /sys/block/mmc*`;
for j in $LOOP $RAM
do
echo "0" > $j/queue/rotational;
echo "2048" > $j/queue/read_ahead_kb;
done
8 SD card speed tweak
Code:
echo "2048" > /sys/devices/virtual/bdi/179:0/read_ahead_kb;
9 Defrags database files
Code:
for i in \
`find /data -iname "*.db"`
do \
sqlite3 $i 'VACUUM;';
done
10 Ondemand governor
Code:
SAMPLING_RATE=$(busybox expr `cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_transition_latency` \* 750 / 1000)
echo 95 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
echo $SAMPLING_RATE > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate
11 Governor Best: Minmax , SavagedZen , Smoothass , Smartass, Interactive
Code:
echo "governor-name-here" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
12 Move dalvik-cache to cache partition
Code:
CACHESIZE=$(df -k /cache | tail -n1 | tr -s ' ' | cut -d ' ' -f2)
if [ $CACHESIZE -gt 80000 ]
then
echo "Large cache detected, moving dalvik-cache to /cache"
if [ ! -d /cache/dalvik-cache ]
then
busybox rm -rf /cache/dalvik-cache /data/dalvik-cache
mkdir /cache/dalvik-cache /data/dalvik-cache
fi
busybox chown 1000:1000 /cache/dalvik-cache
busybox chmod 0771 /cache/dalvik-cache
# bind mount dalvik-cache so we can still boot without the sdcard
busybox mount -o bind /cache/dalvik-cache /data/dalvik-cache
busybox chown 1000:1000 /data/dalvik-cache
busybox chmod 0771 /data/dalvik-cache
else
echo "Small cache detected, dalvik-cache will remain on /data"
fi
13 Disable normalize sleeper
Code:
mount -t debugfs none /sys/kernel/debug
echo NO_NORMALIZED_SLEEPER > /sys/kernel/debug/sched_features
Other tweaks (not build.prop,init.d)
1 v6 supercharger
Code:
http://forum.xda-developers.com/attachment.php?attachmentid=591730&d=1305000576
Credit- zeppelinrox
2 Use CyanogenMOD's APN list file (fully , for every operator)
Its in system>etc
3 Use uot kitchen for Theming your rom
Code:
http://uot.dakra.lt/
4 Never use Task killer............
please hit thanks and comment if you like this guide....if using in Rom proper credits to this guide!
HBBTweaks is a package of Kernel and build.prop tweaks I've done (read, tested, benchmarked, saw the sources, etc) and shared on a Facebook group since version 1 (long time ago huh?)
Lots of users tested and most of them noticed improvements in battery life *and* performance, so I decided to publish here as you may find it helpful too..
It is just a .zip file you can install with CWM or TWRP the same way as you install a ROM. It should work on ALL ROMs but *I* have only tested it with CM10.x and CM11 ones. Don't worry, if anything goes wrong you can easily uninstall it and everything will be reverted.
WARNING: it will activate some overclocking (cpu: 1050mhz, gpu: 700mhz) and undervolting *if* your Kernel is able to, so your phone may get unstable if it's not as GOOD as mine, LOL.
If you get some reboots after installing it, try the alternate versions.. First try a1, then try a2. They won't save as MUCH battery as the original one but you'll definitively notice improvements as this isn't just a "switch-on-the-OC script" !!
Download link: http://d-h.st/iuT (Multi-installer, with two "alternate" versions and uninstaller included)
See if your phone gets a bit more responsive and if your battery life is better then post your thoughts here
CHANGELOG
31 -> 32
abyssplug or pegasusqplus as default
faster gpu clock reaction
sqlite3 and zipalign updated
touchboost to 800mhz with 200ms duration (default was 500ms)
higher intervals for the kernel scheduler
won't save any modified data to mmc/sd for up to 5m
tweaked abyssplug and pegasusq
won't disable zram, instead will use it more if it's already enabled
30 -> 31
sqlite3 included to optimize some databases
other minor tweaks
don't forget to reinstall it after any rom update!
29 -> 30
it tries to disable zram giving better performance and battery
ext4 and sioplus tweaks!
abyssplug by default, tweaked also
28 -> 29
kernel's sched_* back to default. better performance
testing some ext4 tweaks
27 -> 28
Aroma installer providing 2 alternate installation options and an uninstaller.
10.1 (and MIUI) compatible
Different swappiness and page-cluster values for zRam swapping or "normal" swapping
ddr_opp set to 100%, don't know if it will stick. it's faster here.
tweaked the way minfree is set and also the mounting options
26 -> 27
A typo (while I was translating) was preventing undervolting.. that's why nobody complained about reboots with the full version.. lol
XDA:DevDB Information
HBBTweaks, Tool/Utility for the Samsung Galaxy S Advance I9070
Contributors
fbs
Version Information
Status: Testing
Created 2014-06-16
Last Updated 2014-11-25
Works on JB roms too ?
Normally I can't overclock, it causes the known freezes and reboot issues.
So which verison should I pick? Alternate 1 or Alternate 2?
danielbulan97 said:
Works on JB roms too ?
Click to expand...
Click to collapse
It should..
coffeecore said:
Normally I can't overclock, it causes the known freezes and reboot issues.
So which verison should I pick? Alternate 1 or Alternate 2?
Click to expand...
Click to collapse
It's not a big overclock to the cpu(it's limited to 1050mhz), it's mostly to the gpu.. so, I think you could try the original one and then a1.. come on, the files are so small..
fbs said:
It's not a big overclock to the cpu(it's limited to 1050mhz), it's mostly to the gpu.. so, I think you could try the original one and then a1.. come on, the files are so small..
Click to expand...
Click to collapse
Haha I know, sorry for my lazyness :cyclops:
Edit: You should/can mention in the OP that OC is limited to 1050mhz.
I will download and try!
I am using Resurection Remix. The rom is awesome but i am having some battery drains..
I will try this tweaks for some days and test if the battery goes better
thanks!
@fbs Thanks man, tried original one and everything is fine. Waiting a couple of days for making a correct review. One question, I set CPU to 1000 (max.) and after that I flashed your script. When looking for which states my processor has been on there is 1000 Mhz the highest (I've set this before flashing script) but is my CPU actually running on 1050mhz? Would like to know more about this script
Thanks anyway, it's nice :thumbup:
PS; On what ROM are you now?
sent with my S Advance.
coffeecore said:
@fbs Thanks man, tried original one and everything is fine. Waiting a couple of days for making a correct review. One question, I set CPU to 1000 (max.) and after that I flashed your script. When looking for which states my processor has been on there is 1000 Mhz the highest (I've set this before flashing script) but is my CPU actually running on 1050mhz? Would like to know more about this script
PS; On what ROM are you now?
Click to expand...
Click to collapse
Well it sets max frequency to 1050 right after booting, but if your ROM or any app (like No-Frills) set it back to 1000, it will keep on 1000.
Right now I'm using Paranoid 4.4 build by t4n017 available here.. it's faster than vanilla cm11 and Vanir, to me..
v26 changelog?
moscka said:
v26 changelog?
Click to expand...
Click to collapse
Did you use V25 ?
Is KitKat based custom ROM supported?
Is KitKat based custom ROM supported? TQ.
xbean said:
Is KitKat based custom ROM supported? TQ.
Click to expand...
Click to collapse
Yes
I'll give it a try tomorrow.
coffeecore said:
Yes
Click to expand...
Click to collapse
Thanks. I'll give it a try tomorrow. Cheers.
King ov Hell said:
Did you use V25 ?
Click to expand...
Click to collapse
Yes, I was on v25.
The system is a little snappier, but the most noticeable change is the battery save (undervolting).
I got 4h and 30m of screen on and my battery is not good. I have it for 18 months.
I'm on PA 4.4.3.
Essential
II'm using this tweak since version 23. Currently use version 26 alt1 with Vanir 4.4.3 ROM and everything is running perfectly. Really feel improvements in battery performance and the performance of the device. :good::good::good::good::good:
Thank U Bro.
and what about the battery life
mhmod222 said:
and what about the battery life
Click to expand...
Click to collapse
Try it out, it is worth it man :good:
---------- Post added at 11:57 PM ---------- Previous post was at 11:21 PM ----------
@fbs
It is not recommended to flash this script right after flashing ROM and Gapps, right?
Booting is a requirement.
coffeecore said:
Try it out, it is worth it man :good:
---------- Post added at 11:57 PM ---------- Previous post was at 11:21 PM ----------
@fbs
It is not recommended to flash this script right after flashing ROM and Gapps, right?
Booting is a requirement.
Click to expand...
Click to collapse
You can flash it any time. Don't need to boot after initial ROM/GApps flash.. :good:
It just won't work if you install it BEFORE the ROM itself as the ROM's installer will format /system and everything will be lost
If anyone's interested, here are the two main "scripts" my tweak uses. Anyone could read it inside the .zip or /system/etc/init.d folder, but I know some are lazy then I'll copy/paste here
#!/system/bin/sh
#hbbtweaksv27
echo z1hbbkern START
#activate KSM, but less pages in a bunch to prevent lagging
echo 51 > /sys/kernel/mm/ksm/sleep_millisecs;
echo 29 > /sys/kernel/mm/ksm/pages_to_scan;
echo 1 > /sys/kernel/mm/ksm/run;
#and activate uksm if it has it
echo 1 > /sys/kernel/mm/uksm/run;
echo medium > /sys/kernel/mm/uksm/cpu_governor;
echo 439 > /sys/kernel/mm/uksm/sleep_millisecs;
#I read somewhere 5ms should be the maximum for a dual-core, our default was 10ms
echo "3999971" > /proc/sys/kernel/sched_latency_ns;
echo "1000003" > /proc/sys/kernel/sched_shares_window;
#higher avg time, maybe lessen the overhead
echo "2003" > /proc/sys/kernel/sched_time_avg;
#1.5ms was the minimum time a thread could be on cpu.
#I think it's too much time, lowered to 0,1ms. Same for threads that are waking up
echo "100003" > /proc/sys/kernel/sched_wakeup_granularity_ns;
echo "100003" > /proc/sys/kernel/sched_min_granularity_ns;
echo "150000" > /proc/sys/kernel/sched_migration_cost;
#a forked thread should run right after
echo 1 > /proc/sys/kernel/sched_child_runs_first;
echo 0 > /proc/sys/kernel/sched_tunable_scaling;
#won't enforce a time for real-time tasks.. maybe lessen the overhead?
echo -1 > /proc/sys/kernel/sched_rt_runtime_us;
echo 2000000 > /proc/sys/kernel/sched_rt_period_us;
#updated file-data that's cached in ram will stay on it 63s before being written
echo "6317" > /proc/sys/vm/dirty_writeback_centisecs;
echo "6317" > /proc/sys/vm/dirty_expire_centisecs;
#but if we have dynamic writebacks, it will stay only 3s when display is active and 123s when not
echo "317" > /proc/sys/vm/dirty_writeback_active_centisecs;
echo "12301" > /proc/sys/vm/dirty_writeback_suspend_centisecs;
#let's almost deactivate swapping, our "disc" is ultra-super-slow!
echo "1" > /proc/sys/vm/swappiness;
#let's fix the amount of memory that could be dirty before it start writing to mmc
echo "8000000" > /proc/sys/vm/dirty_background_bytes;
#let's fix the maximum amount of memory an app can defile before it get blocked
echo "14000000" > /proc/sys/vm/dirty_bytes;
#4mb really "free", not even used for caching
echo 4096 > /proc/sys/vm/min_free_kbytes;
#1=same amount for every zone.. (?)
echo 1 > /proc/sys/vm/min_free_order_shift;
#3s frequency for stats. idk if there's any drawbacks
echo 3 > /proc/sys/vm/stat_interval;
echo 0 > /proc/sys/vm/highmem_is_dirtyable;
echo "30" > /proc/sys/kernel/panic;
echo "0" > /proc/sys/kernel/panic_on_oops;
echo "0" > /proc/sys/vm/oom_kill_allocating_task;
#swap as little as possible in a bunch
echo "1" > /proc/sys/vm/page-cluster;
#less wait time, less complexity.. less memory, less packet size
echo 5 > /proc/sys/net/ipv4/tcp_fin_timeout;
echo 1 > /proc/sys/net/ipv4/tcp_timestamps;
echo 5 > /proc/sys/net/ipv4/tcp_challenge_ack_limit;
echo 1 > /proc/sys/net/ipv4/tcp_sack;
echo 0 > /proc/sys/net/ipv4/tcp_dsack;
echo 64 > /proc/sys/net/ipv4/tcp_base_mss;
echo 0 > /proc/sys/net/ipv4/tcp_retrans_collapse;
echo 0 > /proc/sys/net/ipv4/tcp_abc;
echo 0 > /proc/sys/net/ipv4/tcp_mtu_probing;
echo 0 > /proc/sys/net/ipv4/tcp_ecn;
echo 21 > /proc/sys/net/ipv4/tcp_reordering;
echo 262144 > /proc/sys/net/core/wmem_default;
echo 262144 > /proc/sys/net/core/rmem_default;
echo 1 > /proc/sys/net/ipv4/tcp_no_metrics_save;
echo 512 1024 4096 > /proc/sys/net/ipv4/tcp_mem;
echo illinois > /proc/sys/net/ipv4/tcp_congestion_control;
#max of 4mb for net reads and writes, should be enough
echo 4194304 > /proc/sys/net/core/rmem_max;
echo 4194304 > /proc/sys/net/core/wmem_max;
#abb-codec audio: higher gains and low power mode activated
echo on > /sys/kernel/abb-codec/anagain3;
echo gain=0 > /sys/kernel/abb-codec/anagain3;
echo on > /sys/kernel/abb-codec/hsldiggain;
echo gain=0 > /sys/kernel/abb-codec/hsldiggain;
echo on > /sys/kernel/abb-codec/hsrdiggain;
echo gain=0 > /sys/kernel/abb-codec/hsrdiggain;
echo on > /sys/kernel/abb-codec/hslowpow;
echo mode=1 > /sys/kernel/abb-codec/hslowpow;
echo on > /sys/kernel/abb-codec/hsdaclowpow;
echo mode=1 > /sys/kernel/abb-codec/hsdaclowpow;
echo on > /sys/kernel/abb-codec/hshpen;
echo mode=1 > /sys/kernel/abb-codec/hshpen;
echo on > /sys/kernel/abb-codec/classdhpg;
echo gain=10 > /sys/kernel/abb-codec/classdhpg;
echo on > /sys/kernel/abb-codec/classdwg;
echo gain=10 > /sys/kernel/abb-codec/classdwg;
echo on > /sys/kernel/abb-codec/addiggain2;
echo gain=4 > /sys/kernel/abb-codec/addiggain2;
echo on > /sys/kernel/abb-codec/eardiggain;
echo gain=0 > /sys/kernel/abb-codec/eardiggain;
echo 1 > /sys/kernel/abb-codec/chargepump;
#ramp to 800mhz when you touch the screen
echo on > /sys/kernel/mxt224e/touchboost;
echo 800000 > /sys/kernel/mxt224e/touchboost_freq;
#no fsync.
echo 1 > /sys/kernel/fsync/mode;
#mali (gpu) stuff
echo 0 > /sys/module/mali/parameters/mali_debug_level;
echo 6 > /sys/module/mali/parameters/mali_oskmem_allocorder;
#439ms instead of 1s to verify mali(gpu)'s usage
echo 439 > /sys/module/mali/parameters/mali_utilization_sampling_rate;
echo 439 > /sys/module/mali/parameters/mali_pm_sampling_rate;
echo 50331648 > /sys/module/mali/parameters/pre_allocated_memory_size_max;
echo 48 > /sys/module/mali/parameters/mali_l2_max_reads;
echo 0 > /sys/module/mali/parameters/mali_pp_scheduler_balance_jobs;
#our cpu's own powersaving is buggy and we have pegasusq
echo 0 > /sys/devices/system/cpu/sched_mc_power_savings;
echo 0 > /sys/module/dhd/parameters/dhdpm_fast;
echo 4 > /d/cpuidle/deepest_state;
#don't try to squeeze too much or too frequently (?) lessen overhead (?)
echo 64 > /sys/module/lowmemorykiller/parameters/cost;
#order of death! starting from right to left in number of pages
#first it will kill empty apps when we have less than 30720x4096 (120MB) of free ram
minfree=16384,18432,20480,24576,26624,30720;
lmk=/sys/module/lowmemorykiller/parameters/minfree;
minboot=`cat $lmk`;
while sleep 10; do
if [ `cat $lmk` != $minboot ]; then
[ `cat $lmk` != $minfree ] && echo $minfree > $lmk || exit;
fi;
done&
#I really don't know if these will help to lessen overhead or lessen lags, but....
sysctl -w vm.extfrag_threshold=800;
sysctl -w kernel.randomize_va_space=0;
echo 128 > /proc/sys/kernel/random/read_wakeup_threshold;
echo 256 > /proc/sys/kernel/random/write_wakeup_threshold;
#let's use pegasusq as governor as it's multi-core AWARE and it shut downs our second cpu
echo pegasusq > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor;
governor=reset;
while true; do
current=`cut -d\[ -f2 /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor | cut -d\] -f1`;
if [ $governor != $current ]; then
governor=$current;
if [ $governor == "pegasusq" ]; then
echo 40000 > /sys/devices/system/cpu/cpufreq/pegasusq/sampling_rate;
echo 400000 > /sys/devices/system/cpu/cpufreq/pegasusq/freq_for_responsiveness;
echo 70 > /sys/devices/system/cpu/cpufreq/pegasusq/up_threshold_at_min_freq;
echo 99 > /sys/devices/system/cpu/cpufreq/pegasusq/up_threshold;
echo 20 > /sys/devices/system/cpu/cpufreq/pegasusq/down_differential;
echo 20 > /sys/devices/system/cpu/cpufreq/pegasusq/freq_step;
echo 800000 > /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_freq_1_1;
echo 400000 > /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_freq_2_0;
echo 300 > /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_rq_1_1;
echo 110 > /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_rq_2_0;
echo 3 > /sys/devices/system/cpu/cpufreq/pegasusq/cpu_up_rate;
echo 2 > /sys/devices/system/cpu/cpufreq/pegasusq/cpu_down_rate;
echo 2 > /sys/devices/system/cpu/cpufreq/pegasusq/sampling_down_factor;
fi;
if [ $governor == "lulzactiveq" ]; then
echo 3 > /sys/devices/system/cpu/cpufreq/lulzactiveq/screen_off_min_step;
echo 90 > /sys/devices/system/cpu/cpufreq/lulzactiveq/inc_cpu_load;
echo 40 > /sys/devices/system/cpu/cpufreq/lulzactiveq/dec_cpu_load;
echo 80000 > /sys/devices/system/cpu/cpufreq/lulzactiveq/up_sample_time;
echo 80000 > /sys/devices/system/cpu/cpufreq/lulzactiveq/down_sample_time;
echo 120000 > /sys/devices/system/cpu/cpufreq/lulzactiveq/hotplug_sampling_rate;
echo 2 > /sys/devices/system/cpu/cpufreq/lulzactiveq/cpu_up_rate;
echo 2 > /sys/devices/system/cpu/cpufreq/lulzactiveq/cpu_down_rate;
echo 1 > /sys/devices/system/cpu/cpufreq/lulzactiveq/pump_up_step;
echo 1 > /sys/devices/system/cpu/cpufreq/lulzactiveq/pump_down_step;
echo 800000 > /sys/devices/system/cpu/cpufreq/lulzactiveq/hotplug_freq_1_1;
echo 400000 > /sys/devices/system/cpu/cpufreq/lulzactiveq/hotplug_freq_2_0;
echo 300 > /sys/devices/system/cpu/cpufreq/lulzactiveq/hotplug_rq_1_1;
echo 110 > /sys/devices/system/cpu/cpufreq/lulzactiveq/hotplug_rq_2_0;
fi;
fi;
sleep 809;
done&
#no sleepers seems to help. others are experimental
mount -t debugfs none /sys/kernel/debug;
echo "ARCH_POWER" > /sys/kernel/debug/sched_features;
echo "NO_GENTLE_FAIR_SLEEPERS" > /sys/kernel/debug/sched_features;
echo "NO_NORMALIZED_SLEEPERS" > /sys/kernel/debug/sched_features;
echo "NO_NEW_FAIR_SLEEPERS" > /sys/kernel/debug/sched_features;
echo "NO_START_DEBIT" > /sys/kernel/debug/sched_features;
echo "NO_NEXT_BUDDY" > /sys/kernel/debug/sched_features;
echo "NONTASK_POWER" > /sys/kernel/debug/sched_features;
echo "AFFINE_WAKEUPS" > /sys/kernel/debug/sched_features;
#let's force the system user interface to have higher priority
while sleep 1; do
if [ `pidof com.android.systemui` ]; then
systemui=`pidof com.android.systemui`;
busybox renice -18 $systemui;
echo -17 > /proc/$systemui/oom_adj;
chmod 100 /proc/$systemui/oom_adj;
exit;
fi;
done&
#and some launchers too
list="com.android.launcher org.adw.launcher org.adwfreak.launcher com.anddoes.launcher com.android.lmt com.chrislacy.actionlauncher.pro com.cyanogenmod.trebuchet com.gau.go.launcherex com.mobint.hololauncher com.mobint.hololauncher.hd com.teslacoilsw.launcher com.tsf.shell org.zeam";
while sleep 60; do
for class in $list; do
if [ `pgrep $class` ]; then
launcher=`pgrep $class`;
echo -17 > /proc/$launcher/oom_adj;
chmod 100 /proc/$launcher/oom_adj;
busybox renice -18 $launcher;
fi;
done;
exit;
done&
echo hbbkern: adjusting frequencies and voltages/undervolt
########################## OVERCLOCK & UNDERVOLT. The alternate versions changes these!
#and you can change it too. higher VARM = higher voltage. in hexadecimal
#This is ULTRA-STABLE on my phone but yours are not like mine..
#################
#overclock gpu if needed
echo 1 > /sys/kernel/mali/mali_auto_boost;
#720mhz while "boosted" (idx 22)
echo idx=22 > /sys/kernel/mali/mali_boost_high;
#300mhz while not (idx 2)
echo idx=2 > /sys/kernel/mali/mali_boost_low;
#let's scale from 200mhz to 1050mhz
echo 200000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq;
echo 1050000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq;
#200mhz
echo varm=0x10 > /sys/kernel/liveopp/arm_step0;
echo set_volt=1 > /sys/kernel/liveopp/arm_step0;
#400mhz
echo varm=0x10 > /sys/kernel/liveopp/arm_step1;
echo set_volt=1 > /sys/kernel/liveopp/arm_step1;
#600mhz
echo varm=0x19 > /sys/kernel/liveopp/arm_step2;
echo set_volt=1 > /sys/kernel/liveopp/arm_step2;
#800mhz
echo varm=0x22 > /sys/kernel/liveopp/arm_step3;
echo set_volt=1 > /sys/kernel/liveopp/arm_step3;
#1000mhz
echo varm=0x2C > /sys/kernel/liveopp/arm_step4;
echo set_volt=1 > /sys/kernel/liveopp/arm_step4;
#1050mhz
echo varm=0x2E > /sys/kernel/liveopp/arm_step5;
echo set_volt=1 > /sys/kernel/liveopp/arm_step5;
echo z1hbbkern END
#!/system/bin/sh
#hbbtweaksv27
echo z2hbbmounts START
tune2fs -o journal_data_writeback /dev/block/mmcblk0p4
tune2fs -o journal_data_writeback /dev/block/mmcblk0p5
tune2fs -O ^has_journal /dev/block/mmcblk0p4
tune2fs -O ^has_journal /dev/block/mmcblk0p5
sleep 31;
#let's not update access time for each file/folder accessed (noatime, nodiratime)
#let's write only after 61 secs instead of 5
#"writeback" is the fastest metadata writing mode and "discard" will clean erased zones providing better writting performance after
busybox mount -o remount,noatime,nodiratime,rw,barrier=1,noauto_da_alloc,discard,delalloc,nobh,nodev,nosuid,commit=61 /data /data;
busybox mount -o remount,noatime,nodiratime,rw,barrier=0,noauto_da_alloc,discard,delalloc,nobh,nodev,nosuid,commit=67 /cache /cache;
#quem sabe tenha writeback?
busybox mount -o remount,noatime,nodiratime,data=writeback,rw,barrier=0,noauto_da_alloc,discard,delalloc,nobh,nodev,nosuid,commit=61 /cache /cache;
busybox mount -o remount,noatime,nodiratime,data=writeback,rw,barrier=1,noauto_da_alloc,discard,delalloc,nobh,nodev,nosuid,commit=67 /data /data;
for k in $(busybox mount | grep relatime | cut -d " " -f3); do busybox mount -o remount,noatime,nodiratime $k $k; done;
echo 15 > /proc/sys/fs/lease-break-time;
sleep 31;
#let's cache 2000 writes/reads requests
#no merging and no scheduler if not writing to a real mmc (less overhead?)
#NO read_ahead seems controversial.. but we shouldn't waste our time trying to read
# and fillin our ram with unrequested data
for i in $(busybox find /sys/devices -name queue);
do
echo 2000 > $i/nr_requests;
echo 2 > $i/rq_affinity;
echo 2 > $i/nomerges;
echo 0 > $i/rotational;
echo 0 > $i/add_random;
echo 0 > $i/iostats;
echo noop > $i/scheduler;
echo 0 > $i/read_ahead_kb;
done;
#for mmcs it will merge and try to use sioplus as scheduler..
for i in $(busybox find /sys/devices -name queue |grep mmc);
do
echo 0 > $i/nomerges;
echo row > $i/scheduler;
echo sio > $i/scheduler;
echo sioplus > $i/scheduler;
echo 0 > $i/read_ahead_kb;
done;
#in doubt about it for the external one
echo "128" > /sys/devices/virtual/bdi/179:96/read_ahead_kb;
CI() {
echo $1 > /sys/block/mmcblk0/queue/iosched/$2
echo $1 > /sys/block/mmcblk1/queue/iosched/$2
}
#scheduler tweaks
scheduler=reset;
while sleep 461; do
current=`cut -d\[ -f2 /sys/block/mmcblk0/queue/scheduler | cut -d\] -f1`;
if [ $scheduler != $current ]; then
scheduler=$current;
if [ $scheduler == "deadline" ]; then
CI 200 read_expire;
CI 500 write_expire;
CI 4 writes_starved;
CI 0 front_merges;
CI 8 fifo_batch;
elif [ $scheduler == "row" ]; then
CI 100 hp_read_quantum;
CI 75 rp_read_quantum;
CI 3 lp_read_quantum;
CI 6 hp_swrite_quantum;
CI 5 rp_swrite_quantum;
CI 4 rp_write_quantum;
CI 12 lp_swrite_quantum;
CI 10 read_idle;
CI 15 read_idle_freq;
elif [ $scheduler == "cfq" ]; then
CI 4 quantum;
CI 80 fifo_expire_sync;
CI 330 fifo_expire_async;
CI 12582912 back_seek_max;
CI 1 back_seek_penalty;
CI 60 slice_sync;
CI 50 slice_async;
CI 2 slice_async_rq;
CI 0 slice_idle;
CI 0 group_idle;
CI 1 low_latency;
fi;
fi;
done&
#nada de gastar memoria com internet, nossas conexoes sao ultra-lentas
setprop net.tcp.buffersize.evdo ""
setprop net.tcp.buffersize.evdo_b ""
setprop net.tcp.buffersize.gprs ""
setprop net.tcp.buffersize.hsdpa ""
setprop net.tcp.buffersize.hspa ""
setprop net.tcp.buffersize.hspap ""
setprop net.tcp.buffersize.hsupa ""
setprop net.tcp.buffersize.edge ""
setprop net.tcp.buffersize.umts ""
setprop net.tcp.buffersize.dchspap ""
setprop net.tcp.buffersize.lte ""
setprop net.tcp.buffersize.default 1024,32768,1048576,1024,4096,65536
setprop net.tcp.buffersize.wifi 4096,524288,1048576,4096,1048576,4194304
echo z2hbbmounts END
sleep 2;
#DROP all cached stuff till now. We won't need again all stuff that have been read while booting
sync;
sysctl -w vm.drop_caches=3;