v6 supercharger for android-update9 rc4.sh

Upload: eroyardiana

Post on 14-Jul-2015

449 views

Category:

Documents


0 download

TRANSCRIPT

#!/system/bin/sh # V6 SuperCharger, OOM Grouping & Priority Fixes created by zeppelinrox. echo "" echo "================================================" echo " NOTE: BUSYBOX v1.16.2 OR HIGHER IS RECOMMENDED!" echo "================================================" sleep 2 #set -o errexit cat > /sdcard/SuperCharger.html /dev/null; then break; fi echo " Input Error! Try again :) ";sleep 2 done fi if [ "$break" -eq 0 ]; then while :; do echo -n " if [ "$MB6" = "X" ] ; break; fi if [ "$MB6" -gt 0 ] 2>/dev/null; then break; fi echo " Input Error! Try again :) ";sleep 2 done fi echo "" if [ "$break" -eq 0 ]; then $sleep echo $line echo " CONFIRM: Cust-OOMize $MB1, $MB2, $MB3, $MB4, $MB5 , $MB6 MB?" echo $line echo "" $sleep echo -n " Enter N for No, any key for Yes: " read custOOM echo "" case $custOOM in n N)opt=22;; *)echo $line echo " Cust-OOMizer Settings Accepted!" ;; esac else opt=23 fi fi;; 11)echo " OOM GROUPING FIXES PLUS..." echo "" echo " ...HARD TO KILL LAUNCHER!" if [ "$gb" -eq 0 ]; then

Slot 5: ";read MB5 [ "$MB5" = "x" ]; then break=1

Slot 6: ";read MB6 [ "$MB6" = "x" ]; then break=1

echo $line echo "" echo " Sorry, Hard To Kill Launcher..." echo "" $sleep echo " ...is only available on Gingerbread ROMS..." echo "" $sleep echo " ...or Greater!" echo "" opt=23 fi;; 12)echo " OOM GROUPING FIXES PLUS..." echo "" echo " ...DIE-HARD LAUNCHER!";; 13)echo " OOM GROUPING FIXES PLUS..." echo "" echo " ...BULLETPROOF LAUNCHER!";; 14)echo " ====================" echo " //// UNKERNELIZER \\\\\\\\" if [ ! -f "/system/etc/init.d/99SuperCharger" ] && [ ! -f "/system/etc/ init.d/S99SuperCharger" ] && [ ! -f "/data/99SuperCharger.sh" ] && [ ! -f "$rcpa th" ] && [ ! -f "$initrcpath" ]; then echo $line echo " There's Nothing to UnKernelize!" opt=23 fi;; 15)echo " =======================" echo " //// UN-SUPERCHARGER \\\\\\\\" echo $line echo "" $sleep echo " WHAT? UnSuperCharge? Are you sure?" echo "" $sleep echo -n " Enter Y for Yes, any key for No: " read unsuper echo "" echo $line case $unsuper in y Y)echo " Well... okay then... be like that! :p";; *)echo " False alarm... *whew*" opt=23;; esac;; 16)echo " =======================" echo " //// THE bOOM STICK! \\\\\\\\";; 17)echo " ========================" echo " //// BULLETPROOF APPS \\\\\\\\";; 18)echo " ====================" echo " //// ENGINE FLUSH \\\\\\\\";; 19)echo " =================" echo " //// DETAILING \\\\\\\\";; 20)echo " ===========================" echo " //// NITRO LAG NULLIFIER \\\\\\\\";; 21)echo " ======================" echo " //// SYSTEM INSTALL \\\\\\\\";; 22)echo " =======================" echo " //// RE-SUPERCHARGER \\\\\\\\";; 23)echo " =====================" echo " //// POWERSHIFTING \\\\\\\\"

echo $line echo "" $sleep echo " Now you can quickly switch minfree settings!" echo "" $sleep echo " When you run a preset or the Cust-OOMizer..." echo "" $sleep echo " ...a PowerShift Script..." echo "" $sleep echo " ...is saved to your SD Card!" echo "" echo $line $sleep echo " You can find them in the folder..." echo "" $sleep echo ".../sdcard/V6_SuperCharger/PowerShift_Scripts :D" echo $line echo "" $sleep echo " Just create Script Manager widgets for them..." echo "" $sleep echo " ...and PowerShift between settings!" echo "" $sleep echo $line echo " They will also be your new SuperCharger values!" echo $line echo "" $sleep echo " They will have descriptive names..." echo "" $sleep echo " ...indicating minfree values." echo "" $sleep echo " Different Cust-OOMizer settings will be saved!" echo "";; 24)echo " =================" echo " //// HELP FILE \\\\\\\\" echo $line echo "" $sleep echo " Loading Help File..." echo "" $sleep am start -a android.intent.action.VIEW -n com.android.browser/.BrowserA ctivity -d file:///sdcard/SuperCharger.html echo "" echo " I hope that helped! :)" echo "";; 25)echo " =============================" echo " //// UPDATES & HELP ONLINE \\\\\\\\" echo $line echo "" $sleep

echo " Loading web site for more help & updates..." echo "" $sleep am start http://forum.xda-developers.com/showthread.php?t=991276 echo "" echo " I hope that helped! :)" echo "";; 26)echo " ===============" echo " //// OPTIONS \\\\\\\\" echo $line echo "" $sleep echo " Scrolling speed options..." echo "" $sleep echo " 1(fast), 2(normal), 3(slow)" echo "" $sleep while : do echo -n " Please select scrolling speed (1 - 3): " read speed case $speed in 0)sleep="sleep $speed";break;; 1)sleep="sleep $speed";break;; 2)sleep="sleep $speed";break;; 3)sleep="sleep $speed";break;; *)echo "" echo " Invalid entry... Please try again :)" echo "" $sleep;; esac done echo "" $sleep echo " Scrolling Speed is now set to $speed..." echo "" echo $line echo "" $sleep echo " Build.prop vs Local.prop..." echo "" $sleep echo " If your launcher does NOT stay SuperCharged..." echo "" $sleep echo " You can apply MEM and ADJ values..." echo "" $sleep echo " ...to build.prop instead of local.prop!" echo "" $sleep echo " This is more likely to stick but is riskier..." echo "" $sleep echo $line echo " WARNING: There is a small chance of bootloops!" echo "" $sleep echo " ...so have a backup available!"

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 use the build.prop method!" buildprop=1;; *)echo " Okay... will try local.prop method again..." buildprop=0;; esac showbuildpropopt=0 echo "" echo $line echo "" $sleep if [ -d "/system/etc/init.d" ]; then echo " System Integration - $initrcpath1 options..." echo "" $sleep echo " SuperCharger can attempt proper integration..." echo "" $sleep echo " ...with system files on boot using init.rc..." echo "" $sleep echo " If it sticks, it makes for a much cleaner mod!" echo "" $sleep echo " Root access issues are rare, but can occur..." echo "" $sleep echo $line echo " Regardless, a SuperCharged init.rc file..." echo "" $sleep echo " ...can always be found in /data!" echo $line $sleep echo " Note: You can bake $initrcpath into your ROM!" echo $line echo "" $sleep echo -n " Integrate? Enter Y for Yes, any key for No: " read bake echo "" case $bake in y Y)initrc=1 echo " System Integration of $initrcpath1 is now ON!"; ; *)initrc=0 echo " System Integration of $initrcpath1 is now OFF!" ;; esac echo "" echo $line

