[Samsung Galaxy Nexus] büscher:
Hey guys

some months ago somebody asked about a init.d script for Fancy.

Because my new phone is stuck at Chinese boarders I still have to use my old one...

So I decided to only install apps that I really need and created a light version of my init.d script for Fancy. (It's really just altering numbers):

#!/system/bin/sh
# chmod -R 755 /system/etc/init.d

# wait for android os
until [ `pidof com.android.systemui` != "" ]; do
sleep 1
done;
sleep 20;

# 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;

#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# Set CPU frequencies
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

# Set Min Freq
echo "384000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo "384000" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq

# Set Max Freq
echo "1228800" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo "1228800" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq

# Screen Off Max Freq
echo "537600" > /sys/devices/system/cpu/cpu0/cpufreq/screen_off_max_freq
echo "537600" > /sys/devices/system/cpu/cpu1/cpufreq/screen_off_max_freq

# Screen On Min Freq
echo "384000" > /sys/devices/system/cpu/cpu0/cpufreq/screen_on_min_freq
echo "384000" > /sys/devices/system/cpu/cpu1/cpufreq/screen_on_min_freq

#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# Set CPU governor and tunables
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

# Set Interactive Governor
echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo "interactive" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor

# Set Governor Settings
chmod 664 /sys/devices/system/cpu/cpufreq/interactive/*
echo "20000" > /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
echo "85" > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
echo "1036800" > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
echo "20000" > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
echo "75" > /sys/devices/system/cpu/cpufreq/interactive/target_loads
echo "10000" > /sys/devices/system/cpu/cpufreq/interactive/timer_rate
echo "60000" > /sys/devices/system/cpu/cpufreq/interactive/timer_slack

#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# Set I/O governor and tunables
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

# Set sioplus as governor
echo "sioplus" > /sys/block/mmcblk0/queue/scheduler

# Set Read Ahead KB
echo "4096" > /sys/block/mmcblk0/queue/read_ahead_kb

# General I/0 Tunables
echo "0" > /sys/block/mmcblk0/queue/add_random
echo "0" > /sys/block/mmcblk0/queue/iostats
echo "1" > /sys/block/mmcblk0/queue/nomerges
echo "0" > /sys/block/mmcblk0/queue/rotational
echo "2" > /sys/block/mmcblk0/queue/rq_affinity

#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# Set TCP congestion control
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

# Set TCP Congestion Control to Westwood
/system/xbin/sysctl -w net.ipv4.tcp_congestion_control=westwood

#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# Set Colors
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

# Disable Safety
echo 0 > /sys/class/misc/colorcontrol/safety_enabled

# OMAP Gamma contrast
echo "0" > /sys/devices/platform/omapdss/manager0/gamma

# Contrast
echo "-14" > /sys/module/panel_s6e8aa0/parameters/contrast

# Gamma Offset (RED GREEN BLUE)
echo "-6 0 8" > /sys/class/misc/colorcontrol/v1_offset

# Color Multiplier (RED GREEN BLUE)
echo "2000000000 2000000000 2650000000" > /sys/class/misc/colorcontrol/multiplier

#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# Misc Settings
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

# Enable Content Adaptive Brightness
echo "1" > /sys/class/backlight/s6e8aa0/acl_set

# Enable Fast Charge
echo "1" > /sys/kernel/fast_charge/force_fast_charge

# OC GPU to 512MHz (1 for 384MHz / 0 for 307MHz)
echo "2" > /sys/devices/system/cpu/cpu0/cpufreq/gpu_oc
echo "2" > /sys/devices/system/cpu/cpu1/cpufreq/gpu_oc

# Set Headphone Volume Boost to 2 (0 to 3)
echo "2" > /sys/devices/virtual/misc/soundcontrol/volume_boost

# Set High Performance Sound to Enabled
echo "1" > /sys/class/misc/soundcontrol/highperf_enabled

# Disable Multicore Power Saving
echo "0" > /sys/devices/system/cpu/sched_mc_power_savings

# Set Vibrator Strength to 70 (0 to 127)
chmod 644 /sys/vibrator/pwmvalue
echo "70" > /sys/vibrator/pwmvalue

# Disable uksm (can cause battery drain)
echo "0" > /sys/kernel/mm/uksm/run

#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# Set Minfree Values
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

# Set minfree values
chmod 664 /sys/module/lowmemorykiller/parameters/minfree
#echo "6144,8192,12288,16384,24576,40960"> /sys/module/lowmemorykiller/parameters/minfree

Because I don't know the latest best minfree values I just commented those lines out. THX [MENTION=4793042]pkgnex[/MENTION]

The script should be self-explaining.

1. make a new text file without an ending

2. put it into /etc/init.d

3. chmod the file to 755