[MOD][REF]Set governer on boot with init.d - Android Software/Hacking General [Developers Only]

Since everyones asking how to set a governor on boot, heres a sample of my init.d script that sets "on demand" with max frequency 1400000 (1.4GHZ) and min frequency 200000 (0.2GHZ) on boot, if you would like to use it or modify it let me know, i dont bite and im one to help! enjoy!!
here's the guidelines!
100000 = 1GHZ
DOWNLOAD

This is my Script to set / tweak my Governor on my XZ.
It's easy to handle, i guess.
#!/system/bin/sh
LOG_FILE=/data/Init.d_Tweaks.log
sleep 60
# Set Scaling Governor
GOVERNOR="conservative"
echo $GOVERNOR > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo $GOVERNOR > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
echo $GOVERNOR > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor
echo $GOVERNOR > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor
echo "$GOVERNOR Governor is running" | tee -a $LOG_FILE;
# Set Min & Max Frequency
# 384000 486000 594000 702000 810000 918000 1026000 1134000 1242000 1350000 1458000 1512000
CPU_MIN="384000"
CPU_MAX="1242000"
echo $CPU_MIN > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo $CPU_MAX > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo $CPU_MIN > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
echo $CPU_MAX > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
echo $CPU_MIN > /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq
echo $CPU_MAX > /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq
echo $CPU_MIN > /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq
echo $CPU_MAX > /sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq
echo "Min / Max Frequency is set to $CPU_MIN / $CPU_MAX" | tee -a $LOG_FILE;
# Set IO Sheduler
SHEDULER="deadline"
echo $SHEDULER > /sys/block/mmcblk0/queue/scheduler
echo $SHEDULER > /sys/block/mmcblk1/queue/scheduler
echo "$SHEDULER Sheduler is running" | tee -a $LOG_FILE;
# Set SD Cache
READ_AHEAD_KB="512"
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/254:0/read_ahead_kb
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/254:1/read_ahead_kb
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/179:0/read_ahead_kb
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/179:32/read_ahead_kb
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/0:18/read_ahead_kb
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/7:0/read_ahead_kb
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/7:1/read_ahead_kb
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/7:2/read_ahead_kb
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/7:3/read_ahead_kb
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/7:4/read_ahead_kb
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/7:5/read_ahead_kb
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/7:6/read_ahead_kb
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/7:7/read_ahead_kb
echo "256" > /sys/devices/virtual/bdi/default/read_ahead_kb
echo "SD Cache is set to $READ_AHEAD_KB kb" | tee -a $LOG_FILE;
# Tweak Governor
# Ondemand
if [ -d "/sys/devices/system/cpu/cpufreq/$GOVERNOR" ]; then
# Ondemand Tweaked
echo "90" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
echo "85" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_any_cpu_load
echo "85" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_multi_core
echo "75000" > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
echo "2" > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
echo "384000" > /sys/devices/system/cpu/cpufreq/ondemand/sync_freq
echo "1242000" > /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq
echo "10" > /sys/devices/system/cpu/cpufreq/ondemand/down_differential
echo "35" > /sys/devices/system/cpu/cpufreq/ondemand/freq_step
# Ondemand Battery
# echo "95" /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
# echo "85" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_any_cpu_load
# echo "85" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_multi_core
# echo "120000" > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
# echo "1" > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
# echo "384000" > /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq
# echo "1026000" > /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq
# echo "5" > /sys/devices/system/cpu/cpufreq/ondemand/down_differential
# echo "10" > /sys/devices/system/cpu/cpufreq/ondemand/freq_step
# Ondemand Performance
# echo "70" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
# echo "60" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_any_cpu_load
# echo "60" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_multi_core
# echo "50000" > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
# echo "2" > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
# echo "702000" > /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq
# echo "1512000" > /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq
# echo "15" > /sys/devices/system/cpu/cpufreq/ondemand/down_differential
# echo "50" > /sys/devices/system/cpu/cpufreq/ondemand/freq_step
fi;
# Interactive
if [ -d "/sys/devices/system/cpu/cpufreq/$GOVERNOR" ]; then
# Interactive Tweaked
echo "90" > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
echo "1242000" > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
echo "20000" > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
echo "30000" > /sys/devices/system/cpu/cpufreq/interactive/timer_rate
# Interactive Battery
# echo "95" > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
# echo "1026000" > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
# echo "10000" > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
# echo "40000" > /sys/devices/system/cpu/cpufreq/interactive/timer_rate
# Interactive Performance
# echo "80" > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
# echo "1512000" > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
# echo "40000" > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
# echo "20000" > /sys/devices/system/cpu/cpufreq/interactive/timer_rate
fi;
# Conservative
if [ -d "/sys/devices/system/cpu/cpufreq/$GOVERNOR" ]; then
# Conservative Tweaked
echo "90" > /sys/devices/system/cpu/cpufreq/conservative/up_threshold
echo "60000" > /sys/devices/system/cpu/cpufreq/conservative/sampling_rate
echo "3" > /sys/devices/system/cpu/cpufreq/conservative/sampling_down_factor
echo "30" > /sys/devices/system/cpu/cpufreq/conservative/down_threshold
echo "15" > /sys/devices/system/cpu/cpufreq/conservative/freq_step
# Conservative Battery
# echo "95" > /sys/devices/system/cpu/cpufreq/conservative/up_threshold
# echo "120000" > /sys/devices/system/cpu/cpufreq/conservative/sampling_rate
# echo "1" > /sys/devices/system/cpu/cpufreq/conservative/sampling_down_factor
# echo "40" > /sys/devices/system/cpu/cpufreq/conservative/down_threshold
# echo "10" > /sys/devices/system/cpu/cpufreq/conservative/freq_step
# Conservative Performance
# echo "60" > /sys/devices/system/cpu/cpufreq/conservative/up_threshold
# echo "40000" > /sys/devices/system/cpu/cpufreq/conservative/sampling_rate
# echo "5" > /sys/devices/system/cpu/cpufreq/conservative/sampling_down_factor
# echo "20" > /sys/devices/system/cpu/cpufreq/conservative/down_threshold
# echo "25" > /sys/devices/system/cpu/cpufreq/conservative/freq_step
fi;
echo "$GOVERNOR Governor is Tweaked" | tee -a $LOG_FILE;
# Custom Kernel Tweaks
# reduce / increase [mv] for all Frequencys
# echo "-90000" > /sys/devices/system/cpu/cpufreq/vdd_table/vdd_levels
# Set GPU Governor
# echo "simple" > /sys/devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0/pwrscale/trustzone/governor
# Set GPU Clock
# echo "325000000" > /sys/devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0/max_gpuclk
# Swap / Tap 2 Wake
# echo "0" > /sys/android_touch/doubletap2wake
# echo "0" > /sys/android_touch/sweep2wake
# echo "Custom Kernel Settings are applied" | tee -a $LOG_FILE;
echo " " | tee -a $LOG_FILE;
echo "@ $( date +"%m-%d-%Y %H:%M:%S" )" | tee -a $LOG_FILE;
echo " " | tee -a $LOG_FILE;
Gesendet von meinem C6603 mit Tapatalk