echo "" $sleep fi echo " Disable AWESOME V6 Animation?" echo "" $sleep echo -n " Enter Y for Yes, any key for No: " read animate echo "" case $animate in y Y)animation=0 echo " Boo... Animation is OFF...";; *)animation=1 echo " Yay... Animation is ON...";; esac echo "" $sleep echo "$speed,$buildprop,$animation,$initrc" > /data/SuperChargerOptions echo $line echo " Settings have been saved!";; 27)echo " ===============" echo " //// DONATE! \\\\\\\\" echo $line echo "" $sleep echo " Gimme some sugar, baby..." echo "" $sleep echo " ...before my hand goes bad!" echo "" $sleep echo " I've done ALOT of work to make this GREAT..." echo "" $sleep echo " ...possibly the BEST script EVER..." echo "" $sleep echo " ...hours, weeks, months... almost a YEAR..." echo "" $sleep echo " So if you think I deserve a few bucks..." echo "" $sleep echo " ...I'd really appreciate it! :D" echo "" $sleep echo " Come give some! hehe..." echo "" $sleep echo " ...AOD FTW!!" echo "" $sleep am start http://forum.xda-developers.com/donatetome.php?u=3357461 echo "" echo " I hope you helped! :)" echo "";; 28)echo " =================" echo " //// OFF TOPIC \\\\\\\\" echo $line echo ""

$sleep echo " Ok this is \"Off Topic\"..." echo "" $sleep echo " ...but maybe there's a good reason..." echo "" $sleep echo " ...why this script is so popular :p" echo "" $sleep echo " It's profound... so just read the link..." echo "" $sleep echo " ...and decide for yourself if it makes sense!" echo "" $sleep echo " If you don't like it... remember..." echo "" $sleep echo " ...don't shoot the messenger!" echo "" $sleep echo " Either way... I'm not crazy..." echo "" $sleep echo " ...and you may learn something..." echo "" $sleep echo " ...even if you're a doctor!" echo "" $sleep;$sleep am start http://www.cancertutor.com/ echo "";; 29)echo $line echo " !!POOF!!" echo $line echo "" $sleep busybox sync echo 1 > /proc/sys/kernel/sysrq echo b > /proc/sysrq-trigger echo " If it don't go poofie, just reboot manually!" echo "" reboot;; 30)echo " ===================" echo " //// SUPERCLEAN! \\\\\\\\" if [ "$ram1" -ne "$ram2" ]; then opt=23; fi;; 31)echo " Did you find this useful? Feedback is welcome!";; *) echo " #!*@%$*?%@&)&*#!*?(*)(*)&(!)%#!&?@#$*%&?&$%$*#?!" echo "" sleep 2 echo " oops.. typo?! $opt is an Invalid Option!" echo "" sleep 2 echo " 1 31 !!" echo "" sleep 2 echo -n " hehe... Press Enter key to continue... ;) " read return opt=0;;

esac if [ "$opt" -ne 1 ] && [ "$opt" -ne 14 ] && [ "$opt" -ne 15 ] && [ "$opt" -ne 16 ] && [ "$opt" -le 23 ] && [ "$ram1" -ne "$ram2" ]; then opt=69; fi if [ "$opt" -ne 0 ] && [ "$opt" -ne 31 ] && [ "$opt" -ne 69 ]; then echo $line echo "" $sleep fi if [ "$opt" -eq 1 ]; then echo " Out Of Memory (OOM) / lowmemorykiller values:" echo "" $sleep echo " "$currentminfree pages echo "" $sleep awk -F , '{print " Which means: "$1/256",",$2/256",",$3/256",",$4/256", ",$5/256",",$6/256 " MB"}' /sys/module/lowmemorykiller/parameters/minfree echo "" echo $line echo "" $sleep echo " Home Launcher Priority is: $HL" echo "" $sleep echo " Foreground App Priority is: $FA" echo "" $sleep if [ "$gb" -eq 1 ]; then echo " Perceptible App Priority is: $PA" echo "" $sleep fi echo " Visible App Priority is: $VA" echo "" echo $line echo "" $sleep if [ "$status" -eq 4 ]; then echo " Launcher is greater than Visible App..." echo "" $sleep echo $line echo " Wow, that's one weak ass launcher! :(" elif [ "$status" -eq 3 ]; then echo " Launcher is equal to Visible App..." echo "" $sleep echo " ...Home Launcher is Locked In Memory!" echo "" $sleep echo $line echo " meh... that's still pretty weak! :P" elif [ "$status" -eq 0 ]; then echo " Launcher is equal to Foreground App..." echo "" $sleep if [ "$gb" -eq 1 ]; then echo " ...is less than Perceptible App..." echo "" $sleep

fi echo " ...and is less than Visible App..." echo "" $sleep echo $line echo " Home Launcher is BULLETPROOF!" elif [ "$status" -eq 1 ]; then echo " Launcher is greater than Foreground App..." echo "" $sleep if [ "$gb" -eq 1 ]; then echo " ...is less than Perceptible App..." echo "" $sleep fi echo " ...and is less than Visible App..." echo "" $sleep echo $line echo " Home Launcher is DIE-HARD!" else echo " Launcher is greater than Foreground App..." echo "" $sleep if [ "$gb" -eq 1 ]; then echo " ...is equal to Perceptible App..." echo "" $sleep fi echo " ...and is less than Visible App..." echo "" $sleep echo $line echo " Home Launcher is very HARD TO KILL!" fi echo $line echo "" $sleep echo " SuperCharger and Launcher Status..." echo "" $sleep echo " ...by -=zeppelinrox=- @ XDA & Droid Forums" sleep 2 elif [ "$opt" -ge 2 ] && [ "$opt" -le 31 ]; then if [ "$opt" -eq 22 ]; then echo " Restore previous V6 SuperCharger Settings..." echo "" $sleep echo " ...from your SD Card?" echo "" $sleep echo -n " Enter Y for Yes, any key for No: " read resuper echo "" echo $line $sleep case $resuper in y Y)echo " Re-SuperCharging from your SD Card..." echo "" $sleep

if [ -f "/sdcard/V6_SuperCharger/97BulletProof_Apps.sh " ]; then cp -fr /sdcard/V6_SuperCharger/97BulletProof_App s.sh /data/97BulletProof_Apps.sh fi if [ -f "/sdcard/V6_SuperCharger/97BulletProof_Apps" ] ; then cp -fr /sdcard/V6_SuperCharger/97BulletProof_App s /system/etc/init.d/97BulletProof_Apps fi if [ -f "/sdcard/V6_SuperCharger/S97BulletProof_Apps" ]; then cp -fr /sdcard/V6_SuperCharger/S97BulletProof_Ap ps /system/etc/init.d/S97BulletProof_Apps fi if [ -f "/sdcard/V6_SuperCharger/Fast_Engine_Flush.sh" ]; then cp -fr /sdcard/V6_SuperCharger/Fast_Engine_Flush .sh /data/Fast_Engine_Flush.sh fi if [ -f "/sdcard/V6_SuperCharger/Detailing.sh" ]; then cp -fr /sdcard/V6_SuperCharger/Detailing.sh /dat a/Detailing.sh fi if [ -f "/sdcard/V6_SuperCharger/SuperClean.sh" ]; the n cp -fr /sdcard/V6_SuperCharger/SuperClean.sh /da ta/SuperClean.sh fi if [ -f "/sdcard/V6_SuperCharger/SuperChargerAdj" ]; t hen cp -fr /sdcard/V6_SuperCharger/SuperChargerAdj / data/SuperChargerAdj fi if [ -f "/sdcard/V6_SuperCharger/SuperChargerMinfree" ]; then cp -fr /sdcard/V6_SuperCharger/SuperChargerMinfr ee /data/SuperChargerMinfree fi if [ -f "/sdcard/V6_SuperCharger/SuperChargerCustomMin free" ]; then cp -fr /sdcard/V6_SuperCharger/SuperChargerCusto mMinfree /data/SuperChargerCustomMinfree fi if [ -f "/sdcard/V6_SuperCharger/SuperChargerOptions" ]; then cp -fr /sdcard/V6_SuperCharger/SuperChargerOptio ns /data/SuperChargerOptions fi if [ -f "/sdcard/V6_SuperCharger/99SuperCharger" ]; th en cp -fr /sdcard/V6_SuperCharger/99SuperCharger /s ystem/etc/init.d/99SuperCharger fi if [ -f "/sdcard/V6_SuperCharger/S99SuperCharger" ]; t hen cp -fr /sdcard/V6_SuperCharger/S99SuperCharger / system/etc/init.d/S99SuperCharger fi if [ -f "/sdcard/V6_SuperCharger/99SuperCharger.sh" ];

