Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

+ sync ...

  • Loading branch information...
commit a4873b89d950792ac37abd73d3b626b46ab063c0 1 parent b2a94d2
Lars Moelleken authored
Showing with 661 additions and 396 deletions.
  1. +1 −1  init.rc
  2. +1 −1  init.rc.2
  3. +1 −1  res/crontab/cron-scripts/clear-file-cache.sh
  4. +2 −2 res/crontab/cron-scripts/fix-perm.sh
  5. +7 −4 res/crontab/cron-scripts/zipaling.sh
  6. +34 −0 res/crontab/new_job.sh
  7. +27 −0 res/crontab_service/dm_job.sh
  8. +1 −0  res/crontab_service/ics/root
  9. +1 −0  res/crontab_service/root
  10. +59 −0 res/crontab_service/service.sh
  11. +3 −5 res/customconfig/actions/cortexbrain_background_process
  12. +33 −0 res/customconfig/actions/cpu-voltage
  13. +8 −44 res/customconfig/actions/crontab
  14. +2 −2 res/customconfig/actions/push-actions/ad_update
  15. +7 −0 res/customconfig/actions/push-actions/check_cpu_voltage
  16. +4 −4 res/customconfig/actions/push-actions/color_to_default
  17. +2 −3 res/customconfig/actions/push-actions/cortexbrain_background_process_check
  18. +7 −6 res/customconfig/actions/push-actions/crontab_log
  19. +19 −0 res/customconfig/actions/push-actions/crontab_reset
  20. +1 −1  res/customconfig/actions/push-actions/crontab_test
  21. +6 −5 res/customconfig/actions/push-actions/fix_wifi
  22. +4 −1 res/customconfig/actions/push-actions/gpszonecheck
  23. +50 −57 res/customconfig/actions/push-actions/root_install
  24. +3 −11 res/customconfig/actions/push-actions/stweaks_update
  25. +10 −10 res/customconfig/actions/push-actions/time_update
  26. +6 −3 res/customconfig/actions/push-actions/zipalign
  27. +10 −7 res/customconfig/actions/push-actions/zramstats
  28. +0 −6 res/customconfig/actions/zramtweaks
  29. +16 −5 res/customconfig/battery.profile
  30. +59 −24 res/customconfig/customconfig.xml
  31. +16 −5 res/customconfig/default.profile
  32. +16 −5 res/customconfig/extreme_battery.profile
  33. +20 −9 res/customconfig/extreme_performance.profile
  34. +19 −8 res/customconfig/performance.profile
  35. BIN  res/images/charger/battery_0.png
  36. BIN  res/images/charger/battery_1.png
  37. BIN  res/images/charger/battery_2.png
  38. BIN  res/images/charger/battery_3.png
  39. BIN  res/images/charger/battery_4.png
  40. BIN  res/images/charger/battery_5.png
  41. BIN  res/images/charger/battery_charge.png
  42. BIN  res/images/charger/battery_fail.png
  43. 0  res/images/icon_clockwork.png
  44. BIN  res/images/recovery-icon.png
  45. +1 −1  res/misc/B2G-ROM/init.rc
  46. +2 −2 res/misc/B2G-ROM/init.rc.2
  47. +1 −1  res/misc/CM-ROM/init.rc
  48. +1 −1  res/misc/JellyB-CM-AOKP/init.rc
  49. +1 −1  res/misc/Sense4All-ROM/init.s4a
  50. +1 −1  res/misc/Sense4All-ROM/init.s4a.2
  51. BIN  res/misc/payload/CWMManager.apk
  52. BIN  res/misc/payload/STweaks.apk
  53. BIN  res/misc/payload/SuperSU.apk
  54. BIN  res/misc/payload/ntfs-3g
  55. BIN  res/misc/payload/su
  56. BIN  res/misc/sql/ics/libsqlite.so
  57. BIN  res/misc/sql/jb/libsqlite.so
  58. BIN  res/misc/sql/jb/sqlite3
  59. BIN  res/misc/vendor/firmware/mfc_fw.bin
  60. BIN  sbin/adbd.jb
  61. BIN  sbin/busybox
  62. +113 −79 sbin/ext/cortexbrain-tune.sh
  63. +20 −38 sbin/ext/install.sh
  64. +13 −11 sbin/ext/post-init.sh
  65. +2 −2 sbin/ext/properties.sh
  66. +0 −1  sbin/ext/system_tune_on_init.sh
  67. +23 −26 sbin/init
  68. +1 −2  sbin/recovery-loader
  69. +23 −0 update-images-optimization.sh
  70. +4 −0 update-stweaks-md5.sh
