Skip to content
Browse files

Merge pull request #2 from voku/master

pull request better / easier that cherry-pick? 
i prefer to cherry-pick, but if you insist :)
  • Loading branch information...
2 parents fadefa1 + b2a94d2 commit 4afcb41043096a951b66ec3674d839402887e01e @dorimanx dorimanx committed Nov 10, 2012
View
2 res/customconfig/actions/crontab
@@ -14,7 +14,7 @@ if [ "a$2" != "a" ]; then
echo "root:x:0:0::/data/crontab/cron:/sbin/sh" > /etc/passwd;
# set timezone
- timezone=`date +%:::z`;
+ timezone=`date +%z`;
timezone_name=`date +%Z`;
plus_zone=`echo ${timezone} | grep +`;
View
13 res/customconfig/actions/push-actions/time_update
@@ -0,0 +1,13 @@
+#!/sbin/busybox sh
+
+ TMPFILE=$(mktemp -t);
+
+ TESTCONNECTION=`wget http://www.google.com -O $TMPFILE &>/dev/null 2>&1`;
+ if [ $? != 0 ]; then
+ echo "Problem: no internet connection! connect and try again";
+ else
+ (
+ ntpd -n -q -p `cat /system/etc/gps.conf | grep NTP_SERVER | cut -f 2 -d "="`;
+ )&
+ echo "updated time via ntp";
+ fi;
View
6 res/customconfig/battery.profile
@@ -75,11 +75,11 @@ led_fadeout=on
led_on_touch=off
touchkey_brightness=2700
dyn_brightness=on
-crontab=on
-cron_drop_cache=on
+crontab=off
+cron_drop_cache=off
cron_clear_app_cache=off
cron_fix_permissions=off
-cron_zipaling=on
+cron_zipaling=off
logger=off
max_cpu_lock=2
adb_mode=0
View
2 res/customconfig/customconfig.xml
@@ -512,6 +512,8 @@
<button description="ZRAM check for active state" name="ZRAM STATS" action="push-actions/zramstats" label="ZRAM STATS"/>
+ <button description="Update time via ntp-server" name="UPDATE TIME" action="push-actions/time_update" label="UPDATE TIME"/>
+
<spinner description="GPS Time Zone for faster LOCK! Use your region to fix GPS location!" name="GPS Region" action="gpsregion">
<spinnerItem name="No GPS Zone changes (default)" value="No_GPS_Zone_changes"/>
<spinnerItem name="Set Asia" value="Asia"/>
View
6 res/customconfig/default.profile
@@ -75,11 +75,11 @@ led_fadeout=on
led_on_touch=off
touchkey_brightness=3000
dyn_brightness=off
-crontab=on
-cron_drop_cache=on
+crontab=off
+cron_drop_cache=off
cron_clear_app_cache=off
cron_fix_permissions=off
-cron_zipaling=on
+cron_zipaling=off
logger=off
max_cpu_lock=2
adb_mode=0
View
6 res/customconfig/extreme_battery.profile
@@ -75,11 +75,11 @@ led_fadeout=on
led_on_touch=off
touchkey_brightness=2700
dyn_brightness=on
-crontab=on
-cron_drop_cache=on
+crontab=off
+cron_drop_cache=off
cron_clear_app_cache=off
cron_fix_permissions=off
-cron_zipaling=on
+cron_zipaling=off
logger=off
max_cpu_lock=2
adb_mode=0
View
6 res/customconfig/extreme_performance.profile
@@ -75,11 +75,11 @@ led_fadeout=on
led_on_touch=off
touchkey_brightness=3000
dyn_brightness=off
-crontab=on
-cron_drop_cache=on
+crontab=off
+cron_drop_cache=off
cron_clear_app_cache=off
cron_fix_permissions=off
-cron_zipaling=on
+cron_zipaling=off
logger=off
max_cpu_lock=2
adb_mode=0
View
6 res/customconfig/performance.profile
@@ -75,11 +75,11 @@ led_fadeout=on
led_on_touch=off
touchkey_brightness=3000
dyn_brightness=on
-crontab=on
-cron_drop_cache=on
+crontab=off
+cron_drop_cache=off
cron_clear_app_cache=off
cron_fix_permissions=off
-cron_zipaling=on
+cron_zipaling=off
logger=off
max_cpu_lock=2
adb_mode=0
View
39 sbin/ext/cortexbrain-tune.sh
@@ -85,7 +85,7 @@ IO_TWEAKS()
fi;
if [ -e $i/queue/read_ahead_kb ]; then
- echo "2048" > $i/queue/read_ahead_kb; # default: 128
+ echo "1024" > $i/queue/read_ahead_kb; # default: 128
fi;
if [ -e $i/queue/nr_requests ]; then
@@ -107,12 +107,12 @@ IO_TWEAKS()
done;
if [ -e /sys/devices/virtual/bdi/default/read_ahead_kb ]; then
- echo "2048" > /sys/devices/virtual/bdi/default/read_ahead_kb;
+ echo "1024" > /sys/devices/virtual/bdi/default/read_ahead_kb;
fi;
SDCARDREADAHEAD=`ls -d /sys/devices/virtual/bdi/179*`;
for i in $SDCARDREADAHEAD; do
- echo "2048" > $i/read_ahead_kb;
+ echo "1024" > $i/read_ahead_kb;
done;
echo "10" > /proc/sys/fs/lease-break-time;
@@ -163,10 +163,10 @@ BATTERY_TWEAKS()
LEVEL=`cat /sys/class/power_supply/battery/capacity`;
CURR_ADC=`cat /sys/class/power_supply/battery/batt_current_adc`;
BATTFULL=`cat /sys/class/power_supply/battery/batt_full_check`;
- echo "*** LEVEL: $LEVEL - CUR: $CURR_ADC ***"
+ log -p i -t $FILE_NAME "*** BATTERY - LEVEL: $LEVEL - CUR: $CURR_ADC ***";
if [ "$LEVEL" == 100 ] && [ "$BATTFULL" == 1 ]; then
rm -f /data/system/batterystats.bin;
- echo "battery-calibration done ...";
+ log -p i -t $FILE_NAME "battery-calibration done ...";
fi;
if [ "$power_reduce" == on ]; then
@@ -239,22 +239,20 @@ MEGA_BOOST_CPU_TWEAKS()
# GPU utilization to min delay
echo "100" > /sys/module/mali/parameters/mali_gpu_utilization_timeout;
- # cpu-settings for second core online at booster time.
+ # cpu-settings for second core online at booster time
echo "15" > /sys/module/stand_hotplug/parameters/load_h0;
echo "15" > /sys/module/stand_hotplug/parameters/load_l1;
- # boost wakeup.
- if [ "$scaling_max_freq" \> 1100000 ]; then
- # Powering MAX FREQ
+ # boost wakeup
+ if [ "$scaling_max_freq" \> 1000000 ]; then
+ # powering MAX FREQ
echo "$scaling_max_freq" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq;
- # Powering MIN FREQ
- echo "1000000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq;
else
- # Powering MAX FREQ
+ # powering MAX FREQ
echo "1000000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq;
- # Powering MIN FREQ
- echo "1000000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq;
fi;
+ # powering MIN FREQ
+ echo "1000000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq;
log -p i -t $FILE_NAME "*** MEGA_BOOST_CPU_TWEAKS Mode ***";
fi;
@@ -620,7 +618,7 @@ WAKEUP_BOOST()
{
# check if ROM booting now, if yes, dont wait. creation and deletion of /data/.siyah/booting @> /sbin/ext/post-init.sh
if [ ! -e /data/.siyah/booting ] && [ "$wakeup_boost" != 0 ]; then
- log -p i -t $FILE_NAME "*** WAKEUP_BOOST Mode ***";
+ log -p i -t $FILE_NAME "*** WAKEUP_BOOST ${wakeup_boost}sec Mode ***";
sleep $wakeup_boost;
fi;
}
@@ -629,15 +627,15 @@ WAKEUP_DELAY()
{
# set wakeup booster delay to prevent mp3 music shattering when screen turned ON.
if [ "$wakeup_delay" != 0 ] && [ ! -e /data/.siyah/booting ]; then
- log -p i -t $FILE_NAME "*** WAKEUP_DELAY Mode ***";
+ log -p i -t $FILE_NAME "*** WAKEUP_DELAY ${wakeup_delay}sec Mode ***";
sleep $wakeup_delay
fi;
}
WAKEUP_DELAY_SLEEP()
{
if [ "$wakeup_delay" != 0 ] && [ ! -e /data/.siyah/booting ]; then
- log -p i -t $FILE_NAME "*** WAKEUP_DELAY_SLEEP Mode ***";
+ log -p i -t $FILE_NAME "*** WAKEUP_DELAY_SLEEP ${wakeup_delay}sec Mode ***";
sleep $wakeup_delay;
else
log -p i -t $FILE_NAME "*** WAKEUP_DELAY_SLEEP 3sec Mode ***";
@@ -663,12 +661,15 @@ AUTO_BRIGHTNESS()
SWAPPINESS()
{
# set swappiness in case that no root installed, and zram used or disk swap used
- SWAP_CHECK=`free | grep Swap | cut -c 18-18`;
+ SWAP_CHECK=`free | grep Swap | awk '{ print $2 }'`;
if [ "$zramtweaks" == 4 ] || [ "$SWAP_CHECK" == 0 ]; then
echo "0" > /proc/sys/vm/swappiness;
log -p i -t $FILE_NAME "*** SWAPPINESS Mode OFF ***";
else
- echo "60" > /proc/sys/vm/swappiness;
+ TOTAL_MEM=$(grep MemTotal /proc/meminfo | awk '{ print $2 }');
+ USED_MEM=$(grep AnonPages /proc/meminfo | awk '{ print $2 }');
+ RESULT_FOR_SWAPPINESS=$(($USED_MEM*100/$TOTAL_MEM));
+ echo "$RESULT_FOR_SWAPPINESS" > /proc/sys/vm/swappiness;
log -p i -t $FILE_NAME "*** SWAPPINESS Mode ON ***";
fi;
}

0 comments on commit 4afcb41

Please sign in to comment.
Something went wrong with that request. Please try again.