then cp -fr /sdcard/V6_SuperCharger/99SuperCharger.sh /data/99SuperCharger.sh fi echo " To avoid conflicts (different rom, etc)..." echo "" $sleep echo " ...some system files were not restored!" echo $line echo "" $sleep echo " Nitro Lag Nullifier and 3G TurboCharger..." echo "" $sleep echo " ...may need to be re-installed!" echo "" echo $line echo "" $sleep echo " But this comes first..." echo "" $sleep echo " Select a launcher to complete Re-SuperCharge... " echo "" $sleep while : do echo -n " Enter 1 (HTK) 2 (Die-Hard) 3 (BulletPr oof): " read launcher case $launcher in 1)opt=11;break;; 2)opt=12;break;; 3)opt=13;break;; *)echo "" echo " Invalid entry... Please try again :)" echo "" $sleep;; esac done;; *)echo " Re-SuperCharging declined... meh...";; esac echo $line echo "" $sleep fi if [ "$opt" -le 15 ]; then if [ "$opt" -le 10 ]; then SP1=$(($MB0*256));SL1=$(($MB1*256));SL2=$(($MB2*256));SL 3=$(($MB3*256));SL4=$(($MB4*256));SL5=$(($MB5*256));SL6=$(($MB6*256)) echo " zOOM... zOOM..." echo "" $sleep fi if [ "$opt" -le 13 ]; then echo "============= Information Section ============" echo " =======================" echo ""

$sleep if [ "$showbuildpropopt" -eq 1 ];then echo " Even though you SuperCharged before..." echo "" $sleep echo " ...Your 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: There is a small chance of bootl oops!" echo "" $sleep echo " able!" 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 use the build.prop met hod!" buildprop=1;; *)echo " Okay... will try local.prop met hod again..." buildprop=0;; esac echo "" $sleep echo "$speed,$buildprop,$animation,$initrc" > /d ata/SuperChargerOptions echo " Settings have been saved!" echo "" $sleep echo " Note: This can be changed later under Opt ions!" echo "" echo $line echo "" $sleep ...so have a backup avail

fi if [ -f "/system/build.prop.unsuper" ]; then echo " Leaving ORIGINAL build.prop backup intact ..." else echo " Backing up ORIGINAL build.prop..." echo "" $sleep cp -r /system/build.prop /system/build.prop.unsu per echo " uper!" 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 if [ -f "/data/local.prop" ]; then echo "" $sleep if [ -f "/data/local.prop.unsuper" ]; then echo " Leaving ORIGINAL local.prop backu p intact..." else echo " Backing up ORIGINAL local.prop... " echo "" $sleep cp -r /data/local.prop /data/local.prop. unsuper echo " ...as /data/local. prop.unsuper!" fi fi echo "" $sleep echo $line echo -n " MEM and ADJ values to be applied to " if [ "$buildprop" -eq 0 ];then echo "LOCAL.PROP!" else echo "BUILD.PROP!" fi echo $line echo "" $sleep fi if [ "$opt" -ne 14 ]; then if [ -f "/sdcard/UnSuperCharged.html" ]; then rm /sdcard/UnSuperCharged.html fi if [ -f "/sdcard/UnSuperChargerError.html" ]; then rm /sdcard/UnSuperChargerError.html fi if [ -f "/sdcard/SuperChargerScriptManagerHelp.html" ]; then rm /sdcard/SuperChargerScriptManagerHelp.html fi if [ -f "/sdcard/SuperChargerHelp.html" ]; then ...as /system/build.prop.uns

rm /sdcard/SuperChargerHelp.html fi fi if [ "$opt" -le 14 ]; then if [ -f "$initrcpath1" ] && [ ! -f "$initrcpath" ]; then cp -r $initrcpath1 $initrcpath fi if [ -f "$rcpath" ]; then echo " Found "$rcpath echo "" $sleep if [ -f "$rcbackup" ]; then echo " Backup already exists... leaving backup intact" else cp -r $rcpath $rcbackup echo " Backing up ORIGINAL settings..." fi echo "" $sleep if [ -f "$initrcpath1" ] && [ ! -f "$initrcbacku p" ]; then cp -r $initrcpath1 $initrcbackup fi echo $line if [ "$opt" -ge 11 ] && [ "$opt" -le 13 ]; then echo " $rcfile will be OOM Fixed!" elif [ "$opt" -eq 14 ]; then echo " $rcfile to be UnKernelized!" else echo " $rcfile will be SuperCharged!" fi elif [ -f "$initrcpath1" ]; then echo " Found "$initrcpath1 echo "" $sleep if [ -f "$initrcbackup" ]; then echo " Backup already exists... leaving backup intact" else cp -r $initrcpath1 $initrcbackup echo " Backing up ORIGINAL settings..." fi echo "" $sleep if [ "$initrc" -eq 0 ]; then echo " System Integration of $initrcpath 1 is OFF..." echo "" $sleep echo " But for cooking/baking into ROMs. .." echo "" $sleep fi echo $line if [ "$initrc" -eq 0 ]; then echo -n " .../data/" else echo -n " "

