[Android Software/Hacking General [Developers Only]] sid9922:
Here you go mate

Turkbey Tweak

#!/system/bin/sh

#

# S98nex-s_tweak for by nexxx

#

# Voodoo Color settings, will be applied if voodoo color kernel is installed

echo "2955346560" > /sys/class/misc/voodoo_color/red_multiplier

echo "2955346560" > /sys/class/misc/voodoo_color/green_multiplier

echo "4294967290" > /sys/class/misc/voodoo_color/blue_multiplier

# Set heapsize

setprop dalvik.vm.heapsize 70m;

# Increase UI responsiveness

setprop windowsmgr.max_events_per_sec 60;

# Increase wifi scan intervall

setprop wifi.supplicant_scan_interval 180;

# Render UI with GPU

setprop debug.sf.hw 1;

# Responsiveness Tweaks

setprop debug.performance.tuning 1;

setprop video.accelerate.hw 1;

# Store devices

MMC=`ls -d /sys/block/mmc*`;

# Set the cfq scheduler

for i in $MMC;

do

echo "cfq" > $i/queue/scheduler;

done;

# cfq scheduler optimizations

for i in $MMC;

do

if [ -e $i/queue/rotational ]; then

echo "0" > $i/queue/rotational

fi

if [ -e $i/queue/iosched/back_seek_penalty ]; then

echo "1" > $i/queue/iosched/back_seek_penalty

fi

if [ -e $i/queue/iosched/back_seek_max ]; then

echo "1000000000" > $i/queue/iosched/back_seek_max

fi

if [ -e $i/queue/iosched/low_latency ]; then

echo "1" > $i/queue/iosched/low_latency

fi

if [ -e $i/queue/iosched/slice_idle ]; then

echo "3" > $i/queue/iosched/slice_idle

fi

if [ -e $i/queue/iosched/quantum ]; then

echo "16" > $i/queue/iosched/quantum

fi

if [ -e $i/queue/nr_requests ]; then

echo "1024" > $i/queue/nr_requests

fi

if [ -e $i/queue/iostats ]; then

echo "0" > $k/queue/iostats

fi

if [ -e $i/queue/rq_affinity ]; then

echo "1" > $i/queue/rq_affinity

fi

done;

# Scheduler tweaks

if [ -e echo /proc/sys/kernel/sched_min_granularity_ns ]; then

echo "4000000" > /proc/sys/kernel/sched_min_granularity_ns

fi

if [ -e echo /proc/sys/kernel/sched_latency_ns ]; then

echo "8000000" > /proc/sys/kernel/sched_latency_ns

fi

if [ -e /proc/sys/kernel/sched_wakeup_granularity_ns ]; then

echo "1600000" > /proc/sys/kernel/sched_wakeup_granularity_ns

fi

if [ -e /proc/sys/kernel/sched_features ]; then

echo "24319" > /proc/sys/kernel/sched_features

fi

# Remount all partitions

busybox mount -o remount,noatime,nodev /system

busybox mount -o remount,noatime,noauto_da_alloc,nosuid,nodev /data

busybox mount -o remount,noatime,nosuid,nodev /cache

# TWEAKS: change read_ahead_kb cache-value for sd card

if [ -e /sys/devices/virtual/bdi/179:0/read_ahead_kb ]; then

/system/xbin/echo "2048" > /sys/devices/virtual/bdi/179:0/read_ahead_kb;

fi

if [ -e /sys/devices/virtual/bdi/default/read_ahead_kb ]; then

/system/xbin/echo "128" > /sys/devices/virtual/bdi/default/read_ahead_kb;

fi

# Governor Settings

if [ -e /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy ]; then

echo "1" > /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy

fi

if [ -e /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate ]; then

echo "30000" > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate

fi

if [ -e /sys/devices/system/cpu/cpu1/cpufreq/ondemand/sampling_rate ]; then

echo "30000" > /sys/devices/system/cpu/cpu1/cpufreq/ondemand/sampling_rate

fi

if [ -e /sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold ]; then

echo "75" > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold

fi

if [ -e /sys/devices/system/cpu/cpu1/cpufreq/ondemand/up_threshold ]; then

echo "75" > /sys/devices/system/cpu/cpu1/cpufreq/ondemand/up_threshold

fi

if [ -e /sys/devices/system/cpu/cpu0/cpufreq/conservative/sampling_rate ]; then

echo "60000" > /sys/devices/system/cpu/cpu0/cpufreq/conservative/sampling_rate

fi

if [ -e /sys/devices/system/cpu/cpu1/cpufreq/conservative/sampling_rate ]; then

echo "60000" > /sys/devices/system/cpu/cpu1/cpufreq/conservative/sampling_rate

fi

if [ -e /sys/devices/system/cpu/cpu0/cpufreq/conservative/up_threshold ]; then

echo "95" > /sys/devices/system/cpu/cpu0/cpufreq/conservative/up_threshold

fi

if [ -e /sys/devices/system/cpu/cpu1/cpufreq/conservative/up_threshold ]; then

echo "95" > /sys/devices/system/cpu/cpu1/cpufreq/conservative/up_threshold

fi

# VFS, VM settings

if [ -e /proc/sys/vm/swappiness ]; then

echo "0" > /proc/sys/vm/swappiness

fi

if [ -e /proc/sys/vm/page-cluster ]; then

echo "3" > /proc/sys/vm/page-cluster

fi

if [ -e /proc/sys/vm/vfs_cache_pressure ]; then

echo "50" > /proc/sys/vm/vfs_cache_pressure

fi

if [ -e /proc/sys/vm/dirty_writeback_centisecs ]; then

