+ All Categories
Home > Documents > V6 Supercharger for Android-Update9 Beta 6.1.Sh

V6 Supercharger for Android-Update9 Beta 6.1.Sh

Date post: 14-Jul-2015
Category:
Upload: mihut-ci
View: 279 times
Download: 0 times
Share this document with a friend
Popular Tags:

of 41

Transcript

#!/system/bin/sh # V6 SuperCharger, OOM Grouping & Priority Fixes created by zeppelinrox. echo "" echo " REMINDER: ONLY USE BUSYBOX v1.18.2 OR LOWER!!" echo "" sleep 2 #set -o errexit cat > /sdcard/SuperCharger.html Forums
EOF echo $line echo " See /sdcard/UnSuperChargerError.html for help!" echo $line echo "" sleep 4 echo " Clean "$rcpath echo "" sed -i '/.*SuperCharger/,/.*SuperCharged/d' $rcp ath sed -i '/.*_ADJ/d' $rcpath sed -i '/parameters\/adj/d' $rcpath sed -i '/lowmemorykiller/d' $rcpath sed -i '/vm\/.*oom.*/d' $rcpath sed -i '/kernel\/panic.*/d' $rcpath $sleep fi fi if [ "$opt" -le 10 ] [ "$opt" -eq 14 ]; then if [ -f "/data/local.prop" ]; then sed -i '/.*SuperCharger/,/END OOM_MEM_Settings/d ' /data/local.prop sed -i '/.*_MEM/d' /data/local.prop fi sed -i '/.*SuperCharger/,/END OOM_MEM_Settings/d' /syste m/build.prop sed -i '/.*_MEM/d' /system/build.prop if [ -f "/system/bin/build.prop" ]; then sed -i '/.*SuperCharger/,/END OOM_MEM_Settings/d ' /system/bin/build.prop sed -i '/.*_MEM/d' /system/bin/build.prop fi fi if [ "$opt" -ne 13 ]; then if [ -f "/system/etc/init.d/99SuperCharger" ] [ -f "/ system/etc/init.d/S99SuperCharger" ]; then if [ "$opt" -ne 11 ] && [ "$opt" -ne 12 ]; then

echo " Cleaning Up SuperCharge from /ini t.d folder" echo "" $sleep fi echo " Cleaning Up Grouping Fixes from /init.d f older" if [ -f "/system/etc/init.d/99SuperCharger" ]; t hen rm /system/etc/init.d/99SuperCharger else rm /system/etc/init.d/S99SuperCharger fi echo "" $sleep fi if [ -f "/data/99SuperCharger.sh" ]; then if [ "$opt" -ne 11 ] && [ "$opt" -ne 12 ]; then echo " Cleaning Up SuperCharge from /dat a folder" echo "" $sleep fi echo " Cleaning Up Grouping Fixes from /data fol der" echo "" rm /data/99SuperCharger.sh $sleep fi fi if [ "$opt" -eq 14 ]; then if [ -f "/system/build.prop.unsuper" ]; then echo " Restoring ORIGINAL build.prop..." cp -fr /system/build.prop.unsuper /system/build. prop rm /system/build.prop.unsuper echo "" $sleep fi if [ -f "/system/bin/build.prop.unsuper" ]; then cp -fr /system/bin/build.prop.unsuper /system/bi n/build.prop rm /system/bin/build.prop.unsuper echo "" $sleep fi if [ -f "/data/SuperChargerAdj" ]; then rm /data/SuperChargerAdj fi if [ -f "/data/SuperChargerMinfree" ]; then rm /data/SuperChargerMinfree fi if [ -f "/data/SuperChargerMinfreeOld" ]; then rm /data/SuperChargerMinfreeOld fi if [ -f "/data/SuperChargerCustomMinfree" ]; then rm /data/SuperChargerCustomMinfree fi if [ -f "/data/SuperChargerOptions" ]; then rm /data/SuperChargerOptions

