Permalink
Browse files

+ sync ...

  • Loading branch information...
1 parent b2a94d2 commit a4873b89d950792ac37abd73d3b626b46ab063c0 Lars Moelleken committed Nov 15, 2012
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. BIN 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
@@ -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
@@ -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
@@ -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;
@@ -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;
@@ -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;
@@ -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;
+
@@ -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;
+
@@ -0,0 +1 @@
+# This file is at /var/spool/cron/crontabs/root
@@ -0,0 +1 @@
+# This file is at /system/etc/cron.d/crontabs/root
@@ -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;
+
@@ -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;
@@ -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;
@@ -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)
@@ -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.";
@@ -0,0 +1,7 @@
+#!/sbin/busybox sh
+
+(
+ CPU_VOT=`cat /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels`;
+ echo "$CPU_VOT";
+)&
+
@@ -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";
@@ -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";
@@ -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.
Oops, something went wrong.

0 comments on commit a4873b8

Please sign in to comment.