HSD-Pilot said:
This is my Script to set / tweak my Governor on my XZ.
It's easy to handle, i guess.
#!/system/bin/sh
LOG_FILE=/data/Init.d_Tweaks.log
sleep 60
# Set Scaling Governor
GOVERNOR="conservative"
echo $GOVERNOR > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo $GOVERNOR > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
echo $GOVERNOR > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor
echo $GOVERNOR > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor
echo "$GOVERNOR Governor is running" | tee -a $LOG_FILE;
# Set Min & Max Frequency
# 384000 486000 594000 702000 810000 918000 1026000 1134000 1242000 1350000 1458000 1512000
CPU_MIN="384000"
CPU_MAX="1242000"
echo $CPU_MIN > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo $CPU_MAX > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo $CPU_MIN > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
echo $CPU_MAX > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
echo $CPU_MIN > /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq
echo $CPU_MAX > /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq
echo $CPU_MIN > /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq
echo $CPU_MAX > /sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq
echo "Min / Max Frequency is set to $CPU_MIN / $CPU_MAX" | tee -a $LOG_FILE;
# Set IO Sheduler
SHEDULER="deadline"
echo $SHEDULER > /sys/block/mmcblk0/queue/scheduler
echo $SHEDULER > /sys/block/mmcblk1/queue/scheduler
echo "$SHEDULER Sheduler is running" | tee -a $LOG_FILE;
# Set SD Cache
READ_AHEAD_KB="512"
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/254:0/read_ahead_kb
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/254:1/read_ahead_kb
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/179:0/read_ahead_kb
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/179:32/read_ahead_kb
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/0:18/read_ahead_kb
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/7:0/read_ahead_kb
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/7:1/read_ahead_kb
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/7:2/read_ahead_kb
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/7:3/read_ahead_kb
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/7:4/read_ahead_kb
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/7:5/read_ahead_kb
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/7:6/read_ahead_kb
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/7:7/read_ahead_kb
echo "256" > /sys/devices/virtual/bdi/default/read_ahead_kb
echo "SD Cache is set to $READ_AHEAD_KB kb" | tee -a $LOG_FILE;
# Tweak Governor
# Ondemand
if [ -d "/sys/devices/system/cpu/cpufreq/$GOVERNOR" ]; then
# Ondemand Tweaked
echo "90" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
echo "85" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_any_cpu_load
echo "85" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_multi_core
echo "75000" > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
echo "2" > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
echo "384000" > /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq
echo "1242000" > /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq
echo "10" > /sys/devices/system/cpu/cpufreq/ondemand/down_differential
echo "35" > /sys/devices/system/cpu/cpufreq/ondemand/freq_step
# Ondemand Battery
# echo "95" /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
# echo "85" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_any_cpu_load
# echo "85" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_multi_core
# echo "120000" > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
# echo "1" > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
# echo "384000" > /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq
# echo "1026000" > /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq
# echo "5" > /sys/devices/system/cpu/cpufreq/ondemand/down_differential
# echo "10" > /sys/devices/system/cpu/cpufreq/ondemand/freq_step
# Ondemand Performance
# echo "70" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
# echo "60" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_any_cpu_load
# echo "60" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_multi_core
# echo "50000" > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
# echo "2" > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
# echo "702000" > /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq
# echo "1512000" > /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq
# echo "15" > /sys/devices/system/cpu/cpufreq/ondemand/down_differential
# echo "50" > /sys/devices/system/cpu/cpufreq/ondemand/freq_step
fi;
# Interactive
if [ -d "/sys/devices/system/cpu/cpufreq/$GOVERNOR" ]; then
# Interactive Tweaked
echo "90" > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
echo "1242000" > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
echo "20000" > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
echo "30000" > /sys/devices/system/cpu/cpufreq/interactive/timer_rate
# Interactive Battery
# echo "95" > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
# echo "1026000" > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
# echo "10000" > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
# echo "40000" > /sys/devices/system/cpu/cpufreq/interactive/timer_rate
# Interactive Performance
# echo "80" > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
# echo "1512000" > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
# echo "40000" > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
# echo "20000" > /sys/devices/system/cpu/cpufreq/interactive/timer_rate
fi;
# Conservative
if [ -d "/sys/devices/system/cpu/cpufreq/$GOVERNOR" ]; then
# Conservative Tweaked
echo "90" > /sys/devices/system/cpu/cpufreq/conservative/up_threshold
echo "60000" > /sys/devices/system/cpu/cpufreq/conservative/sampling_rate
echo "3" > /sys/devices/system/cpu/cpufreq/conservative/sampling_down_factor
echo "30" > /sys/devices/system/cpu/cpufreq/conservative/down_threshold
echo "15" > /sys/devices/system/cpu/cpufreq/conservative/freq_step
# Conservative Battery
# echo "95" > /sys/devices/system/cpu/cpufreq/conservative/up_threshold
# echo "120000" > /sys/devices/system/cpu/cpufreq/conservative/sampling_rate
# echo "1" > /sys/devices/system/cpu/cpufreq/conservative/sampling_down_factor
# echo "40" > /sys/devices/system/cpu/cpufreq/conservative/down_threshold
# echo "10" > /sys/devices/system/cpu/cpufreq/conservative/freq_step
# Conservative Performance
# echo "60" > /sys/devices/system/cpu/cpufreq/conservative/up_threshold
# echo "40000" > /sys/devices/system/cpu/cpufreq/conservative/sampling_rate
# echo "5" > /sys/devices/system/cpu/cpufreq/conservative/sampling_down_factor
# echo "20" > /sys/devices/system/cpu/cpufreq/conservative/down_threshold
# echo "25" > /sys/devices/system/cpu/cpufreq/conservative/freq_step
fi;
echo "$GOVERNOR Governor is Tweaked" | tee -a $LOG_FILE;
# Custom Kernel Tweaks
# reduce / increase [mv] for all Frequencys
# echo "-90000" > /sys/devices/system/cpu/cpufreq/vdd_table/vdd_levels
# Set GPU Governor
# echo "simple" > /sys/devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0/pwrscale/trustzone/governor
# Set GPU Clock
# echo "325000000" > /sys/devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0/max_gpuclk
# Swap / Tap 2 Wake
# echo "0" > /sys/android_touch/doubletap2wake
# echo "0" > /sys/android_touch/sweep2wake
# echo "Custom Kernel Settings are applied" | tee -a $LOG_FILE;
echo " " | tee -a $LOG_FILE;
echo "@ $( date +"%m-%d-%Y %H:%M:%S" )" | tee -a $LOG_FILE;
echo " " | tee -a $LOG_FILE;
Gesendet von meinem C6603 mit Tapatalk
Click to expand...
Click to collapse
thats pretty neat, mines just a basic compared to yours

HSD-Pilot said:
This is my Script to set / tweak my Governor on my XZ.
...
Click to expand...
Click to collapse
do i only have to change ondemand to hotplug to work on hotplug governor?