fi if [ "$UnSuperCharged" -ne 1 ]; then echo " Removed Kernel/Memory Tweaks..." echo "" $sleep if [ "$UnSuperChargerError" -ne 1 ]; then echo " Your ROM's default minfree values are restored!" echo "" $sleep fi echo " Out Of Memory (OOM) Groupings UnFixed..." echo "" $sleep echo " ...OOM Priorities UnFixed. .." echo "" $sleep echo " ed :(" echo "" $sleep echo " UnSuperCharging Complete..." echo "" echo $line echo "" $sleep echo " REBOOT NOW..." echo "" $sleep echo " ...FOR UNSUPERCHARGE TO TAKE EF FECT!" echo "" echo $line echo "" $sleep fi echo " UnSuperCharging..." echo "" $sleep echo " ...by -=zeppelinrox=- @ XDA & Droid Forums" sleep 2 fi if [ "$opt" -le 13 ]; then if [ "$opt" -eq 13 ]; then echo " Removing Kernel/Memory Tweaks..." echo "" $sleep fi if [ "$rc" -eq 1 ]; then if [ "$opt" -ne 13 ]; then sed -i '/BEGIN OOM_ADJ_Settings/,/.*Supe rCharged/d' $rcpath sed -i '/.*_ADJ/d' $rcpath fi if [ "$opt" -eq 11 ] [ "$opt" -eq 12 ]; then sed -i '/parameters\/adj/d' $rcpath fi if [ "$opt" -le 10 ]; then sed -i '/.*SuperCharger/,/END OOM_MEM_Se Weak Ass Launcher Restor

ttings/d' $rcpath sed -i '/.*_MEM/d' $rcpath sed -i '/lowmemorykiller/d' $rcpath fi sed -i '/vm\/.*oom.*/d' $rcpath sed -i '/kernel\/panic.*/d' $rcpath fi if [ -f "/system/etc/init.d/99SuperCharger" ]; then sed -i '/.*oom.*/d' /system/etc/init.d/99SuperCh arger sed -i '/.*panic.*/d' /system/etc/init.d/99Super Charger fi if [ -f "/system/etc/init.d/S99SuperCharger" ]; then sed -i '/.*oom.*/d' /system/etc/init.d/S99SuperC harger sed -i '/.*panic.*/d' /system/etc/init.d/S99Supe rCharger fi if [ -f "/data/99SuperCharger.sh" ]; then sed -i '/.*oom.*/d' /data/99SuperCharger.sh sed -i '/.*panic.*/d' /data/99SuperCharger.sh fi if [ "$opt" -eq 13 ]; then echo " ...Kernel/Memory Tweaks Rem oved!" $sleep fi fi if [ "$opt" -le 12 ]; then if [ "$showbuildpropopt" -eq 1 ];then echo $line echo "" echo " Even though you SuperCharged before..." echo "" $sleep echo " ...You launcher is NOT SuperCharg ed..." echo "" $sleep echo " To apply MEM and ADJ values..." echo "" $sleep echo " ...You can try and use build.prop..." echo "" $sleep echo " ...instead of local. prop!" echo "" $sleep echo " This is more likely to work but riskier.. ." echo "" $sleep echo $line echo " WARNING!!! Bootloops are possible..." echo "" $sleep echo " ...So have a backup ha ndy!!"

echo $line echo "" $sleep echo " Do you want to use Build.prop?" echo "" $sleep echo -n " Enter Y for Yes, any key for No: " read buildpropopt echo "" case $buildpropopt in y Y)echo " Okay... will try using the build.pr op method!" buildprop=1;; *)echo " Okay... will try local.prop met hod again...";; esac echo "" echo $line echo "" $sleep fi echo "0,3,5,7,14,15" > /data/SuperChargerAdj scadj=`cat /data/SuperChargerAdj` adj1=`awk -F , '{print $1}' /data/SuperChargerAdj`;adj2= `awk -F , '{print $2}' /data/SuperChargerAdj`;adj3=`awk -F , '{print $3}' /data/ SuperChargerAdj`;adj4=`awk -F , '{print $4}' /data/SuperChargerAdj`;adj5=`awk -F , '{print $5}' /data/SuperChargerAdj`;adj6=`awk -F , '{print $6}' /data/SuperCh argerAdj` if [ "$opt" -le 10 ]; then if [ -f "/data/SuperChargerMinfree" ]; then cp -fr /data/SuperChargerMinfree /data/S uperChargerMinfreeOld fi echo "$SL1,$SL2,$SL3,$SL4,$SL5,$SL6" > /data/Sup erChargerMinfree scminfree=`cat /data/SuperChargerMinfree` if [ "$opt" -eq 10 ]; then if [ "$restore" -eq 1 ]; then echo " Restoring Prior CUST-OO MIZED Settings!" else if [ -f "/data/SuperChargerCusto mMinfree" ]; then echo " Removing Prior Cu st-OOMized Settings..." echo "" $sleep fi echo " Backing Up Your New CUS T-OOMIZED Settings!" fi cp -fr /data/SuperChargerMinfree /data/S uperChargerCustomMinfree echo "" $sleep fi fi echo $line if [ "$opt" -le 10 ]; then echo " SuperCharging Performance: $CONFIG!"