fi if [ "$opt" -ge 11 ] && [ "$opt" -le 13 ]; then echo "$initrcfile will be OOM Fixed!" elif [ "$opt" -eq 14 ]; then echo "$initrcfile to be UnKernelized!" else echo "$initrcfile will be SuperCharged!" fi fi echo $line echo "" $sleep fi if [ "$opt" -eq 15 ]; then echo " UNSUPERCHARGE..." echo "" sleep 1 echo " ...UNFIX OOM GROUPINGS..." echo "" sleep 1 echo " ...RESTORE WEAK ASS LAUNCHER" echo "" echo $line echo "" $sleep echo " UnSuperCharging Performance...." echo "" $sleep scminfree= sccminfree= if [ ! -f "/system/etc/init.d/99SuperCharger" ] && [ ! f "/system/etc/init.d/S99SuperCharger" ] && [ ! -f "/data/99SuperCharger.sh" ] & & [ ! -f "$rcpath" ] && [ ! -f "$initrcpath" ] && [ ! -f "$rcbackup" ] && [ ! -f "$initrcbackup" ]; then echo " I Got Nothing To Do! Try SuperCharging fi rst!" echo "" $sleep UnSuperCharged=1 cat > /sdcard/UnSuperCharged.html /sdcard/UnSuperChargerError.html /sys/module /lowmemorykiller/parameters/minfree;" >> /system/etc/hw_config.sh fi if [ "$buildprop" -eq 0 ]; then echo " sed -i '/.*_ADJ/d' /system/build .prop;" >> /system/etc/hw_config.sh echo " sed -i '/.*_MEM/d' /system/build .prop;" >> /system/etc/hw_config.sh if [ -f "/system/bin/build.prop" ]; then echo " sed -i '/.*_ADJ/d' /syst em/bin/build.prop;" >> /system/etc/hw_config.sh echo " sed -i '/.*_MEM/d' /syst em/bin/build.prop;" >> /system/etc/hw_config.sh fi fi cat >> /system/etc/hw_config.sh /data/SuperChargerRan; echo ""; echo " SuperCharger Settings Applied!"; else echo "\$( date +"%m-%d-%Y %H:%M:%S" ): Ran and DIDN'T Apply Settings fro m \$0" >> /data/SuperChargerRan; echo " SuperCharger Settings Were ALREADY Applied!"; fi; echo ""; echo " \$0 Completed!"; echo ""; busybox mount -o remount,ro /system 2>/dev/null; for m in /dev/block/mtdblock*; do busybox mount -o remount,ro \$m /system 2>/dev/null; done; sh /data/99SuperCharger.sh; # End of V6 SuperCharged Entries EOF fi if [ -d "/system/etc/init.d" ]; then echo " SuperCharging your init.d folder..." echo "" $sleep 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 if [ -f "/system/etc/init.d/99SuperCharg er" ]; then sed -i '/30.*/s/^/#/' /system/et c/init.d/99SuperCharger sed -i '/SuperCharged/ i\ sh /data/99SuperCharger.sh;' /system/etc/init.d/99SuperCharger chown 0.0 /system/etc/init.d/99S uperCharger chmod 777 /system/etc/init.d/99S uperCharger echo "sh /system/etc/init.d/99Su perCharger;" >> /data/local/userinit.sh echo " ...with /system/etc/i nit.d/99SuperCharger!" else echo " WARNING: ERROR copying fi le to /system/init.d!" echo "" $sleep echo " Got enough free space?" echo "" $sleep echo " System Partition has `df -h system awk '{print $4}' sed -n 2p` Free ie. `df -h system awk '{print $ 5}' sed -n 2p` Used" fi else cp -fr /data/99SuperCharger.sh /system/e tc/init.d/S99SuperCharger if [ -f "/system/etc/init.d/S99SuperChar ger" ]; then sed -i '/30.*/s/^/#/' /system/et c/init.d/S99SuperCharger sed -i '/SuperCharged/ i\ sh /data/99SuperCharger.sh;' /system/etc/init.d/S99SuperCharger chown 0.0 /system/etc/init.d/S99 SuperCharger chmod 777 /system/etc/init.d/S99 SuperCharger echo "sh /system/etc/init.d/S99S uperCharger;" >> /data/local/userinit.sh echo " ...with /system/etc/in it.d/S99SuperCharger!" else echo " WARNING: ERROR copying fi le to /system/init.d!" echo "" $sleep echo " Got enough free space?" echo "" $sleep echo " System Partition has `df -h system awk '{print $4}' sed -n 2p` Free ie. `df -h system awk '{print $ 5}' sed -n 2p` Used" fi fi echo ""

else 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 " ...Die-Hard Launcher and OOM Grou ping Fixes..." 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" else echo " ..Please ENABLE boot scripts to b e run from..." echo " 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!" fi fi echo $line $sleep echo "$scadj" > /sys/module/lowmemorykiller/parameters/a dj if [ "$opt" -le 10 ]; then echo "" .../system/etc/i

echo " Setting LowMemoryKiller to $MB1,$MB2,$MB3 ,$MB4,$MB5,$MB6 MB" echo "" $sleep echo "$scminfree" > /sys/module/lowmemorykiller/ parameters/minfree currentminfree=`cat /sys/module/lowmemorykiller/ parameters/minfree` echo " OOM minfrees levels are now set to..." echo "" $sleep echo " ..."$currentminfree echo "" $sleep echo $line echo " SUPERCHARGE IN EFFECT IMMEDIATELY!!" echo $line echo "" $sleep cat > "/data/$CONFIG-($MB1,$MB2,$MB3,$MB4,$MB5,$MB6).sh" /data/SuperChargerMinfree echo " OOM minfrees levels are now set to..." echo "" echo " ...\`cat /sys/module/lowmemorykiller/parameters/minfree\`" echo "" sleep 1 echo " They are also your new SuperCharger values!" echo "" sleep 1 echo " ===========================" echo " ) PowerShift Completed! (" echo " ==========================="

echo "" EOF cp -fr "/data/$CONFIG-($MB1,$MB2,$MB3,$MB4,$MB5, $MB6).sh" "/sdcard/V6_SuperCharger/PowerShift_Scripts/$CONFIG-($MB1,$MB2,$MB3,$M B4,$MB5,$MB6).sh" echo " A PowerShift Script was saved to /data fo lder!" echo "" $sleep echo " Find $CONFIG-($MB1,$MB2,$MB3,$MB4,$MB5,$M B6).sh..." echo "" $sleep echo " ...make a Widget for it..." echo "" $sleep echo " ...and PowerShift between sett ings!" echo "" $sleep echo " They will also be your new SuperCharger v alues!" echo "" $sleep echo $line fi if [ "$newlauncher" -eq 1 ]; then echo " LAUNCHER CHANGE DETECTED!" echo $line echo "" $sleep echo " REBOOT NOW TO ENABLE..." echo "" $sleep if [ "$opt" -eq 13 ]; then echo " ...BULLETPROOF LAUNCHER. .." elif [ "$opt" -eq 11 ]; then echo " ...HARD TO KILL LAUNCHER. .." else echo " ...DIE-HARD LAUNCHER. .." fi echo "" $sleep echo " ...AND OOM GROUPING F IXES!" echo "" $sleep echo $line fi if [ "$SuperChargerHelp" -eq 1 ]; then echo " RUN /data/99SuperCharger.sh AFTER EACH RE BOOT!" elif [ "$SuperChargerScriptManagerHelp" -eq 1 ]; then echo " DON'T FORGET to have Script Manager load. .." echo " .../data/99SuperCharger.sh on

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't in effect after a rebo ot..." echo "" $sleep echo " ak..." echo "" $sleep echo " file!" echo "" fi echo $line echo "" $sleep fi ran=1 if [ -f "/system/bin/build.prop" ]; then cp -fr /system/build.prop /system/bin/build.prop fi # chmod 644 /system/build.prop # chmod 644 /system/bin/build.prop if [ -f "/data/local.prop" ]; then chmod 644 /data/local.prop fi if [ "$opt" -ne 15 ]; then if [ ! -f "$rcpath" ] && [ -f "$initrcpath" ] && [ "$ini trc" -eq 1 ]; then cp -fr $initrcpath $initrcpath1 fi echo " Backing up Re-SuperCharger files to SD Card... " echo "" $sleep cp -fr /system/build.prop /sdcard/V6_SuperCharger/build. prop if [ -f "/system/build.prop.unsuper" ]; then cp -fr /system/build.prop.unsuper /sdcard/V6_Sup erCharger/build.prop.unsuper fi if [ -f "/data/local.prop.unsuper" ]; then cp -fr /data/local.prop.unsuper /sdcard/V6_Super Charger/local.prop.unsuper fi if [ -f "/data/local.prop" ]; then cp -fr /data/local.prop /sdcard/V6_SuperCharger/ ...check the help ...and the Launcher is we ...or make a Script Manager WIDGET fo