Maximus1a said:
do i only have to change ondemand to hotplug to work on hotplug governor?
Click to expand...
Click to collapse
If your Kernel supports it, sure.
You can set any available Governor on your Phone.
Just edit
GOVERNOR="hotplug"
To tweak it, just search the Forum for available Values. My Phone doesn't support it, that's why it's not in the script.
Gesendet von meinem Full Android on C6603 mit Tapatalk 2

HSD-Pilot said:
This is my Script to set / tweak my Governor on my XZ.
It's easy to handle, i guess.
#!/system/bin/sh
LOG_FILE=/data/Init.d_Tweaks.log
sleep 60
# Set Scaling Governor
GOVERNOR="conservative"
echo $GOVERNOR > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo $GOVERNOR > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
echo $GOVERNOR > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor
echo $GOVERNOR > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor
echo "$GOVERNOR Governor is running" | tee -a $LOG_FILE;
# Set Min & Max Frequency
# 384000 486000 594000 702000 810000 918000 1026000 1134000 1242000 1350000 1458000 1512000
CPU_MIN="384000"
CPU_MAX="1242000"
echo $CPU_MIN > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo $CPU_MAX > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo $CPU_MIN > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
echo $CPU_MAX > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
echo $CPU_MIN > /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq
echo $CPU_MAX > /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq
echo $CPU_MIN > /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq
echo $CPU_MAX > /sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq
echo "Min / Max Frequency is set to $CPU_MIN / $CPU_MAX" | tee -a $LOG_FILE;
# Set IO Sheduler
SHEDULER="deadline"
echo $SHEDULER > /sys/block/mmcblk0/queue/scheduler
echo $SHEDULER > /sys/block/mmcblk1/queue/scheduler
echo "$SHEDULER Sheduler is running" | tee -a $LOG_FILE;
# Set SD Cache
READ_AHEAD_KB="512"
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/254:0/read_ahead_kb
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/254:1/read_ahead_kb
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/179:0/read_ahead_kb
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/179:32/read_ahead_kb
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/0:18/read_ahead_kb
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/7:0/read_ahead_kb
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/7:1/read_ahead_kb
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/7:2/read_ahead_kb
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/7:3/read_ahead_kb
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/7:4/read_ahead_kb
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/7:5/read_ahead_kb
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/7:6/read_ahead_kb
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/7:7/read_ahead_kb
echo "256" > /sys/devices/virtual/bdi/default/read_ahead_kb
echo "SD Cache is set to $READ_AHEAD_KB kb" | tee -a $LOG_FILE;
# Tweak Governor
# Ondemand
if [ -d "/sys/devices/system/cpu/cpufreq/$GOVERNOR" ]; then
# Ondemand Tweaked
echo "90" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
echo "85" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_any_cpu_load
echo "85" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_multi_core
echo "75000" > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
echo "2" > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
echo "384000" > /sys/devices/system/cpu/cpufreq/ondemand/sync_freq
echo "1242000" > /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq
echo "10" > /sys/devices/system/cpu/cpufreq/ondemand/down_differential
echo "35" > /sys/devices/system/cpu/cpufreq/ondemand/freq_step
# Ondemand Battery
# echo "95" /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
# echo "85" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_any_cpu_load
# echo "85" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_multi_core
# echo "120000" > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
# echo "1" > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
# echo "384000" > /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq
# echo "1026000" > /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq
# echo "5" > /sys/devices/system/cpu/cpufreq/ondemand/down_differential
# echo "10" > /sys/devices/system/cpu/cpufreq/ondemand/freq_step
# Ondemand Performance
# echo "70" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
# echo "60" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_any_cpu_load
# echo "60" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_multi_core
# echo "50000" > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
# echo "2" > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
# echo "702000" > /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq
# echo "1512000" > /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq
# echo "15" > /sys/devices/system/cpu/cpufreq/ondemand/down_differential
# echo "50" > /sys/devices/system/cpu/cpufreq/ondemand/freq_step
fi;
# Interactive
if [ -d "/sys/devices/system/cpu/cpufreq/$GOVERNOR" ]; then
# Interactive Tweaked
echo "90" > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
echo "1242000" > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
echo "20000" > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
echo "30000" > /sys/devices/system/cpu/cpufreq/interactive/timer_rate
# Interactive Battery
# echo "95" > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
# echo "1026000" > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
# echo "10000" > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
# echo "40000" > /sys/devices/system/cpu/cpufreq/interactive/timer_rate
# Interactive Performance
# echo "80" > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
# echo "1512000" > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
# echo "40000" > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
# echo "20000" > /sys/devices/system/cpu/cpufreq/interactive/timer_rate
fi;
# Conservative
if [ -d "/sys/devices/system/cpu/cpufreq/$GOVERNOR" ]; then
# Conservative Tweaked
echo "90" > /sys/devices/system/cpu/cpufreq/conservative/up_threshold
echo "60000" > /sys/devices/system/cpu/cpufreq/conservative/sampling_rate
echo "3" > /sys/devices/system/cpu/cpufreq/conservative/sampling_down_factor
echo "30" > /sys/devices/system/cpu/cpufreq/conservative/down_threshold
echo "15" > /sys/devices/system/cpu/cpufreq/conservative/freq_step
# Conservative Battery
# echo "95" > /sys/devices/system/cpu/cpufreq/conservative/up_threshold
# echo "120000" > /sys/devices/system/cpu/cpufreq/conservative/sampling_rate
# echo "1" > /sys/devices/system/cpu/cpufreq/conservative/sampling_down_factor
# echo "40" > /sys/devices/system/cpu/cpufreq/conservative/down_threshold
# echo "10" > /sys/devices/system/cpu/cpufreq/conservative/freq_step
# Conservative Performance
# echo "60" > /sys/devices/system/cpu/cpufreq/conservative/up_threshold
# echo "40000" > /sys/devices/system/cpu/cpufreq/conservative/sampling_rate
# echo "5" > /sys/devices/system/cpu/cpufreq/conservative/sampling_down_factor
# echo "20" > /sys/devices/system/cpu/cpufreq/conservative/down_threshold
# echo "25" > /sys/devices/system/cpu/cpufreq/conservative/freq_step
fi;
echo "$GOVERNOR Governor is Tweaked" | tee -a $LOG_FILE;
# Custom Kernel Tweaks
# reduce / increase [mv] for all Frequencys
# echo "-90000" > /sys/devices/system/cpu/cpufreq/vdd_table/vdd_levels
# Set GPU Governor
# echo "simple" > /sys/devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0/pwrscale/trustzone/governor
# Set GPU Clock
# echo "325000000" > /sys/devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0/max_gpuclk
# Swap / Tap 2 Wake
# echo "0" > /sys/android_touch/doubletap2wake
# echo "0" > /sys/android_touch/sweep2wake
# echo "Custom Kernel Settings are applied" | tee -a $LOG_FILE;
echo " " | tee -a $LOG_FILE;
echo "@ $( date +"%m-%d-%Y %H:%M:%S" )" | tee -a $LOG_FILE;
echo " " | tee -a $LOG_FILE;
Gesendet von meinem C6603 mit Tapatalk
Click to expand...
Click to collapse
How to set minimum gpu frequency? Will this work?:
# echo "325000000" > /sys/devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0/min_gpuclk