echo $line echo "" $sleep echo " Out Of Memory (OOM) / lowmemorykiller val ues:" echo "" $sleep awk -F , '{print " Old MB = "$1/256",",$2/256 ",",$3/256",",$4/256",",$5/256",",$6/256 " mb"}' /sys/module/lowmemorykiller/par ameters/minfree echo " New MB = $MB1, $MB2, $MB3, $MB4, $MB5, $MB6 mb" echo "" $sleep echo " Old Pages = "$currentminfree echo " New Pages = $scminfree" fi echo "" $sleep if [ "$rc" -eq 1 ]; then if [ "$opt" -le 10 ]; then sed -i '/on boot/ a\ write /sys/module/lowmemorykiller/parameters/minfree '$scminfree $rcpath sed -i '/on early/ a\ # V6 SuperCharger, OOM Grouping & Priority Fixes created by zeppelinrox. # DO NOT DELETE COMMENTS. DELETING COMMENTS WILL BREAK UNINSTALL ROUTINE! # BEGIN OOM_MEM_Settings' $rcpath sed -i '/BEGIN OOM_MEM_Settings/ a\ setprop ro.FOREGROUND_APP_MEM '$SL1 $rcpath sed -i '/ro.FOREGROUND_APP_MEM/ a\ setprop ro.VISIBLE_APP_MEM '$SL2 $rcpath sed -i '/ro.VISIBLE_APP_MEM/ a\ setprop ro.SECONDARY_SERVER_MEM '$SL3 $rcpath sed -i '/ro.SECONDARY_SERVER_MEM/ a\ setprop ro.BACKUP_APP_MEM '$SL4 $rcpath sed -i '/ro.BACKUP_APP_MEM/ a\ setprop ro.HOME_APP_MEM '$SP1 $rcpath sed -i '/ro.HOME_APP_MEM/ a\ setprop ro.HIDDEN_APP_MEM '$SL4 $rcpath sed -i '/ro.HIDDEN_APP_MEM/ a\ setprop ro.EMPTY_APP_MEM '$SL6 $rcpath sed -i '/ro.EMPTY_APP_MEM/ a\ # END OOM_MEM_Settings' $rcpath if [ "$gb" -eq 1 ]; then sed -i '/ro.VISIBLE_APP_MEM/ a\ setprop ro.PERCEPTIBLE_APP_MEM '$SP1 $rcpath sed -i '/ro.PERCEPTIBLE_APP_MEM/ a\ setprop ro.HEAVY_WEIGHT_APP_MEM '$SL3 $rcpath else sed -i '/ro.HIDDEN_APP_MEM/ a\ setprop ro.CONTENT_PROVIDER_MEM '$SL5 $rcpath fi fi if [ ! -f "/data/SuperChargerMinfree" ] && [ "$o pt" -gt 10 ]; then sed -i '/on early/ a\ # V6 SuperCharger, OOM Grouping & Priority Fixes created by zeppelinrox. # DO NOT DELETE COMMENTS. DELETING COMMENTS WILL BREAK UNINSTALL ROUTINE! # BEGIN OOM_MEM_Settings

# END OOM_MEM_Settings' $rcpath fi sed -i '/on boot/ a\ write /sys/module/lowmemorykiller/parameters/adj '$scadj $rcpath sed -i '/END OOM_MEM_Settings/ a\ # BEGIN OOM_ADJ_Settings' $rcpath sed -i '/BEGIN OOM_ADJ_Settings/ a\ setprop ro.FOREGROUND_APP_ADJ '$adj1 $rcpath sed -i '/ro.FOREGROUND_APP_ADJ/ a\ setprop ro.VISIBLE_APP_ADJ '$adj2 $rcpath sed -i '/ro.VISIBLE_APP_ADJ/ a\ setprop ro.SECONDARY_SERVER_ADJ '$adj3 $rcpath sed -i '/ro.SECONDARY_SERVER_ADJ/ a\ setprop ro.BACKUP_APP_ADJ '$(($adj4-1)) $rcpath sed -i '/ro.BACKUP_APP_ADJ/ a\ setprop ro.HOME_APP_ADJ '$adj2 $rcpath sed -i '/ro.HOME_APP_ADJ/ a\ setprop ro.HIDDEN_APP_MIN_ADJ '$adj4 $rcpath sed -i '/ro.HIDDEN_APP_MIN_ADJ/ a\ setprop ro.EMPTY_APP_ADJ '$adj6 $rcpath sed -i '/ro.EMPTY_APP_ADJ/ a\ # END OOM_ADJ_Settings # End of V6 SuperCharged Entries' $rcpath if [ "$gb" -eq 1 ]; then sed -i '/ro.VISIBLE_APP_ADJ/ a\ setprop ro.PERCEPTIBLE_APP_ADJ '$(($adj2-1)) $rcpath sed -i '/ro.PERCEPTIBLE_APP_ADJ/ a\ setprop ro.HEAVY_WEIGHT_APP_ADJ '$(($adj3-1)) $rcpath else sed -i '/ro.HIDDEN_APP_MIN_ADJ/ a\ setprop ro.CONTENT_PROVIDER_ADJ '$(($adj5-6)) $rcpath fi if [ "$opt" -eq 12 ]; then if [ "$froyo" -eq 1 ]; then sed -i 's/.* ro.HOME_APP_ADJ .*/ setprop ro.HOME_APP_ADJ '$adj1/ $rcpath else sed -i 's/.* ro.HOME_APP_ADJ .*/ setprop ro.HOME_APP_ADJ '$(($adj2-2))/ $rcpath fi else if [ "$froyo" -eq 1 ]; then sed -i 's/.* ro.HOME_APP_ADJ .*/ setprop ro.HOME_APP_ADJ '$(($adj2-2))/ $rcpath else sed -i 's/.* ro.HOME_APP_ADJ .*/ setprop ro.HOME_APP_ADJ '$(($adj2-1))/ $rcpath fi fi sed -i '/minfree/ a\ write /proc/sys/vm/oom_kill_allocating_task 0' $rcpath sed -i '/oom_kill_allocating_task/ a\ write /proc/sys/vm/panic_on_oom 0' $rcpath sed -i '/panic_on_oom/ a\ write /proc/sys/kernel/panic_on_oops 1' $rcpath sed -i '/panic_on_oops/ a\ write /proc/sys/kernel/panic 0' $rcpath if [ "$opt" -eq 11 ] [ "$opt" -eq 12 ]; then echo " $rcfile has been OOM Fixed!" else

