Init.D Scripts For Freedom Kernel
What is init.d support?
Init.D scripts only work with the latest versions of my Freedom Kernel in both Lite & Overclocked versions.
This thread will be for posting any init.d scripts and for troubleshooting them. There are many init.d scripts on the web. Just google these search terms, init.d tweaks or init.d scripts. You can tweak many aspects of the kernel and system with init.d scripts.
I wrote a script to get you started called 00cpu located in the new directory you will have after flashing the latest version of Freedom kernel (/system/etc/init.d). It will allow you to adjust the following...
- Governor
- CPU clock speed
- Scheduler
- Enable core 2 at all times
You can edit the script on your phone with a text editor like the one in root explorer or on a PC (PC recommended). You can tweak this script how you like, kind of like your own profile.
Here's a look at the script I wrote that's in your init.d folder. The things that are in green can be edited to your liking. Make sure to read the directions within the script (do not skip directions)...
#!/system/bin/sh
# CPU Tweak Init.D Script by GameTheory
#
# You can tweak your CPU with this script the same as with a CPU app, but this script is recommended. This gives direct CPU tuning without the need for a CPU app. This would eliminate all chances of bugs that would come from a CPU app like settings not sticking on boot etc etc.
#
# INSTRUCTIONS - You can change any value within the two (" ") signs. For further instructions read the top line for each block of lines. At the bottom of this script I will list all the Clock frequencies, schedulers, and governors that are available to you in Freedom Kernel.
## GOVERNOR
chmod 666 /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
chmod 444 /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
chmod 666 /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
echo "interactive" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
chmod 444 /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
## CLOCK MAX - Remove the (#) from next 6 lines to enable clock max control.
#chmod 666 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
#echo "1512000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
#chmod 444 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
#chmod 666 /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
#echo "1512000" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
#chmod 444 /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
## CLOCK MIN - Remove the (#) from next 6 lines to enable clock min control.
#chmod 666 /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
#echo "384000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
#chmod 444 /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
#chmod 666 /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
#echo "384000" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
#chmod 444 /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
## SCHEDULER - Remove the (#) from next 3 lines to enable scheduler control.
#chmod 666 /sys/block/mmcblk0/queue/scheduler
#echo "cfq" > /sys/block/mmcblk0/queue/scheduler
#chmod 644 /sys/block/mmcblk0/queue/scheduler
## CORE 2 - Remove the (#) from next 3 lines to enable 2nd core at all times.
#chmod 666 /sys/devices/system/cpu/cpu1/online
#echo "1" > /sys/devices/system/cpu/cpu1/online
#chmod 444 /sys/devices/system/cpu/cpu1/online
## All available clock frequencies for use in the lines above to set the clock min or max.
# 384000 432000 486000 540000 594000 648000 702000 756000 810000 864000 918000 972000 1026000 1080000 1134000 1188000 1242000 1296000 1350000 1404000 11458000 1512000 1600000 1700000 1800000
## All available governors for use in the lines above to set your default governor.
# msm-dcvs conservative ondemand userspace powersave interactive performance intellidemand smartassV2 superbad
## All available schedulers for use in the lines above to set your default scheduler.
# noop deadline cfq
# CPU Tweak Init.D Script by GameTheory
#
# You can tweak your CPU with this script the same as with a CPU app, but this script is recommended. This gives direct CPU tuning without the need for a CPU app. This would eliminate all chances of bugs that would come from a CPU app like settings not sticking on boot etc etc.
#
# INSTRUCTIONS - You can change any value within the two (" ") signs. For further instructions read the top line for each block of lines. At the bottom of this script I will list all the Clock frequencies, schedulers, and governors that are available to you in Freedom Kernel.
## GOVERNOR
chmod 666 /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
chmod 444 /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
chmod 666 /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
echo "interactive" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
chmod 444 /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
## CLOCK MAX - Remove the (#) from next 6 lines to enable clock max control.
#chmod 666 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
#echo "1512000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
#chmod 444 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
#chmod 666 /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
#echo "1512000" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
#chmod 444 /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
## CLOCK MIN - Remove the (#) from next 6 lines to enable clock min control.
#chmod 666 /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
#echo "384000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
#chmod 444 /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
#chmod 666 /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
#echo "384000" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
#chmod 444 /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
## SCHEDULER - Remove the (#) from next 3 lines to enable scheduler control.
#chmod 666 /sys/block/mmcblk0/queue/scheduler
#echo "cfq" > /sys/block/mmcblk0/queue/scheduler
#chmod 644 /sys/block/mmcblk0/queue/scheduler
## CORE 2 - Remove the (#) from next 3 lines to enable 2nd core at all times.
#chmod 666 /sys/devices/system/cpu/cpu1/online
#echo "1" > /sys/devices/system/cpu/cpu1/online
#chmod 444 /sys/devices/system/cpu/cpu1/online
## All available clock frequencies for use in the lines above to set the clock min or max.
# 384000 432000 486000 540000 594000 648000 702000 756000 810000 864000 918000 972000 1026000 1080000 1134000 1188000 1242000 1296000 1350000 1404000 11458000 1512000 1600000 1700000 1800000
## All available governors for use in the lines above to set your default governor.
# msm-dcvs conservative ondemand userspace powersave interactive performance intellidemand smartassV2 superbad
## All available schedulers for use in the lines above to set your default scheduler.
# noop deadline cfq
Note:
If your using a CPU app then it will override the init.d script. That is ok though, this allows you to use the CPU app along with the script if you choose.