:good:

@Ricky Divjakovski
Sorry for disturbing
Please give the script in the post or give a mirror link sir..
All your threads are very helpful
Thanks

Related

[Tweaks] Build.prop and init.d tweaks for Speed,Perfomance and Battery life

Intro
Tweaks build.prop and init.d for Speed,Perfomance and Battery life​
Build.prop Tweaks
Code:
# Raise JPG quality to 100%
ro.media.enc.jpeg.quality=100
# VM Heapsize; 178MB RAM = 32 is better
dalvik.vm.heapsize=32m
# Render UI with GPU
debug.sf.hw=1
# Decrease dialing out delay
ro.telephony.call_ring.delay=0
# Helps scrolling responsiveness
windowsmgr.max_events_per_sec=150
# Save battery
wifi.supplicant_scan_interval=180
pm.sleep_mode=1
ro.ril.disable.power.collapse=0
# Disable debugging notify icon on statusbar
persist.adb.notify=0
# Increase overall touch responsiveness
debug.performance.tuning=1
video.accelerate.hw=1
# Photo and video recording quality tweak (2.3 Rom only)
ro.media.dec.jpeg.memcap=8000000
ro.media.enc.hprof.vid.bps=800000
# Photo and video recording quality tweak (2.2 Rom only)
ro.media.dec.jpeg.memcap=10000000
ro.media.enc.hprof.vid.bps=1000000
# Photo and video recording quality tweak (Official ROM only)
ro.media.dec.jpeg.memcap=10000000
ro.media.enc.hprof.vid.bps=1600000
# Internet tweaks
ro.ril.hsxpa=2
ro.ril.gprsclass=12
ro.ril.hep=1
ro.ril.hsdpa.category=10
ro.ril.enable.3g.prefix=1
ro.ril.htcmaskw1.bitmask=4294967295
ro.ril.htcmaskw1=14449
ro.ril.hsupa.category=6
ro.ril.def.agps.mode=2
ro.ril.def.agps.feature=1
ro.ril.enable.sdr=1
ro.ril.enable.gea3=1
ro.ril.enable.fd.plmn.prefix=23402,23410,23411
ro.ril.enable.a52=1
ro.ril.enable.a53=1
ro.ril.enable.dtm=1
# NetSpeed tweaks
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
# Disable blackscreen issue after a call
ro.lge.proximity.delay=25
mot.proximity.delay=25
# Fix some application issues
ro.kernel.android.checkjni=0
# Phone will not wake up from hitting the volume rocker
ro.config.hwfeature_wakeupkey=0
# Force button lights on when screen is on
ro.mot.buttonlight.timeout=0
# Disable boot animation for faster boot
debug.sf.nobootanimation=1
# Enable Stagefright helps stream Video and Music Faster
media.stagefright.enable-player=true
media.stagefright.enable-meta=true
media.stagefright.enable-scan=true
media.stagefright.enable-http=true
init.d tweaks ​Download Init.dtweaks.rar and choose 99Tweaks for balance option and 99XTweaks for aggressive tweaks
Init.d tweaks contain
LowmemoryKiller Tweaks Balance
Code:
echo "0,3,5,7,14,15" > /sys/module/lowmemorykiller/parameters/adj
echo "1536,2048,6656,7168,7680,8192" > /sys/module/lowmemorykiller/parameters/minfree
echo "0" > /proc/sys/kernel/panic
echo "0" > /proc/sys/vm/oom_kill_allocating_task
echo "0" > /proc/sys/vm/panic_on_oom
echo "1" > /proc/sys/kernel/panic_on_oops
echo "0" > /proc/sys/kernel/panic
LowmemoryKiller Tweaks aggressive
Code:
echo "0,3,5,7,14,15" > /sys/module/lowmemorykiller/parameters/adj
echo "2560,4096,6144,15360,17920,20480" > /sys/module/lowmemorykiller/parameters/minfree
echo "0" > /proc/sys/kernel/panic
echo "0" > /proc/sys/vm/oom_kill_allocating_task
echo "0" > /proc/sys/vm/panic_on_oom
echo "1" > /proc/sys/kernel/panic_on_oops
echo "0" > /proc/sys/kernel/panic
IPv4 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;
Dalvik VM 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
Battery Tweaks
Code:
echo "500" > /proc/sys/vm/dirty_expire_centisecs
echo "1000" > /proc/sys/vm/dirty_writeback_centisecs
Note:If you have init.d problem or if not have init.d folder try add this line at hw_config.sh
Balance Tweaks
Code:
# Low memory killer tweaks
echo "0,3,5,7,14,15" > /sys/module/lowmemorykiller/parameters/adj
echo "1536,2048,6656,7168,7680,8192" > /sys/module/lowmemorykiller/parameters/minfree
echo "0" > /proc/sys/kernel/panic
echo "0" > /proc/sys/vm/oom_kill_allocating_task
echo "0" > /proc/sys/vm/panic_on_oom
echo "1" > /proc/sys/kernel/panic_on_oops
echo "0" > /proc/sys/kernel/panic
IPV4 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
Dalvik VM tweaks
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
Battery tweaks
echo "500" > /proc/sys/vm/dirty_expire_centisecs
echo "1000" > /proc/sys/vm/dirty_writeback_centisecs
Aggressive Tweaks
Code:
# Low memory killer
echo "0,3,5,7,14,15" > /sys/module/lowmemorykiller/parameters/adj
echo "2560,4096,6144,15360,17920,20480" > /sys/module/lowmemorykiller/parameters/minfree
echo "0" > /proc/sys/kernel/panic
echo "0" > /proc/sys/vm/oom_kill_allocating_task
echo "0" > /proc/sys/vm/panic_on_oom
echo "1" > /proc/sys/kernel/panic_on_oops
echo "0" > /proc/sys/kernel/panic
# IPV4 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
# Dalvik VM tweaks
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
# Battery tweaks
echo "500" > /proc/sys/vm/dirty_expire_centisecs
echo "1000" > /proc/sys/vm/dirty_writeback_centisecs
Reserved for Future use
Last reserved OK
hate to break it to you, but looks like most of the things you have here can be found in this thread:
http://forum.xda-developers.com/showthread.php?t=1227269
Thank, please keep developing...
Will the build.prop tweaks still work on ICS?
Nice scripts they are working but if you want them to be safe and without conflicts try removing the lmk settings before Ram differs on most phones
Example: Galaxy ace has 278 mb of ram and Lg optimus one has 512 (Basically is 478 or something).Those lmk settings will mess LG's ram
[email protected] said:
Nice scripts they are working but if you want them to be safe and without conflicts try removing the lmk settings before Ram differs on most phones
Example: Galaxy ace has 278 mb of ram and Lg optimus one has 512 (Basically is 478 or something).Those lmk settings will mess LG's ram
Click to expand...
Click to collapse
Actually, LMK settings should be standard as it represents free RAM (rather than total available RAM).
Only thing that matters for an LMK is that it should be tweaked along the Dalvik LMK. Only tweaking one or the other makes the LMK inefficient.
Hi what I would like to know is that the netspeed tweaks do those help in the edge speed. Also the internet tweaks do i need to enter all of those for the edge speed gain or only the line with the gprs.
how to use this script , i mean how to save this file??
dinesam said:
how to use this script , i mean how to save this file??
Click to expand...
Click to collapse
Bookmark it Ctrl+D or Subscribe to this topic.
Sent from my C6603 using xda app-developers app