echo " $rcfile has been SuperCharged!" fi echo "" $sleep echo " For Super Stickiness..." echo "" $sleep echo " ...settings will now be applied..." echo "" $sleep echo " ...to /system/etc/init.d folder as well!" echo "" $sleep fi echo " Fixing Out Of Memory (OOM) Groupings..." echo "" $sleep echo " ...Fixing OOM Priorities..." echo "" $sleep if [ "$buildprop" -eq 0 ]; then if [ "$opt" -le 10 ]; then echo "# V6 SuperCharger, OOM Grouping & Priority Fixes created by zeppelinrox." >> /data/local.prop echo "# DO NOT DELETE COMMENTS. DELETING COMMENTS WILL BREAK UNINSTALL ROUTINE!" >> /data/local.prop echo "# BEGIN OOM_MEM_Settings" >> /data /local.prop echo "ro.FOREGROUND_APP_MEM=$SL1" >> /da ta/local.prop echo "ro.VISIBLE_APP_MEM=$SL2" >> /data/ local.prop if [ "$gb" -eq 1 ]; then echo "ro.PERCEPTIBLE_APP_MEM=$SP 1" >> /data/local.prop echo "ro.HEAVY_WEIGHT_APP_MEM=$S L3" >> /data/local.prop fi echo "ro.SECONDARY_SERVER_MEM=$SL3" >> / data/local.prop echo "ro.BACKUP_APP_MEM=$SL4" >> /data/l ocal.prop echo "ro.HOME_APP_MEM=$SP1" >> /data/loc al.prop echo "ro.HIDDEN_APP_MEM=$SL4" >> /data/l ocal.prop if [ "$froyo" -eq 1 ]; then echo "ro.CONTENT_PROVIDER_MEM=$S L5" >> /data/local.prop fi echo "ro.EMPTY_APP_MEM=$SL6" >> /data/lo cal.prop echo "# END OOM_MEM_Settings" >> /data/l ocal.prop fi if [ ! -f "/data/SuperChargerMinfree" ] && [ "$o pt" -gt 10 ]; then echo "# V6 SuperCharger, OOM Grouping & Priority Fixes created by zeppelinrox." >> /data/local.prop