local.prop fi if [ -f "/data/local/userinit.sh" ]; then cp -fr /data/local/userinit.sh /sdcard/V6_SuperC harger/userinit.sh fi if [ -f "$rcpath" ]; then cp -fr $rcpath /sdcard/V6_SuperCharger fi if [ -f "$rcbackup" ]; then cp -fr $rcbackup /sdcard/V6_SuperCharger fi if [ -f "$initrcpath" ]; then cp -fr $initrcpath /sdcard/V6_SuperCharger fi if [ -f "$initrcbackup" ]; then cp -fr $initrcbackup /sdcard/V6_SuperCharger fi if [ -f "/system/etc/hw_config.sh" ]; then cp -fr /system/etc/hw_config.sh /sdcard/V6_Super Charger/hw_config.sh fi if [ -f "/system/etc/init.d/99SuperCharger" ]; then cp -fr /system/etc/init.d/99SuperCharger /sdcard /V6_SuperCharger/99SuperCharger fi if [ -f "/system/etc/init.d/S99SuperCharger" ]; then cp -fr /system/etc/init.d/S99SuperCharger /sdcar d/V6_SuperCharger/S99SuperCharger fi if [ -f "/data/99SuperCharger.sh" ]; then cp -fr /data/99SuperCharger.sh /sdcard/V6_SuperC harger/99SuperCharger.sh fi if [ -f "/data/SuperChargerAdj" ]; then cp -fr /data/SuperChargerAdj /sdcard/V6_SuperCha rger/SuperChargerAdj fi if [ -f "/data/SuperChargerMinfree" ]; then cp -fr /data/SuperChargerMinfree /sdcard/V6_Supe rCharger/SuperChargerMinfree fi if [ -f "/data/SuperChargerCustomMinfree" ]; then cp -fr /data/SuperChargerCustomMinfree /sdcard/V 6_SuperCharger/SuperChargerCustomMinfree fi if [ -f "/data/SuperChargerOptions" ]; then cp -fr /data/SuperChargerOptions /sdcard/V6_Supe rCharger/SuperChargerOptions fi echo " ...Re-SuperCharger backup complete!" echo "" echo $line echo "" $sleep if [ "$newsupercharger" -eq 1 ]; then echo " I think this is your FIRST SuperCharge... " echo "" $sleep

echo " Select YES in the next step to..." echo "" $sleep echo $line echo " ...SuperClean & ReS tart!" echo $line echo "" $sleep opt=30 echo -n " Press Return Key..." read return echo "" $sleep fi fi fi if [ "$opt" -eq 16 ] [ "$opt" -eq 17 ]; then if [ "$opt" -eq 16 ]; then echo " Does Your OOM Stick?!" echo " =====================" echo "" $sleep echo " Find Out Here... AND Find Your Home Launcher!!" echo "" $sleep echo " Choose from 2 bitchin' OOM Sticks..." echo "" $sleep echo " zOOM Stick (Quick) Mode is faster..." echo "" $sleep echo " ...it shows App Name, Priority (ADJ), and PID!" echo "" $sleep echo " vrOOM Stick (Verbose) mode is slower..." echo "" $sleep echo " ...but adds Path and/or Apk file info!" echo "" echo $line echo "" $sleep echo " Do you want vrOOM or zOOM Stick mode?" echo "" $sleep echo -n " Enter V for vrOOM, any key for zOOM: " read chooseverifier echo "" echo $line case $chooseverifier in v V)echo " vrOOM Stick Verifier (Verbose) selected..." vroomverifier=1;; *)echo " zOOM Stick Verifier (Quick) selected..." vroomverifier=0;; esac echo $line echo "" $sleep fi