View
2  init.rc
@@ -82,7 +82,7 @@ loglevel 3
mkdir /mnt/.lfs 0755 root root
write /proc/sys/kernel/panic_on_oops 0
- write /proc/sys/kernel/hung_task_timeout_secs 60
+ write /proc/sys/kernel/hung_task_timeout_secs 120
write /proc/sys/kernel/sched_latency_ns 10000000
write /proc/cpu/alignment 4
write /proc/sys/kernel/sched_compat_yield 1
View
2  init.rc.2
@@ -82,7 +82,7 @@ loglevel 3
mkdir /mnt/.lfs 0755 root root
write /proc/sys/kernel/panic_on_oops 0
- write /proc/sys/kernel/hung_task_timeout_secs 60
+ write /proc/sys/kernel/hung_task_timeout_secs 120
write /proc/sys/kernel/sched_latency_ns 10000000
write /proc/cpu/alignment 4
write /proc/sys/kernel/sched_compat_yield 1
View
2  res/crontab/cron-scripts/clear-file-cache.sh
@@ -20,7 +20,7 @@ if [ "$cron_clear_app_cache" == "on" ]; then
rm -f /data/tombstones/*;
rm -f /data/anr/*;
rm -f /data/system/dropbox/*;
- date > /data/crontab/cron-clear-file-cache;
+ date +%H:%M-%D-%Z > /data/crontab/cron-clear-file-cache;
echo "Done! Cleaned Apps Cache" >> /data/crontab/cron-clear-file-cache;
sync;
fi;
View
4 res/crontab/cron-scripts/fix-perm.sh
@@ -9,8 +9,8 @@ if [ "$cron_fix_permissions" == "on" ]; then
sleep 30;
done;
- /sbin/fix_permissions;
- date > /data/crontab/cron-fix_permissions;
+ /sbin/fix_permissions -l -r -v > /dev/null 2>&1;
+ date +%H:%M-%D-%Z > /data/crontab/cron-fix_permissions;
echo "Done! Fixed Apps Permissions" >> /data/crontab/cron-fix_permissions;
fi;
View
11 res/crontab/cron-scripts/zipaling.sh
@@ -17,6 +17,9 @@ if [ "$cron_zipaling" == "on" ]; then
echo "Starting zipalign, it's will take 2min to finish, please wait.";
sleep 3;
+ /sbin/busybox mount -o remount,rw /system;
+ /sbin/busybox mount -o remount,rw /data;
+
if [ -e /data/zipalign.log ]; then
rm -f /data/zipalign.log;
rm -f /data/zipalign.db;
@@ -25,9 +28,6 @@ if [ "$cron_zipaling" == "on" ]; then
LOG_FILE=/data/zipalign.log;
ZIPALIGNDB=/data/zipalign.db;
- /sbin/busybox mount -o remount,rw /system;
- /sbin/busybox mount -o remount,rw /data;
-
if [ ! -e /system/xbin/zipalign ]; then
cp /res/misc/zipalign /system/xbin/zipalign;
chmod 755 /system/xbin/zipalign;
@@ -66,8 +66,11 @@ if [ "$cron_zipaling" == "on" ]; then
touch $ZIPALIGNDB;
echo "Automatic ZipAlign finished at $( date +"%m-%d-%Y %H:%M:%S" )" | tee -a $LOG_FILE;
- date > /data/crontab/cron-zipaling;
+ date +%H:%M-%D-%Z > /data/crontab/cron-zipaling;
echo "Done! Zipalined All Apps" >> /data/crontab/cron-zipaling;
+ mv /data/local/*.apk /data/app/
+ chown system:system /data/app/*
+ chmod 644 /data/app/*
else
echo "ZipAlign already running, please wait.";
fi;
View
34 res/crontab/new_job.sh
@@ -0,0 +1,34 @@
+#!/sbin/busybox sh
+
+# Created By Dorimanx and Dairinin
+
+if [ "a$1" != "a" ] && [ -e /system/xbin/busybox ]; then
+ cron_localtime () {
+ local localtime=$1;
+ shift;
+ date -u --date=@$(date --date="$localtime" +%s) "+%-M %-H * * * $*";
+ }
+
+ plan_cron_job () {
+ local desired_time=$1;
+ shift;
+ local your_cron_job=$*;
+
+ local tmpfile=$(mktemp);
+ crontab -l > $tmpfile;
+ # edit it, for example, cut existing job with sed
+ sed -i "\~$your_cron_job~ d" $tmpfile;
+ cron_localtime $desired_time $your_cron_job >> $tmpfile;
+ crontab $tmpfile;
+ rm -f $tmpfile;
+ crontab -l;
+ }
+ plan_cron_job $1 $2
+else
+ if [ ! -e /system/xbin/busybox ]; then
+ echo "You dont have busybox that support cron service, update and try again";
+ else
+ echo "input time and script to run, example: "05:00" "/sbin/busybox sh YOUR SCRIPT PATH HERE" , this will run 'Your Script' at 05:00AM by cron";
+ fi;
+fi;
+
View
27 res/crontab_service/dm_job.sh
@@ -0,0 +1,27 @@
+#!/sbin/busybox sh
+
+# Created By Dorimanx and Dairinin
+
+if [ "a$1" != "a" ] && [ -e /system/xbin/busybox ]; then
+ cron_localtime () {
+ local localtime=$1;
+ shift;
+ date -u --date=@$(date --date="$localtime" +%s) "+%-M %-H * * * $*";
+ }
+
+ plan_cron_job () {
+ local desired_time=$1;
+ shift;
+ local your_cron_job=$*;
+
+ local tmpfile=$(mktemp);
+ crontab -l > $tmpfile;
+ # edit it, for example, cut existing job with sed
+ sed -i "\~$your_cron_job~ d" $tmpfile;
+ cron_localtime $desired_time $your_cron_job >> $tmpfile;
+ crontab $tmpfile;
+ rm -f $tmpfile;
+ }
+ plan_cron_job $1 $2
+fi;
+
View
1  res/crontab_service/ics/root
@@ -0,0 +1 @@
+# This file is at /var/spool/cron/crontabs/root
View
1  res/crontab_service/root
@@ -0,0 +1 @@
+# This file is at /system/etc/cron.d/crontabs/root
View
59 res/crontab_service/service.sh
@@ -0,0 +1,59 @@
+#!/sbin/busybox sh
+
+# Created By Dorimanx and Dairinin
+
+MIUI_JB=0;
+JELLY=0;
+[ "`grep -i cMIUI /system/build.prop`" ] && MIUI_JB=1;
+[ -f /system/lib/ssl/engines/libkeystore.so ] && JELLY=1;
+
+if [ "$MIUI_JB" == 1 ] || [ "$JELLY" == 1 ]; then
+ if [ ! -e /system/etc/cron.d/crontabs/root ]; then
+ mkdir -p /system/etc/cron.d/crontabs/;
+ chmod 777 /system/etc/cron.d/crontabs/;
+ cp -a /res/crontab_service/root /system/etc/cron.d/crontabs/;
+ fi;
+
+ chown 0:0 /system/etc/cron.d/crontabs/*;
+ chmod 777 /system/etc/cron.d/crontabs/*;
+ echo "root:x:0:0::/system/etc/cron.d/crontabs:/sbin/sh" > /etc/passwd;
+else
+ if [ ! -e /var/spool/cron/crontabs/root ]; then
+ mkdir -p /var/spool/cron/crontabs/;
+ chmod 777 /var/spool/cron/crontabs/;
+ cp -a /res/crontab_service/ics/root /var/spool/cron/crontabs/;
+ fi;
+
+ chown 0:0 /var/spool/cron/crontabs/*;
+ chmod 777 /var/spool/cron/crontabs/*;
+ echo "root:x:0:0::/var/spool/cron/crontabs:/sbin/sh" > /etc/passwd;
+fi;
+
+# set timezone
+TZ=UTC
+
+# set cron timezone
+export TZ
+
+#Set Permissions to scripts
+chown 0:0 /data/crontab/cron-scripts/*;
+chmod 777 /data/crontab/cron-scripts/*;
+
+# use /system/etc/cron.d/crontabs/ call the crontab file "root" for JB ROMS
+# use /var/spool/cron/crontabs/ call the crontab file "root" for ICS ROMS
+if [ -e /system/xbin/busybox ]; then
+ /sbin/busybox chmod 6755 /system/xbin/busybox;
+ if [ "$MIUI_JB" == 1 ] || [ "$JELLY" == 1 ]; then
+ nohup /system/xbin/busybox crond -c /system/etc/cron.d/crontabs/
+ else
+ nohup /system/xbin/busybox crond -c /var/spool/cron/crontabs/
+ fi;
+elif [ -e /system/bin/busybox ]; then
+ /sbin/busybox chmod 6755 /system/bin/busybox;
+ if [ "$MIUI_JB" == 1 ] || [ "$JELLY" == 1 ]; then
+ nohup /system/bin/busybox crond -c /system/etc/cron.d/crontabs/
+ else
+ nohup /system/xbin/busybox crond -c /var/spool/cron/crontabs/
+ fi;
+fi;
+
View
8 res/customconfig/actions/cortexbrain_background_process
@@ -16,14 +16,12 @@ case "${cortexbrain_background_process}" in
pkill -f "cat /sys/power/wait_for_fb_sleep";
pkill -f "cat /sys/power/wait_for_fb_wake";
sed -i "s/cortexbrain_background_process=[0-1]*/cortexbrain_background_process=0/g" /sbin/ext/cortexbrain-tune.sh;
- /sbin/busybox sh /sbin/ext/cortexbrain-tune.sh > /dev/null;
;;
1)
sed -i "s/cortexbrain_background_process=[0-1]*/cortexbrain_background_process=1/g" /sbin/ext/cortexbrain-tune.sh;
- pkill -f "/sbin/ext/cortexbrain-tune.sh";
- pkill -f "cat /sys/power/wait_for_fb_sleep";
- pkill -f "cat /sys/power/wait_for_fb_wake";
- /sbin/busybox sh /sbin/ext/cortexbrain-tune.sh > /dev/null;
+ if [ `pgrep -f "cortexbrain-tune.sh" | wc -l` == 0 ]; then
+ nohup /sbin/ext/cortexbrain-tune.sh > /dev/null 2>&1;
+ fi;
;;
*)
cortexbrain_background_process=1;
View
33 res/customconfig/actions/cpu-voltage
@@ -0,0 +1,33 @@
+#!/sbin/busybox sh
+
+PROFILE=`cat /data/.siyah/.active.profile`;
+. /data/.siyah/$PROFILE.profile;
+
+if [ "a$3" == "a" ]; then
+ evalcmd='eval "echo \$CPUVOLT$2"';
+ eval $evalcmd;
+else
+ evalcmd='eval "CPUVOLT$2=$3"';
+ eval $evalcmd;
+ evalcmd='eval "echo \$CPUVOLT$2"';
+ eval $evalcmd;
+
+ if [ "$cpu_voltage_switch" == on ]; then
+ echo "100000 $CPUVOLT12" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels;
+ echo "200000 $CPUVOLT11" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels;
+ echo "300000 $CPUVOLT10" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels;
+ echo "400000 $CPUVOLT9" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels;
+ echo "500000 $CPUVOLT8" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels;
+ echo "600000 $CPUVOLT7" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels;
+ echo "700000 $CPUVOLT6" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels;
+ echo "800000 $CPUVOLT5" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels;
+ echo "900000 $CPUVOLT4" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels;
+ echo "1000000 $CPUVOLT3" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels;
+ echo "1100000 $CPUVOLT2" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels;
+ echo "1200000 $CPUVOLT1" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels;
+ echo "1300000 1350" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels;
+ echo "1400000 1375" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels;
+ echo "1500000 1400" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels;
+ echo "1600000 1450" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels;
+ fi;
+fi;
View
52 res/customconfig/actions/crontab
@@ -8,52 +8,16 @@ if [ "a$2" != "a" ]; then
case "${crontab}" in
on)
- # Created By Dorimanx
+ # Created By Dorimanx and Dairinin
- # enable crond
- echo "root:x:0:0::/data/crontab/cron:/sbin/sh" > /etc/passwd;
+ # starting crontab service
+ if [ -e /system/xbin/busybox ] || [ /system/bin/busybox ]; then
+ /res/crontab_service/service.sh
- # set timezone
- timezone=`date +%z`;
- timezone_name=`date +%Z`;
-
- plus_zone=`echo ${timezone} | grep +`;
- minus_zone=`echo ${timezone} | grep -`;
-
- if [ "a$plus_zone" != "a" ]; then
- cronzone1=`echo ${plus_zone} | cut -c2-2`;
-
- if [ "$cronzone1" == "0" ]; then
- cronzone=`echo ${plus_zone} | cut -c3-3`;
- else
- cronzone=`echo ${plus_zone} | cut -c2-3`;
- fi;
- TZ=`echo "${timezone_name}-${cronzone}"`;
- fi;
-
- if [ "a$minus_zone" != "a" ]; then
- cronzone1=`echo ${minus_zone} | cut -c2-2`;
-
- if [ "$cronzone1" == "0" ]; then
- cronzone=`echo ${minus_zone} | cut -c3-3`;
- else
- cronzone=`echo ${minus_zone} | cut -c2-3`;
- fi;
- TZ=`echo "${timezone_name}+${cronzone}"`;
- fi;
-
- # set cron timezone
- export TZ
-
- #Set Permissions to scripts
- chown 0:0 /data/crontab/cron/*;
- chown 0:0 /data/crontab/cron-scripts/*;
- chmod 777 /data/crontab/cron/*;
- chmod 777 /data/crontab/cron-scripts/*;
- # use /data/crontab/cron/ call the crontab file "root"
- if [ -e /system/xbin/busybox ]; then
- /sbin/busybox chmod 6755 /system/xbin/busybox;
- /system/xbin/busybox crond -c /data/crontab/cron/
+ # setting my jobs with corrected timezone for all world.
+ /res/crontab_service/dm_job.sh "4:00" "/sbin/busybox sh /data/crontab/cron-scripts/clear-file-cache.sh"
+ /res/crontab_service/dm_job.sh "4:40" "/sbin/busybox sh /data/crontab/cron-scripts/fix-perm.sh"
+ /res/crontab_service/dm_job.sh "4:50" "/sbin/busybox sh /data/crontab/cron-scripts/zipaling.sh"
fi;
;;
off)
View
4 res/customconfig/actions/push-actions/ad_update
@@ -3,12 +3,12 @@
TMPFILE=$(mktemp -t);
HOST_FILE="/system/etc/hosts";
- TESTCONNECTION=`wget http://www.google.com -O $TMPFILE &>/dev/null 2>&1`;
+ 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
mount -o remount,rw /system
- wget http://winhelp2002.mvps.org/hosts.zip -O $TMPFILE &>/dev/null 2>&1;
+ wget http://winhelp2002.mvps.org/hosts.zip -O $TMPFILE > /dev/null 2>&1;
unzip -p $TMPFILE HOSTS > $HOST_FILE;
chmod 644 $HOST_FILE;
echo "AD Blocker: installed to /system/etc/hosts, reboot to use.";
View
7 res/customconfig/actions/push-actions/check_cpu_voltage
@@ -0,0 +1,7 @@
+#!/sbin/busybox sh
+
+(
+ CPU_VOT=`cat /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels`;
+ echo "$CPU_VOT";
+)&
+
View
8 res/customconfig/actions/push-actions/color_to_default
@@ -7,10 +7,10 @@ case "$2" in
1)
PROFILE=`cat /data/.siyah/.active.profile`;
echo "1" > /sys/devices/platform/samsung-pd.2/mdnie/mdnie/mdnie/user_mode;
- echo "130" > /sys/devices/platform/samsung-pd.2/mdnie/mdnie/mdnie/user_cb;
- echo "133" > /sys/devices/platform/samsung-pd.2/mdnie/mdnie/mdnie/user_cr;
- sed -i "s/user_cb=[0-9]*/user_cb=130/g" /data/.siyah/$PROFILE.profile;
- sed -i "s/user_cr=[0-9]*/user_cr=133/g" /data/.siyah/$PROFILE.profile;
+ echo "127" > /sys/devices/platform/samsung-pd.2/mdnie/mdnie/mdnie/user_cb;
+ echo "127" > /sys/devices/platform/samsung-pd.2/mdnie/mdnie/mdnie/user_cr;
+ sed -i "s/user_cb=[0-9]*/user_cb=127/g" /data/.siyah/$PROFILE.profile;
+ sed -i "s/user_cr=[0-9]*/user_cr=127/g" /data/.siyah/$PROFILE.profile;
echo "Color was set to default, reloading";
sleep 2
pkill -f "com.gokhanmoral.stweaks.app";
View
5 res/customconfig/actions/push-actions/cortexbrain_background_process_check
@@ -2,9 +2,8 @@
export PATH="/res/customconfig/actions/push-actions:${PATH}";
(
- CORTEX_CHECK=-1;
- CORTEX_CHECK=`pgrep -f "/sbin/busybox sh /sbin/ext/cortexbrain-tune.sh"`;
- if [ "1$CORTEX_CHECK" \> 10 ]; then
+ CORTEX_CHECK=`pgrep -f "/sbin/busybox sh /sbin/ext/cortexbrain-tune.sh" | wc -l`;
+ if [ "$CORTEX_CHECK" != 0 ]; then
echo "SERVICE ONLINE";
else
echo "SERVICE OFFLINE";
View
13 res/customconfig/actions/push-actions/crontab_log
@@ -3,21 +3,22 @@
if [ ! -e /data/crontab/cron-clear-file-cache ]; then
echo "no data" > /data/crontab/cron-clear-file-cache;
fi;
-cat /data/crontab/cron-clear-file-cache > /data/crontab/cron_log;
-echo "----------------------------" >> /data/crontab/cron_log;
if [ ! -e /data/crontab/cron-clear-ram-cache ]; then
echo "no data" > /data/crontab/cron-clear-ram-cache;
fi;
-cat /data/crontab/cron-clear-ram-cache >> /data/crontab/cron_log;
-echo "----------------------------" >> /data/crontab/cron_log;
if [ ! -e /data/crontab/cron-fix_permissions ]; then
echo "no data" > /data/crontab/cron-fix_permissions;
fi;
-cat /data/crontab/cron-fix_permissions >> /data/crontab/cron_log;
-echo "----------------------------" >> /data/crontab/cron_log;
if [ ! -e /data/crontab/cron-zipaling ]; then
echo "no data" > /data/crontab/cron-zipaling;
fi;
+chmod 777 /data/crontab/*
+cat /data/crontab/cron-clear-file-cache > /data/crontab/cron_log;
+echo "----------------------------" >> /data/crontab/cron_log;
+cat /data/crontab/cron-clear-ram-cache >> /data/crontab/cron_log;
+echo "----------------------------" >> /data/crontab/cron_log;
+cat /data/crontab/cron-fix_permissions >> /data/crontab/cron_log;
+echo "----------------------------" >> /data/crontab/cron_log;
cat /data/crontab/cron-zipaling >> /data/crontab/cron_log;
# push all to one log.
View
19 res/customconfig/actions/push-actions/crontab_reset
@@ -0,0 +1,19 @@
+#!/sbin/busybox sh
+
+(
+ rm -f /system/etc/cron.d/crontabs/*
+ rm -f /var/spool/cron/crontabs/*
+ rm -rf /data/crontab/
+ cp -a /res/crontab/ /data/
+ chmod 777 /data/crontab/ -R
+
+ CRON_STATUS=`pgrep -f "crond" | wc -l`
+ if [ "$CRON_STATUS" != 0 ]; then
+ pkill -f "crond"
+ /res/customconfig/actions/crontab crontab on
+ echo "Reset Done and CRON enabled"
+ fi;
+
+ echo "Reset Done!"
+)&
+
View
2  res/customconfig/actions/push-actions/crontab_test
@@ -1,7 +1,7 @@
#!/sbin/busybox sh
CRON_SERVICE=`pgrep -f "crond" | wc -l`;
-if [ "$CRON_SERVICE" == "1" ]; then
+if [ "$CRON_SERVICE" != 0 ]; then
echo "Service is ONLINE and supported";
else
echo "Service is OFFLINE or NOT supported";
View
11 res/customconfig/actions/push-actions/fix_wifi
@@ -1,8 +1,9 @@
#!/sbin/busybox sh
-svc wifi disable;
-rm -f /data/misc/dhcp/dhcpcd*;
-svc wifi enable;
-
-echo "WIFI Release Renew is DONE"
+(
+ svc wifi disable;
+ rm -f /data/misc/dhcp/dhcpcd*;
+ svc wifi enable;
+ echo "WIFI Release Renew is DONE"
+)&
View
5 res/customconfig/actions/push-actions/gpszonecheck
@@ -1,4 +1,7 @@
#!/sbin/busybox sh
-cat /system/etc/gps.conf
+(
+ GPS=`cat /system/etc/gps.conf`
+ echo "$GPS"
+)&
View
107 res/customconfig/actions/push-actions/root_install
@@ -3,76 +3,69 @@ export PATH="/res/customconfig/actions/push-actions:${PATH}";
(
if [ ! -e /system/xbin/su ]; then
- if [ ! -e /system/xbin/su ]; then
- # extract Payload with root files
- /sbin/busybox mount -o remount,rw /system;
- /sbin/busybox mount -o remount,rw /;
- /sbin/busybox chmod 755 /sbin/read_boot_headers;
- eval $(/sbin/read_boot_headers /dev/block/mmcblk0p5);
- load_offset=$boot_offset;
- load_len=$boot_len;
- cd /;
- dd bs=512 if=/dev/block/mmcblk0p5 skip=$load_offset count=$load_len | tar x;
+ BB=/sbin/busybox;
- # clean su traces
- /sbin/busybox rm -f /system/bin/su > /dev/null 2>&1;
- if [ ! -d /system/xbin ]; then
- /sbin/busybox mkdir /system/xbin;
- /sbin/busybox chmod 755 /system/xbin;
- fi;
+ # extract Payload with root files
+ $BB mount -o remount,rw /system;
+ $BB mount -o remount,rw /;
- # extract SU binary
- /sbin/busybox xzcat /res/misc/payload/su.xz > /system/xbin/su;
- /sbin/busybox chown root:root /system/xbin/su;
- /sbin/busybox chmod 6755 /system/xbin/su;
- /sbin/busybox ln -s /system/xbin/su /system/bin/su
+ # clean su traces
+ $BB rm -f /system/bin/su > /dev/null 2>&1;
+ if [ ! -d /system/xbin ]; then
+ $BB mkdir /system/xbin;
+ $BB chmod 755 /system/xbin;
+ fi;
- # clean super user old apps
- /sbin/busybox rm -f /system/app/Superuser.apk > /dev/null 2>&1;
- /sbin/busybox rm -f /system/app/SuperSU.apk > /dev/null 2>&1;
- /sbin/busybox rm -f /system/app/*uper?ser.apk > /dev/null 2>&1;
- /sbin/busybox rm -f /system/app/?uper?u.apk > /dev/null 2>&1;
- /sbin/busybox rm -f /system/app/*chainfire?supersu*.apk > /dev/null 2>&1;
+ # extract SU binary
+ $BB cp -a /res/misc/payload/su /system/xbin/su;
+ $BB chown root:root /system/xbin/su;
+ $BB chmod 6755 /system/xbin/su;
+ $BB ln -s /system/xbin/su /system/bin/su;
- /sbin/busybox rm -f /data/app/Superuse*.apk > /dev/null 2>&1;
- /sbin/busybox rm -f /data/app/*uper?ser.apk > /dev/null 2>&1;
- /sbin/busybox rm -f /data/app/?uper?u.apk > /dev/null 2>&1;
- /sbin/busybox rm -f /data/app/*chainfire?supersu*.apk > /dev/null 2>&1;
+ # clean super user old apps
+ $BB rm -f /system/app/Superuser.apk > /dev/null 2>&1;
+ $BB rm -f /system/app/SuperSU.apk > /dev/null 2>&1;
+ $BB rm -f /system/app/*uper?ser.apk > /dev/null 2>&1;
+ $BB rm -f /system/app/?uper?u.apk > /dev/null 2>&1;
+ $BB rm -f /system/app/*chainfire?supersu*.apk > /dev/null 2>&1;
- /sbin/busybox rm -rf /data/dalvik-cache/*uper?ser.apk* > /dev/null 2>&1;
- /sbin/busybox rm -rf /data/dalvik-cache/*chainfire?supersu*.apk* > /dev/null 2>&1;
+ $BB rm -f /data/app/Superuse*.apk > /dev/null 2>&1;
+ $BB rm -f /data/app/*uper?ser.apk > /dev/null 2>&1;
+ $BB rm -f /data/app/?uper?u.apk > /dev/null 2>&1;
+ $BB rm -f /data/app/*chainfire?supersu*.apk > /dev/null 2>&1;
- /sbin/busybox rm -rf /data/data/eu.chainfire.supersu > /dev/null 2>&1;
- /sbin/busybox rm -rf /data/data/com.noshufou.android.su > /dev/null 2>&1;
+ $BB rm -f /data/dalvik-cache/*uper?ser.apk* > /dev/null 2>&1;
+ $BB rm -f /data/dalvik-cache/*chainfire?supersu*.apk* > /dev/null 2>&1;
- # extract super user app
- /sbin/busybox xzcat /res/misc/payload/Superuser.apk.xz > /system/app/Superuser.apk;
- /sbin/busybox chown root:root /system/app/Superuser.apk;
- /sbin/busybox chmod 644 /system/app/Superuser.apk;
+ $BB rm -rf /data/data/eu.chainfire.supersu > /dev/null 2>&1;
+ $BB rm -rf /data/data/com.noshufou.android.su > /dev/null 2>&1;
- # restore witch if exist
- if [ -e /system/xbin/waswhich-bkp ]; then
- /sbin/busybox rm -f /system/xbin/which > /dev/null 2>&1;
- /sbin/busybox mv /system/xbin/waswhich-bkp /system/xbin/which > /dev/null 2>&1;
- /sbin/busybox chmod 755 /system/xbin/which > /dev/null 2>&1;
- fi;
+ # extract super user app
+ $BB cp -a /res/misc/payload/SuperSU.apk /system/app/SuperSU.apk;
+ $BB chown root:root /system/app/SuperSU.apk;
+ $BB chmod 644 /system/app/SuperSU.apk;
- if [ -e /system/xbin/boxman ]; then
- /sbin/busybox rm -f /system/xbin/busybox > /dev/null 2>&1;
- /sbin/busybox mv /system/xbin/boxman /system/xbin/busybox > /dev/null 2>&1;
- /sbin/busybox chmod 755 /system/xbin/busybox > /dev/null 2>&1;
- /sbin/busybox mv /system/bin/boxman /system/bin/busybox > /dev/null 2>&1;
- /sbin/busybox chmod 755 /system/bin/busybox > /dev/null 2>&1;
- fi;
+ # restore witch if exist
+ if [ -e /system/xbin/waswhich-bkp ]; then
+ $BB rm -f /system/xbin/which > /dev/null 2>&1;
+ $BB mv /system/xbin/waswhich-bkp /system/xbin/which > /dev/null 2>&1;
+ $BB chmod 755 /system/xbin/which > /dev/null 2>&1;
+ fi;
- # delete payload and kill superuser pid
- /sbin/busybox rm -rf /res/misc/payload;
- pkill -f "com.noshufou.android.su";
- pkill -f "eu.chinfire.supersu";
+ if [ -e /system/xbin/boxman ]; then
+ $BB rm -f /system/xbin/busybox > /dev/null 2>&1;
+ $BB mv /system/xbin/boxman /system/xbin/busybox > /dev/null 2>&1;
+ $BB chmod 755 /system/xbin/busybox > /dev/null 2>&1;
+ $BB mv /system/bin/boxman /system/bin/busybox > /dev/null 2>&1;
+ $BB chmod 755 /system/bin/busybox > /dev/null 2>&1;
fi;
+ # delete payload and kill superuser pid
+ pkill -f "com.noshufou.android.su";
+ pkill -f "eu.chinfire.supersu";
+ echo "App SuperSU was installed!, You have Full ROOT now!";
else
- echo "You have root installed already! first remove it.";
+ echo "You have ROOT installed already! first remove it.";
fi;
)&
View
14 res/customconfig/actions/push-actions/stweaks_update
@@ -3,29 +3,21 @@
(
BB="/sbin/busybox";
- $BB chmod 755 /sbin/read_boot_headers;
- eval $(/sbin/read_boot_headers /dev/block/mmcblk0p5);
- load_offset=$boot_offset;
- load_len=$boot_len;
- cd /;
- dd bs=512 if=/dev/block/mmcblk0p5 skip=$load_offset count=$load_len | tar x > /dev/null 2>&1;
-
- if [ -e /res/misc/payload/STweaks.apk.xz ]; then
+ if [ -e /res/misc/payload/STweaks.apk ]; then
rm -f /system/app/STweaks.apk > /dev/null 2>&1;
rm -f /data/app/com.gokhanmoral.*weak*.apk > /dev/null 2>&1;
rm -f /system/app/com.gokhanmoral.*weak*.apk > /dev/null 2>&1;
rm -rf /data/data/com.gokhanmoral.*weak* > /dev/null 2>&1;
rm -f /data/dalvik-cache/*gokhanmoral.*weak*.apk* > /dev/null 2>&1;
rm -f /cache/dalvik-cache/*gokhanmoral.*weak*.apk* > /dev/null 2>&1;
- $BB xzcat /res/misc/payload/STweaks.apk.xz > /system/app/STweaks.apk;
+ $BB cp -a /res/misc/payload/STweaks.apk /system/app/STweaks.apk;
$BB chown 0.0 /system/app/STweaks.apk;
$BB chmod 644 /system/app/STweaks.apk;
- rm -rf /res/misc/payload/;
pkill -f "com.gokhanmoral.stweaks.app";
sleep 2
am start -a android.intent.action.MAIN -n com.gokhanmoral.stweaks.app/.MainActivity;
else
- echo "payload is missing or code error!";
+ echo "STweaks is missing or code error!";
fi;
)&
View
20 res/customconfig/actions/push-actions/time_update
@@ -1,13 +1,13 @@
#!/sbin/busybox sh
- TMPFILE=$(mktemp -t);
+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;
+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
9 res/customconfig/actions/push-actions/zipalign
@@ -8,6 +8,9 @@ export PATH="/res/customconfig/actions/push-actions:${PATH}";
echo "Starting zipalign, it's will take 2min to finish, please wait.";
sleep 3;
+ /sbin/busybox mount -o remount,rw /system;
+ /sbin/busybox mount -o remount,rw /data;
+
if [ -e /data/zipalign.log ]; then
rm -f /data/zipalign.log;
rm -f /data/zipalign.db;
@@ -16,9 +19,6 @@ export PATH="/res/customconfig/actions/push-actions:${PATH}";
LOG_FILE=/data/zipalign.log;
ZIPALIGNDB=/data/zipalign.db;
- /sbin/busybox mount -o remount,rw /system;
- /sbin/busybox mount -o remount,rw /data;
-
if [ ! -e /system/xbin/zipalign ]; then
cp /res/misc/zipalign /system/xbin/zipalign;
chmod 755 /system/xbin/zipalign;
@@ -57,6 +57,9 @@ export PATH="/res/customconfig/actions/push-actions:${PATH}";
touch $ZIPALIGNDB;
echo "Automatic ZipAlign finished at $( date +"%m-%d-%Y %H:%M:%S" )" | tee -a $LOG_FILE;
+ mv /data/local/*.apk /data/app/
+ chown system:system /data/app/*
+ chmod 644 /data/app/*
else
echo "ZipAlign already running, please wait.";
fi;
View
17 res/customconfig/actions/push-actions/zramstats
@@ -1,11 +1,14 @@
#!/sbin/busybox sh
-if [ -e /system/xbin/bash ]; then
- /sbin/zram_stats_ex;
-elif [ -e /system/bin/bash ]; then
- /sbin/zram_stats_ex;
+PROFILE=`cat /data/.siyah/.active.profile`;
+. /data/.siyah/$PROFILE.profile;
+
+if [ "$zramtweaks" != 4 ]; then
+ if [ -e /system/xbin/bash ] || [ -e /system/bin/bash ]; then
+ /sbin/zram_stats_ex;
+ else
+ free;
+ fi;
else
- free;
- cat /proc/swaps;
+ echo "ZRAM IS OFFLINE";
fi;
-
View
6 res/customconfig/actions/zramtweaks
@@ -36,8 +36,6 @@ case "${zramtweaks}" in
mkswap /dev/block/zram1 >/dev/null;
mkswap /dev/block/zram2 >/dev/null;
# activating ZRAM swaps with the same priority to load balance ram swapping
- rm -f /sbin/swapon;
- /sbin/busybox xzcat /sbin/swapon-xz.xz > /sbin/swapon;
chmod 755 /sbin/swapon;
swapon /dev/block/zram0 -p 20 >/dev/null 2>&1;
swapon /dev/block/zram1 -p 20 >/dev/null 2>&1;
@@ -65,8 +63,6 @@ case "${zramtweaks}" in
mkswap /dev/block/zram0 >/dev/null;
mkswap /dev/block/zram1 >/dev/null;
mkswap /dev/block/zram2 >/dev/null;
- rm -f /sbin/swapon;
- /sbin/busybox xzcat /sbin/swapon-xz.xz > /sbin/swapon;
chmod 755 /sbin/swapon;
# activating ZRAM swaps with the same priority to load balance ram swapping
swapon /dev/block/zram0 -p 20 >/dev/null 2>&1;
@@ -95,8 +91,6 @@ case "${zramtweaks}" in
mkswap /dev/block/zram0 >/dev/null;
mkswap /dev/block/zram1 >/dev/null;
mkswap /dev/block/zram2 >/dev/null;
- rm -f /sbin/swapon;
- /sbin/busybox xzcat /sbin/swapon-xz.xz > /sbin/swapon;
chmod 755 /sbin/swapon;
# activating ZRAM swaps with the same priority to load balance ram swapping
swapon /dev/block/zram0 -p 20 >/dev/null 2>&1;
View
21 res/customconfig/battery.profile
@@ -7,12 +7,11 @@ load_h0=20
min_rq=2
load_rq=20
rate=100
-freq_min=800000
+freq_min=600000
GENTLE_FAIR_SLEEPERS=off
ARCH_POWER=on
-cpu_undervolting=+0
enable_mask=3
-sched_mc_power_savings=0
+sched_mc_power_savings=2
busfreq_up_threshold=80
scaling_max_suspend_freq=600000
scaling_min_suspend_freq=200000
@@ -20,6 +19,19 @@ deep_sleep=ondemand
standby_freq=200000
wakeup_delay=0
wakeup_boost=4
+cpu_voltage_switch=off
+CPUVOLT1=1300
+CPUVOLT2=1250
+CPUVOLT3=1200
+CPUVOLT4=1125
+CPUVOLT5=1075
+CPUVOLT6=1025
+CPUVOLT7=1000
+CPUVOLT8=975
+CPUVOLT9=975
+CPUVOLT10=975
+CPUVOLT11=950
+CPUVOLT12=925
mali_use_vpll=off
mali_gpu_utilization_timeout=150
GPUFREQ1=108
@@ -76,13 +88,11 @@ led_on_touch=off
touchkey_brightness=2700
dyn_brightness=on
crontab=off
-cron_drop_cache=off
cron_clear_app_cache=off
cron_fix_permissions=off
cron_zipaling=off
logger=off
max_cpu_lock=2
-adb_mode=0
supplicant_scan_interval=360
init_d=off
zramtweaks=4
@@ -98,6 +108,7 @@ install_root=on
cortexbrain_background_process=1
cortexbrain_auto_tweak_brightness=off
cortexbrain_auto_tweak_wifi=off
+cortexbrain_auto_tweak_wifi_sleep_delay=30
wifi_pwr=off
android_logger=auto
cortexbrain_firewall=on
View
83 res/customconfig/customconfig.xml
@@ -39,10 +39,10 @@
<spinnerItem name="sleepy" value="sleepy"/>
</spinner>
- <seekBar description="second core will be enabled when the load goes above this threshold, if you set above 24, and you have 800Mhz as MAX, second core will not turn ON!. if you set freq lower than 800Mhz Second core is DISABLED! (default is 23)"
+ <seekBar description="second core will be enabled when the load goes above this threshold, if you set above 24, and you have 800Mhz as MAX, second core will not turn ON!. if you set MAX CPU freq lower than 800Mhz Second core is DISABLED! (default is 20)"
name="load_h0" action="generic /sys/module/stand_hotplug/parameters/load_h0" unit="%" min="5" reversed="false" step="1" max="30"/>
- <seekBar description="second core will be disabled when the load goes below this threshold (default is 30)"
+ <seekBar description="second core will be disabled when the load goes below this threshold (default is 20)"
name="load_l1" action="generic /sys/module/stand_hotplug/parameters/load_l1" unit="%" min="5" reversed="false" step="1" max="50"/>
<seekBar description="(default is 2)"
@@ -73,17 +73,6 @@
<settingsPane description="Here you can set all the settings for power save!"
name="CPU Idle and Power Settings">
- <spinner description="Sets the CPU undervolting/overvolting value which will be set during boot time only. !ALERT! -100 and -75 can brake the boot or shutdown the CPU! 'SOD', So dont post about it if you stuck after messing with this control! It's will not have any effect until you restart your device. Remember: if you change this value and your device doesn't boot! you will have to reset stweaks settings using CWM recovery. This value will be applied to all CPU steps before any script or app execution. If you use any script or voltage control app this setting may be overridden by those."
- name="CPU Undervolting" action="generic /tmp/cpu_undervolting">
- <spinnerItem name=" +50 mV" value="+50"/>
- <spinnerItem name=" +25 mV" value="+25"/>
- <spinnerItem name="No UV/OV" value="+0"/>
- <spinnerItem name=" -25 mV" value="-25"/>
- <spinnerItem name=" -50 mV" value="-50"/>
- <spinnerItem name=" -75 mV" value="-75"/>
- <spinnerItem name="-100 mV" value="-100"/>
- </spinner>
-
<spinner description="Sets the CPU Idle Mode. for best stability use Idle + LPA"
name="CPU Idle Mode" action="generic /sys/module/cpuidle_exynos4/parameters/enable_mask">
<spinnerItem name="AFTR + LPA" value="3"/>
@@ -97,7 +86,7 @@
<seekBar description="This is for CPU BUS-FREQ UP-FREQ-Scaling, based on CPU load! default=80%"
name="busfreq_up_threshold" action="generic /sys/devices/system/cpu/cpufreq/busfreq_up_threshold"
- unit="%" min="20" reversed="false" step="1" max="90"/>
+ unit="%" min="23" reversed="false" step="1" max="90"/>
<seekBar description="Maximum DEEP SLEEP CPU Speed default is Kernel default 600000, Samsung Default 800000! too low freq will stuck your device!)"
name="scaling_max_suspend_freq" action="generic /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_suspend_freq"
@@ -135,6 +124,55 @@
</settingsTab>
+<settingsTab name="CPU VOLTAGE">
+
+ <settingsPane description="CPU Voltage Controls: Freq's Above 1200Mhz not allowed to be Under Volted via STweaks, Voltage Range is 850~1350mV lower/higher NOT SUPPORTED, all done to prevent BUGS and SODS, Use this interface On Your Own Risk! If you get SOD before you can load this interface and fix your error! reset profiles from recovery. and think harder before you SOD your CPU with too much UV!" name="CPU Voltage Controls">
+
+ <checkbox description="Main Switch for Voltage Control! if OFF all below setting have no effect! If you are using external App or Script to configure CPU Voltage dont enable this checkbox. dont start to mod voltage before you enable this switch! it's will not make any effect! you will have to set to defaults, and tune agan."
+ name="CPU Voltage Main Switch" action="generic_cortex /tmp/cpu_voltage_switch" label="CPU Voltage Main Switch"/>
+
+ <button description="Use this button to see CPU Voltage that used right now!" name="Check Active CPU Voltage" action="push-actions/check_cpu_voltage" label="Check CPU Voltage"/>
+
+ <seekBar description="CPU Voltage for 1200Mhz default 1300mV"
+ name="GPU Voltage 1200Mhz" action="cpu-voltage 1" unit="mV" min="1225" reversed="false" step="25" max="1350"/>
+
+ <seekBar description="CPU Voltage for 1100Mhz default 1250mV"
+ name="GPU Voltage 1100Mhz" action="cpu-voltage 2" unit="mV" min="1175" reversed="false" step="25" max="1300"/>
+
+ <seekBar description="CPU Voltage for 1000Mhz default 1200mV"
+ name="GPU Voltage 1000Mhz" action="cpu-voltage 3" unit="mV" min="1125" reversed="false" step="25" max="1250"/>
+
+ <seekBar description="CPU Voltage for 900Mhz default 1125mV"
+ name="GPU Voltage 900Mhz" action="cpu-voltage 4" unit="mV" min="1050" reversed="false" step="25" max="1175"/>
+
+ <seekBar description="CPU Voltage for 800Mhz default 1075mV"
+ name="GPU Voltage 800Mhz" action="cpu-voltage 5" unit="mV" min="1000" reversed="false" step="25" max="1125"/>
+
+ <seekBar description="CPU Voltage for 700Mhz default 1025mV"
+ name="GPU Voltage 700Mhz" action="cpu-voltage 6" unit="mV" min="950" reversed="false" step="25" max="1075"/>
+
+ <seekBar description="CPU Voltage for 600Mhz default 1000mV"
+ name="GPU Voltage 600Mhz" action="cpu-voltage 7" unit="mV" min="925" reversed="false" step="25" max="1050"/>
+
+ <seekBar description="CPU Voltage for 500Mhz default 975mV"
+ name="GPU Voltage 500Mhz" action="cpu-voltage 8" unit="mV" min="900" reversed="false" step="25" max="1025"/>
+
+ <seekBar description="CPU Voltage for 400Mhz default 975mV"
+ name="GPU Voltage 400Mhz" action="cpu-voltage 9" unit="mV" min="900" reversed="false" step="25" max="1025"/>
+
+ <seekBar description="CPU Voltage for 300Mhz default 975mV"
+ name="GPU Voltage 300Mhz" action="cpu-voltage 10" unit="mV" min="900" reversed="false" step="25" max="1025"/>
+
+ <seekBar description="CPU Voltage for 200Mhz default 950mV"
+ name="GPU Voltage 200Mhz" action="cpu-voltage 11" unit="mV" min="875" reversed="false" step="25" max="1000"/>
+
+ <seekBar description="CPU Voltage for 100Mhz default 925mV"
+ name="GPU Voltage 100Mhz" action="cpu-voltage 12" unit="mV" min="850" reversed="false" step="25" max="975"/>
+
+ </settingsPane>
+
+</settingsTab>
+
<settingsTab name="GPU">
<settingsPane description="GPU Frequency/voltage/steps/utilization Settings. Defaults frequencies are 108, 160, 200, 267 and 267. Voltage defaults are 900mV, 950mV, 1000mV, 1000mV and 1000mV." name="GPU Control">
@@ -442,8 +480,7 @@
<button description="Use this button to test if Cron Task Service is ONLINE and supported!, if main switch is ON, and service is OFFLINE, then ROM Busybox not supporting CRON, update Busybox or ROM." name="Test Cron Task Service" action="push-actions/crontab_test" label="Test Cron Task Service"/>
- <checkbox description="Cron Task to clear RAM cache every HOUR only if CPU is resting(IDLE)! this can improve stability and clean RAM from junk, and get it ready to be used"
- name="RAM Clean Task" action="generic_cortex /tmp/cron_drop_cache" label="RAM Clean Task Every Hour"/>
+ <button description="Use this button to RESET Cron scripts and jobs from kernel to refresh the config, This will clear all custom changes!" name="CRON Function Reset" action="push-actions/crontab_reset" label="Reset Cron Files"/>
<checkbox description="Cron Task to clear APP cache every 4:00AM only if CPU is resting(IDLE)! this can maintain free space on data partition, and clean all old junk."
name="DISK Clean Task" action="generic_cortex /tmp/cron_clear_app_cache" label="DISK Clean Task Every 4:00AM"/>
@@ -451,7 +488,7 @@
<checkbox description="Cron Task to FIX APPS Permissions every 4:40AM only if CPU is resting(IDLE)! this can help to reduce errors, bugs, and FC of Apps"
name="Permissions Fix Task" action="generic_cortex /tmp/cron_fix_permissions" label="Permissions Fix Task Every 4:40AM"/>
- <checkbox description="Cron Task to Zipaling all DATA APPS every 4:50AM only if CPU is resting(IDLE)! this can help to reduce errors, bugs, FC of Apps, and improve apps load speed."
+ <checkbox description="Cron Task to Zipaling all DATA APPS every 4:50AM only if CPU is resting(IDLE)! this can help to reduce errors, bugs, FC of Apps, and improve apps load speed. Do backup of all your apps before use! This process will remove Apps that BROKEN and not compressed or compiled correctly, so you may find some apps missing, use it in your own risk!, and update the broken Apps."
name="Zipaling Task" action="generic_cortex /tmp/cron_zipaling" label="Zipaling Task Every 4:50AM"/>
<button description="Use this button to check if Cron Task Jobs done as requested, this will show log for all finished jobs." name="Test Cron Task Jobs" action="push-actions/crontab_log" label="Test Cron Task Jobs"/>
@@ -473,7 +510,7 @@
<button description="Click here to start fixing." name="FIX PERMISSIONS" action="push-actions/fix_permissions" label="FIX PERMISSIONS"/>
- <button description="Click here to start Zipalign ONLY User apps, system may be unresponsive, it's OK, do not use phone for 2Min." name="ZIPALIGN" action="push-actions/zipalign" label="ZIPALIGN ALL APPS"/>
+ <button description="Click here to start Zipalign ONLY User apps, system may be unresponsive, it's OK, do not use phone for 2Min. Do backup of all your apps before use! This process will remove Apps that BROKEN and not compressed or compiled correctly, so you may find some apps missing, use it in your own risk!, and update the broken Apps." name="ZIPALIGN" action="push-actions/zipalign" label="ZIPALIGN ALL APPS"/>
<button description="Click here to start Apps DataBase's Optimization, compacting, cleaning and reindexing, will take 2min max." name="DB OPTIMIZATION" action="push-actions/database_optimizing" label="DATABASE OPTIMIZATON"/>
@@ -493,12 +530,6 @@
<checkbox description="Enable or Disable INIT.D scripts RUN on boot, many new ROMS running the init.d scripts by Auto, I also can force running the scripts, so if I run them and ROM run them, we have a problem! all scripts running X2 times, so my force RUN is Disabled by default. if you know that your ROM NOT supporting init.d script RUN, then turn it ON here and reboot.'set checkbox ON'"
name="INIT.D Scripts RUN control" action="generic /tmp/init_d" label="INIT.D scripts RUN control"/>
- <spinner description="This setting change normal full root ADB to DEV hacked not rooted ADB! that allow to use external apps to upload files and mod them inside the phone!, normal user not need it! DEV ADB is for developers only."
- name="ADB BINARY MODE" action="adb_mode">
- <spinnerItem name="Normal ADB" value="0"/>
- <spinnerItem name="Development ADB" value="1"/>
- </spinner>
-
<checkbox description="Enable or Disable Android Additional Logs (needs reboot)"
name="Android Logger" action="generic /tmp/logger" label="Android Logger"/>
@@ -635,6 +666,10 @@
<checkbox description="Enable or Disable the 'Wifi turns off while screen is off'-function. depend on Cortexbrain-Background-Process!"
name="Auto-Wifi" action="generic_cortex /tmp/cortexbrain_auto_tweak_wifi" label="Force Auto-Wifi"/>
+ <seekBar description="Here you can set delay before WIFI is fourced to OFF when screen is Off, Only if above tweak is Enabled! 'Force Auto-Wifi'"
+ name="WIFI Turn Off Delay in Sec" action="generic /tmp/cortexbrain_auto_tweak_wifi_sleep_delay"
+ unit="sec" min="0" reversed="false" step="30" max="300"/>
+
<!--checkbox description="Here you can Allow WIFI to use LOW PWR when Screen is OFF(when ON back to high PWR), if not set, we use HIGH PWR and get fast wifi transfers on screen OFF"
name="Wifi Low PWR Switch" action="generic_cortex /tmp/wifi_pwr" label="Wifi Low PWR"/-->
View
21 res/customconfig/default.profile
@@ -3,14 +3,13 @@ scaling_min_freq=200000
smooth_level0=14
scaling_governor=HYPER
load_l1=20
-load_h0=23
+load_h0=20
min_rq=2
load_rq=20
rate=100
-freq_min=800000
+freq_min=600000
GENTLE_FAIR_SLEEPERS=off
ARCH_POWER=on
-cpu_undervolting=+0
enable_mask=3
sched_mc_power_savings=0
busfreq_up_threshold=80
@@ -20,6 +19,19 @@ deep_sleep=ondemand
standby_freq=200000
wakeup_delay=0
wakeup_boost=4
+cpu_voltage_switch=off
+CPUVOLT1=1300
+CPUVOLT2=1250
+CPUVOLT3=1200
+CPUVOLT4=1125
+CPUVOLT5=1075
+CPUVOLT6=1025
+CPUVOLT7=1000
+CPUVOLT8=975
+CPUVOLT9=975
+CPUVOLT10=975
+CPUVOLT11=950
+CPUVOLT12=925
mali_use_vpll=off
mali_gpu_utilization_timeout=150
GPUFREQ1=108
@@ -76,13 +88,11 @@ led_on_touch=off
touchkey_brightness=3000
dyn_brightness=off
crontab=off
-cron_drop_cache=off
cron_clear_app_cache=off
cron_fix_permissions=off
cron_zipaling=off
logger=off
max_cpu_lock=2
-adb_mode=0
supplicant_scan_interval=120
init_d=off
zramtweaks=4
@@ -98,6 +108,7 @@ install_root=on
cortexbrain_background_process=1
cortexbrain_auto_tweak_brightness=off
cortexbrain_auto_tweak_wifi=off
+cortexbrain_auto_tweak_wifi_sleep_delay=30
wifi_pwr=off
android_logger=auto
cortexbrain_firewall=on
View
21 res/customconfig/extreme_battery.profile
@@ -7,12 +7,11 @@ load_h0=20
min_rq=2
load_rq=20
rate=100
-freq_min=800000
+freq_min=600000
GENTLE_FAIR_SLEEPERS=off
ARCH_POWER=on
-cpu_undervolting=-25
enable_mask=3
-sched_mc_power_savings=0
+sched_mc_power_savings=2
busfreq_up_threshold=80
scaling_max_suspend_freq=600000
scaling_min_suspend_freq=200000
@@ -20,6 +19,19 @@ deep_sleep=ondemand
standby_freq=200000
wakeup_delay=0
wakeup_boost=4
+cpu_voltage_switch=on
+CPUVOLT1=1250
+CPUVOLT2=1225
+CPUVOLT3=1175
+CPUVOLT4=1100
+CPUVOLT5=1050
+CPUVOLT6=1000
+CPUVOLT7=975
+CPUVOLT8=950
+CPUVOLT9=950
+CPUVOLT10=950
+CPUVOLT11=925
+CPUVOLT12=900
mali_use_vpll=off
mali_gpu_utilization_timeout=150
GPUFREQ1=108
@@ -76,13 +88,11 @@ led_on_touch=off
touchkey_brightness=2700
dyn_brightness=on
crontab=off
-cron_drop_cache=off
cron_clear_app_cache=off
cron_fix_permissions=off
cron_zipaling=off
logger=off
max_cpu_lock=2
-adb_mode=0
supplicant_scan_interval=360
init_d=off
zramtweaks=4
@@ -98,6 +108,7 @@ install_root=on
cortexbrain_background_process=1
cortexbrain_auto_tweak_brightness=off
cortexbrain_auto_tweak_wifi=off
+cortexbrain_auto_tweak_wifi_sleep_delay=30
wifi_pwr=off
android_logger=auto
cortexbrain_firewall=on
View
29 res/customconfig/extreme_performance.profile
@@ -3,23 +3,35 @@ scaling_min_freq=200000
smooth_level0=4
scaling_governor=HYPER
load_l1=20
-load_h0=23
+load_h0=20
min_rq=2
load_rq=20
rate=100
-freq_min=800000
+freq_min=600000
GENTLE_FAIR_SLEEPERS=off
ARCH_POWER=on
-cpu_undervolting=+0
enable_mask=3
sched_mc_power_savings=0
-busfreq_up_threshold=20
+busfreq_up_threshold=23
scaling_max_suspend_freq=600000
scaling_min_suspend_freq=200000
deep_sleep=ondemand
standby_freq=200000
wakeup_delay=0
wakeup_boost=5
+cpu_voltage_switch=off
+CPUVOLT1=1300
+CPUVOLT2=1250
+CPUVOLT3=1200
+CPUVOLT4=1125
+CPUVOLT5=1075
+CPUVOLT6=1025
+CPUVOLT7=1000
+CPUVOLT8=975
+CPUVOLT9=975
+CPUVOLT10=975
+CPUVOLT11=950
+CPUVOLT12=925
mali_use_vpll=off
mali_gpu_utilization_timeout=100
GPUFREQ1=108
@@ -75,14 +87,12 @@ led_fadeout=on
led_on_touch=off
touchkey_brightness=3000
dyn_brightness=off
-crontab=off
-cron_drop_cache=off
-cron_clear_app_cache=off
+crontab=on
+cron_clear_app_cache=on
cron_fix_permissions=off
-cron_zipaling=off
+cron_zipaling=on
logger=off
max_cpu_lock=2
-adb_mode=0
supplicant_scan_interval=60
init_d=off
zramtweaks=3
@@ -98,6 +108,7 @@ install_root=on
cortexbrain_background_process=1
cortexbrain_auto_tweak_brightness=off
cortexbrain_auto_tweak_wifi=off
+cortexbrain_auto_tweak_wifi_sleep_delay=30
wifi_pwr=off
android_logger=auto
cortexbrain_firewall=on
View
27 res/customconfig/performance.profile
@@ -3,14 +3,13 @@ scaling_min_freq=200000
smooth_level0=14
scaling_governor=HYPER
load_l1=20
-load_h0=23
+load_h0=20
min_rq=2
load_rq=20
rate=100
-freq_min=800000
+freq_min=600000
GENTLE_FAIR_SLEEPERS=off
ARCH_POWER=on
-cpu_undervolting=+0
enable_mask=3
sched_mc_power_savings=0
busfreq_up_threshold=80
@@ -20,6 +19,19 @@ deep_sleep=ondemand
standby_freq=200000
wakeup_delay=0
wakeup_boost=5
+cpu_voltage_switch=off
+CPUVOLT1=1300
+CPUVOLT2=1250
+CPUVOLT3=1200
+CPUVOLT4=1125
+CPUVOLT5=1075
+CPUVOLT6=1025
+CPUVOLT7=1000
+CPUVOLT8=975
+CPUVOLT9=975
+CPUVOLT10=975
+CPUVOLT11=950
+CPUVOLT12=925
mali_use_vpll=off
mali_gpu_utilization_timeout=150
GPUFREQ1=108
@@ -75,14 +87,12 @@ led_fadeout=on
led_on_touch=off
touchkey_brightness=3000
dyn_brightness=on
-crontab=off
-cron_drop_cache=off
-cron_clear_app_cache=off
+crontab=on
+cron_clear_app_cache=on
cron_fix_permissions=off
-cron_zipaling=off
+cron_zipaling=on
logger=off
max_cpu_lock=2
-adb_mode=0
supplicant_scan_interval=120
init_d=off
zramtweaks=4
@@ -98,6 +108,7 @@ install_root=on
cortexbrain_background_process=1
cortexbrain_auto_tweak_brightness=off
cortexbrain_auto_tweak_wifi=off
+cortexbrain_auto_tweak_wifi_sleep_delay=30
wifi_pwr=off
android_logger=auto
cortexbrain_firewall=on
View
BIN  res/images/charger/battery_0.png 100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  res/images/charger/battery_1.png 100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  res/images/charger/battery_2.png 100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  res/images/charger/battery_3.png 100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  res/images/charger/battery_4.png 100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  res/images/charger/battery_5.png 100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  res/images/charger/battery_charge.png 100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  res/images/charger/battery_fail.png 100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0  res/images/icon_clockwork.png 100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  res/images/recovery-icon.png 100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
2  res/misc/B2G-ROM/init.rc
@@ -87,7 +87,7 @@ loglevel 3
mkdir /mnt/.lfs 0755 root root
write /proc/sys/kernel/panic_on_oops 0
- write /proc/sys/kernel/hung_task_timeout_secs 60
+ write /proc/sys/kernel/hung_task_timeout_secs 120
write /proc/sys/kernel/sched_latency_ns 10000000
write /proc/cpu/alignment 4
write /proc/sys/kernel/sched_compat_yield 1
View
4 res/misc/B2G-ROM/init.rc.2
@@ -86,7 +86,7 @@ loglevel 3
mkdir /mnt/.lfs 0755 root root
write /proc/sys/kernel/panic_on_oops 0
- write /proc/sys/kernel/hung_task_timeout_secs 60
+ write /proc/sys/kernel/hung_task_timeout_secs 120
write /proc/sys/kernel/sched_latency_ns 10000000
write /proc/cpu/alignment 4
write /proc/sys/kernel/sched_compat_yield 1
@@ -905,4 +905,4 @@ on property:sysimg.gonk=1
start servicemanager
start surfaceflinger
start TvoutService_C
- class_start b2g
+ class_start b2g
View
2  res/misc/CM-ROM/init.rc
@@ -76,7 +76,7 @@ loglevel 3
mkdir /mnt/.lfs 0755 root root
write /proc/sys/kernel/panic_on_oops 0
- write /proc/sys/kernel/hung_task_timeout_secs 60
+ write /proc/sys/kernel/hung_task_timeout_secs 120
write /proc/sys/kernel/sched_latency_ns 10000000
write /proc/cpu/alignment 4
write /proc/sys/kernel/sched_compat_yield 1
View
2  res/misc/JellyB-CM-AOKP/init.rc
@@ -79,7 +79,7 @@ loglevel 3
mount tmpfs tmpfs /mnt/obb mode=0755,gid=1000
write /proc/sys/kernel/panic_on_oops 0
- write /proc/sys/kernel/hung_task_timeout_secs 60
+ write /proc/sys/kernel/hung_task_timeout_secs 120
write /proc/sys/kernel/sched_latency_ns 10000000
write /proc/cpu/alignment 4
write /proc/sys/kernel/sched_compat_yield 1
View
2  res/misc/Sense4All-ROM/init.s4a
@@ -84,7 +84,7 @@ loglevel 3
mkdir /mnt/.lfs 0755 root root
write /proc/sys/kernel/panic_on_oops 0
- write /proc/sys/kernel/hung_task_timeout_secs 60
+ write /proc/sys/kernel/hung_task_timeout_secs 120
write /proc/sys/kernel/sched_latency_ns 10000000
write /proc/cpu/alignment 4
write /proc/sys/kernel/sched_compat_yield 1
View
2  res/misc/Sense4All-ROM/init.s4a.2
@@ -84,7 +84,7 @@ loglevel 3
mkdir /mnt/.lfs 0755 root root
write /proc/sys/kernel/panic_on_oops 0
- write /proc/sys/kernel/hung_task_timeout_secs 60
+ write /proc/sys/kernel/hung_task_timeout_secs 120
write /proc/sys/kernel/sched_latency_ns 10000000
write /proc/cpu/alignment 4
write /proc/sys/kernel/sched_compat_yield 1
View
BIN  res/misc/payload/CWMManager.apk
Binary file not shown
View
BIN  res/misc/payload/STweaks.apk
Binary file not shown
View
BIN  res/misc/payload/SuperSU.apk
Binary file not shown
View
BIN  res/misc/payload/ntfs-3g
Binary file not shown
View
BIN  res/misc/payload/su
Binary file not shown
View
BIN  res/misc/sql/ics/libsqlite.so
Binary file not shown
View
BIN  res/misc/sql/jb/libsqlite.so
Binary file not shown
View
BIN  res/misc/sql/jb/sqlite3
Binary file not shown
View
BIN  res/misc/vendor/firmware/mfc_fw.bin
Binary file not shown
View
BIN  sbin/adbd.jb
Binary file not shown
View
BIN  sbin/busybox
Binary file not shown
View
192 sbin/ext/cortexbrain-tune.sh
@@ -85,7 +85,7 @@ IO_TWEAKS()
fi;
if [ -e $i/queue/read_ahead_kb ]; then
- echo "1024" > $i/queue/read_ahead_kb; # default: 128
+ echo "2048" > $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 "1024" > /sys/devices/virtual/bdi/default/read_ahead_kb;
+ echo "2048" > /sys/devices/virtual/bdi/default/read_ahead_kb;
fi;
SDCARDREADAHEAD=`ls -d /sys/devices/virtual/bdi/179*`;
for i in $SDCARDREADAHEAD; do
- echo "1024" > $i/read_ahead_kb;
+ echo "2048" > $i/read_ahead_kb;
done;
echo "10" > /proc/sys/fs/lease-break-time;
@@ -202,62 +202,12 @@ BATTERY_TWEAKS()
log -p i -t $FILE_NAME "*** BATTERY_TWEAKS ***: enabled";
fi;
}
-BATTERY_TWEAKS;
# ==============================================================
# CPU-TWEAKS
# ==============================================================
-MEGA_BOOST_CPU_TWEAKS()
-{
- if [ "$cortexbrain_cpu" == on ]; then
- SYSTEM_GOVERNOR=`cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor`;
-
- # boost CPU power for fast and no lag wakeup.
- echo "20000" > /sys/devices/system/cpu/cpufreq/$SYSTEM_GOVERNOR/sampling_rate;
- if [ -e /sys/devices/system/cpu/cpufreq/$SYSTEM_GOVERNOR/cpu_up_rate ]; then
- echo "10" > /sys/devices/system/cpu/cpufreq/$SYSTEM_GOVERNOR/cpu_up_rate;
- echo "10" > /sys/devices/system/cpu/cpufreq/$SYSTEM_GOVERNOR/cpu_down_rate;
- fi;
- if [ -e /sys/devices/system/cpu/cpufreq/$SYSTEM_GOVERNOR/down_threshold ]; then
- echo "10" > /sys/devices/system/cpu/cpufreq/$SYSTEM_GOVERNOR/down_threshold;
- fi;
- echo "40" > /sys/devices/system/cpu/cpufreq/$SYSTEM_GOVERNOR/up_threshold;
- if [ -e /sys/devices/system/cpu/cpufreq/$SYSTEM_GOVERNOR/up_threshold_min_freq ]; then
- echo "20" > /sys/devices/system/cpu/cpufreq/$SYSTEM_GOVERNOR/up_threshold_min_freq;
- fi;
- if [ -e /sys/devices/system/cpu/cpufreq/$SYSTEM_GOVERNOR/freq_step ]; then
- echo "100" > /sys/devices/system/cpu/cpufreq/$SYSTEM_GOVERNOR/freq_step;
- fi;
- if [ -e /sys/devices/system/cpu/cpufreq/$SYSTEM_GOVERNOR/freq_responsiveness ]; then
- echo "800000" > /sys/devices/system/cpu/cpufreq/$SYSTEM_GOVERNOR/freq_responsiveness;
- fi;
-
- # bus freq to 400MHZ in low load
- echo "20" > /sys/devices/system/cpu/cpufreq/busfreq_up_threshold;
-
- # GPU utilization to min delay
- echo "100" > /sys/module/mali/parameters/mali_gpu_utilization_timeout;
-
- # 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" \> 1000000 ]; then
- # powering MAX FREQ
- echo "$scaling_max_freq" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq;
- else
- # powering MAX FREQ
- echo "1000000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_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;
-}
-
+sleep_power_save=0;
CPU_GOV_TWEAKS()
{
if [ "$cortexbrain_cpu" == on ]; then
@@ -374,7 +324,7 @@ CPU_GOV_TWEAKS()
# performance-settings
elif [ "$PROFILE" == performance ] || [ "$PROFILE" == extreme_performance ]; then
- echo "50000" > /sys/devices/system/cpu/cpufreq/$SYSTEM_GOVERNOR/sampling_rate;
+ echo "60000" > /sys/devices/system/cpu/cpufreq/$SYSTEM_GOVERNOR/sampling_rate;
if [ -e /sys/devices/system/cpu/cpufreq/$SYSTEM_GOVERNOR/cpu_up_rate ]; then
echo "$load_h0" > /sys/devices/system/cpu/cpufreq/$SYSTEM_GOVERNOR/cpu_up_rate;
echo "$load_l1" > /sys/devices/system/cpu/cpufreq/$SYSTEM_GOVERNOR/cpu_down_rate;
@@ -415,8 +365,6 @@ CPU_GOV_TWEAKS()
log -p i -t $FILE_NAME "*** CPU_GOV_TWEAKS ***: enabled";
fi;
}
-sleep_power_save=0;
-CPU_GOV_TWEAKS;
# ==============================================================
# MEMORY-TWEAKS
@@ -427,13 +375,13 @@ MEMORY_TWEAKS()
echo "$dirty_expire_centisecs_default" > /proc/sys/vm/dirty_expire_centisecs;
echo "$dirty_writeback_centisecs_default" > /proc/sys/vm/dirty_writeback_centisecs;
echo "15" > /proc/sys/vm/dirty_background_ratio; # default: 10
- echo "15" > /proc/sys/vm/dirty_ratio; # default: 20
+ echo "20" > /proc/sys/vm/dirty_ratio; # default: 20
echo "4" > /proc/sys/vm/min_free_order_shift; # default: 4
echo "0" > /proc/sys/vm/overcommit_memory; # default: 0
echo "1000" > /proc/sys/vm/overcommit_ratio; # default: 50
echo "128 128" > /proc/sys/vm/lowmem_reserve_ratio;
echo "3" > /proc/sys/vm/page-cluster; # default: 3
- echo "8192" > /proc/sys/vm/min_free_kbytes;
+ echo "4096" > /proc/sys/vm/min_free_kbytes;
log -p i -t $FILE_NAME "*** MEMORY_TWEAKS ***: enabled";
fi;
@@ -502,10 +450,22 @@ DISABLE_WIFI()
# disable WIFI-driver if screen is off
if [ -e /sys/module/dhd/initstate ]; then
if [ "$cortexbrain_auto_tweak_wifi" == on ]; then
- svc wifi disable;
- WIFI_STATE=1;
+ if [ "$cortexbrain_auto_tweak_wifi_sleep_delay" == 0 ]; then
+ svc wifi disable;
+ WIFI_STATE=1;
+ log -p i -t $FILE_NAME "*** DISABLE_WIFI Mode ***";
+ fi;
+ (
+ PROFILE=`cat /data/.siyah/.active.profile`;
+ . /data/.siyah/$PROFILE.profile;
+ if [ "$cortexbrain_auto_tweak_wifi_sleep_delay" != 0 ]; then
+ log -p i -t $FILE_NAME "*** DISABLE_WIFI $cortexbrain_auto_tweak_wifi_sleep_delay Sec Delay Mode ***";
+ sleep $cortexbrain_auto_tweak_wifi_sleep_delay;
+ svc wifi disable;
+ WIFI_STATE=1;
+ fi;
+ )&
fi;
- log -p i -t $FILE_NAME "*** DISABLE_WIFI Mode ***";
else
WIFI_STATE=0;
fi;
@@ -571,7 +531,7 @@ ENABLE_GESTURE()
echo "1" > /sys/devices/virtual/misc/touch_gestures/gestures_enabled;
pkill -f "/data/gesture_set.sh";
pkill -f "/sys/devices/virtual/misc/touch_gestures/wait_for_gesture";
- /sbin/busybox sh /data/gesture_set.sh;
+ nohup /sbin/busybox sh /data/gesture_set.sh;
log -p i -t $FILE_NAME "*** ENABLE_GESTURE Mode ***";
fi;
}
@@ -593,10 +553,10 @@ DISABLE_GESTURE()
DONT_KILL_CORTEX()
{
- # please don't kill "cortexbrain"
+ # please don't kill "cortexbrain" set oom_adj to -14
PIDOFCORTEX=`pgrep -f "/sbin/ext/cortexbrain-tune.sh"`;
for i in $PIDOFCORTEX; do
- echo "-600" > /proc/${i}/oom_score_adj;
+ echo "-950" > /proc/${i}/oom_score_adj;
done;
log -p i -t $FILE_NAME "*** DONT_KILL_CORTEX Mode ***";
@@ -666,17 +626,15 @@ SWAPPINESS()
echo "0" > /proc/sys/vm/swappiness;
log -p i -t $FILE_NAME "*** SWAPPINESS Mode OFF ***";
else
- 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;
+ echo "80" > /proc/sys/vm/swappiness;
log -p i -t $FILE_NAME "*** SWAPPINESS Mode ON ***";
fi;
}
TUNE_IPV6()
{
- if [ "$cortexbrain_ipv6" == on ]; then
+ CISCO_VPN=`find /data/data/com.cisco.anyconnec* | wc -l`;
+ if [ "$cortexbrain_ipv6" == on ] || [ "$CISCO_VPN" != 0 ]; then
echo "0" > /proc/sys/net/ipv6/conf/wlan0/disable_ipv6;
sysctl -w net.ipv6.conf.all.disable_ipv6=0
log -p i -t $FILE_NAME "*** TUNE_IPV6 Mode ON ***";
@@ -705,6 +663,38 @@ KERNEL_SCHED_SLEEP()
log -p i -t $FILE_NAME "*** KERNEL_SCHED_SLEEP Mode ***";
}
+BLN_CORRECTION()
+{
+ if [ "$notification_enabled" == on ]; then
+
+ echo "1" > /sys/class/misc/notification/notification_enabled;
+
+ if [ "$bln_switch" == 0 ]; then
+ /res/uci.sh bln_switch 0;
+ elif [ "$bln_switch" == 1 ]; then
+ /res/uci.sh bln_switch 1;
+ elif [ "$bln_switch" == 2 ]; then
+ /res/uci.sh bln_switch 2;
+ fi;
+
+ log -p i -t $FILE_NAME "*** BLN_CORRECTION Mode ***";
+ fi;
+
+ if [ "$led_timeout_ms" == -1 ]; then
+ echo "-1" > /sys/class/misc/notification/led_timeout_ms;
+ fi;
+}
+
+CROND_SAFETY()
+{
+ # if crond used, give it root perent, if started by STweaks, it's will be killed in time.
+ if [ "$crontab" == on ]; then
+ pkill -f "crond";
+ /res/crontab_service/service.sh;
+ log -p i -t $FILE_NAME "*** CROND_SAFETY Mode ***";
+ fi;
+}
+
# ==============================================================
# TWEAKS: if Screen-ON
# ==============================================================
@@ -731,7 +721,52 @@ AWAKE_MODE()
KERNEL_SCHED_AWAKE;
- MEGA_BOOST_CPU_TWEAKS;
+ if [ "$cortexbrain_cpu" == on ]; then
+ SYSTEM_GOVERNOR=`cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor`;
+
+ # boost CPU power for fast and no lag wakeup.
+ echo "20000" > /sys/devices/system/cpu/cpufreq/$SYSTEM_GOVERNOR/sampling_rate;
+ if [ -e /sys/devices/system/cpu/cpufreq/$SYSTEM_GOVERNOR/cpu_up_rate ]; then
+ echo "10" > /sys/devices/system/cpu/cpufreq/$SYSTEM_GOVERNOR/cpu_up_rate;
+ echo "10" > /sys/devices/system/cpu/cpufreq/$SYSTEM_GOVERNOR/cpu_down_rate;
+ fi;
+ if [ -e /sys/devices/system/cpu/cpufreq/$SYSTEM_GOVERNOR/down_threshold ]; then
+ echo "10" > /sys/devices/system/cpu/cpufreq/$SYSTEM_GOVERNOR/down_threshold;
+ fi;
+ echo "40" > /sys/devices/system/cpu/cpufreq/$SYSTEM_GOVERNOR/up_threshold;
+ if [ -e /sys/devices/system/cpu/cpufreq/$SYSTEM_GOVERNOR/up_threshold_min_freq ]; then
+ echo "20" > /sys/devices/system/cpu/cpufreq/$SYSTEM_GOVERNOR/up_threshold_min_freq;
+ fi;
+ if [ -e /sys/devices/system/cpu/cpufreq/$SYSTEM_GOVERNOR/freq_step ]; then
+ echo "100" > /sys/devices/system/cpu/cpufreq/$SYSTEM_GOVERNOR/freq_step;
+ fi;
+ if [ -e /sys/devices/system/cpu/cpufreq/$SYSTEM_GOVERNOR/freq_responsiveness ]; then
+ echo "800000" > /sys/devices/system/cpu/cpufreq/$SYSTEM_GOVERNOR/freq_responsiveness;
+ fi;
+
+ # bus freq to 400MHZ in low load
+ echo "25" > /sys/devices/system/cpu/cpufreq/busfreq_up_threshold;
+
+ # GPU utilization to min delay
+ echo "100" > /sys/module/mali/parameters/mali_gpu_utilization_timeout;
+
+ # cpu-settings for second core online at booster time
+ echo "20" > /sys/module/stand_hotplug/parameters/load_h0;
+ echo "20" > /sys/module/stand_hotplug/parameters/load_l1;
+
+ # boost wakeup
+ if [ "$scaling_max_freq" \> 1100000 ]; then
+ # powering MAX FREQ
+ echo "$scaling_max_freq" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq;
+ else
+ # powering MAX FREQ
+ echo "1000000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_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;
MOUNT_SD_CARD;
@@ -745,11 +780,6 @@ AWAKE_MODE()
WAKEUP_BOOST;
- # activate VPLL after wakeup booster delay
- if [ "$mali_use_vpll" == on ]; then
- echo "1" > /sys/module/mali/parameters/mali_use_vpll;
- fi;
-
# bus freq back to normal
echo "$busfreq_up_threshold" > /sys/devices/system/cpu/cpufreq/busfreq_up_threshold;
@@ -790,6 +820,8 @@ AWAKE_MODE()
SWAPPINESS;
+ BLN_CORRECTION;
+
log -p i -t $FILE_NAME "*** AWAKE Normal Mode ***";
}
@@ -805,7 +837,6 @@ SLEEP_MODE()
echo "$standby_freq" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq;
echo "500" > /sys/module/mali/parameters/mali_gpu_utilization_timeout;
- echo "0" > /sys/module/mali/parameters/mali_use_vpll;
KERNEL_SCHED_SLEEP;
@@ -815,6 +846,10 @@ SLEEP_MODE()
BATTERY_TWEAKS;
+ BLN_CORRECTION;
+
+ CROND_SAFETY;
+
CHARGING=`cat /sys/class/power_supply/battery/charging_source`;
if [ $CHARGING == 0 ]; then
@@ -885,12 +920,11 @@ if [ "$cortexbrain_background_process" == 1 ] && [ `pgrep -f "cat /sys/power/wai
# AWAKE State. all system ON.
cat /sys/power/wait_for_fb_wake > /dev/null 2>&1;
AWAKE_MODE;
- sleep 10;
+ sleep 5;
# SLEEP state. All system to power save.
cat /sys/power/wait_for_fb_sleep > /dev/null 2>&1;
SLEEP_MODE;
- sleep 2
done &);
else
if [ "$cortexbrain_background_process" == 0 ]; then
View
58 sbin/ext/install.sh
@@ -4,7 +4,6 @@ BB="/sbin/busybox";
extract_payload()
{
- payload_extracted=1;
$BB chmod 755 /sbin/read_boot_headers;
eval $(/sbin/read_boot_headers /dev/block/mmcblk0p5);
load_offset=$boot_offset;
@@ -19,27 +18,21 @@ read_config;
$BB mount -o remount,rw /system;
$BB mount -t rootfs -o remount,rw rootfs;
-payload_extracted=0;
cd /;
# copy cron files
-if [ ! -d /data/crontab ]; then
- cp -a /res/crontab /data/
+cp -a /res/crontab/ /data/
+rm -rf /data/crontab/cron/ > /dev/null 2>&1;
+if [ ! -e /data/crontab/custom_jobs ]; then
+ touch /data/crontab/custom_jobs;
+ chmod 777 /data/crontab/custom_jobs;
fi;
-# update my scripts in case i made change.
-cp -a /res/crontab/cron-scripts/* /data/crontab/cron-scripts/
-
if [ "$install_root" == "on" ]; then
- if [ -s /system/xbin/su ]; then
+ if [ -e /system/xbin/su ]; then
echo "Superuser already exists";
else
- if [ "$payload_extracted" == "0" ]; then
- extract_payload;
- fi;
- payload_extracted=1
-
# clean su traces
$BB rm -f /system/bin/su > /dev/null 2>&1;
$BB rm -f /system/xbin/su > /dev/null 2>&1;
@@ -47,7 +40,7 @@ if [ "$install_root" == "on" ]; then
$BB chmod 755 /system/xbin;
# extract SU binary
- $BB xzcat /res/misc/payload/su.xz > /system/xbin/su;
+ $BB cp -a /res/misc/payload/su /system/xbin/su;
$BB chown 0.0 /system/xbin/su;
$BB chmod 6755 /system/xbin/su;
@@ -58,13 +51,15 @@ if [ "$install_root" == "on" ]; then
$BB rm -f /data/app/*uper?ser.apk > /dev/null 2>&1;
$BB rm -f /data/app/?uper?u.apk > /dev/null 2>&1;
$BB rm -f /data/app/*chainfire?supersu*.apk > /dev/null 2>&1;
- $BB rm -rf /data/dalvik-cache/*uper?ser.apk* > /dev/null 2>&1;
- $BB rm -rf /data/dalvik-cache/*chainfire?supersu*.apk* > /dev/null 2>&1;
+ $BB rm -f /data/dalvik-cache/*uper?ser.apk* > /dev/null 2>&1;
+ $BB rm -f /data/dalvik-cache/*chainfire?supersu*.apk* > /dev/null 2>&1;
+ $BB rm -rf /data/data/com.noshufou.android.su > /dev/null 2>&1;
+ $BB rm -rf /data/data/eu.chinfire.supersu > /dev/null 2>&1;
# extract super user app
- $BB xzcat /res/misc/payload/Superuser.apk.xz > /system/app/Superuser.apk;
- $BB chown 0.0 /system/app/Superuser.apk;
- $BB chmod 644 /system/app/Superuser.apk;
+ $BB cp -a /res/misc/payload/SuperSU.apk /system/app/SuperSU.apk;
+ $BB chown 0.0 /system/app/SuperSU.apk;
+ $BB chmod 644 /system/app/SuperSU.apk;
# restore witch if exist
if [ -e /system/xbin/waswhich-bkp ]; then
@@ -87,19 +82,15 @@ if [ "$install_root" == "on" ]; then
fi;
fi;
-if [ ! -f /system/app/CWMManager.apk ]; then
- if [ "$payload_extracted" == "0" ]; then
- extract_payload;
- fi;
+if [ ! -e /system/app/CWMManager.apk ]; then
rm -f /data/app/CWMManager.apk > /dev/null 2>&1;
rm -f /data/dalvik-cache/*CWMManager.apk* > /dev/null 2>&1;
rm -f /data/app/eu.chainfire.cfroot.cwmmanager*.apk > /dev/null 2>&1;
rm -rf /data/data/eu.chainfire.cfroot.cwmmanage* > /dev/null 2>&1;
- xzcat /res/misc/payload/CWMManager.apk.xz > /system/app/CWMManager.apk;
+ cp -a /res/misc/payload/CWMManager.apk /system/app/CWMManager.apk;
chown 0.0 /system/app/CWMManager.apk;
chmod 644 /system/app/CWMManager.apk;
- payload_extracted=1
fi;
# liblights install by force to allow BLN
@@ -135,16 +126,12 @@ GMTWEAKS()
rm -rf /data/data/com.gokhanmoral.*weak* > /dev/null 2>&1;
rm -f /data/dalvik-cache/*gokhanmoral.*weak*.apk* > /dev/null 2>&1;
rm -f /cache/dalvik-cache/*gokhanmoral.*weak*.apk* > /dev/null 2>&1;
- if [ "$payload_extracted" == "0" ]; then
- extract_payload;
- fi;
- $BB xzcat /res/misc/payload/STweaks.apk.xz > /system/app/STweaks.apk;
+ $BB cp -a /res/misc/payload/STweaks.apk /system/app/STweaks.apk;
$BB chown 0.0 /system/app/STweaks.apk;
$BB chmod 644 /system/app/STweaks.apk;
- payload_extracted=1
fi;
}
-GMTWEAKS
+GMTWEAKS;
EXTWEAKS_CLEAN()
{
@@ -155,19 +142,14 @@ EXTWEAKS_CLEAN()
rm -f /data/dalvik-cache/*com.darekxan.extweaks.app* > /dev/null 2>&1;
fi;
}
-EXTWEAKS_CLEAN
+EXTWEAKS_CLEAN;
if [ ! -s /system/xbin/ntfs-3g ]; then
- if [ "$payload_extracted" == "0" ]; then
- extract_payload;
- fi;
- $BB xzcat /res/misc/payload/ntfs-3g.xz > /system/xbin/ntfs-3g;
+ $BB cp -a /res/misc/payload/ntfs-3g /system/xbin/ntfs-3g;
$BB chown 0.0 /system/xbin/ntfs-3g;
$BB chmod 755 /system/xbin/ntfs-3g;
fi;
-$BB rm -rf /res/misc/payload;
-
$BB mount -t rootfs -o remount,rw rootfs;
$BB mount -o remount,rw /system;
View
24 sbin/ext/post-init.sh
@@ -5,9 +5,6 @@ BB="/sbin/busybox";
# first mod the partitions then boot
$BB sh /sbin/ext/system_tune_on_init.sh;
-# start ADB early to see some logs :)
-start adbd;
-
PIDOFINIT=`pgrep -f "/sbin/ext/post-init.sh"`;
for i in $PIDOFINIT; do
echo "-600" > /proc/$i/oom_score_adj;
@@ -37,25 +34,31 @@ read_config;
#mdnie sharpness tweak
if [ "$mdniemod" == "on" ]; then
- . /sbin/ext/mdnie-sharpness-tweak.sh
+ . /sbin/ext/mdnie-sharpness-tweak.sh;
fi;
# dual core hotplug
echo "on" > /sys/devices/virtual/misc/second_core/hotplug_on;
echo "off" > /sys/devices/virtual/misc/second_core/second_core_on;
+# Cortex parent should be ROOT/INIT and not STweaks
+nohup /sbin/ext/cortexbrain-tune.sh;
+
(
PROFILE=`cat /data/.siyah/.active.profile`;
. /data/.siyah/$PROFILE.profile;
- if [ $init_d == on ]; then
+ MIUI=0;
+ MIUI_JB=0;
+ [ -f /system/framework/framework-miui.jar ] && MIUI=1;
+ [ -f /system/framework/miui-framework.jar ] && MIUI=1;
+ [ "`/sbin/busybox grep -i cMIUI /system/build.prop`" ] && MIUI_JB=1;
+
+ if [ $init_d == on ] || [ "$MIUI" == 1 ] || [ "$MIUI_JB" == 1 ]; then
/sbin/busybox sh /sbin/ext/run-init-scripts.sh;
fi;
)&
-# cpu undervolting
-echo "$cpu_undervolting" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels;
-
# disable debugging on some modules
if [ "$logger" == "off" ]; then
echo "0" > /sys/module/ump/parameters/ump_debug_level;
@@ -129,7 +132,6 @@ echo "0" > /proc/sys/kernel/kptr_restrict;
input keyevent 24
input keyevent 24
input keyevent 24
- input keyevent 24
fi;
# change USB mode MTP or Mass Storage
@@ -139,12 +141,12 @@ echo "0" > /proc/sys/kernel/kptr_restrict;
(
while [ ! `cat /proc/loadavg | cut -c1-4` \< "3.50" ]; do
echo "Waiting For CPU to cool down";
- sleep 30;
+ sleep 60;
done;
PIDOFACORE=`pgrep -f "android.process.acore"`;
for i in $PIDOFACORE; do
- echo "-600" > /proc/${i}/oom_score_adj;
+ echo "-800" > /proc/${i}/oom_score_adj;
renice -15 -p $i;
log -p i -t boot "*** do not kill -> android.process.acore ***";
done;
View
4 sbin/ext/properties.sh
@@ -3,8 +3,8 @@
mkdir -p /customkernel/property
echo true >> /customkernel/property/customkernel.cf-root
echo true >> /customkernel/property/customkernel.base.cf-root
-echo SiyahKernel >> /customkernel/property/customkernel.name
-echo "SiyahKernel" >> /customkernel/property/customkernel.namedisplay
+echo Dorimanx >> /customkernel/property/customkernel.name
+echo "Dorimanx Kernel" >> /customkernel/property/customkernel.namedisplay
echo 104 >> /customkernel/property/customkernel.version.number
echo 5.2 >> /customkernel/property/customkernel.version.name
echo true >> /customkernel/property/customkernel.bootani.zip
View
1  sbin/ext/system_tune_on_init.sh
@@ -5,7 +5,6 @@ stop;
# set busybox location
BB="/sbin/busybox";
-FP="/sbin/fix_permissions";
# remount all partitions tweked settings
for k in $(busybox mount | busybox grep relatime | busybox cut -d " " -f3); do
View
49 sbin/init
@@ -131,14 +131,12 @@ fi;
# mounting system!
/sbin/busybox mount -t ext4 /res/dev/system /system;
-# linking sbin to /bin for crond
-if [ ! -v /bin ]; then
- ln -s /sbin/ /bin;
-fi;
+# linking /system/bin to /bin for crond
+ln -s /system/bin/ /bin
# adding latest vendor binary from 3.6.RC6 kernel for all! tested working great
mkdir -p /system/vendor/firmware;
-/sbin/busybox xzcat /res/misc/vendor/firmware/mfc_fw.bin.xz > /system/vendor/firmware/mfc_fw.bin;
+cp -a /res/misc/vendor/firmware/mfc_fw.bin /system/vendor/firmware/mfc_fw.bin;
chmod 755 /system/vendor/firmware/mfc_fw.bin;
# fix permission to services.jar in case user did a mess, after using my MOD!
@@ -292,6 +290,12 @@ USER_ACTIONS()
if [ "$JELLY" == "1" ] || [ "$MIUI_JB" == "1" ]; then
echo "JB-INSTALLED" > /data/.siyah/jb-installed; # used and terminated at /sbin/ext/partition_tune.sh
+ stop adbd;
+ cp -a /sbin/adbd.jb /sbin/adbd;