[For DEV][Build.prop Tweak's]All tweaks

Tweaks Increase download/upload/3G speeds
Code:
ro.ril.hsxpa=2
ro.ril.gprsclass=10
ro.ril.hep=1
ro.ril.enable.dtm=0
ro.ril.hsdpa.category=8 (or 10,12,14) Still looking for more of these though.
ro.ril.enable.a53=1
ro.ril.enable.3g.prefix=1
ro.ril.htcmaskw1.bitmask=4294967295
ro.ril.htcmaskw1=14449
ro.ril.hsupa.category=6
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
Power Save Tweak
Code:
Allows the phone to sleep better
ro.ril.disable.power.collapse=0
Saves power when phone is sleep
pm.sleep_mode=1
Allows your wifi to scan less, saving more battery
wifi.supplicant_scan_interval=150 or 180 (your choice)
Helps Scrolling Responsiveness
windowsmgr.max_events_per_sec=150
Increase overal touch responsivenss
debug.performance.tuning=1
video.accelerate.hw=1
MEDIA TWEAKS
Code:
Makes streaming videos stream faster
media.stagefright.enable-player=true
media.stagefright.enable-meta=true
media.stagefright.enable-scan=true
media.stagefright.enable-http=true
media.stagefright.enable-record=false
Increases quality of photo and videos
ro.media.dec.jpeg.memcap=8000000
ro.media.enc.hprof.vid.bps=8000000
Raises quality of JPEG images
ro.media.enc.jpeg.quality=90 or 100 (your choice)
BOOT TWEAKS
Code:
Gives your phone no boot animation
debug.sf.nobootanimation=1
SYSTEM TWEAKS
Code:
Forces your home launcher into memory
ro.HOME_APP_ADJ=1
Change the Dalvik VM heap size
dalvik.vm.heapsize=64m #or 48mb
To disable usb debugging popup
persist.adb.notify=0
To stop the phone from waking up when pressing the volume key
ro.config.hwfeature_wakeupkey=0
To make the phone ring faster when dialing out
ro.telephony.call_ring.delay=800
Disable black screen issue after call
ro.lge.proximity.delay=25
mot.proximity.delay=25
dalvik.vm.startheapsize = 4м
Screen ppi or font density
[B]ro.sf.lcd_density=240
Other Tweaks
Code:
mot.proximity.delay=150
debug.sf.hw=1 #Render UI with GPU
ro.kernel.android.checkjni=0
persist.sys.purgeable_assets=1
download link ? does it work in miui ?
anna0811 said:
download link ? does it work in miui ?
Click to expand...
Click to collapse
You add it to build.prop on your own.
Cheers
Sent from my GT-i9003 powered by MIUI
anna0811 said:
download link ? does it work in miui ?
Click to expand...
Click to collapse
read it it is for dev only
I am using must of them so no need to change it.Thanks Frank for collecting.
tarunagg said:
read it it is for dev only
Click to expand...
Click to collapse
i know it is for devs but i want to try it if there is a download link
btw can you tell me how to flash it
anna0811 said:
i know it is for devs but i want to try it if there is a download link
btw can you tell me how to flash it
Click to expand...
Click to collapse
all hail the king of troll
it has to be changed manually.not a flashable file.
anna0811 said:
i know it is for devs but i want to try it if there is a download link
btw can you tell me how to flash it
Click to expand...
Click to collapse
If you don't know how to apply them just install a rom that surely has some of them
Nice list.
I think ro.ril.disable.power.collapse should read
Code:
ro.ril.disable.power.collapse=0
because you want the power collapse to happen to save energy. Also, all commands should be lower case. Therefore it should be
Code:
debug.performance.tuning=1
video.accelerate.hw=1
with 'd' and 'v' instead of 'D' and 'V' at the beginning.
Further, I use
Code:
dalvik.vm.startheapsize=4m
which in my experience reduces RAM usage by approx. 15 MB on startup.
XDA_Bam said:
Nice list.
I think ro.ril.disable.power.collapse should read
Code:
ro.ril.disable.power.collapse=0
because you want the power collapse to happen to save energy. Also, all commands should be lower case. Therefore it should be
Code:
debug.performance.tuning=1
video.accelerate.hw=1
with 'd' and 'v' instead of 'D' and 'V' at the beginning.
Further, I use
Code:
dalvik.vm.startheapsize=4m
which in my experience reduces RAM usage by approx. 15 MB on startup.
Click to expand...
Click to collapse
Thanks man, i add this later
Nice one frank,ButI think Mediastatefright breaks HD Video
PhosgenMod init.d + build.prop
PhosgenCharger
Code:
echo "0,3,5,7,14,15" > /sys/module/lowmemorykiller/parameters/adj; # OOM Grouping
echo "1536,2048,4096,10240,12800,15360"> /sys/module/lowmemorykiller/parameters/minfree;
PhosgenCore
Code:
if [ -e /sys/devices/virtual/bdi/179:0/read_ahead_kb ]
then
/system/xbin/echo "4096" > /sys/devices/virtual/bdi/179:0/read_ahead_kb;
fi;
if [ -e /sys/devices/virtual/bdi/179:8/read_ahead_kb ]
then
/system/xbin/echo "4096" > /sys/devices/virtual/bdi/179:8/read_ahead_kb;
fi;
if [ -e /sys/devices/virtual/bdi/default/read_ahead_kb ]
then
/system/xbin/echo "4096" > /sys/devices/virtual/bdi/default/read_ahead_kb;
fi;
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/parameters/minfree
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 "450" > /proc/sys/vm/dirty_writeback_centisecs
fi
if [ -e /proc/sys/vm/dirty_ratio ]; then
echo "10" > /proc/sys/vm/dirty_ratio
fi
if [ -e /proc/sys/vm/dirty_background_ratio ]; then
echo "2" > /proc/sys/vm/dirty_background_ratio
fi
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
ZIPCHECK=`/system/xbin/zipalign -c -v 4 $APK | grep FAILED | wc -l`;
if [ $ZIPCHECK == "1" ]; then
echo "Now aligning: $DIR/$APK" | tee -a $LOG_FILE;
/system/xbin/zipalign -v -f 4 $APK /data/local/$APK;
busybox mount -o rw,remount /system;
cp -f -p /data/local/$APK $APK;
grep "$DIR/$APK" $ZIPALIGNDB > /dev/null || echo $DIR/$APK >> $ZIPALIGNDB;
else
echo "Already aligned: $DIR/$APK" | tee -a $LOG_FILE;
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;
MODULES="ipv6"
for i in $MODULES;
do
modprobe $i;
done
sysctl -p /etc/sysctl.conf;
LOOP=`ls -d /sys/block/loop*`;
blk0=`ls -d /sys/block/mmcblk0`;
blk1=`ls -d /sys/block/mmcblk1`;
MMC=`ls -d /sys/block/mmc*`;
for j in $blk0 $blk1; do
echo "0" > $j/queue/rotational;
echo "4096" > $j/queue/read_ahead_kb;
done;
for k in $(busybox mount | grep relatime | cut -d " " -f3) ; do
sync;
busybox mount -o remount,noatime $k;
done;
for i in /sys/block/*/queue/scheduler ; do
echo "noop" > $i;
done;
for a in $blk0 $blk1 $MMC ; do
echo "512" > $a/queue/nr_requests;
done;
for k in $(busybox mount | grep relatime | cut -d " " -f3) ; do
sync
busybox mount -o remount,noatime $k
done
STL=`ls -d /sys/block/stl*`;
BML=`ls -d /sys/block/bml*`;
MMC=`ls -d /sys/block/mmc*`;
ZRM=`ls -d /sys/block/zram*`;
MTD=`ls -d /sys/block/mtd*`;
for i in $STL $BML $MMC $TFSR; do
echo 0 > $i/queue/rotational
echo 1 > $i/queue/iosched/low_latency
echo 1 > $i/queue/iosched/back_seek_penalty
echo 1000000000 > $i/queue/iosched/back_seek_max
echo 3 > $i/queue/iosched/slice_idle
echo 16 > $i/queue/iosched/quantum
echo 1 > $i/queue/iosched/fifo_batch
echo sio > $i/queue/scheduler
done
if [ -n ${up_threshold} ];
then echo ${up_threshold} > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold
fi
if [ -n ${sampling_rate} ];
then echo ${sampling_rate} > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate
fi
if [ -e /sys/module/lowmemorykiller/parameters/adj ]; then
echo "0,1,2,4,7,15" > /sys/module/lowmemorykiller/parameters/adj
fi
if [ -e /sys/module/lowmemorykiller/parameters/minfree ]; then
echo "2560,4096,6144,12288,14336,18432" > /sys/module/lowmemorykiller/parameters/minfree
fi
if [ -e /sys/devices/virtual/bdi/179:0/read_ahead_kb ]; then
echo "3072" > /sys/devices/virtual/bdi/179:0/read_ahead_kb
fi
echo "deadline" > /sys/block/mmcblk0/queue/scheduler
echo "0" > /sys/block/mmcblk0/queue/rotational
echo "2048" > /sys/block/mmcblk0/queue/nr_requests
echo ${READ_AHEAD_KB} > /sys/block/mmcblk0/queue/read_ahead_kb
echo "deadline" > /sys/block/mmcblk1/queue/scheduler
echo "0" > /sys/block/mmcblk1/queue/rotational
echo "2048" > /sys/block/mmcblk1/queue/nr_requests
echo ${READ_AHEAD_KB} > /sys/block/mmcblk1/queue/read_ahead_kb
for i in \ `find /data -iname "*.db"` do \ sqlite3
$i 'VACUUM;'
done
echo "6144 87380 524288" > /proc/sys/net/ipv4/tcp_wmem
echo "6144 87380 524288" > /proc/sys/net/ipv4/tcp_rmem
setprop ro.telephony.call_ring.delay 0
setprop ring.delay 0
setprop windowsmgr.support_rotation_270 true
setprop ro.HOME_APP_ADJ 1
setprop ro.HOME_APP_MEM 2048
echo "500" > /proc/sys/vm/dirty_expire_centisecs
echo "1000" > /proc/sys/vm/dirty_writeback_centisecs
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;
PhosgenKNZO
Code:
b="busybox"; _e () { echo "$1" > "$2"; };
_m () { $b mount -o $mop -t $fs $1 $2 > /dev/nul 2>&1; };
_t1 () { tune2fs -o $1 $2; }; _t2 () { tune2fs -O $1 $2; };
_mt () { mount -o rw -t tmpfs tmpfs /data/data/$1; };
qa="com.aurorasoftworks.quadrant.ui.standard";
qs="com.aurorasoftworks.quadrant.ui.advanced";
_e "Smartassv2" /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor;
for i in /sys/block/*/queue/scheduler; do sync; echo "sio" > /$i; done;
sd="/sys/devices/virtual/bdi";
_e "1024" $sd/179:0/read_ahead_kb; _e "1024" $sd/default/read_ahead_kb;
if [ -e "$sd/179:16/read_ahead_kb" ]; then _e "1024" $sd/179:16/read_ahead_kb; else _e "1024" $sd/179:17/read_ahead_kb; fi;
PhosgenLoopy
Code:
###### Loopy Smoothness Tweak for PhosgenMod (Experimental) #######
sleep 3
renice 18 `pidof kswapd0` # please give credit and thanks to loopy for this line if it works
##### Set nice levels for smoothness loop BEGIN #####
### Let's loop this in the background for a bit
for i in {1..20}
do
sleep 5
### Phone dialer app ###
renice -20 `pidof com.android.phone`
### Launcher apps ###
renice -20 `pidof com.sec.android.app.twlauncher` # TouchWiz Launcher
renice -20 `pidof org.adwfreak.launcher` # ADW Launcher Ex
renice -20 `pidof org.zeam.core` # Zeam launcher
### System apps ###
renice -19 `pidof com.android.mms` # Text message app
renice -19 `pidof com.swype.android.inputmethod` # Swype keyboard
renice -15 `pidof com.sec.android.app.controlpanel` # Task manager
renice -15 `pidof com.android.systemui` # Status bar
renice -9 `pidof com.android.settings` # Settings menu
renice -9 `pidof com.android.browser` # Browser app
renice -9 `pidof com.android.vending` # Market app
renice -20 `pidof com.sec.android.app.camera` # Camera app
renice -6 `pidof com.sec.android.app.fm` # FM Radio app
renice -6 `pidof com.google.android.youtube` # YouTube app
renice -6 `pidof com.google.android.apps.maps` # Maps
renice -3 `pidof android.process.acore`
renice -3 `pidof android.process.media`
### Memory management kernel thread ###
renice 19 `pidof kswapd0` # please give credit and thanks to loopy for this line if it works
done
PhosgenTouch
Code:
echo 7035 > /sys/class/touch/switch/set_touchscreen;
echo 8002 > /sys/class/touch/switch/set_touchscreen;
echo 11000 > /sys/class/touch/switch/set_touchscreen;
echo 13060 > /sys/class/touch/switch/set_touchscreen;
echo 14005 > /sys/class/touch/switch/set_touchscreen;
PhosgenTune
Code:
if [ -e /sys/class/misc/gpu_clock_control/gpu_control ]; then
echo "100 200 267" > /sys/class/misc/gpu_clock_control/gpu_control;
echo "85% 45% 85% 70%" > /sys/class/misc/gpu_clock_control/gpu_control;
#echo "800000 850000 950000" > /sys/devices/virtual/misc/gpu_voltage_control/gpu_control;
fi;
if [ -e /sys/devices/system/cpu/cpu0/cpufreq/UV_mV_table ]; then
#echo "1400 1300 1175 1075 975 850 825 825 " > /sys/devices/system/cpu/cpu0/cpufreq/UV_mV_table;
fi;
for i in \
`busybox find /data -iname "*.db"`;
do \
/system/xbin/sqlite3 $i 'VACUUM;';
/system/xbin/sqlite3 $i 'REINDEX;';
done;
if [ -d "/dbdata" ]; then
for i in \
`busybox find /dbdata -iname "*.db"`;
do \
/system/xbin/sqlite3 $i 'VACUUM;';
/system/xbin/sqlite3 $i 'REINDEX;';
done;
fi;
if [ -d "/datadata" ]; then
for i in \
`busybox find /datadata -iname "*.db"`;
do \
/system/xbin/sqlite3 $i 'VACUUM;';
/system/xbin/sqlite3 $i 'REINDEX;';
done;
fi;
for i in \
`busybox find /sdcard -iname "*.db"`;
do \
/system/xbin/sqlite3 $i 'VACUUM;';
/system/xbin/sqlite3 $i 'REINDEX;';
done;
if [ "`grep 'quadrant.*true' $p`" ]; then
echo "`date` Enabling Quadrant hack..." >>$LOG
dd="/data/data"
qs="com.aurorasoftworks.quadrant.ui.standard"
qa="com.aurorasoftworks.quadrant.ui.advanced"
if [ -d "$dd/$qs" ]; then mount -t tmpfs tmpfs $dd/$qs; renice -20 `pidof $qs`; fi
if [ -d "$dd/$qa" ]; then mount -t tmpfs tmpfs $dd/$qa; renice -20 `pidof $qa`; fi
mount |grep quadrant >>$LOG
fi
if [ -e /sys/devices/system/cpu/cpufreq/smartass/awake_ideal_freq ]; then
echo "800000" > /sys/devices/system/cpu/cpufreq/smartass/awake_ideal_freq;
if [ "`cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq`" -eq 200000 ]; then
echo "200000" > /sys/devices/system/cpu/cpufreq/smartass/sleep_ideal_freq;
else
echo "100000" > /sys/devices/system/cpu/cpufreq/smartass/sleep_ideal_freq;
fi;
echo "800000" > /sys/devices/system/cpu/cpufreq/smartass/sleep_wakeup_freq;
echo "85" > /sys/devices/system/cpu/cpufreq/smartass/max_cpu_load;
echo "75" > /sys/devices/system/cpu/cpufreq/smartass/min_cpu_load;
echo "200000" > /sys/devices/system/cpu/cpufreq/smartass/ramp_down_step;
echo "0" > /sys/devices/system/cpu/cpufreq/smartass/ramp_up_step;
fi;
XDA_Bam said:
Nice list.
I think ro.ril.disable.power.collapse should read
Code:
ro.ril.disable.power.collapse=0
because you want the power collapse to happen to save energy. Also, all commands should be lower case. Therefore it should be
Code:
debug.performance.tuning=1
video.accelerate.hw=1
with 'd' and 'v' instead of 'D' and 'V' at the beginning.
Further, I use
Code:
dalvik.vm.startheapsize=4m
which in my experience reduces RAM usage by approx. 15 MB on startup.
Click to expand...
Click to collapse
ro.ril.disable.power.collapse should be 1 to disable the power collapse
For collection of scripts and tweaks look here
send from gt-i9003 using android keyboard
sirilpta said:
For collection of scripts and tweaks look here
send from gt-i9003 using android keyboard
Click to expand...
Click to collapse
..Thanks!
TheFrankenstain said:
..Thanks!
Click to expand...
Click to collapse
in that link it is written
Code:
ro.ril.disable.power.collapse=0
The sense says it should be=1, so what do we use?
Another thing, we can't use all the build.prop lines of that link is this right?
Originally Posted by TheFrankenstain
..Thanks!
Click to expand...
Click to collapse
in that link it is written
ro.ril.disable.power.collapse=0
The sense says it should be=1, so what do we use?
Another thing, we can't use all the build.prop lines of that link is this right?
Click to expand...
Click to collapse
Just use the tweaks currently in the OP. I believe thefrankenstein will only state the tweaks that work.
Cheers
Sent from my GT-i9003 powered by MIUI
Nice work!
I'd changed the media builds yesterday, however, now i can't playing youtube's videos because when i press play button the Mobile become frigde and i only can to turn off pressing long the power button.
Can you give me thr factory status? I didn't a back up file :s
Thx!!
Enviado desde mi GT-I9003 usando Tapatalk
txitxo0 said:
Nice work!
I'd changed the media builds yesterday, however, now i can't playing youtube's videos because when i press play button the Mobile become frigde and i only can to turn off pressing long the power button.
Can you give me thr factory status? I didn't a back up file :s
Thx!!
Enviado desde mi GT-I9003 usando Tapatalk
Click to expand...
Click to collapse
When you edit build.prop, the phone automatically saves a build.prop.bak in the same location, just under your build.prop. Just rename it to build.prop and delete the bad one.
luiseteyo said:
When you edit build.prop, the phone automatically saves a build.prop.bak in the same location, just under your build.prop. Just rename it to build.prop and delete the bad one.
Click to expand...
Click to collapse
Thx a lot luiseteyo! I fell weird writing on english with you jaja
Enviado desde mi GT-I9003 usando Tapatalk

[Q] Faux kernel init.post_boot.sh customization

This is, i´m reeally noob, and do it just for fun and have muy sensation the way I like, so I want to know just the basics to do that.
Just added stock frequencies to init.post_boot.sh of faux kernel, and I wondering, how to control the transitions or steps of the frecuency scaling, I found this lines, but really don´t know if they will work. Some of them are already in my file. But I don´t know whats the function of sampling_rate, up_threshold, and sampling_down_factor, and if they will work on intellidemand governor.
echo 40000 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate
echo 40000 > /sys/devices/system/cpu/cpu1/cpufreq/ondemand/sampling_rate
echo "60000" > /sys/devices/system/cpu/cpu0/cpufreq/conservative/sampling_rate
echo "60000" > /sys/devices/system/cpu/cpu1/cpufreq/conservative/sampling_rate
echo 80 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold
echo 80 > /sys/devices/system/cpu/cpu1/cpufreq/ondemand/up_threshold
echo "95" > /sys/devices/system/cpu/cpu0/cpufreq/conservative/up_threshold
echo "95" > /sys/devices/system/cpu/cpu1/cpufreq/conservative/up_threshold
echo "1" > /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy
echo "2" > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
echo "20" > /sys/devices/system/cpu/cpufreq/ondemand/down_differential
chown system /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate
chown system /sys/devices/system/cpu/cpu1/cpufreq/ondemand/sampling_rate
echo "192000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo "192000" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
chown system /sys/devices/system/cpu/cpu0/online
chown system /sys/devices/system/cpu/cpu1/online
chown system /sys/power/perflock
Thanks!

[Q] Init.d problems

I'm trying to make a script for my kernel settings on boot but can't seem to get them to apply it only applies the GPU clock, the max frequency, and voltage table. The CPU boost speeds, the go hispeed load value, and my I/o settings don't however. Is there something I'm doing wrong? At the end of the script I even have a line for it to create a text file verifying that the script ran but it in fact does not. There is no other kernel apps set to run at boot, and I've tried editing a vomertweaks zip with my settings and it won't apply either. Can anyone give me some tips?
Code:
#!/system/bin/sh
# CPU
echo 1267200 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo 1267200 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
echo 1267200 > /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq
echo 1267200 > /sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq
# GPU
echo 330000000 > /sys/devices/fdb00000.qcom,kgsl-3d0/kgsl/kgsl-3d0/max_gpuclk
# CPU Boost
echo 1036800 > /sys/module/cpu_boost/parameters/input_boost_freq
echo 960000 > /sys/module/cpu_boost/parameters/sync_threshold
# Governor
echo 120000 > /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
echo 97 > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
echo 1190400 > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
echo 10000 > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
echo 93 > /sys/devices/system/cpu/cpufreq/interactive/target_loads
# Hotplug
echo 95 > /sys/devices/virtual/misc/mako_hotplug_control/load_threshold
# I/O Scheduler
echo row > /sys/block/mmcblk0/queue/scheduler
echo 1024 > /sys/block/mmcblk0/queue/read_ahead_kb
# Vibration
echo 20 > /sys/devices/virtual/timed_output/vibrator/vtg_level
# DISABLED:
# FSYNC System Call
#echo N > /sys/module/sync/parameters/fsync_enabled
#
# Voltage
echo "700 700 700 700 710 720 730 750 760 790 800 830 875 935 970" > /sys/devices/system/cpu/cpu0/cpufreq/UV_mV_table
#
echo " ~ franco Tweaks Applied! ~ " > /sdcard/FKU.txt;

Ideal Init for AOSP-based ROMs

I wrote this program because Android's init process on Qualcomm phones is absolutely terrible. It's full of things like the following hidden code segment:
Code:
if [ -f /sys/devices/soc0/soc_id ]; then
soc_id=`cat /sys/devices/soc0/soc_id`
else
soc_id=`cat /sys/devices/system/soc/soc0/id`
fi
if [ -f /sys/devices/f9967000.i2c/i2c-0/0-0072/enable_irq ]; then
echo 1 > /sys/devices/f9967000.i2c/i2c-0/0-0072/enable_irq
else
echo "doesn't find slimport enable_irq"
fi
case "$soc_id" in
"208" | "211" | "214" | "217" | "209" | "212" | "215" | "218" | "194" | "210" | "213" | "216")
for devfreq_gov in /sys/class/devfreq/qcom,cpubw*/governor
do
echo "cpubw_hwmon" > $devfreq_gov
done
echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo "interactive" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
echo "interactive" > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor
echo "interactive" > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor
#echo "20000 1400000:40000 1700000:20000" > /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
echo 90 > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
echo 1190400 > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
echo 1 > /sys/devices/system/cpu/cpufreq/interactive/io_is_busy
#echo "85 1500000:90 1800000:70" > /sys/devices/system/cpu/cpufreq/interactive/target_loads
echo 40000 > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
echo 20 > /sys/module/cpu_boost/parameters/boost_ms
#echo 1728000 > /sys/module/cpu_boost/parameters/sync_threshold
#echo 100000 > /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor
echo 1497600 > /sys/module/cpu_boost/parameters/input_boost_freq
echo 40 > /sys/module/cpu_boost/parameters/input_boost_ms
#Set LGE Interactive-Grid parameters for G3 models
echo "20000 1100000:40000 1500000:20000" > /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
echo "85 1500000:90" > /sys/devices/system/cpu/cpufreq/interactive/target_loads
echo 960000 > /sys/module/cpu_boost/parameters/sync_threshold
echo 0 > /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor
echo 1 > /sys/devices/system/cpu/cpufreq/interactive/is_grid
echo 40000 > /sys/devices/system/cpu/cpufreq/interactive/above_optimal_max_freq_delay
echo 960000 > /sys/devices/system/cpu/cpufreq/interactive/optimal_max_freq
echo 7 > /sys/devices/system/cpu/cpufreq/interactive/middle_grid_step
echo 37 > /sys/devices/system/cpu/cpufreq/interactive/middle_grid_load
echo 14 > /sys/devices/system/cpu/cpufreq/interactive/high_grid_step
echo 46 > /sys/devices/system/cpu/cpufreq/interactive/high_grid_load
echo 1000 > /sys/class/devfreq/g3-display.0/polling_interval
setprop ro.qualcomm.perf.cores_online 2
;;
*)
echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo "ondemand" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
echo "ondemand" > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor
echo "ondemand" > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor
echo 50000 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
echo 90 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
echo 1 > /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy
echo 2 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
echo 10 > /sys/devices/system/cpu/cpufreq/ondemand/down_differential
echo 70 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_multi_core
echo 3 > /sys/devices/system/cpu/cpufreq/ondemand/down_differential_multi_core
echo 960000 > /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq
echo 960000 > /sys/devices/system/cpu/cpufreq/ondemand/sync_freq
# even if scaling_max_freq go down because of themal mitigation, input_boost frequency does not go down.
# echo 1190400 > /sys/devices/system/cpu/cpufreq/ondemand/input_boost
echo 80 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_any_cpu_load
#Set LGE Ondemand-Grid parameters for msm8974aa
echo 960000 > /sys/devices/system/cpu/cpufreq/ondemand/optimal_max_freq
echo 7 > /sys/devices/system/cpu/cpufreq/ondemand/middle_grid_step
echo 40 > /sys/devices/system/cpu/cpufreq/ondemand/middle_grid_load
echo 14 > /sys/devices/system/cpu/cpufreq/ondemand/high_grid_step
echo 50 > /sys/devices/system/cpu/cpufreq/ondemand/high_grid_load
;;
esac
What is $soc_id equal to? Now we have to audit trail to see what and when $soc_id has been set to, which will open up another can of worms to see when it was initialized to, and what are the implications of having $soc_id set to a certain value, rather than another further down in the init process? Why can't we just extract all of the actual information to the boot process and leave the other junk (support for CPUs which are 5+ years old, unused features, etc) behind?
Enter Ideal Init. What Ideal Init is, consists of some changes to your device's stock kernel, and some changes to your device's stock ramdisk. Once you make the changes to the kernel and ramdisk, you create a boot.img with the new and updated kernel and ramdisk, and flash it to your device. The changes you just made to the kernel and ramdisk now allow the system calls made by your device's init.*.rc scripts and init shell scripts to be logged and dumped for later use.
From there you can dump your device's logs using the dmesg command, and run the ideal_init program on your computer to interpret these intercepted system calls and output a single valid init.<device>.rc. Then you can revert back to your original setup.
Basically, this program turns all of these init scripts and these init shell scripts and extracts only the information that was actually used in the boot process to create something like this
Check out the README for detailed instructions
https://github.com/JackpotClavin/Ideal-Init
Hope this helps the device bringup for future ROMs

Categories

Resources