echo "500" > /proc/sys/vm/dirty_writeback_centisecs

fi

if [ -e /proc/sys/vm/dirty_expire_centisecs ]; then

echo "1000" > /proc/sys/vm/dirty_expire_centisecs

fi

if [ -e /proc/sys/vm/dirty_ratio ]; then

echo "90" > /proc/sys/vm/dirty_ratio

fi

if [ -e /proc/sys/vm/dirty_background_ratio ]; then

echo "5" > /proc/sys/vm/dirty_background_ratio

fi

# Network tweaks

if [ -e /proc/sys/net/ipv4/tcp_tw_reuse ]; then

echo "1" > /proc/sys/net/ipv4/tcp_tw_reuse

fi

if [ -e /proc/sys/net/ipv4/tcp_sack ]; then

echo "1" > /proc/sys/net/ipv4/tcp_sack

fi

if [ -e /proc/sys/net/ipv4/tcp_tw_recycle ]; then

echo "1" > /proc/sys/net/ipv4/tcp_tw_recycle

fi

if [ -e /proc/sys/net/ipv4/tcp_window_scaling ]; then

echo "1" > /proc/sys/net/ipv4/tcp_window_scaling

fi

if [ -e /proc/sys/net/ipv4/tcp_keepalive_probes ]; then

echo "5" > /proc/sys/net/ipv4/tcp_keepalive_probes

fi

if [ -e /proc/sys/net/ipv4/tcp_keepalive_intvl ]; then

echo "30" > /proc/sys/net/ipv4/tcp_keepalive_intvl

fi

if [ -e /proc/sys/net/ipv4/tcp_fin_timeout ]; then

echo "30" > /proc/sys/net/ipv4/tcp_fin_timeout

fi

# Memory Tweaks

if [ -e /proc/sys/vm/oom_kill_allocating_task ]; then

echo "1" > /proc/sys/vm/oom_kill_allocating_task

fi

if [ -e /proc/sys/vm/panic_on_oom ]; then

echo "0" > /proc/sys/vm/panic_on_oom

fi

if [ -e /proc/sys/kernel/panic_on_oops ]; then

echo "1" > /proc/sys/kernel/panic_on_oops

fi

if [ -e /proc/sys/kernel/panic ]; then

echo "0" > /proc/sys/kernel/panic

fi

if [ -e /sys/module/lowmemorykiller/parameters/minfree ]; then

echo "2560,4096,6144,12288,14336,18432" > /sys/module/lowmemorykiller/parameters/minfree

fi

# Optimize SQlite databases of apps

for i in \

`find /data -iname "*.db"`;

do \

sqlite3 $i 'VACUUM;';

done;

# Renice kswapd0 - kernel thread responsible for managing the memory

sleep 3

renice 18 `pidof kswapd0`

# Delete old, unused, orphaned scripts and files

busybox mount -o remount,rw /system

rm -Rf /etc/init.d/S90dualcore_init

rm -Rf /etc/init.d/dual_core

rm -Rf /etc/init.d/S70zipalign

rm -Rf /etc/init.d/S98nex-s_tweak

rm -Rf /etc/init.d/S98system_tweak

busybox mount -o remount,ro /system

# =========

# Changelog

# =========

# V0:	Initial Base from Zach

# V1:	Changed for SGS2

# V2: Added Kernel Tweaks

# Added Dualcore Scripts

# Added Network tweaks

# Changed Minfree Settings

# V3: Removed Dualcore Scripts

# Set CPU0 to ondemand

# Set CPU1 to performance

# Cleanup of old dualcore scripts

# Changed scriptnames

# V4: Removed Governors

# V5: Cleanup Buxfixing

# V6: Renamed Scripts to fit Oxygen

# V7: Added binaries and libs (thx EDT, Acid,...)

# V8: Added Scheduler Tweaks

# Added if conditions for more safety

# V9: Added OOM Grouping+Fixes

# Added Persistant Launcher

# V10: Render UI with GPU

# Optimized remount options

# build.prop responsiveness tweaks

# renice kswapd0 to 18

# Media quality tweaks

# Added Backups, needed for uninstall

# Refactored some bash

Tr8darky_zipalign

#!/system/bin/sh

# DarkyROM 2011

# Much faster zipalign.

# Changelog:

# 1.2 (17/1/11) Added /data/zipalign.db file for faster apk check (ninpo,Bo$s)

# 1.1 (12/1/09) Switched to zipalign -c 4 to check the apk instead of MD5 (oknowton)

# 1.0 (11/30/09) Original

LOG_FILE=/data/zipalign.log

ZIPALIGNDB=/data/zipalign.db

if [ -e $LOG_FILE ]; then

rm $LOG_FILE;

fi;

if [ ! -f $ZIPALIGNDB ]; then

touch $ZIPALIGNDB;

fi;

echo "Starting FV Automatic ZipAlign $( date +"%m-%d-%Y %H:%M:%S" )" | tee -a $LOG_FILE

for DIR in /system/app /data/app ; do

cd $DIR

for APK in *.apk ; do

if [ $APK -ot $ZIPALIGNDB ] && [ $(grep "$DIR/$APK" $ZIPALIGNDB|wc -l) -gt 0 ] ; then

echo "Already checked: $DIR/$APK" | tee -a $LOG_FILE

else

zipalign -c 4 $APK

if [ $? -eq 0 ] ; then

echo "Already aligned: $DIR/$APK" | tee -a $LOG_FILE

grep "$DIR/$APK" $ZIPALIGNDB > /dev/null || echo $DIR/$APK >> $ZIPALIGNDB

else

echo "Now aligning: $DIR/$APK" | tee -a $LOG_FILE

zipalign -f 4 $APK