echo "# DO NOT DELETE COMMENTS. DELETING COMMENTS WILL BREAK UNINSTALL ROUTINE!" >> /data/local.prop echo "# BEGIN OOM_MEM_Settings" >> /data /local.prop echo "# END OOM_MEM_Settings" >> /data/l ocal.prop fi echo "# BEGIN OOM_ADJ_Settings" >> /data/local.p rop echo "ro.FOREGROUND_APP_ADJ=$adj1" >> /data/loca l.prop echo "ro.VISIBLE_APP_ADJ=$adj2" >> /data/local.p rop if [ "$gb" -eq 1 ]; then echo "ro.PERCEPTIBLE_APP_ADJ=$(($adj2-1) )" >> /data/local.prop echo "ro.HEAVY_WEIGHT_APP_ADJ=$(($adj3-1 ))" >> /data/local.prop fi echo "ro.SECONDARY_SERVER_ADJ=$adj3" >> /data/lo cal.prop echo "ro.BACKUP_APP_ADJ=$(($adj4-1))" >> /data/l ocal.prop echo "ro.HOME_APP_ADJ=$adj2" >> /data/local.prop echo "ro.HIDDEN_APP_MIN_ADJ=$adj4" >> /data/loca l.prop if [ "$froyo" -eq 1 ]; then echo "ro.CONTENT_PROVIDER_ADJ=$(($adj5-6 ))" >> /data/local.prop fi echo "ro.EMPTY_APP_ADJ=$adj6" >> /data/local.pro p echo "# END OOM_ADJ_Settings" >> /data/local.pro p echo "# End of V6 SuperCharged Entries" >> /data /local.prop echo " ...OOM Groupings and Priorities are now f ixed!" echo "" $sleep if [ "$opt" -eq 12 ]; then echo " Applying BulletProof Launcher..." echo "" $sleep if [ "$froyo" -eq 1 ]; then sed -i 's/ro.HOME_APP_ADJ=.*/ro. HOME_APP_ADJ='$adj1/ /data/local.prop else sed -i 's/ro.HOME_APP_ADJ=.*/ro. HOME_APP_ADJ='$(($adj2-2))/ /data/local.prop fi echo " Launcher is no Longer Hard To Kil l..." echo "" $sleep echo " ...It's BULLETPROOF!" else echo " Applying Hard To Kill Launcher... "

echo "" $sleep if [ "$froyo" -eq 1 ]; then sed -i 's/ro.HOME_APP_ADJ=.*/ro. HOME_APP_ADJ='$(($adj2-2))/ /data/local.prop else sed -i 's/ro.HOME_APP_ADJ=.*/ro. HOME_APP_ADJ='$(($adj2-1))/ /data/local.prop fi echo " ...Hard To Kill Laun cher APPLIED!" fi elif [ "$buildprop" -eq 1 ]; then if [ "$opt" -le 10 ]; then echo "# V6 SuperCharger, OOM Grouping & Priority Fixes created by zeppelinrox." >> /system/build.prop echo "# DO NOT DELETE COMMENTS. DELETING COMMENTS WILL BREAK UNINSTALL ROUTINE!" >> /system/build.prop echo "# BEGIN OOM_MEM_Settings" >> /syst em/build.prop echo "ro.FOREGROUND_APP_MEM=$SL1" >> /sy stem/build.prop echo "ro.VISIBLE_APP_MEM=$SL2" >> /syste m/build.prop if [ "$gb" -eq 1 ]; then echo "ro.PERCEPTIBLE_APP_MEM=$SP 1" >> /system/build.prop echo "ro.HEAVY_WEIGHT_APP_MEM=$S L3" >> /system/build.prop fi echo "ro.SECONDARY_SERVER_MEM=$SL3" >> / system/build.prop echo "ro.BACKUP_APP_MEM=$SL4" >> /system /build.prop echo "ro.HOME_APP_MEM=$SP1" >> /system/b uild.prop echo "ro.HIDDEN_APP_MEM=$SL4" >> /system /build.prop if [ "$froyo" -eq 1 ]; then echo "ro.CONTENT_PROVIDER_MEM=$S L5" >> /system/build.prop fi echo "ro.EMPTY_APP_MEM=$SL6" >> /system/ build.prop echo "# END OOM_MEM_Settings" >> /system /build.prop fi if [ ! -f "/data/SuperChargerMinfree" ] && [ "$o pt" -gt 10 ]; then echo "# V6 SuperCharger, OOM Grouping & Priority Fixes created by zeppelinrox." >> /system/build.prop echo "# DO NOT DELETE COMMENTS. DELETING COMMENTS WILL BREAK UNINSTALL ROUTINE!" >> /system/build.prop echo "# BEGIN OOM_MEM_Settings" >> /syst em/build.prop echo "# END OOM_MEM_Settings" >> /system /build.prop fi echo "# BEGIN OOM_ADJ_Settings" >> /system/build .prop