if [ "$opt" -eq 17 ]; 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 " Okay... maybe next time!";; *)echo " Loading zOOM Stick Verifier (Quick)..." vroomverifier=0 echo $line echo "" $sleep;; esac fi if [[ -n "$vroomverifier" ]]; then oomadj1=`awk -F , '{print $1}' /sys/module/lowmemorykill er/parameters/adj`;oomadj2=`awk -F , '{print $2}' /sys/module/lowmemorykiller/pa rameters/adj`;oomadj3=`awk -F , '{print $3}' /sys/module/lowmemorykiller/paramet ers/adj`;oomadj4=`awk -F , '{print $4}' /sys/module/lowmemorykiller/parameters/a dj`;oomadj5=`awk -F , '{print $5}' /sys/module/lowmemorykiller/parameters/adj`;o omadj6=`awk -F , '{print $6}' /sys/module/lowmemorykiller/parameters/adj` fi if [[ -n "$vroomverifier" ]] && [ "$vroomverifier" -eq 0 ]; then echo "----====zeppelinrox's bOOM Stick Verifier====---" echo "" $sleep echo " Using zOOM Stick Mode (Quick)..." echo "" $sleep echo " ADJ PID Process" echo "" echo " FOREGROUND_APP OOM GROUPING" echo " ===========================" if [ "$HL" -gt -18 ] && [ "$HL" -lt "$oomadj1" ]; then echo "" echo " HOME LAUNCHER IS IN HERE! (ADJ=$HL)" echo "" fi for i in ls /proc/* do if [ -f "$i/oom_adj" ] && [[ -n "`cat $i/cmdline`" ]] && [ "`cat $i/oom_adj`" -gt -18 ] && [ "`cat $i/oom_adj`" -lt "$oomadj1" ]; then cmdline=`cat $i/cmdline` appname=${cmdline##*/} pid=${i##*/} echo -n " `cat $i/oom_adj` " echo -n $pid echo " $appname" fi done if [ "$HL" -eq "$oomadj1" ]; then echo "" echo " HOME LAUNCHER IS IN HERE! (ADJ=$HL)" echo "" fi

for i in ls /proc/* do if [ -f "$i/oom_adj" ] && [[ -n "`cat $i/cmdline`" ]] && [ "`cat $i/oom_adj`" -eq "$oomadj1" ]; then cmdline=`cat $i/cmdline` appname=${cmdline##*/} pid=${i##*/} echo -n " `cat $i/oom_adj` " echo -n $pid echo " $appname" fi done echo "" if [[ -n "$scadj" ]] && [ "$currentadj" = "$scadj" ] && [ "$oomstick" -eq 1 ] && [ "$HL" -ne "$oomadj1" ]; then echo " HOME_LAUNCHER OOM GROUPING!" echo " ===========================" for i in ls /proc/* do if [ -f "$i/oom_adj" ] && [[ -n "`cat $i/cmdline `" ]] && [ "`cat $i/oom_adj`" -gt "$oomadj1" ] && [ "`cat $i/oom_adj`" -lt "$oom adj2" ]; then if [ "`cat $i/oom_adj`" -eq "$HL" ] && [ "$HL" -ne "$PA" ]; then echo "" echo " Home Launcher is on the N EXT line! (ADJ=$HL)" fi cmdline=`cat $i/cmdline` appname=${cmdline##*/} pid=${i##*/} echo -n " `cat $i/oom_adj` " echo -n $pid echo " $appname" if [ "`cat $i/oom_adj`" -eq "$HL" ]; the n echo "" fi fi done echo "" echo " VISIBLE_APP OOM GROUPING" echo " ========================" for i in ls /proc/* do if [ -f "$i/oom_adj" ] && [[ -n "`cat $i/cmdline `" ]] && [ "`cat $i/oom_adj`" -eq "$oomadj2" ]; then cmdline=`cat $i/cmdline` appname=${cmdline##*/} pid=${i##*/} echo -n " `cat $i/oom_adj` " echo -n $pid echo " $appname" fi done else echo " VISIBLE_APP OOM GROUPING" echo " ========================" if [ "$HL" -gt "$oomadj1" ] && [ "$HL" -le "$oom adj2" ]; then

echo "" echo " HOME LAUNCHER IS IN HERE! (ADJ=$H L)" echo "" fi for i in ls /proc/* do if [ -f "$i/oom_adj" ] && [[ -n "`cat $i/cmdline `" ]] && [ "`cat $i/oom_adj`" -gt "$oomadj1" ] && [ "`cat $i/oom_adj`" -le "$oom adj2" ]; then cmdline=`cat $i/cmdline` appname=${cmdline##*/} pid=${i##*/} echo -n " `cat $i/oom_adj` " echo -n $pid echo " $appname" fi done fi echo "" echo " SECONDARY_SERVER OOM GROUPING" echo " =============================" if [ "$HL" -gt "$oomadj2" ] && [ "$HL" -le "$oomadj3" ]; then echo "" echo " HOME LAUNCHER IS IN HERE! (ADJ=$HL)" echo "" fi for i in ls /proc/* do if [ -f "$i/oom_adj" ] && [[ -n "`cat $i/cmdline`" ]] && [ "`cat $i/oom_adj`" -gt "$oomadj2" ] && [ "`cat $i/oom_adj`" -le "$oomadj3" ]; then cmdline=`cat $i/cmdline` appname=${cmdline##*/} pid=${i##*/} echo -n " `cat $i/oom_adj` " echo -n $pid echo " $appname" fi done echo "" echo " HIDDEN_APP OOM GROUPING" echo " =======================" if [ "$HL" -gt "$oomadj3" ] && [ "$HL" -le "$oomadj4" ]; then echo "" echo " HOME LAUNCHER IS IN HERE! (ADJ=$HL)" echo "" fi for i in ls /proc/* do if [ -f "$i/oom_adj" ] && [[ -n "`cat $i/cmdline`" ]] && [ "`cat $i/oom_adj`" -gt "$oomadj3" ] && [ "`cat $i/oom_adj`" -le "$oomadj4" ]; then cmdline=`cat $i/cmdline` appname=${cmdline##*/} pid=${i##*/} echo -n " `cat $i/oom_adj` " echo -n $pid

echo " $appname" fi done echo echo echo if [ then echo "" echo " HOME LAUNCHER IS IN HERE! (ADJ=$HL)" echo "" fi for i in ls /proc/* do if [ -f "$i/oom_adj" ] && [[ -n "`cat $i/cmdline`" ]] && [ "`cat $i/oom_adj`" -gt "$oomadj4" ] && [ "`cat $i/oom_adj`" -le "$oomadj5" ]; then cmdline=`cat $i/cmdline` appname=${cmdline##*/} pid=${i##*/} echo -n " `cat $i/oom_adj` " echo -n $pid echo " $appname" fi done echo "" echo " EMPTY_APP OOM GROUPING" echo " ======================" if [ "$HL" -gt "$oomadj5" ] && [ "$HL" -le "$oomadj6" ]; then echo "" echo " HOME LAUNCHER IS IN HERE! (ADJ=$HL)" echo "" fi for i in ls /proc/* do if [ -f "$i/oom_adj" ] && [[ -n "`cat $i/cmdline`" ]] && [ "`cat $i/oom_adj`" -gt "$oomadj5" ] && [ "`cat $i/oom_adj`" -le "$oomadj6" ]; then cmdline=`cat $i/cmdline` appname=${cmdline##*/} pid=${i##*/} echo -n " `cat $i/oom_adj` " echo -n $pid echo " $appname" fi done echo "" echo $line if [ "$opt" -eq 16 ]; then echo " zOOM Stick Complete!" fi elif [[ -n "$vroomverifier" ]] && [ "$vroomverifier" -eq 1 ]; th en echo "----====zeppelinrox's bOOM Stick Verifier====---" echo "" $sleep echo " Using vrOOM Stick Mode (Verbose)..." echo "" $sleep "" " CONTENT_PROVIDER OOM GROUPING" " =============================" "$HL" -gt "$oomadj4" ] && [ "$HL" -le "$oomadj5" ];

echo echo echo echo if [

" ADJ PID Process/Path (APK)" "" " FOREGROUND_APP OOM GROUPING" " ===========================" "$HL" -gt -18 ] && [ "$HL" -lt "$oomadj1" ]; then echo "" echo " HOME LAUNCHER IS IN HERE! (ADJ=$HL)" echo ""

fi for i in ls /proc/* do if [ -f "$i/oom_adj" ] && [[ -n "`cat $i/cmdline`" ]] && [ "`cat $i/oom_adj`" -gt -18 ] && [ "`cat $i/oom_adj`" -lt "$oomadj1" ]; then cmdline=`cat $i/cmdline` appname=${cmdline##*/} pid=${i##*/} apkpath=`pm list packages -f $appname` apkpath2=${apkpath#*:} apkname=${apkpath2%%=*} echo -n " `cat $i/oom_adj` " echo -n $pid if [[ -n "$apkpath" ]]; then # echo -n " $appname" echo -n " $cmdline" echo " ($apkname)" else # echo " $appname" echo " $cmdline" fi fi done if [ "$HL" -eq "$oomadj1" ]; then echo "" echo " HOME LAUNCHER IS IN HERE! (ADJ=$HL)" echo "" fi for i in ls /proc/* do if [ -f "$i/oom_adj" ] && [[ -n "`cat $i/cmdline`" ]] && [ "`cat $i/oom_adj`" -eq "$oomadj1" ]; then cmdline=`cat $i/cmdline` appname=${cmdline##*/} pid=${i##*/} apkpath=`pm list packages -f $appname` apkpath2=${apkpath#*:} apkname=${apkpath2%%=*} echo -n " `cat $i/oom_adj` " echo -n $pid if [[ -n "$apkpath" ]]; then # echo -n " $appname" echo -n " $cmdline" echo " ($apkname)" else # echo " $appname" echo " $cmdline" fi fi done echo "" if [[ -n "$scadj" ]] && [ "$currentadj" = "$scadj" ] &&

[ "$oomstick" -eq 1 ] && [ "$HL" -ne "$oomadj1" ]; then echo " HOME_LAUNCHER OOM GROUPING!" echo " ===========================" for i in ls /proc/* do if [ -f "$i/oom_adj" ] && [[ -n "`cat $i/cmdline `" ]] && [ "`cat $i/oom_adj`" -gt "$oomadj1" ] && [ "`cat $i/oom_adj`" -lt "$oom adj2" ]; then if [ "`cat $i/oom_adj`" -eq "$HL" ] && [ "$HL" -ne "$PA" ]; then echo "" echo " Home Launcher is on the N EXT line! (ADJ=$HL)" fi cmdline=`cat $i/cmdline` appname=${cmdline##*/} pid=${i##*/} apkpath=`pm list packages -f $appname` apkpath2=${apkpath#*:} apkname=${apkpath2%%=*} echo -n " `cat $i/oom_adj` " echo -n $pid if [[ -n "$apkpath" ]]; then # echo -n " $appname" echo -n " $cmdline" echo " ($apkname)" else # echo " $appname" echo " $cmdline" fi if [ "`cat $i/oom_adj`" -eq "$HL" ]; the n echo "" fi fi done echo "" echo " VISIBLE_APP OOM GROUPING" echo " ========================" for i in ls /proc/* do if [ -f "$i/oom_adj" ] && [[ -n "`cat $i/cmdline `" ]] && [ "`cat $i/oom_adj`" -eq "$oomadj2" ]; then cmdline=`cat $i/cmdline` appname=${cmdline##*/} pid=${i##*/} apkpath=`pm list packages -f $appname` apkpath2=${apkpath#*:} apkname=${apkpath2%%=*} echo -n " `cat $i/oom_adj` " echo -n $pid if [[ -n "$apkpath" ]]; then # echo -n " $appname" echo -n " $cmdline" echo " ($apkname)" else # echo " $appname" echo " $cmdline" fi fi

done else echo " VISIBLE_APP OOM GROUPING" echo " ========================" if [ "$HL" -gt "$oomadj1" ] && [ "$HL" -le "$oom adj2" ]; then echo "" echo " HOME LAUNCHER IS IN HERE! (ADJ=$H L)" echo "" fi for i in ls /proc/* do if [ -f "$i/oom_adj" ] && [[ -n "`cat $i/cmdline `" ]] && [ "`cat $i/oom_adj`" -gt "$oomadj1" ] && [ "`cat $i/oom_adj`" -le "$oom adj2" ]; then cmdline=`cat $i/cmdline` appname=${cmdline##*/} pid=${i##*/} apkpath=`pm list packages -f $appname` apkpath2=${apkpath#*:} apkname=${apkpath2%%=*} echo -n " `cat $i/oom_adj` " echo -n $pid if [[ -n "$apkpath" ]]; then # echo -n " $appname" echo -n " $cmdline" echo " ($apkname)" else # echo " $appname" echo " $cmdline" fi fi done fi echo "" echo " SECONDARY_SERVER OOM GROUPING" echo " =============================" if [ "$HL" -gt "$oomadj2" ] && [ "$HL" -le "$oomadj3" ]; then echo "" echo " HOME LAUNCHER IS IN HERE! (ADJ=$HL)" echo "" fi for i in ls /proc/* do if [ -f "$i/oom_adj" ] && [[ -n "`cat $i/cmdline`" ]] && [ "`cat $i/oom_adj`" -gt "$oomadj2" ] && [ "`cat $i/oom_adj`" -le "$oomadj3" ]; then cmdline=`cat $i/cmdline` appname=${cmdline##*/} pid=${i##*/} apkpath=`pm list packages -f $appname` apkpath2=${apkpath#*:} apkname=${apkpath2%%=*} echo -n " `cat $i/oom_adj` " echo -n $pid if [[ -n "$apkpath" ]]; then # echo -n " $appname" echo -n " $cmdline"

echo " ($apkname)" else # fi fi done echo echo echo if [ then echo "" echo " HOME LAUNCHER IS IN HERE! (ADJ=$HL)" echo "" fi for i in ls /proc/* do if [ -f "$i/oom_adj" ] && [[ -n "`cat $i/cmdline`" ]] && [ "`cat $i/oom_adj`" -gt "$oomadj3" ] && [ "`cat $i/oom_adj`" -le "$oomadj4" ]; then cmdline=`cat $i/cmdline` appname=${cmdline##*/} pid=${i##*/} apkpath=`pm list packages -f $appname` apkpath2=${apkpath#*:} apkname=${apkpath2%%=*} echo -n " `cat $i/oom_adj` " echo -n $pid if [[ -n "$apkpath" ]]; then # echo -n " $appname" echo -n " $cmdline" echo " ($apkname)" else # echo " $appname" echo " $cmdline" fi fi done echo "" echo " CONTENT_PROVIDER OOM GROUPING" echo " =============================" if [ "$HL" -gt "$oomadj4" ] && [ "$HL" -le "$oomadj5" ]; then echo "" echo " HOME LAUNCHER IS IN HERE! (ADJ=$HL)" echo "" fi for i in ls /proc/* do if [ -f "$i/oom_adj" ] && [[ -n "`cat $i/cmdline`" ]] && [ "`cat $i/oom_adj`" -gt "$oomadj4" ] && [ "`cat $i/oom_adj`" -le "$oomadj5" ]; then cmdline=`cat $i/cmdline` appname=${cmdline##*/} pid=${i##*/} apkpath=`pm list packages -f $appname` apkpath2=${apkpath#*:} apkname=${apkpath2%%=*} echo -n " `cat $i/oom_adj` " "" " HIDDEN_APP OOM GROUPING" " =======================" "$HL" -gt "$oomadj3" ] && [ "$HL" -le "$oomadj4" ]; echo " $appname" echo " $cmdline"

#

# fi done echo echo echo if [ then

echo -n $pid if [[ -n "$apkpath" ]]; then echo -n " $appname" echo -n " $cmdline" echo " ($apkname)" else echo " $appname" echo " $cmdline" fi "" " EMPTY_APP OOM GROUPING" " ======================" "$HL" -gt "$oomadj5" ] && [ "$HL" -le "$oomadj6" ]; echo "" echo " HOME LAUNCHER IS IN HERE! (ADJ=$HL)" echo ""

fi for i in ls /proc/* do if [ -f "$i/oom_adj" ] && [[ -n "`cat $i/cmdline`" ]] && [ "`cat $i/oom_adj`" -gt "$oomadj5" ] && [ "`cat $i/oom_adj`" -le "$oomadj6" ]; then cmdline=`cat $i/cmdline` appname=${cmdline##*/} pid=${i##*/} apkpath=`pm list packages -f $appname` apkpath2=${apkpath#*:} apkname=${apkpath2%%=*} echo -n " `cat $i/oom_adj` " echo -n $pid if [[ -n "$apkpath" ]]; then # echo -n " $appname" echo -n " $cmdline" echo " ($apkname)" else # echo " $appname" echo " $cmdline" fi fi done echo "" echo $line echo " vrOOM Stick Complete!" fi if [[ -n "$vroomverifier" ]] && [ "$opt" -eq 17 ]; then while : do bpps=;bppid=;bpcmdline=;bpappname= echo "" $sleep echo " Enter a unique segment of the process name..." echo "" $sleep echo " Example: \"Opera\" for Opera Browser..." echo "" $sleep echo -n " Or press the Return key to exit: " read bpps

echo "" echo $line if [[ -z "$bpps" ]]; then echo " Okay... See Ya Later! ;-)" again= elif [ "`pgrep $bpps`" ]; then bppid=`pgrep $bpps` if [[ -f "/proc/$bppid/cmdline" ]]; then bpcmdline=`cat /proc/$bppid/cmdline` bpappname=${bpcmdline##*/} else echo " Insufficient fuel for thought..." echo "" $sleep echo " Need more info - there's more tha n one match!" fi if [[ -n "$bpappname" ]]; then echo " Found $bpappname..." echo "" $sleep echo "-17" > /proc/`pgrep $bpps`/oom_adj renice -20 `pgrep $bpps` echo " $bpappname has been BulletProofed !" echo "" $sleep echo -n " $bpappname's oom score is " cat /proc/`pgrep $bpps`/oom_score echo "" $sleep echo -n " $bpappname's oom priority is " cat /proc/`pgrep $bpps`/oom_adj echo $line echo "" $sleep echo " Save BulletProof \"One-Shot\" Scr ipt to SD Card?" echo "" $sleep echo " If so, with Script Manager..." echo "" $sleep echo " ...make a quick launch widget for it..." echo "" $sleep echo " med schedule!" echo "" echo $line echo -n " Enter N for No, any key for Ye s: " read bpsps echo "" echo $line case $bpsps in n N)echo " Okay... maybe next time!";; *)cat > /sdcard/V6_SuperCharger/Bullet Proof_One_Shots/1Shot-$bpappname.sh /data/97BulletProof_Apps.sh &1; # echo ""; if [ ! "\`id grep =0\`" ]; then echo " You are NOT running this script as root..."; echo ""; echo " ...No SuperUser for you!!"; echo ""; echo " ...Please Run as Root and try again..."; echo ""; exit 69; elif [ -d "/system/etc/init.d" ] [ -f "/system/etc/hw_config.sh" ]; then if [[ -n "\`pgrep android\`" ]]; then echo " Waiting 60 seconds to let apps load... then..."; echo ""; echo " Gonna BulletProof Some!"; echo ""; sleep 60; fi; fi; EOF fi sed -i '/Begin '$bpappname'/,/ End '$bpappname'/d' /data/97BulletProof_Apps.sh sed -i '/'$bpappname'/d' /data /97BulletProof_Apps.sh cat >> /data/97BulletProof_App s.sh > /system/etc/init.d/97BulletProof_Apps chown 0. 0 /system/etc/init.d/97BulletProof_Apps chmod 77 7 /system/etc/init.d/97BulletProof_Apps cp -fr / system/etc/init.d/97BulletProof_Apps /sdcard/V6_SuperCharger/97BulletProof_Apps echo " .../system/etc/init.d/97BulletProof_Apps!" else echo " W ARNING: ERROR copying file to /system/init.d!" echo "" $sleep echo " G ot enough free space?" echo "" $sleep echo " S ystem Partition has `df -h system awk '{print $4}' sed -n 2p` Free ie. `df h system awk '{print $5}' sed -n 2p` Used" fi else cp -fr /data/97B ulletProof_Apps.sh /system/etc/init.d/S97BulletProof_Apps if [ -f "/system /etc/init.d/S97BulletProof_Apps" ]; then echo "sh /data/97BulletProof_Apps.sh;" >> /system/etc/init.d/S97BulletProof_Apps chown 0. 0 /system/etc/init.d/S97BulletProof_Apps chmod 77 7 /system/etc/init.d/S97BulletProof_Apps cp -fr / system/etc/init.d/S97BulletProof_Apps /sdcard/V6_SuperCharger/S97BulletProof_App s echo " .../system/etc/init.d/S97BulletProof_Apps!"

else echo " W ARNING: ERROR copying file to /system/init.d!" echo "" $sleep echo " G ot enough free space?" echo "" $sleep echo " S sed -n 2p` Free ie. `df fi fi else echo " ./data/97BulletProof_Apps.sh!" echo $line echo "" $sleep if [[ -n "$smrun" ]]; th en echo "THIS app c an load 97BulletProof_Apps.sh on boot!" echo "" fi fi;; *)echo " Okay... maybe next time !";; esac fi else echo " Can't find $bpps running..." echo "" $sleep echo " ...so it can't be BulletProof ed :(" fi if [[ -n "$bpps" ]]; then echo $line echo "" $sleep echo " BulletProof another app?" echo "" $sleep echo -n " Enter Y for Yes, any key for No: " read again echo "" fi case $again in y Y)echo $line;; *)break;; esac done fi echo $line echo "" $sleep fi if [ "$opt" -eq 18 ]; then ..

ystem Partition has `df -h system awk '{print $4}' h system awk '{print $5}' sed -n 2p` Used"

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 rambytesused=`free awk '{ print $3 }' sed -n 2p` rambytesfree=`free awk '{ print $4 }' sed -n 2p` ramused=$(($rambytesused/1024)) ramfree=$(($rambytesfree/1024)) echo " Current RAM stats:" echo "" $sleep echo " Total: $ram MB Used: $ramused MB Free: $ramfree MB" echo "" 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)busybox sync; echo 3 > /proc/sys/vm/drop_caches sleep 2 echo 0 > /proc/sys/vm/drop_caches echo " Engine Flush Completed!" echo $line echo ""

$sleep rambytesused=`free awk '{ print $3 }' sed -n 2p` rambytesfree=`free awk '{ print $4 }' sed -n 2p` ramused=$(($rambytesused/1024)) ramfree=$(($rambytesfree/1024)) echo " Updated RAM stats:" echo "" $sleep echo " Total: $ram MB Used: $ramused MB Free: $ram free MB" echo "" $sleep echo $line echo " ;; *)echo " File system caches were retained...";; esac echo $line echo "" $sleep cat > /data/Fast_Engine_Flush.sh /proc/sys/vm/drop_caches rambytes=\`free awk '{ print \$2 }' sed -n 2p\` rambytesused=\`free awk '{ print \$3 }' sed -n 2p\`

...Enjoy Your Quick Boost :)"

rambytesfree=\`free awk '{ print \$4 }' sed -n 2p\` ram=\$((\$rambytes/1024)) ramused=\$((\$rambytesused/1024)) ramfree=\$((\$rambytesfree/1024)) echo " RAM Stats AFTER Engine Flush..." echo "" sleep 1 echo " Total: \$ram MB Used: \$ramused MB Free: \$ramfree MB" echo "" sleep 1 echo " ==================================" echo " ) Fast Engine Flush Completed! (" echo " ==================================" echo "" EOF cp -fr /data/Fast_Engine_Flush.sh /sdcard/V6_SuperCharger/Fast_E ngine_Flush.sh cp -fr /data/Fast_Engine_Flush.sh /system/xbin/Flush echo " For fast flushing..." echo "" $sleep echo " .../data/Fast_Engine_Flush.sh was created!" echo "" $sleep echo " With Script Manager..." echo "" $sleep echo " ...make a widget for it..." echo "" $sleep echo " ...or put it on a timed schedule!" echo "" echo $line echo "" $sleep if [ -f "/system/xbin/Flush" ]; then chown 0.0 /system/xbin/Flush chmod 777 /system/xbin/Flush echo " There is another copy in /system/xbin..." echo "" $sleep echo " To use this script with Terminal Emulator..." echo "" $sleep echo " Run Terminal Emulator..." echo "" $sleep echo " ...type \"su\" and enter..." echo "" $sleep echo " ...type \"Flush\" and enter..." echo "" $sleep echo " THAT'S IT!" else echo " WARNING: ERROR copying file to /system/xbin!" echo "" $sleep echo " Got enough free space?" echo ""

$sleep echo " System Partition has `df -h system awk '{print $4}' sed -n 2p` Free ie. `df -h system awk '{print $5}' sed -n 2p` Used" fi echo "" echo $line echo "" $sleep fi if [ "$opt" -eq 19 ]; then echo " You have many SQLite databases that become..." echo "" $sleep echo " ...fragmented and unoptimized over a few days." echo "" $sleep echo " This tool will optimize them with..." echo "" $sleep echo " ...SQLite VACUUM and REINDEX!" echo "" echo $line echo "" $sleep echo " Optimize SQLite databases now?" echo "" $sleep echo -n " Enter N for No, any key for Yes: " read detailing echo "" echo $line case $detailing in n N)echo " SQLite Optimization declined... meh...";; *)echo "" echo " Cool beans... just ignore any errors..." echo "" $sleep echo " ...as they won't effect SQLite Optimization!" echo "" $sleep echo " This may take awhile... please wait..." echo "" for i in `find /data -iname "*.db"`; do sqlite3 $i 'VACUUM;'; sqlite3 $i 'REINDEX;'; done echo "";; esac echo $line echo "" $sleep cat > /data/Detailing.sh