[Samsung Epic 4G Touch] PhAkEer:
Haven't even had time to look at this to see what it does...

Found it in an unnamed folder in a backup..

If anybodies knows who's work this is please say so..

I'm only posting it to get it off of my work pc.. I'll look into it later.

#!/system/bin/sh
#
#

readdebug() {
DUAL_CORE_DEBUG=`cat /system/etc/dual_core/debug`
DUAL_CORE_DEBUG=${DUAL_CORE_DEBUG:=0}
}

log() {
if [ "$DUAL_CORE_DEBUG" = "1" ] ; then
echo "$(date): $@" >> /devlog/dual_core
fi
}

logcpu() {
if [ "$DUAL_CORE_DEBUG" = "1" ] ; then
local NOW_FREQ=`cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq`
local NOW=`cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq`
log "CPU[0]: scaling_max_freq=$NOW"
local NOW_ONLINE=`cat /sys/devices/system/cpu/cpu1/online`
log "CPU[1]: online=$NOW_ONLINE"
if [ -f /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq ] ; then
local NOW=`cat /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq`
log "CPU[1]: scaling_max_freq=$NOW"
fi
fi
}

init_dc_fs() {
sysrw
touch /devlog/dual_core ; chmod 777 /devlog/dual_core
touch /system/etc/dual_core/debug ; chmod 777 /system/etc/dual_core/debug
touch /system/etc/dual_core/sleep_frequency ; chmod 777 /system/etc/dual_core/sleep_frequency
touch /system/etc/dual_core/disable_sleep_freq ; chmod 777 /system/etc/dual_core/disable_sleep_freq
sysro
}

waitforwakeup() {
log "waitforwakeup{" ; logcpu
AWAKE=`cat /sys/power/wait_for_fb_wake`
if [ "$AWAKE" = "awake" ] ; then
CPU0_FREQ_AWAKE=${CPU0_FREQ_AWAKE:="$CPU0_FREQ_BOOT"}

log "Awake triggered... old awake is: $CPU0_FREQ_AWAKE"

log "CPU[1] try set online"
chmod 644 /sys/devices/system/cpu/cpu1/online
echo "1" > /sys/devices/system/cpu/cpu1/online
chmod 444 /sys/devices/system/cpu/cpu1/online
log "CPU[1] online"

if [ "$DISABLE_SLEEP" = "1" ] || [ "$OC_DAEMON" = "1" ] ; then
log "sleep cpu0 frequency mod disabled"
else
log "waking up from earlier sleep.. set to old awake frequency = $CPU0_FREQ_AWAKE"
echo "$CPU0_FREQ_AWAKE" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
fi

sleep 1
echo "$CPU0_FREQ_AWAKE" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq

chmod 644 /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
echo "ondemand" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
chmod 444 /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor

log "}wakeup" ; logcpu
fi
}

waitforsleep() {
log "waitforsleep{" ; logcpu
SLEEPING=`cat /sys/power/wait_for_fb_sleep`
if [ "$SLEEPING" = "sleeping" ] ; then
log "Sleep triggered..."
sleep_cpu0

log "CPU[1]: try set offline"
chmod 644 /sys/devices/system/cpu/cpu1/online
echo "0" > /sys/devices/system/cpu/cpu1/online
chmod 444 /sys/devices/system/cpu/cpu1/online
log "CPU[1]: offline"
fi
log "}waitforsleep" ; logcpu
}

sleep_cpu0() {
CPU0_FREQ_AWAKE=`cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq`
log "Sleeping, remember awake frequency: $CPU0_FREQ_AWAKE"

DISABLE_SLEEP=`cat /system/etc/dual_core/disable_sleep_freq`
if [ "$DISABLE_SLEEP" = "1" ] || [ "$OC_DAEMON" = "1" ] ; then
log "DISABLE_SLEEP=1 or OCD detected"
else
if [ -e /system/etc/dual_core/sleep_frequency ] ; then
SLEEP_FREQUENCY=`cat /system/etc/dual_core/sleep_frequency`
log "sleep_frequency setting found, using $SLEEP_FREQUENCY instead of $CPU0_FREQ_AWAKE"
fi
SLEEP_FREQUENCY=${SLEEP_FREQUENCY:=DEFAULT_SLEEP_FREQUENCY}
echo "$SLEEP_FREQUENCY" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
log "Set cpu0 frequency to $SLEEP_FREQUENCY"
fi
}

DEFAULT_SLEEP_FREQUENCY=192000

init_dc_fs

DUAL_CORE_DEBUG="1"
log "Starting..."; logcpu

if [ -f /system/etc/virtuous_oc/wake_max_freq ] ; then
OC_DAEMON=1
log "OC Daemon found."
fi

DISABLE_SLEEP=`cat /system/etc/dual_core/disable_sleep_freq`
CPU0_FREQ_BOOT=`cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq`

STATE=`cat /sys/power/state_onchg`
if [ "$STATE" = "chgoff" ] ; then
log "device is asleep, scaling down"
sleep_cpu0
fi

DUAL_CORE_DEBUG="0"

(while : ; do
waitforwakeup
readdebug

waitforsleep
readdebug
done &)

at a glance it looks like an extremely over complicated screenstate script....