echo "ro.FOREGROUND_APP_ADJ=$adj1" >> /system/bu ild.prop echo "ro.VISIBLE_APP_ADJ=$adj2" >> /system/build .prop if [ "$gb" -eq 1 ]; then echo "ro.PERCEPTIBLE_APP_ADJ=$(($adj2-1) )" >> /system/build.prop echo "ro.HEAVY_WEIGHT_APP_ADJ=$(($adj3-1 ))" >> /system/build.prop fi echo "ro.SECONDARY_SERVER_ADJ=$adj3" >> /system/ build.prop echo "ro.BACKUP_APP_ADJ=$(($adj4-1))" >> /system /build.prop echo "ro.HOME_APP_ADJ=$adj2" >> /system/build.pr op echo "ro.HIDDEN_APP_MIN_ADJ=$adj4" >> /system/bu ild.prop if [ "$froyo" -eq 1 ]; then echo "ro.CONTENT_PROVIDER_ADJ=$(($adj5-6 ))" >> /system/build.prop fi echo "ro.EMPTY_APP_ADJ=$adj6" >> /system/build.p rop echo "# END OOM_ADJ_Settings" >> /system/build.p rop echo "# End of V6 SuperCharged Entries" >> /syst em/build.prop echo " ...OOM Groupings and Priorities are now f ixed!" echo "" $sleep if [ "$opt" -eq 12 ]; then echo " Applying BulletProof Launcher..." echo "" $sleep if [ "$froyo" -eq 1 ]; then sed -i 's/ro.HOME_APP_ADJ=.*/ro. HOME_APP_ADJ='$adj1/ /system/build.prop else sed -i 's/ro.HOME_APP_ADJ=.*/ro. HOME_APP_ADJ='$(($adj2-2))/ /system/build.prop fi echo " Launcher is no Longer Hard To Kil l..." echo "" $sleep echo " ...It's BULLETPROOF!" else echo " Applying Hard To Kill Launcher... " echo "" $sleep if [ "$froyo" -eq 1 ]; then sed -i 's/ro.HOME_APP_ADJ=.*/ro. HOME_APP_ADJ='$(($adj2-2))/ /system/build.prop else sed -i 's/ro.HOME_APP_ADJ=.*/ro. HOME_APP_ADJ='$(($adj2-1))/ /system/build.prop

fi echo " cher APPLIED!"

...Hard To Kill Laun

fi fi echo "" $sleep echo " Applying Kernel/Memory Tweaks..." echo "" $sleep echo " oom_kill_allocating_task = 0" echo " panic_on_oom = 0" echo " panic_on_oops = 1" echo " panic = 0" echo "" $sleep cat > /data/99SuperCharger.sh /dev/null; done; echo \$scadj > /sys/module/lowmemorykiller/parameters/adj; EOF if [ -f "/data/SuperChargerMinfree" ]; then echo " echo "\$scminfree" > /sys/module/lowmemo rykiller/parameters/minfree;" >> /data/99SuperCharger.sh fi if [ "$buildprop" -eq 0 ]; then echo " sed -i '/.*_ADJ/d' /system/build.prop;" >> /data/99SuperCharger.sh echo " sed -i '/.*_MEM/d' /system/build.prop;" >> /data/99SuperCharger.sh if [ -f "/system/bin/build.prop" ]; then echo " sed -i '/.*_ADJ/d' /system/build .prop;" >> /data/99SuperCharger.sh echo " sed -i '/.*_MEM/d' /system/build .prop;" >> /data/99SuperCharger.sh fi fi cat >> /data/99SuperCharger.sh /dev/null; done; fi; EOF chown 0.0 /data/99SuperCharger.sh chmod 777 /data/99SuperCharger.sh if [ ! -f "/data/local/userinit.sh" ]; then echo "#!/system/bin/sh" > /data/local/userinit.s h; fi echo "sh /data/99SuperCharger.sh;" >> /data/local/userin it.sh chown 0.0 /data/local/userinit.sh chmod 777 /data/local/userinit.sh if [ -d "/system/etc/init.d" ]; then for i in /system/etc/init.d/S*; do Sfiles=$i;bre ak;done if [ "$Sfiles" = "/system/etc/init.d/S*" ]; then cp -fr /data/99SuperCharger.sh /system/e tc/init.d/99SuperCharger echo "sh /data/99SuperCharger.sh;" >> /s ystem/etc/init.d/99SuperCharger chown 0.0 /system/etc/init.d/99SuperChar ger chmod 777 /system/etc/init.d/99SuperChar ger echo "sh /system/etc/init.d/99SuperCharg er;" >> /data/local/userinit.sh else cp -fr /data/99SuperCharger.sh /system/e tc/init.d/S99SuperCharger echo "sh /data/99SuperCharger.sh;" >> /s ystem/etc/init.d/S99SuperCharger chown 0.0 /system/etc/init.d/S99SuperCha rger chmod 777 /system/etc/init.d/S99SuperCha rger echo "sh /system/etc/init.d/S99SuperChar ger;" >> /data/local/userinit.sh fi else echo $line echo "" $sleep echo " Stock ROM? - Additional Configuration Req uired!" echo "" $sleep if [ "$opt" -le 10 ]; then echo " Some Changes are TEMPORARY & WON' T PERSIST!" echo "" $sleep echo " To enable PERSISTENT SuperCharger settings..." echo "" $sleep echo " ing Fixes..." ...HTK Launcher and OOM Group

else echo " To enable PERSISTENT OOM Grouping Fixes..." fi echo "" $sleep if [[ -n "$smrun" ]]; then SuperChargerScriptManagerHelp=1 cat > /sdcard/SuperChargerScriptManagerHelp.html Forums
EOF echo "Use THIS app to load 99SuperCharge r.sh on boot!" echo "" $sleep echo $line echo " See /sdcard/SuperChargerScriptMan agerHelp.html" echo $line else echo " ..Please ENABLE boot scripts to b e run from..." echo " .../system/etc/i nit.d folder!" echo " Easier: Script Manager can solve everything ;)" echo "" $sleep SuperChargerHelp=1 cat > /sdcard/SuperChargerHelp.html Forums
EOF echo $line echo "See /sdcard/SuperChargerHelp.html for more help!" echo $line fi echo "" $sleep fi echo "$scadj" > /sys/module/lowmemorykiller/parameters/a dj if [ "$opt" -le 10 ]; then if [ -d "/system/etc/init.d" ]; then echo $line echo "" $sleep fi echo " Setting lowmemorykiller to $MB1,$MB2,$MB3 ,$MB4,$MB5,$MB6 mb" echo "" echo "$scminfree" > /sys/module/lowmemorykiller/ parameters/minfree currentminfree=`cat /sys/module/lowmemorykiller/ parameters/minfree` ran=1 $sleep echo " OOM minfrees levels are now set to..."

echo "" $sleep echo " ..."$currentminfree echo "" $sleep echo $line echo " SUPERCHARGE IN EFFECT IMMEDIATELY!!" fi if [ "$opt" -gt 10 ] && [ ! -d "/system/etc/init.d" ]; t hen nl=1 else echo $line echo "" $sleep fi if [ "$opt" -le 10 ]; then echo " If this is your first V6 SuperCharge...." echo "" $sleep fi echo " REBOOT NOW TO ENABLE..." echo "" $sleep if [ "$opt" -eq 12 ]; then echo " ...BULLETPROOF LAUNCHER..." else echo " ...HARD TO KILL LAUNCHER..." fi echo "" $sleep echo " ...AND OOM GROUPING FIXES!" echo "" $sleep echo $line if [ "$SuperChargerHelp" -eq 1 ]; then echo " ...AND RE-RUN THIS SCRIPT AFTER EACH RE BOOT!" elif [ "$SuperChargerScriptManagerHelp" -eq 1 ]; then echo " DON'T FORGET to have Script Manager load. .." echo " boot!" echo " r it!" elif [ "$opt" -le 10 ]; then echo "$CONFIG Settings WILL PERSIST after reboot !" echo $line echo "" $sleep echo " If they don't persist, check the help f ile!" echo "" else $sleep echo "" echo " If OOM Fixes are not in effect after rebo ot..." echo "" ...or make a Script Manager WIDGET fo .../data/99SuperCharger.sh on

$sleep echo " ak..." echo "" $sleep echo " file!" echo "" fi echo $line echo "" $sleep

...and the Launcher is we

...check the help

fi chmod 644 /system/build.prop if [ -f "/system/bin/build.prop" ]; then cp -fr /system/build.prop /system/bin/build.prop chmod 644 /system/bin/build.prop fi if [ ! -d "/sdcard/V6_SuperCharger" ]; then mkdir /sdcard/V6_SuperCharger fi cp -fr /system/build.prop /sdcard/V6_SuperCharger/build.prop if [ -f "/data/local.prop" ]; then cp -fr /data/local.prop /sdcard/V6_SuperCharger/local.pr op fi if [ -f "/data/local/userinit.sh" ]; then cp -fr /data/local/userinit.sh /sdcard/V6_SuperCharger/u serinit.sh fi if [ -f "/system/etc/rootfs/init.mapphone_umts.rc" ]; then cp -fr /system/etc/rootfs/init.mapphone_umts.rc /sdcard/ V6_SuperCharger/init.mapphone_umts.rc fi if [ -f "/system/etc/init.d/99SuperCharger" ]; then cp -fr /system/etc/init.d/99SuperCharger /sdcard/V6_Supe rCharger/99SuperCharger fi if [ -f "/system/etc/init.d/S99SuperCharger" ]; then cp -fr /system/etc/init.d/S99SuperCharger /sdcard/V6_Sup erCharger/S99SuperCharger fi if [ -f "/data/99SuperCharger.sh" ]; then cp -fr /data/99SuperCharger.sh /sdcard/V6_SuperCharger/9 9SuperCharger.sh fi if [ -f "/data/SuperChargerAdj" ]; then cp -fr /data/SuperChargerAdj /sdcard/V6_SuperCharger/Sup erChargerAdj fi if [ -f "/data/SuperChargerMinfree" ]; then cp -fr /data/SuperChargerMinfree /sdcard/V6_SuperCharger /SuperChargerMinfree fi if [ -f "/data/SuperChargerCustomMinfree" ]; then cp -fr /data/SuperChargerCustomMinfree /sdcard/V6_SuperC harger/SuperChargerCustomMinfree fi if [ -f "/data/SuperChargerOptions" ]; then cp -fr /data/SuperChargerOptions /sdcard/V6_SuperCharger

/SuperChargerOptions fi fi if [ "$opt" -eq 15 ]; then echo " This will attempt to lock an app in memory!" echo "" $sleep echo " Do you want to view the current process list?" echo "" echo -n " Enter N for No, any key for Yes: " read bp echo "" echo $line case $bp in n N)echo "" echo " Returning to main menu...";; *)ps echo $line echo "" $sleep echo " Enter a unique segment of the process name... " echo "" $sleep echo -n " Example: Opera for Opera Browser: " read ps echo "" if [ "`pgrep $ps`" ]; then echo "-17" > /proc/`pgrep $ps`/oom_adj renice -20 `pgrep $ps` echo " $ps has been BulletProofed!" echo "" $sleep echo -n " $ps's oom score is " cat /proc/`pgrep $ps`/oom_score echo "" $sleep echo -n " $ps's oom priority is " cat /proc/`pgrep $ps`/oom_adj else echo "$ps is not running..." echo "" $sleep echo "...so it can't be BulletProofed :(" fi;; esac echo "" echo $line echo "" $sleep fi if [ "$opt" -eq 16 ]; then # see http://www.droidforums.net/forum/liberty-rom-d2/122733-tut orial-sysctl-you-guide-better-preformance-battery-life.html # credit imoseyon echo " Your device may get laggy after a day or two.." echo "" $sleep echo " ...if you haven't rebooted." echo "" $sleep

echo " It happens when system caches keep growing..." echo "" $sleep echo " ...and free RAM keeps shrinking..." echo "" $sleep echo " ...and apps are starved for memory!" echo "" echo $line echo "" $sleep echo " This Engine Flush will give you a Quick Boost!" echo "" $sleep echo " The system will drop all file system caches..." echo "" $sleep echo " ...which means more free RAM and no lag!" echo "" $sleep echo " ..so no need to reboot!" echo "" $sleep echo $line echo " Credit to imoseyon for making this more known!" echo $line echo "" $sleep echo " Continue and drop all file system caches?" echo "" $sleep echo -n " Enter Y for Yes, any key for No: " read flush echo "" echo $line case $flush in y Y)sync; echo 3 > /proc/sys/vm/drop_caches echo " Engine Flush Completed!" echo "" $sleep echo " ...Enjoy Your Quick Boost :)" ;; *)echo " File system caches were retained...";; esac echo $line echo "" $sleep fi if [ "$opt" -eq 17 ]; then echo " This is EXPERIMENTAL..." echo "" $sleep echo " ...it may improve multitasking..." echo "" $sleep echo " ...it may make your device even snappier..." echo "" $sleep echo " ...it may really do nothing..." echo ""

$sleep echo " But some people swear that it's great!" echo "" echo $line echo "" $sleep while : do echo -n " Enter 1 to Install, 2 to Uninstall, 3 to Exit:" read nitro case $nitro in 1)nitroinstall=1;break;; 2)nitroinstall=0;break;; 3)nitroinstall=;break;; *)echo "" echo " Invalid entry... Please try again :)" echo "" $sleep;; esac done echo "" echo $line if [[ -n "$nitroinstall" ]]; then if [ "$nitroinstall" -eq 1 ]; then if [ ! -f "/system/build.prop.unsuper" ]; then echo " Backing up ORIGINAL build.prop... " cp -r /system/build.prop /system/build.p rop.unsuper else echo " Leaving ORIGINAL build.prop backu p intact..." fi echo $line echo "" $sleep fi if [ -f "/system/bin/build.prop" ] && [ ! -f "/system/bi n/build.prop.unsuper" ]; then cp -r /system/bin/build.prop /system/bin/build.p rop.unsuper fi sed -i '/Nullifier/,/Nullified/d' /system/build.prop if [ "$nitroinstall" -eq 1 ]; then cat >> /system/build.prop


Recommended