v6 Supercharger for Android-update9 Rc10.Sh

download v6 Supercharger for Android-update9 Rc10.Sh

of 143

description

V6 supercharger

Transcript of v6 Supercharger for Android-update9 Rc10.Sh

#!/system/bin/sh # # V6 SuperCharger, OOM Grouping & Priority Fixes created by zeppelinrox. # SuperMinFree Calculator & MFK Calculator (for min_free_kbytes) created by zepp elinrox also ;^] # # See http://goo.gl/krtf9 - Linux Memory Consumption - Nice article! # See http://goo.gl/hFdNO - Memory and SuperCharging Overview or... "Why 'Free R AM' Is NOT Wasted RAM!" # See http://goo.gl/4w0ba - MFK Calculator Info - explanation for vm.min_free_kb ytes. # # For Debugging: Delete the # at the beginning of the next line and watch the ou tput on the next run! # set -x -o errexit # export PATH=$PATH:/system/xbin:/sbin:/vendor/bin:/system/sbin:/system/bin:/data/ local/busybox.v1.19.4/xbin line================================================= echo "" echo $line echo " NOTE: BUSYBOX v1.16.2 OR HIGHER IS RECOMMENDED!" echo $line sleep 2 busybox mount -o remount,rw /data 2>/dev/null busybox mount -o remount,rw / 2>/dev/null busybox mount -o remount,rw rootfs 2>/dev/null if [ -d "/sqlite_stmt_journals" ]; then madesqlitefolder=0 else mkdir /sqlite_stmt_journals; madesqlitefolder=1 fi if [ "`ls $EXTERNAL_STORAGE`" ]; then storage=${EXTERNAL_STORAGE#*mnt} elif [ "`ls $SECONDARY_STORAGE`" ]; then storage=${SECONDARY_STORAGE#*mnt} elif [ "`ls $EXTERNAL_STORAGE2`" ]; then storage=${EXTERNAL_STORAGE2#*mnt} elif [ "`ls $PHONE_STORAGE`" ]; then storage=${PHONE_STORAGE#*mnt} else storage="/sdcard" fi 2>/dev/null cat > $storage/!SuperCharger.html /dev/null if [ "$allrcpaths" ]; then echo "" echo " STOCK ROMS will benefit most from Services..." echo " ...since those builds have no init.d support!" echo "" if [ "$scservice" ] || [ "$bpservice" ] || [ ! "$scminfree" ]; then echo $line echo -n " SuperCharger Service is " if [ "$scservice" ]; then echo "Installed!" else echo "NOT Installed!" fi echo $line echo -n " BulletProof Apps Service is " if [ "$bpservice" ]; then echo "Installed!" else echo "NOT Installed!" fi else if [ "$scpercent" -lt 100 ]; then echo $line; fi echo " Sorry, your ROM wipes service entries on boot." if [ "$scpercent" -eq 100 ]; then echo "" echo $line echo " You're 100% SuperCharged so it doesn't matter!" fi fi echo $linefi echo -n " Nitro Lag Nullifier is " if [ "`grep Nullifier /system/build.prop`" ]; then echo "Installed!" else echo "NOT Installed!" fi echo $line if [ ! -f "`ls /system/etc/init.d/*BulletProof_Apps*`" ] && [ ! -f "/data/97Bul letProof_Apps.sh" ]; then echo " BulletProof Apps Script is NOT Installed!" elif [ "`cat /proc/*/cmdline | grep Bullet`" != "Bullet" ]; then for i in `cat /proc/*/cmdline | grep Bullet`; do if [ "`echo $i | grep Proof`" ] && [ "`echo $i | grep Effect`" ] ; then echo " $i" elif [ "`echo $i | grep Proof`" ] && [ "`echo $i | grep init.d`" ]; then echo " `echo $i | sed 's/.*etc//'` is Running!" elif [ "`echo $i | grep Proof`" ] && [ "`echo $i | grep data`" ] ; then echo "$i is Running!" fi if [ "$i" != "Bullet" ]; then echo $line; fi done ldone=yes elif [ "`ls /system/etc/init.d/*BulletProof_Apps*`" ]; then echo " `ls /system/ etc/init.d/*BulletProof_Apps* | sed 's/.*etc//'` is NOT Running!" elif [ -f "/data/97BulletProof_Apps.sh" ]; then echo "/data/97BulletProof_Apps. sh is NOT Running!" fi 2>/dev/null if [ ! "$ldone" ]; then echo $line; fi echo "" if [ "$ics" -eq 1 ]; then echo " Lag? Disabling Compcache May Help!" else echo " Lag? Disable Lock Home in Memory & Compcache!" fi echo " Also Run Engine Flush Every Few Hours!" echo "" if [ "$smrun" ]; then echo " In Config, select Run as Root & Browse as Root!" echo " But DO NOT run this script at boot!" echo "" echo " For a quick status check..." echo " ...put a V6 SuperCharger WIDGET on the desktop!" else echo " Optimized for display with Script Manager." echo "" echo " SM can give you a quick status check..." echo " ...Put a V6 SuperCharger WIDGET on the desktop!" echo " ...Try it! ;^]" fi echo "" echo $line ramkbytesfree=`free | awk '{ print $4 }' | sed -n 2p` ramkbytescached=`cat /proc/meminfo | grep Cached | awk '{print $2}' | sed -n 1p ` ramfree=$(($ramkbytesfree/1024));ramcached=$(($ramkbytescached/1024));ramreport edfree=$(($ramfree + $ramcached)) echo " True Free $ramfree MB = \"Free\" $ramreportedfree - Cached Apps $ramcach ed" echo $line echo " SuperCharger Level: $scpercent% SuperCharged!" echo $line if [ "$scpercent" -eq 0 ]; then echo " Hey Rookie! SCROLL UP to see the Menu Options!" echo $lineelif [ "$ran" -eq 1 ] && [ "$scpercent" -lt 100 ]; then echo " Did it work? READ ABOVE MESSAGES AFTER REBOOT!" echo $line elif [ "$scpercent" -lt 100 ]; then if [ "$ADJs" -eq 0 ]; then echo " Lose 25% - ADJ Entries NOT Found / NOT Patched"; fi if [ "$oomstick" -eq 0 ]; then echo " Lose 25% - SuperCharged Launcher N OT In Effect"; fi if [ "$OOMs" -eq 0 ]; then echo " Lose 25% - OOM Grouping Fix(adj) NOT I n Effect"; fi if [ "$minfrees" -eq 0 ]; then echo " Lose 25% - SuperCharger Minfrees N OT In Effect"; fi echo $line fi $sleep if [ ! "$didsomething" ] && [ ! "$missingoptions" ] && [ ! "$resuperable" ] && [ "$scminfree" ] && [ "$currentminfree" != "$scminfree" ]; then if [ -d "/system/etc/init.d" ] && [ "`ls /system/etc/init.d/*SuperCharge r*`" ] || [ ! -d "/system/etc/init.d" ]; then echo "" echo " Values DON'T MATCH... Read The Owner's Guide!" echo "" echo $line echo "" $sleep su -c "LD_LIBRARY_PATH=/vendor/lib:/system/lib am start -a andro id.intent.action.VIEW -n com.android.browser/.BrowserActivity -d file://$storage /!SuperCharger.html" 2>/dev/null echo "" echo $line fi fi echo -n " Please Enter Option [1 - 33]: " if [ "$resuperable" ]; then opt=24; echo $opt elif [ "$firstgear" ] || [ "$missingoptions" ]; then opt=29; echo $opt elif [ "$autoshowcalculated" ]; then opt=10; echo $opt elif [ "$ics" -eq 1 ] && [ ! "$icssced" ] && [ "$scadj" ] && [ "$showicscentre" ]; then opt=25; echo $opt else read opt fi $sleep echo $line busybox echo " \\\\\\\\ V6 SUPERCHARGER ////" echo " =======================" echo "" $sleep if [ "$opt" -gt 1 ] && [ "$opt" -le 29 ] || [ "$opt" -eq 32 ]; then didsomethin g=yes busybox mount -o remount,rw / 2>/dev/null busybox mount -o remount,rw rootfs 2>/dev/null busybox mount -o remount,rw /system 2>/dev/null busybox mount -o remount,rw `busybox mount | grep system | awk '{print $ 1,$3}' | sed -n 1p` 2>/dev/null if [ -d "/sqlite_stmt_journals" ]; then madesqlitefolder=0 else mkdir /sqlite_stmt_journals; madesqlitefolder=1 fi if [ "$opt" -ne 15 ]; then if [ ! "`grep "SuperCharger Installation" /system/build.prop`" ] ; then echo "# SuperCharger Installation Marker." >> /system/build.prop; fi if [ ! -d "/data/V6_SuperCharger" ]; then mkdir /data/V6_SuperCharger; fi if [ ! -d "/data/V6_SuperCharger/PowerShift_Scripts" ]; then mkd ir /data/V6_SuperCharger/PowerShift_Scripts; fi if [ ! -d "/data/V6_SuperCharger/BulletProof_One_Shots" ]; then mkdir /data/V6_SuperCharger/BulletProof_One_Shots; fi if [ ! -d "$storage/V6_SuperCharger" ]; then mkdir $storage/V6_S uperCharger; fi if [ ! -d "$storage/V6_SuperCharger/PowerShift_Scripts" ]; then mkdir $storage/V6_SuperCharger/PowerShift_Scripts; fi if [ ! -d "$storage/V6_SuperCharger/BulletProof_One_Shots" ]; th en mkdir $storage/V6_SuperCharger/BulletProof_One_Shots; fi if [ ! -d "$storage/V6_SuperCharger/temp" ]; then mkdir $storage /V6_SuperCharger/temp; fi fi fi 2>/dev/null case $opt in 1) echo " V6 SUPERCHARGER AND LAUNCHER STATUS!";; 2) if [ "$ics" -eq 0 ]; then echo " 256HP UNLEDDED MINFREES +" else echo " 256HP UNLEDDED MINFREES SELECTED!" fi CONFIG="256HP UnLedd" MB1=8;MB2=12;MB3=22;MB4=24;MB5=26;MB6=28;; 3) if [ "$ics" -eq 0 ]; then echo " 256HP LEDDED MINFREES +" else echo " 256HP LEDDED MINFREES SELECTED!" fi CONFIG="256HP Ledded" MB1=8;MB2=12;MB3=26;MB4=28;MB5=30;MB6=32;; 4) if [ "$ics" -eq 0 ]; then echo " 256HP SUPER UNLEDDED MINFREES +" else echo " 256HP SUPER UNLEDDED MINFREES SELECTED!" fi CONFIG="256HP Super" MB1=8;MB2=12;MB3=28;MB4=30;MB5=35;MB6=50;; 5) if [ "$ics" -eq 0 ]; then echo " 512HP UNLEDDED MINFREES +" else echo " 512HP UNLEDDED MINFREES SELECTED!" fi CONFIG="512HP UnLedd" MB1=8;MB2=14;MB3=40;MB4=50;MB5=60;MB6=75;; 6) if [ "$ics" -eq 0 ]; then echo " 512HP LEDDED MINFREES +" else echo " 512HP LEDDED MINFREES SELECTED!" fi CONFIG="512HP Ledded" MB1=8;MB2=14;MB3=55;MB4=70;MB5=85;MB6=100;; 7) if [ "$ics" -eq 0 ]; then echo " 512HP SUPER UNLEDDED MINFREES +" else echo " 512HP SUPER UNLEDDED MINFREES SELECTED!" fi CONFIG="512HP Super" MB1=8;MB2=14;MB3=75;MB4=90;MB5=95;MB6=125;; 8) if [ "$ics" -eq 0 ]; then echo " 768HP SUPER UNLEDDED MINFREES +" else echo " 768HP SUPER UNLEDDED MINFREES SELECTED!" fi if [ "$ram" -le 256 ]; then opt=26 echo $line $sleep echo " WHOA! There's NOT Enough RAM! lulz!" else CONFIG="768HP Super" MB1=8;MB2=16;MB3=150;MB4=165;MB5=180;MB6=200 fi;; 9) if [ "$ics" -eq 0 ]; then echo " 1000HP SUPER UNLEDDED MINFREES +" else echo " 1000HP SUPER UNLEDDED MINFREES SELECTED!"fi if [ "$ram" -le 256 ]; then opt=26 echo $line $sleep echo " WHOA! There's NOT Enough RAM! lulz!" else CONFIG="1000HP Super" MB1=8;MB2=16;MB3=200;MB4=220;MB5=240;MB6=275 fi;; 10)if [ "$ics" -eq 0 ]; then echo " CUST-OOMIZER MINFREES +" else echo " CUST-OOMIZER MINFREES SELECTED!" fi CONFIG="Cust-OOMized" echo $line echo "" $sleep echo " Your Current Minfree values are..." echo "" $sleep echo $currentminfree | awk -F , '{printf " %.0f, %.0f, %. 0f, %.0f, %.0f, %.0f MB\n", $1/256, $2/256, $3/256, $4/256, $5/256, $6/256}' echo "" $sleep echo " Your SuperMinFree Calculator values are..." echo "" $sleep echo " $calculatedmb MB" echo "" if [ "$sccminfree" ]; then $sleep echo " Your Prior Cust-OOMizer values are..." echo "" $sleep echo $sccminfree | awk -F , '{print " "$1/256", "$ 2/256", "$3/256", "$4/256", "$5/256", "$6/256" MB"}' echo "" fi if [ "$scminfreeold" ] && [ "$currentminfree" != "$scminfreeold" ]; the n $sleep echo " Your Prior V6 Minfrees are..." echo "" $sleep echo $scminfreeold | awk -F , '{print " "$1/256", "$2/256", "$3/256", "$4/256", "$5/256", "$6/256" MB"}' echo "" fi echo $line if [ "$sccminfree" ] && [ "$currentminfree" != "$sccminfree" ] && [ "$c alculatedminfree" != "$sccminfree" ] && [ ! "$autoshowcalculated" ]; then echo "" $sleep echo " Restore Previous Cust-OOMizer Settings?" echo "" $sleep echo -n " Enter Y for Yes, any key for No: " read crestore echo "" echo $line case $crestore iny|Y)restore=1 MB1=`echo $sccminfree | awk -F , '{print $1/256}'`;MB2 =`echo $sccminfree | awk -F , '{print $2/256}'`;MB3=`echo $sccminfree | awk -F , '{print $3/256}'`;MB4=`echo $sccminfree | awk -F , '{print $4/256}'`;MB5=`echo $sccminfree | awk -F , '{print $5/256}'`;MB6=`echo $sccminfree | awk -F , '{prin t $6/256}'` echo " Cust-OOMizer Settings will be Restored!";; *);; esac fi if [ "$currentminfree" != "$calculatedminfree" ] && [ "$calculatedminfr ee" != "$scminfree" ] && [ "$restore" -eq 0 ]; then echo "" $sleep echo " Apply SuperMinFree Calculator Settings?" echo "" $sleep echo -n " Enter Y for Yes, any key for No: " read calculated echo "" echo $line case $calculated in y|Y)calculatorcharge=1 CONFIG="Calculator" MB1=`echo $calculatedmbnosp | awk -F , '{print $1}'`;M B2=`echo $calculatedmbnosp | awk -F , '{print $2}'`;MB3=`echo $calculatedmbnosp | awk -F , '{print $3}'`;MB4=`echo $calculatedmbnosp | awk -F , '{print $4}'`;MB 5=`echo $calculatedmbnosp | awk -F , '{print $5}'`;MB6=`echo $calculatedmbnosp | awk -F , '{print $6}'` echo " Cust-OOMizing with SuperMinFree Calculator!";; *)if [ "$autoshowcalculated" ]; then echo " Well... I tr ied to do you a favour... sheesh!"; fi;; esac fi 2>/dev/null if [ "$scminfreeold" ] && [ "$currentminfree" != "$scminfreeold" ] && [ "$sccminfree" != "$scminfreeold" ] && [ "$calculatedminfree" != "$scminfreeold" ] && [ "$restore" -eq 0 ] && [ "$calculatorcharge" -eq 0 ] && [ ! "$autoshowcal culated" ]; then echo "" $sleep echo " Revert to Prior V6 Minfrees?" echo "" $sleep echo -n " Enter Y for Yes, any key for No: " read prior echo "" echo $line case $prior in y|Y)revert=1 MB1=`echo $scminfreeold | awk -F , '{print $1/256}'`;M B2=`echo $scminfreeold | awk -F , '{print $2/256}'`;MB3=`echo $scminfreeold | aw k -F , '{print $3/256}'`;MB4=`echo $scminfreeold | awk -F , '{print $4/256}'`;MB 5=`echo $scminfreeold | awk -F , '{print $5/256}'`;MB6=`echo $scminfreeold | awk -F , '{print $6/256}'` echo " Prior V6 Minfrees will be Restored!";; *);; esac fi 2>/dev/null if [ "$currentminfree" != "$sccminfree" ] && [ "$currentminfree" != "$s cminfree" ] && [ "$restore" -eq 0 ] && [ "$calculatorcharge" -eq 0 ] && [ "$revert" -eq 0 ] && [ ! "$autoshowcalculated" ]; then echo "" $sleep echo " Apply Quick SuperCharge of Current Minfrees?" echo "" $sleep echo " If Yes, these become your Cust-OOMizer values." echo "" $sleep echo -n " Enter Y for Yes, any key for No: " read quick echo "" echo $line case $quick in y|Y)quickcharge=1 MB1=`echo $currentminfree | awk -F , '{printf "%.0f\n" , $1/256}'`;MB2=`echo $currentminfree | awk -F , '{printf "%.0f\n", $2/256}'`;MB 3=`echo $currentminfree | awk -F , '{printf "%.0f\n", $3/256}'`;MB4=`echo $curre ntminfree | awk -F , '{printf "%.0f\n", $4/256}'`;MB5=`echo $currentminfree | aw k -F , '{printf "%.0f\n", $5/256}'`;MB6=`echo $currentminfree | awk -F , '{print f "%.0f\n", $6/256}'` echo " Quick Cust-OOMizer Settings will be Saved!";; *);; esac fi 2>/dev/null if [ "$restore" -eq 0 ] && [ "$calculatorcharge" -eq 0 ] && [ "$quickch arge" -eq 0 ] && [ "$revert" -eq 0 ] && [ ! "$autoshowcalculated" ]; then echo " Running Cust-OOMizer..." echo $line $sleep busybox echo " \\\\\\\\ V6 CUST-OOMIZER ////" echo " =======================" echo "" $sleep echo " Enter your desired lowmemorykiller OOM levels!" echo "" $sleep echo " Slot 3 determines your fee RAM the most!!" echo "" $sleep echo " Note: Enter \"X\" to Exit at any time ;^]" echo "" echo $line echo "" $sleep while [ "$break" -eq 0 ]; do echo -n " Slot 1: ";read MB1 if [ "$MB1" = "X" ] || [ "$MB1" = "x" ]; then break=1 elif [ "$MB1" -gt 0 ] 2>/dev/null; then break else echo " Input Error! Try again :p";sleep 2; fi done while [ "$break" -eq 0 ]; do echo -n " Slot 2: ";read MB2 if [ "$MB2" = "X" ] || [ "$MB2" = "x" ]; then break=1 elif [ "$MB2" -gt 0 ] 2>/dev/null; then break else echo " Input Error! Try again :p";sleep 2; fi done while [ "$break" -eq 0 ]; doecho if [ elif else :p";sleep 2; fi-n " Slot 3: ";read MB3 "$MB3" = "X" ] || [ "$MB3" = "x" ]; then break=1 [ "$MB3" -gt 0 ] 2>/dev/null; then break echo " Input Error! Try again do Slot 4: ";read MB4 ] || [ "$MB4" = "x" ]; then break=1 0 ] 2>/dev/null; then break Error! Try again do Slot 5: ";read MB5 ] || [ "$MB5" = "x" ]; then break=1 0 ] 2>/dev/null; then break Error! Try again do Slot 6: ";read MB6 ] || [ "$MB6" = "x" ]; then break=1 0 ] 2>/dev/null; then break Error! Try againdone while [ "$break" -eq 0 ]; echo -n " if [ "$MB4" = "X" elif [ "$MB4" -gt else echo " Input :p";sleep 2; fi done while [ "$break" -eq 0 ]; echo -n " if [ "$MB5" = "X" elif [ "$MB5" -gt else echo " Input :p";sleep 2; fi done while [ "$break" -eq 0 ]; echo -n " if [ "$MB6" = "X" elif [ "$MB6" -gt else echo " Input :p";sleep 2; fidone echo "" if [ "$break" -eq 0 ]; then $sleep echo $line echo " CONFIRM! $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=26;; *)echo $line echo " Cust-OOMizer Settings Accepted!" ;; esac fi fi if [ "$break" -eq 1 ] || [ "$MB1" -eq 0 ]; then opt=26; fi autoshowcalculated=;; 11)echo " OOM GROUPING FIXES PLUS..." echo "" echo " ...HARD TO KILL LAUNCHER!" $sleep echo $line echo " This Launcher Is Strong BUT Still Killable" echo $line echo "" $sleep if [ "$gb" -eq 1 ]; then launcheradj=2 echo "$speed,$buildprop,$animation,$initrc,$launcheradj,$fixemis sions,$zepalign,$detailing,$misc3g" > /data/V6_SuperCharger/SuperChargerOptionscp -fr /data/V6_SuperCharger/SuperChargerOptions $storage/V6_Sup erCharger/SuperChargerOptions echo $line echo " Driver Options Updated!" else if [ "$ics" -eq 1 ]; then echo " The script CAN'T SuperCharge launchers on ICS!" echo "" $sleep echo " It can only apply adj/Grouping Fixes..." echo "" $sleep echo " ...and other tweaks!" echo "" $sleep echo $line if [ "$icssced" ]; then echo " Hey your services.jar is patched so who cares!" else echo " Select The \"ICS Service Centre\" Option Ne xt!" fi else opt=26 echo " Sorry, Hard To Kill Launcher..." echo "" $sleep echo " ...is not available on this ROM..." echo "" fi fi;; 12)echo " OOM GROUPING FIXES PLUS..." echo "" echo " ...DIE-HARD LAUNCHER!" $sleep echo $line echo " This Launcher Is Stronger and RECOMMENDED!" echo $line echo "" $sleep if [ "$ics" -eq 1 ]; then echo " The script CAN'T SuperCharge launchers on ICS!" echo "" $sleep echo " It can only apply adj/Grouping Fixes..." echo "" $sleep echo " ...and other tweaks!" echo "" $sleep echo $line if [ "$icssced" ]; then echo " Hey your services.jar is patched so who cares!" else echo " Select The \"ICS Service Centre\" Option Next!" fi else launcheradj=1 echo "$speed,$buildprop,$animation,$initrc,$launcheradj,$fixemis sions,$zepalign,$detailing,$misc3g" > /data/V6_SuperCharger/SuperChargerOptions cp -fr /data/V6_SuperCharger/SuperChargerOptions $storage/V6_Sup erCharger/SuperChargerOptions echo $line echo " Driver Options Updated!"fi;; 13)echo " OOM GROUPING FIXES PLUS..." echo "" echo " ...BULLETPROOF LAUNCHER!" $sleep echo $line echo " This Launcher Is Strongest and UNKILLABLE!" echo $line echo "" $sleep if [ "$ics" -eq 1 ]; then echo " The script CAN'T SuperCharge launchers on ICS!" echo "" $sleep echo " It can only apply adj/Grouping Fixes..." echo "" $sleep echo " ...and other tweaks!" echo "" $sleep echo $line if [ "$icssced" ]; then echo " Hey your services.jar is patched so who cares!" else echo " Select The \"ICS Service Centre\" Option Next!" fi else echo " ==================" busybox echo " \\\\\\ WARNING! ///" echo " ==============" echo "" $sleep echo $line echo " This Breaks \"Long-Press Back To Kill\"!" echo $line echo "" $sleep echo " If you don't have or don't use this feature..." echo "" $sleep echo " ...or don't know what it is - just say \"Yes\" ;)" echo "" echo $line echo "" $sleep echo " Note: This is Gaming UN-FRIENDLY!!" echo "" echo $line echo "" $sleep echo -n " BulletProof? Enter Y for Yes, any key for No:" read breakback echo "" echo $line case $breakback in y|Y)launcheradj=0 echo "$speed,$buildprop,$animation,$initrc,$launcherad j,$fixemissions,$zepalign,$detailing,$misc3g" > /data/V6_SuperCharger/SuperCharg erOptions cp -fr /data/V6_SuperCharger/SuperChargerOptions $stor age/V6_SuperCharger/SuperChargerOptionsecho " Driver Options Updated!" echo $line echo "" $sleep echo $line echo " Break Back Button... erm... BulletProofing!";; *)echo " OK... Die-Hard Launcher Is Great Anyway!" opt=26;; esac fi;; 14)echo " ====================" busybox echo " //// UNKERNELIZER \\\\\\\\" if [ ! -f "`ls /system/etc/init.d/*SuperCharger*`" ] && [ ! -f "`ls /da ta/*SuperCharger*`" ] && [ ! -f "$initrcpath" ] && [ ! -f "$initrcbackup" ] && [ ! "$allrcbackups" ]; then echo $line $sleep echo " There's Nothing to UnKernelize!" opt=26 fi 2>/dev/null;; 15)echo " =======================" busybox echo " //// UN-SUPERCHARGER \\\\\\\\" echo $line echo "" $sleep echo -n " :|" sleep 3 echo -n " !@#?&%(*)(*)&(!)?!" sleep 3 echo " :/" sleep 3 echo "" echo $line echo "" 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=26;; esac;; 16)echo " =======================" busybox echo " //// THE bOOM STICK! \\\\\\\\";; 17)echo " ========================" busybox echo " //// BULLETPROOF APPS \\\\\\\\";; 18)echo " ====================" busybox echo " //// ENGINE FLUSH \\\\\\\\";; 19)echo " =================" busybox echo " //// DETAILING \\\\\\\\";; 20)echo " =======================" busybox echo " //// WHEEL ALIGNMENT \\\\\\\\";; 21)echo " =====================" busybox echo " //// FIX EMISSIONS \\\\\\\\";; 22)echo " ===========================" busybox echo " //// NITRO LAG NULLIFIER \\\\\\\\";;23)echo " ======================" busybox echo " //// SYSTEM INSTALL \\\\\\\\";; 24)echo " =======================" busybox echo " //// RE-SUPERCHARGER \\\\\\\\";; 25)echo " ==========================" busybox echo " //// ICS SERVICE CENTRE \\\\\\\\" if [ "$ics" -eq 0 ]; then opt=26 echo $line echo "" $sleep echo " FAIL: This isn't an ICS ROM! lol" echo "" fi;; 26)echo " =====================" busybox 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 is automatically saved!" echo "" echo $line $sleep echo " You can find them in the folder..." echo "" $sleep echo " .../data/V6_SuperCharger/PowerShift_Scripts :D" echo $line echo "" $sleep echo " Create \"Quick 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 "";; 27)echo " =====================" busybox echo " //// Owner's Guide \\\\\\\\" echo $line echo "" $sleep echo " Loading Owner's Guide..."echo "" $sleep su -c "LD_LIBRARY_PATH=/vendor/lib:/system/lib am start -a android.inte nt.action.VIEW -n com.android.browser/.BrowserActivity -d file://$storage/!Super Charger.html" echo "" echo $line echo "" $sleep echo " I hope that helped! :^)" echo "";; 28)echo " ===================" busybox echo " //// HELP CENTRE \\\\\\\\" echo $line echo "" $sleep echo " Loading web site for more help & updates..." echo "" $sleep su -c "LD_LIBRARY_PATH=/vendor/lib:/system/lib am start http://goo.gl/q M6yR" echo "" echo $line echo "" $sleep echo " I hope that helped! :^)" echo "";; 29)echo " ======================" busybox echo " //// DRIVER OPTIONS \\\\\\\\" echo $line echo "" $sleep echo " Scrolling Speed Options..." echo " ==========================" echo "" $sleep if [ "$scpercent" -lt 100 ]; then echo -n " " else echo -n " 0 (no delay), " fi echo "1 (fast), 2 (normal), 3 (slow)" while :; do echo "" $sleep if [ "$scpercent" -lt 100 ]; then echo -n " Please select scroll ing speed (1 - 3): " else echo -n " Please select scrolling speed (0 - 3): " fi read speed echo "" case $speed in 0)sleep="sleep $speed";break;; 1)sleep="sleep $speed";break;; 2)sleep="sleep $speed";break;; 3)sleep="sleep $speed";break;; *)echo " Invalid entry... Please try again :p";; esac done echo $line echo " Scrolling Speed is now set to $speed..." echo $lineecho "" $sleep if [ "$ics" -eq 0 ]; then echo " Build.prop vs Local.prop..." echo " ===========================" echo "" $sleep echo $line if [ ! "$buildprop" ] && [ ! -f "/data/local.prop" ]; then echo " WARNING: You don't have a /data/local.prop!" echo $line echo "" $sleep echo " You can try creating /data/local.prop..." echo "" $sleep echo " ...and see if the launcher gets SuperCharged!" echo "" $sleep echo $line fi echo " Using local.prop is STRONGLY recommended!" echo $line echo "" $sleep echo " But if the launcher DOES'T get 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 -n " Do you want to use Build.prop" if [ ! "$buildprop" ] && [ ! -f "/data/local.prop" ]; then echo "..." echo "" $sleep echo " ...or create /data/local.prop?" else echo "?" fi echo "" $sleep buildpropold=$buildprop echo -n " Enter (B)uild.prop or any key for local.prop:" read buildpropopt echo "" echo $linecase $buildpropopt in b|B)echo " Okay! build.prop Mode Activated!" buildprop=1;; *)echo " Okay! local.prop Mode Activated!" buildprop=0;; esac echo $line echo "" $sleep showbuildpropopt=0 if [ "$buildpropold" ] && [ "$buildprop" != "$buildpropold" ]; t hen if [ "$buildpropold" -eq 1 ]; then sed -n '/.*V6 SuperCharger/,/.*V6 SuperCharged/p ' /system/build.prop >> /data/local.prop echo " Copied SuperCharger entries to local.prop ..." echo "" $sleep sed -i '/.*V6 SuperCharger/,/.*V6 SuperCharged/d ' /system/build.prop echo " ...and cleaned SuperCharger from build. prop!" elif [ -f "/data/local.prop" ]; then sed -n '/.*V6 SuperCharger/,/.*V6 SuperCharged/p ' /data/local.prop >> /system/build.prop echo " Copied SuperCharger entries to build.prop ..." echo "" $sleep sed -i '/.*V6 SuperCharger/,/.*V6 SuperCharged/d ' /data/local.prop echo " ...and cleaned SuperCharger from local. prop!" fi echo "" echo $line echo "" $sleep fi echo -n " Press The Enter Key..." read enter echo "" echo $line echo "" $sleep echo " SuperCharged Launcher Strength" echo " ==============================" echo "" $sleep if [ "$gb" -eq 1 ]; then echo " Hard To Kill Launcher is..." echo "" $sleep echo " ...Strong BUT Still Killable!" echo "" $sleep fi echo " Die-Hard Launcher is..." echo ""$sleep echo " ...VERY Strong and RECOMMENDED!" echo "" $sleep echo " BulletProof Launcher is..." echo "" $sleep echo " ...Strongest and UNKILLABLE!" echo "" $sleep echo " =======================================" busybox echo " \\\\\\ BULLETPROOF LAUNCHER WARNING! ///" echo " ===================================" echo "" $sleep echo $line echo " This Breaks \"Long-Press Back To Kill\"!" echo $line echo "" $sleep echo " If you don't have or don't use this feature..." echo "" $sleep echo " ...don't worry about it ;)" echo "" $sleep echo $line echo " Note 1: This is NOT for Gamers! (Less Free RAM)" echo $line $sleep echo " Note 2: It also does not play nice with Tasker!" while :; do echo $line echo "" $sleep echo " Select a Launcher Strength..." echo "" if [ "$gb" -eq 0 ]; then echo -n " " else echo -n " (H)TK, " fi echo -n "(B)ulletProof, any key for Die-Hard: " read lstrength echo "" echo $line case $lstrength in h|H)if [ "$gb" -eq 0 ]; then echo " Invalid entry ... Please try again :p" else echo " SuperCharged Launcher Strength is Hard To Kill!" launcheradj=2 break fi;; b|B)echo " SuperCharged Launcher Strength is BulletPro of!" launcheradj=0 break;; *)echo " SuperCharged Launcher Strength is DieHard!" launcheradj=1 break;;esac done if [ "$buildprop" -eq 1 ]; then prop="/system/build.prop" else prop="/data/local.prop" fi for p in /system/etc/ram.conf $prop; do if [ -f "$p" ]; then sed -i 's/ro.HOME_APP_ADJ=.*/ro.HOME_APP_ADJ='$launcheradj/ $p; fi; done echo $line echo "" $sleep else buildprop=1; launcheradj=1 fi echo " Miscellaneous & 3G Tweaks!" echo " ==========================" echo "" $sleep echo " SuperCharger can apply additional tweaks..." echo "" $sleep echo " ...which include battery savings!" echo "" $sleep echo " They are as follows..." echo "" $sleep echo " ...based on the $ram MB of RAM on your device!" echo "" echo $line echo "" $sleep echo " SD Card Read Speed Tweak = $sdtweak KB" if [ "`getprop | grep heapgrowthlimit`" ]; then echo " dalvik.vm .heapgrowthlimit = $heapsize MB"; fi echo " dalvik.vm.heapsize = $heapsize MB" if [ "`getprop | grep persist.sys.vm.heapsize`" ]; then echo " persist.sys.vm.heapsize = $heapsize MB"; fi echo " persist.sys.purgeable_assets = 1" echo " wifi.supplicant_scan_interval = 180" echo " windowsmgr.max_events_per_sec = 200" echo " pm.sleep_mode = 1" echo "" echo $line echo "" $sleep echo " 3G TurboCharger Enhancements effect..." echo "" $sleep echo " ...network buffersizes and TCP RAM allocation!" echo "" echo $line if [ "$scpercent" -eq 0 ]; then echo " An Option from 2 - 13 still needs to be run!" echo $line fi echo "" $sleep for p in /data/local.prop /system/build.prop; do if [ -f "$p" ]; then s ed -i '/Miscellaneous/,/edge=/d' $p; fi; done for sc in /system/etc/init.d/*SuperCharger* /data/99SuperCharger.sh /sy stem/etc/hw_config.sh; do if [ -f "$sc" ]; then sed -i '/wmem_max/,/bdi/d' $sc;fi; done echo " Enable Miscellaneous & 3G Tweaks?" echo "" $sleep echo -n " Enter N for No, any key for Yes: " read misc echo "" echo $line case $misc in n|N)echo " Miscellaneous & 3G Tweaks are now OFF!" misc3g=0;; *)for p in /data/local.prop /system/build.prop; do if [ -f "$p" ]; then sed -i '/END OOM_ADJ_Settings/ a\ # Miscellaneous Tweaks!\ dalvik.vm.heapgrowthlimit='$heapsize'm\ dalvik.vm.heapsize='$heapsize'm\ persist.sys.vm.heapsize='$heapsize'm\ persist.sys.purgeable_assets=1\ wifi.supplicant_scan_interval=180\ windowsmgr.max_events_per_sec=200\ pm.sleep_mode=1\ # 3G TurboCharger Enhancement!\ net.dns1=8.8.8.8\ net.dns2=8.8.4.4\ net.tcp.buffersize.default=6144,87380,110208,6144,16384,110208\ net.tcp.buffersize.wifi=262144,524288,1048576,262144,524288,1048576\ net.tcp.buffersize.lte=262144,524288,3145728,262144,524288,3145728\ net.tcp.buffersize.hsdpa=6144,262144,1048576,6144,262144,1048576\ net.tcp.buffersize.evdo_b=6144,262144,1048576,6144,262144,1048576\ net.tcp.buffersize.umts=6144,87380,110208,6144,16384,110208\ net.tcp.buffersize.hspa=6144,87380,262144,6144,16384,262144\ net.tcp.buffersize.gprs=6144,8760,11680,6144,8760,11680\ net.tcp.buffersize.edge=6144,26280,35040,6144,16384,35040' $p fi if [ ! "`getprop | grep heapgrowthlimit`" ]; then sed -i '/heapgrowthlimit/d' $p; fi if [ ! "`getprop | grep persist.sys.vm.heapsize`" ]; the n sed -i '/persist.sys.vm.heapsize/d' $p; fi done for sc in /system/etc/init.d/*SuperCharger* /data/99SuperCharg er.sh /system/etc/hw_config.sh; do if [ -f "$sc" ]; then sed -i '/$#/ a\ busybox sysctl -w net.core.wmem_max=1048576;\ busybox sysctl -w net.core.rmem_max=1048576;\ busybox sysctl -w net.core.optmem_max=20480;\ busybox sysctl -w net.ipv4.tcp_moderate_rcvbuf=1; # Be sure that autotuning is in effect\ busybox sysctl -w net.ipv4.route.flush=1;\ busybox sysctl -w net.ipv4.udp_rmem_min=6144;\ busybox sysctl -w net.ipv4.udp_wmem_min=6144;\ busybox sysctl -w net.ipv4.tcp_rmem='"'6144 87380 1048576'"';\ busybox sysctl -w net.ipv4.tcp_wmem='"'6144 87380 1048576'"';\ if [ -f "/sys/block/mmcblk0/queue/read_ahead_kb" ]; then\ echo '$sdtweak' > /sys/block/mmcblk0/queue/read_ahead_kb;\ fi;\ if [ "\`ls /sys/devices/virtual/bdi/179*/read_ahead_kb\`" ]; then\ echo '$sdtweak' > \`ls /sys/devices/virtual/bdi/179*/read_ahead_ kb\`;\ fi;' $sc fidone echo " Miscellaneous & 3G Tweaks are now ON!" misc3g=1;; esac echo $line echo "" $sleep echo -n " Press The Enter Key..." read enter echo "" echo $line echo "" $sleep touch $prop if [ -d "/system/etc/init.d" ]; then echo " Wheel Alignment On Boot..." echo " ==========================" echo "" $sleep echo " ZipAlign optimizes all your APKs..." echo "" $sleep echo " ...which means less RAM comsumption..." echo "" $sleep echo " ...better battery life..." echo "" $sleep echo " ...and a faster device!!" echo "" echo $line echo "" $sleep echo " Wheel Alignment can run automatically on boot!" echo "" $sleep echo " *99SuperCharger would run WheelAlignment.sh..." echo "" $sleep echo " ...so boot time would be unaffected!" echo "" if [ "`ls /system/etc/init.d/*SuperCharger*`" ]; then sed -i '/!WheelAlignment/d' /system/etc/init.d/*SuperCha rger* sed -i '/scriptmanager/ i\ sed -i '"'s/# exec >/exec >/'"' /data/V6_SuperCharger/!WheelAlignment.sh 2>/dev/null;\ sh /data/V6_SuperCharger/!WheelAlignment.sh & 2>/dev/null; sleep 1;\ sed -i '"'s/exec >/# exec >/'"' /data/V6_SuperCharger/!WheelAlignment.sh 2>/dev/null;' /system/etc/init.d/*SuperCharger* else echo $line $sleep echo " An Option from 2 - 13 still needs to be run!" fi 2>/dev/null if [ ! -f "/data/V6_SuperCharger/!WheelAlignment.sh" ]; then echo $line $sleep echo " Wheel Alignment has to run once from the menu!" fiecho $line echo "" $sleep echo " Run Wheel Alignment on boot?" echo "" $sleep echo -n " Enter Y for Yes, any key for No: " read bootzepalign echo "" echo $line case $bootzepalign in y|Y)echo " Wheel Alignment Set To Run On Boot!" zepalign=1;; *)sed -i '/!WheelAlignment.sh/s/^/#/' /system/etc/init.d /*SuperCharger* 2>/dev/null echo " Boot Align Declined... does that rhyme?" zepalign=0;; esac echo $line echo "" $sleep echo -n " Press The Enter Key..." read enter echo "" echo $line echo "" $sleep echo " Fix Emissions On Boot..." echo " ========================" echo "" $sleep echo " This should fix app Force Closes!" echo "" $sleep echo " FCs usually happen due to permission errors..." echo "" $sleep echo " This tool will ensure that ALL apps..." echo "" $sleep echo " ...have the correct permissions!" echo "" echo $line echo "" $sleep echo " Fix Emissions can run automatically on boot!" echo "" $sleep echo " *99SuperCharger would run FixEmissions.sh..." echo "" $sleep echo " ...so boot time would be unaffected!" echo "" if [ "`ls /system/etc/init.d/*SuperCharger*`" ]; then sed -i '/!FixEmissions/d' /system/etc/init.d/*SuperCharg er* sed -i '/sleep 60;/ i\ sed -i '"'s/# exec >/exec >/'"' /data/V6_SuperCharger/!FixEmissions.sh 2>/dev/nu ll;\ sh /data/V6_SuperCharger/!FixEmissions.sh & 2>/dev/null; sleep 1;\sed -i '"'s/exec >/# exec >/'"' /data/V6_SuperCharger/!FixEmissions.sh 2>/dev/nu ll;' /system/etc/init.d/*SuperCharger* else echo $line $sleep echo " An Option from 2 - 13 still needs to be run!" fi 2>/dev/null if [ ! -f "/data/V6_SuperCharger/!FixEmissions.sh" ]; then echo $line $sleep echo " Fix Emissions has to run once from the menu!" fi echo $line echo "" $sleep echo " Run Fix Emissions on boot?" echo "" $sleep echo -n " Enter Y for Yes, any key for No: " read bootfixemissions echo "" echo $line case $bootfixemissions in y|Y)echo " Fix Emissions Set To Run On Boot!" fixemissions=1;; *)sed -i '/!FixEmissions.sh/s/^/# /' /system/etc/init.d/ *SuperCharger* 2>/dev/null echo " No FCing Fix On Boot For You!" fixemissions=0;; esac echo $line echo "" $sleep echo -n " Press The Enter Key..." read enter echo "" echo $line echo "" $sleep echo " Detailing On Boot..." echo " ====================" echo "" $sleep 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 " Detailing can run automatically on boot!" echo "" $sleepecho " *99SuperCharger would run Detailing.sh..." echo "" $sleep echo " ...so boot time would be unaffected!" echo "" if [ "`ls /system/etc/init.d/*SuperCharger*`" ]; then sed -i '/!Detailing/d' /system/etc/init.d/*SuperCharger* sed -i '/sleep 60;/ a\ sed -i '"'s/# exec >/exec >/'"' /data/V6_SuperCharger/!Detailing.sh 2>/dev/null; \ sh /data/V6_SuperCharger/!Detailing.sh & 2>/dev/null; sleep 1;\ sed -i '"'s/exec >/# exec >/'"' /data/V6_SuperCharger/!Detailing.sh 2>/dev/null; sleep 480;' /system/etc/init.d/*SuperCharger* else echo $line $sleep echo " An Option from 2 - 13 still needs to be run!" fi 2>/dev/null if [ ! -f "/data/V6_SuperCharger/!Detailing.sh" ]; then echo $line $sleep echo " Detailing has to run once from the menu!" fi echo $line echo "" $sleep echo " Run Detailing on boot?" echo "" $sleep echo -n " Enter Y for Yes, any key for No: " read bootdetailing echo "" echo $line case $bootdetailing in y|Y)echo " Detailing Set To Run On Boot!" detailing=1;; *)sed -i '/!Detailing.sh/s/^/# /' /system/etc/init.d/*Su perCharger* 2>/dev/null echo " Declined Detailing On Boot!" detailing=0;; esac echo $line echo "" $sleep echo -n " Press The Enter Key..." read enter echo "" echo $line echo "" $sleep if [ "$ics" -eq 0 ]; then echo " System Integration - $initrcpath1 Options..." echo " ==================" echo "" $sleep echo " SuperCharger can attempt greater 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 "" echo $line $sleep 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 " Custom ROMs: Settings should stick either way!" echo "" echo $line echo "" $sleep for sc in /system/etc/init.d/*SuperCharger* /data/99Supe rCharger.sh /system/etc/hw_config.sh; do if [ -f "$sc" ]; then sed -i '/diff/,/I ntegration/d' $sc; fi; done echo -n " Integrate? Enter Y for Yes, any key for No: " read bake echo "" echo $line case $bake in y|Y)for sc in /system/etc/init.d/*SuperCharger* /data/ 99SuperCharger.sh /system/etc/hw_config.sh; do if [ -f "$sc" ]; then sed -i '/remount,r w \/data/ i\ if [ -f "'$initrcpath'" ] && [ "\`grep "SuperCharger" /system/build.prop \`" ] && [ "\`diff '$initrcpath' '$initrcpath1'\`" ]; then\ busybox mount -o remount,rw /;\ busybox mount -o remount,rw rootfs;\ cp -fr '$initrcpath' '$initrcpath1';\ busybox mount -o remount,ro /;\ busybox mount -o remount,ro rootfs;\ fi 2>/dev/null; # System Integration Marker' $sc fi done echo " System Integration of $initrcpath1 i s now ON!" initrc=1;; *)echo " System Integration of $initrcpath1 i s now OFF!" initrc=0;; esac echo $line echo "" $sleep else initrc=0 fi else initrc=0; fixemissions=0; zepalign=0; detailing=0 fi echo " Disable AWESOME V6 Animation? (Say \"NO\"!) :P"echo " =======" echo "" $sleep echo -n " Enter Y for Yes, any key for No: " read animate echo "" echo $line case $animate in y|Y)echo " Boo... Animation is OFF... :/" animation=0;; *)echo " Yay... Animation is ON... :D" animation=1;; esac echo $line echo "" $sleep echo "$speed,$buildprop,$animation,$initrc,$launcheradj,$fixemissions,$ zepalign,$detailing,$misc3g" > /data/V6_SuperCharger/SuperChargerOptions cp -fr /data/V6_SuperCharger/SuperChargerOptions $storage/V6_SuperCharg er/SuperChargerOptions echo " Driver Options Have Been Saved!" echo "" $sleep echo $line echo " Now Off To The Races!" firstgear=;missingoptions=;; 30)echo " =================" busybox 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 ""echo $line echo "" sleep 4 su -c "LD_LIBRARY_PATH=/vendor/lib:/system/lib am start http://goo.gl/0 dMcp" echo "";; 31)echo $line echo " !!POOF!!" echo $line echo "" sleep 2 busybox sync if [ -f "/proc/sys/kernel/sysrq" ]; then echo 1 > /proc/sys/kernel/sysrq 2>/dev/null echo b > /proc/sysrq-trigger 2>/dev/null fi echo " If it don't go poofie, just reboot manually!" echo "" reboot; busybox reboot;; 32)echo " ===================" busybox echo " //// SUPERCLEAN! \\\\\\\\" if [ "$ram1" -ne "$ram2" ]; then opt=26; fi;; 33)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 33 !!" echo "" sleep 2 echo -n " hehe... Press the Enter Key to continue... ;)" read enter echo "" opt=69;; esac if [ "$opt" -ne 0 ] && [ "$opt" -ne 1 ] && [ "$opt" -ne 14 ] && [ "$opt" -ne 15 ] && [ "$opt" -ne 16 ] && [ ! "$opt" -gt 26 ] && [ "$ram1" -ne "$ram2" ]; then opt=69; resuperable=; firstgear=; showicscentre=; fi if [ "$ics" -eq 0 ] && [ "$opt" -ge 2 ] && [ "$opt" -le 10 ]; then echo "" $sleep echo $line if [ "$launcheradj" -eq 0 ]; then echo " BULLETPROOF LAUNC HER!" elif [ "$launcheradj" -eq 2 ]; then echo " HARD TO KILL LA UNCHER!" else echo " DIE-HARD LAUNCHER!" fi fi if [ "$opt" -le 25 ] || [ "$opt" -eq 32 ]; then echo $line echo "" $sleep fi if [ "$opt" -eq 1 ]; then echo " Out Of Memory (OOM) / lowmemorykiller values:" echo "" $sleepecho " "$currentminfree pages echo "" $sleep echo $currentminfree | awk -F , '{printf " Which means: %.0f, %.0f, %.0 f, %.0f, %.0f, %.0f MB\n", $1/256, $2/256, $3/256, $4/256, $5/256, $6/256}' echo "" echo $line if [ "$lname" ]; then echo " $lname is the home launcher!" echo $line echo "" $sleep echo -n " But verify groupings with the bOOM Stick" if [ "$lname" = "android.process.acore" ] && [ ! "$diehard" ]; t hen echo "..." echo "" $sleep echo " ...since I'm not 100% sure... lol" else echo "!" fi echo "" echo $line fi echo "" $sleep echo " Home Launcher Priority is: $HL" echo "" $sleep echo " Foreground App Priority is: $FA" echo "" $sleep if [ "$gb" -eq 1 ] || [ "$icssced" ]; 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 ] || [ "$icssced" ]; 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 ] || [ "$icssced" ]; 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 ] || [ "$icssced" ]; 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 elif [ "$opt" -le 33 ]; then if [ "$opt" -le 13 ] || [ "$opt" -eq 24 ]; then if [ "`grep artprojects.RAM /d*/system/packages.xml`" ]; then echo $line echo " WARNING: Incompatibilty Error!" echo $line echo "" $sleep echo " A memory app of questionable integrity found!" echo "" $sleep echo " To ensure REAL SUPERCHARGING..." echo " ==================" echo "" $sleep echo " ...with A REAL SUPERCHARGED LAUNCHER..." echo " ============================" echo "" $sleep echo " You need to uninstall that \"cr-app\" :/"opt=33 fi 2>/dev/null fi if [ "$opt" -eq 24 ]; then echo " Your previous V6 SuperCharger Settings are..." echo "" $sleep awk -F , '{print " "$1/256",",$2/256",",$3/256",", $4/256",",$5/256",",$6/256 " MB"}' $storage/V6_SuperCharger/SuperChargerMinfree echo "" $sleep echo " Re-SuperCharge from $storage?" echo "" $sleep echo -n " Enter Y for Yes, any key for No: " read resuper echo "" echo $line case $resuper in y|Y)CONFIG=Re-Super if [ -f "$storage/V6_SuperCharger/97BulletProof_ Apps.sh" ] && [ -f "$storage/V6_SuperCharger/BulletProof_Apps_HitList" ]; then echo "" $sleep echo " Re-BulletProof Apps too?" echo "" $sleep echo -n " Enter N for No, any key for Ye s: " read rebullet echo "" echo $line case $rebullet in n|N);; *)rebulletproof=yes if [ "`ls $storage/V6_Su perCharger/*BulletProof_Apps`" ]; then cp -fr $storage/V6_SuperCharger/*BulletPr oof_Apps /system/etc/init.d; fi 2>/dev/null if [ "`ls $storage/V6_Su perCharger/BulletProof_Apps*`" ]; then cp -fr $storage/V6_SuperCharger/BulletPro of_Apps* /data/V6_SuperCharger; fi 2>/dev/null if [ -f "$storage/V6_Sup erCharger/97BulletProof_Apps.sh" ]; then cp -fr $storage/V6_SuperCharger/97Bulle tProof_Apps.sh /data; fi;; esac fi echo " Re-SuperCharging from $storage..." echo $line echo "" $sleep if [ "`ls $storage/V6_SuperCharger/SuperCharger* `" ]; then echo " ...your Driver Options..."; $sleep; cp -fr $storage/V6_Su perCharger/SuperCharger* /data/V6_SuperCharger; fi 2>/dev/null if [ "`ls $storage/V6_SuperCharger/*SuperCharger `" ]; then cp -fr $storage/V6_SuperCharger/*SuperCharger /system/etc/init.d; fi 2>/dev/null if [ -f "$storage/V6_SuperCharger/99SuperCharger .sh" ]; then echo " ...your SuperCharger Settings..."; $sleep; cp -fr $stor age/V6_SuperCharger/99SuperCharger.sh /data; fi if [ -f "/data/97BulletProof_Apps.sh" ]; then echo "...your BulletProof Apps Settings..."; $sleep; fi if [ -d "$storage/V6_SuperCharger/BulletProof_On e_Shots" ]; then cp -fr $storage/V6_SuperCharger/BulletProof_One_Shots /data/V6_ SuperCharger; fi if [ -d "$storage/V6_SuperCharger/PowerShift_Scr ipts" ]; then echo " ...your PowerShift Scripts..."; $sleep; cp -fr $storag e/V6_SuperCharger/PowerShift_Scripts /data/V6_SuperCharger; fi if [ -f "$storage/V6_SuperCharger/!FastEngineFlu sh.sh" ]; then echo " ...your \"Quick Widget\" Scripts..."; $sleep; cp -fr $storage/V6_SuperCharger/!FastEngineFlush.sh /data/V6_SuperCharger; fi if [ -f "$storage/V6_SuperCharger/!Detailing.sh" ]; then cp -fr $storage/V6_SuperCharger/!Detailing.sh /data/V6_SuperCharger; fi if [ -f "$storage/V6_SuperCharger/!FixEmissions. sh" ]; then cp -fr $storage/V6_SuperCharger/!FixEmissions.sh /data/V6_SuperCharg er; fi if [ -f "$storage/V6_SuperCharger/!WheelAlignmen t.sh" ]; then cp -fr $storage/V6_SuperCharger/!WheelAlignment.sh /data/V6_SuperC harger; fi if [ -f "$storage/V6_SuperCharger/!SuperClean.sh " ]; then cp -fr $storage/V6_SuperCharger/!SuperClean.sh /data/V6_SuperCharger; fi echo " ...all \"Terminal Emulator\" Scripts ... "; dd if=$0 of=/system/xbin/v6 2>/dev/null if [ -f "/data/V6_SuperCharger/SuperChargerAdj" ]; then scadj=`cat /data/V6_SuperCharger/SuperChargerAdj`; fi if [ -f "/data/V6_SuperCharger/SuperChargerMinfr ee" ]; then scminfree=`cat /data/V6_SuperCharger/SuperChargerMinfree`; ReSuperCh arge=1; autoshowcalculated= MB1=`echo $scminfree | awk -F , '{print $1/256}'`;MB2=`echo $scminfree | awk -F , '{print $2/256}'`;MB3=`echo $scminfree | awk -F , '{print $3/256}'`;MB4=`echo $scminfree | awk -F , '{print $4/256}'`; MB5=`echo $scminfree | awk -F , '{print $5/256}'`;MB6=`echo $scminfree | awk -F , '{print $6/256}'` fi chown 0.0 /system/etc/init.d/* 2>/dev/null; chmo d 777 /system/etc/init.d/* 2>/dev/null chown 0.0 /data/V6_SuperCharger/*; chmod 777 /da ta/V6_SuperCharger/* chown 0.0 /data/V6_SuperCharger/BulletProof_One_ Shots/* 2>/dev/null; chmod 777 /data/V6_SuperCharger/BulletProof_One_Shots/* 2>/ dev/null chown 0.0 /data/V6_SuperCharger/PowerShift_Scrip ts/* 2>/dev/null; chmod 777 /data/V6_SuperCharger/PowerShift_Scripts/* 2>/dev/nu ll chown 0.0 /system/xbin/v6 2>/dev/null; chmod 777 /system/xbin/v6 2>/dev/null if [ "`ls /data/*.sh`" ]; then chown 0.0 /data/* .sh; chmod 777 /data/*.sh; fi if [ -f "/data/V6_SuperCharger/!FastEngineFlush. sh" ]; then cp -fr /data/V6_SuperCharger/!FastEngineFlush.sh /system/xbin/flush; fi if [ -f "/data/V6_SuperCharger/!Detailing.sh" ]; then cp -fr /data/V6_SuperCharger/!Detailing.sh /system/xbin/vac; fi if [ -f "/data/V6_SuperCharger/!FixEmissions.sh" ]; then cp -fr /data/V6_SuperCharger/!FixEmissions.sh /system/xbin/fixfc; fi if [ -f "/data/V6_SuperCharger/!WheelAlignment.s h" ]; then cp -fr /data/V6_SuperCharger/!WheelAlignment.sh /system/xbin/zepalign ; fi if [ -f "/data/V6_SuperCharger/!SuperClean.sh" ] ; then cp -fr /data/V6_SuperCharger/!SuperClean.sh /system/xbin/sclean; fiecho "" echo $line $sleep echo " ...finished copying files to /system and /data!" echo $line echo "" $sleep if [ -f "/data/V6_SuperCharger/SuperChargerOptio ns" ]; then firstgear= speed=`awk -F , '{print $1}' /data/V6_Su perCharger/SuperChargerOptions` sleep="sleep $speed" buildprop=`awk -F , '{print $2}' /data/V 6_SuperCharger/SuperChargerOptions` animation=`awk -F , '{print $3}' /data/V 6_SuperCharger/SuperChargerOptions` initrc=`awk -F , '{print $4}' /data/V6_S uperCharger/SuperChargerOptions` launcheradj=`awk -F , '{print $5}' /data /V6_SuperCharger/SuperChargerOptions` fixemissions=`awk -F , '{print $6}' /dat a/V6_SuperCharger/SuperChargerOptions` zepalign=`awk -F , '{print $7}' /data/V6 _SuperCharger/SuperChargerOptions` detailing=`awk -F , '{print $8}' /data/V 6_SuperCharger/SuperChargerOptions` misc3g=`awk -F , '{print $9}' /data/V6_S uperCharger/SuperChargerOptions` if [ ! "$launcheradj" ]; then launcherad j=1; fi if [ ! "$fixemissions" ]; then fixemissi ons=0; fi if [ ! "$zepalign" ]; then zepalign=0; f i if [ ! "$detailing" ]; then detailing=0; fi if [ ! "$misc3g" ]; then misc3g=1; missi ngoptions=yes; fi fi echo $line echo " Prior scrolling speed of $speed had bee n set..." echo $line $sleep if [ "$ics" -eq 0 ]; then if [ "$buildprop" -eq 0 ]; then echo " LOCAL.PROP to be used for SuperCharging!" else echo " BUILD.PROP to be used for SuperCharging!" fi echo $line $sleep if [ "$launcheradj" -eq 0 ]; then echo " SuperCharged Launcher Option is BulletProof!!" elif [ "$launcheradj" -eq 2 ]; then echo " SuperCharged Launcher Option is Hard To Kill!" else echo " SuperCharged Launcher Opti on is... Die-Hard!!" fiecho $line $sleep fi echo -n " ts - " if [ "$misc3g" -eq 0 ]; then echo "NO!" else echo "YES!" fi echo $line $sleep if [ -d "/system/etc/init.d" ]; then echo -n " Fix Emissions (Fixes FCs) Ru ns On Boot - " if [ "$fixemissions" -eq 0 ]; then echo "NO!" else echo "YES!" fi echo $line $sleep echo -n " Wheel Alignment(ZipAlign) Ru ns On Boot - " if [ "$zepalign" -eq 0 ]; then echo "NO! " else echo "YES!" fi echo $line $sleep echo -n " Detailing(Clean Database) Ru ns On Boot - " if [ "$detailing" -eq 0 ]; then echo "NO !" else echo "YES!" fi echo $line $sleep if [ "$ics" -eq 0 ]; then if [ "$initrc" -eq 1 ]; then ech o " System Integration of $initrcpath1 is ON..." else echo " System Integration of $initrcpath1 is OFF..." fi echo $line $sleep fi fi echo "" if [ "$missingoptions" ]; then echo $line echo " Missing Some NEW Option s!!" echo $line echo "" $sleep echo " You need to refresh them so..." echo "" $sleep echo " ...Driver Options will be load ed..." echo "" $sleep Miscellaneous Tweaks & 3G Enhancemenecho " uperCharging!" echo "" echo $line echo "" $sleepAfter Re-Sfi echo " If you previously used Terminal to execut e..." echo "" $sleep echo " \"v6\" \"flush\" \"vac\" \"fixfc\" \"zepa lign\" \"sclean\"" echo "" $sleep echo $line echo " Those commands will work automagically !" echo $line echo "" $sleep echo " But to avoid conflicts (different rom, et c)..." echo "" $sleep echo " ored!" echo "" $sleep echo " Nitro Lag Nullifier and 3G TurboCharger.. ." echo "" $sleep echo " lled!" echo "" echo $line echo "" $sleep echo " But this comes first... heh..." echo "" echo $line echo "" $sleep opt=12;; *)echo " Re-SuperCharging Declined... meh..." if [ "$firstgear" ]; then echo $line echo "" $sleep echo " Going to load Driver Options inst ead!" echo "" fi resuperable=;; esac fi if [ "$opt" -le 15 ]; then if [ "$opt" -ne 14 ]; then if [ -f "$storage/UnSuperCharged.html" ]; then rm $stora ...may need to be re-insta ...some system files were not restge/UnSuperCharged.html; fi if [ -f "$storage/UnSuperChargerError.html" ]; then rm $ storage/UnSuperChargerError.html; fi if [ -f "$storage/SuperChargerScriptManagerHelp.html" ]; then rm $storage/SuperChargerScriptManagerHelp.html; fi if [ -f "$storage/SuperChargerHelp.html" ]; then rm $sto rage/SuperChargerHelp.html; fi fi if [ "$opt" -le 10 ] || [ "$ReSuperCharge" -eq 1 ]; then SL0=$(($MB0*256));SL1=$(($MB1*256));SL2=$(($MB2*256));SL 3=$(($MB3*256));SL4=$(($MB4*256));SL5=$(($MB5*256));SL6=$(($MB6*256)) echo -n " zOOM... "; sleep 2; echo -n "zOOM..."; sleep 2 ; echo "" echo "" elif [ "$scminfree" ]; then SL0=$(($MB0*256));SL1=`echo $scminfr ee | awk -F , '{print $1}'`;SL2=`echo $scminfree | awk -F , '{print $2}'`;SL3=`e cho $scminfree | awk -F , '{print $3}'`;SL4=`echo $scminfree | awk -F , '{print $4}'`;SL5=`echo $scminfree | awk -F , '{print $5}'`;SL6=`echo $scminfree | awk F , '{print $6}'` fi if [ "$opt" -le 13 ]; then echo "============== Information Panel =============" 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 " ...so have a backup avail able!" echo $line echo "" $sleep echo " Do you want to use Build.prop?" echo "" $sleepecho -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,$laun cheradj,$fixemissions,$zepalign,$detailing,$misc3g" > /data/V6_SuperCharger/Supe rChargerOptions cp -fr /data/V6_SuperCharger/SuperChargerOptions $storage/V6_SuperCharger/SuperChargerOptions echo " Settings have been saved!" echo "" $sleep echo " Note: This can be changed later under Opt ions!" echo "" echo $line echo "" $sleep fi for p in /system/build.prop /data/local.prop /system/bin /build.prop /system/etc/ram.conf; do if [ -f "$p" ]; then if [ -f "$p.unsuper" ]; then echo " Leav ing ORIGINAL ${p##*/} backup intact..." else echo " Backing up ORIGINAL ${p## */}..." echo "" $sleep cp -r $p $p.unsuper if [ "`diff $p $p.unsuper`" ]; t hen echo " ERROR BACKING UP $p!" else sed -i '/SuperCharger In stallation/d' $p.unsuper echo " ...as $p .unsuper!" fi fi echo "" $sleep fi done echo $line if [ "$ics" -eq 0 ]; then echo -n " MEM and ADJ values to be applied to " if [ "$buildprop" -eq 0 ]; then echo "LOCAL.PROP !" else echo "BUILD.PROP!" fi echo $linefi echo "" $sleep fi if [ "$opt" -le 14 ]; then if [ -f "$initrcpath1" ] && [ ! -f "$initrcpath" ]; then cp -r $initrcpath1 $initrcpath; fi for rc in $initrcpath1 $allrcpaths /system/etc/hw_config .sh; do if [ -f "$rc" ]; then echo " Found $rc!" echo "" $sleep if [ "$rc" = "$initrcpath1" ]; then if [ -f "$initrcbackup" ]; then echo " Backup already exists... leaving backup intact" else echo " Backing up ORIGIN AL settings..." cp -r $initrcpath1 $init rcbackup if [ "`diff $initrcpath1 $initrcbackup`" ]; then echo "" $sleep echo " ERROR BAC KING UP $initrcpath1!" fi fi elif [ -f "$rc.unsuper" ]; then echo " B ackup already exists... leaving backup intact" else echo " Backing up ORIGINAL setti ngs..." cp -r $rc $rc.unsuper if [ "`diff $rc $rc.unsuper`" ]; then echo "" $sleep echo " ERROR BACKING UP $rc!" fi fi echo "" $sleep if [ "$opt" -ne 14 ]; then if [ "$ics" -eq 0 ] && [ "`grep -ls "on boot" $rc`" ] && [ "$rc" != "/system/etc/hw_config.sh" ]; then echo $line if [ "$rc" = "$initrcpat h1" ] && [ "$initrc" -eq 0 ]; then echo "" echo " System In tegration of $initrcpath1 is OFF..." echo "" $sleep echo " But for c ooking/baking into ROMs..." echo "" $sleepecho $line fi if [ "$rc" = "$initrcpat h1" ] && [ "$initrc" -eq 0 ]; then echo -n " /data/" elif [ "$rc" = "$initrcp ath1" ]; then echo -n " /" else echo -n " " fi if [ "$ics" -eq 0 ] && [ "$opt" -ge 11 ] && [ "$opt" -le 13 ] && [ "$ReSuperCharge" -eq 0 ]; then echo " ${rc##*/} will be OOM Fixed!" else echo -n "${rc##* /} will be SuperCharged" if [ "$rc" = "$i nitrcpath1" ]; then echo "!" else echo "..." echo $li ne $sleep echo " ...it will also run The SuperCharger Service!" fi fi elif [ "$opt" -le 10 ] || [ "$Re SuperCharge" -eq 1 ] && [ "$rc" != "$initrcpath1" ] && [ "$rc" != "/system/etc/h w_config.sh" ]; then echo $line; echo " It will run The SuperCharger Service !" fi fi echo $line echo "" $sleep fi done 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 $sleep echo " Boo... UnSuperCharging Performance...." echo $line echo "" $sleep if [ ! -f "`ls /system/etc/init.d/*SuperCharger*`" ] && [ ! -f "`ls /data/*SuperCharger*`" ] && [ ! -f "`ls /system/etc/init.d/*BulletPr oof_Apps*`" ] && [ ! -f "$initrcpath" ] && [ ! -f "$initrcbackup" ] && [ ! "$all rcbackups" ]; then echo " I Got Nothing To Do! Try SuperCharging fi rst!" echo "" $sleep UnSuperCharged=1cat > $storage/UnSuperCharged.html > /data/Ran_SuperCharger.log; exit 69; fi; # echo " Delete this file to Re-Enable *99SuperCharger to run on boot..." > /data/!!SuperChargerBootLoopMessage.log; fi; # EOF if [ ! "$allrcpaths" ]; then cat >> $sc > $sc /dev/null; mount -o remount,rw \`busybox mount | grep system | awk '{print \$1,\$3} -n 1p\` 2>/dev/null;if [ "$sc" = "/data/99SuperCharger.sh" ] ; then cat >> $sc $sc $sc \`ls /sys/devices/virtual/bdi/179*/read_ahead_kb \`; fi; EOF fi cat >> $sc /sys/module/lowmemorykille r/parameters/minfree; fi; EOF if [ "$buildprop" -eq 0 ]; then echo " sed -i '/.*_ADJ/d' /syst em/build.prop;" >> $sc echo " sed -i '/.*_MEM/d' /syst em/build.prop;" >> $sc if [ -f "/system/bin/build.prop" ]; then echo " sed -i '/.*_ADJ/ d' /system/bin/build.prop;" >> $sc echo " sed -i '/.*_MEM/ d' /system/bin/build.prop;" >> $sc fi fi cat >> $sc / data/Ran_SuperCharger.log; echo " SuperCharger Settings Applied!"; elif [ "\`pgrep -l android\`" ]; then echo " \$( date +"%m-%d-%Y %H:%M:%S" ): No need to reapply settings from \$0!" >> /data/Ran_SuperCharger.log; echo " SuperCharger Settings Were ALREADY Applied!"; fi; echo ""; echo " \$0 Executed..."; EOF if [ "$sc" = "/data/99SuperCharger.sh" ] ; then cat >> $sc /dev/null; stop super_service; else # rm /data/!!SuperChargerBootLoopMessage.log; \$0 & exit 0; fi; sleep 60; sed -i 's/# exec >/exec >/' /data/V6_SuperCharger/!FastEngineFlush.sh 2>/dev/null; sh /data/V6_SuperCharger/!FastEngineFlush.sh & 2>/dev/null; sleep 1; sed -i 's/exec >/# exec >/' /data/V6_SuperCharger/!FastEngineFlush.sh 2>/dev/nul l; EOF else cat >> $sc /dev/null; sh /system/etc/init.d/*KickAssKernel & 2>/dev/null; sh /data/99SuperCharger.sh & 2>/dev/null; EOF fi echo "# End of V6 SuperCharged Entries." >> $sc fi done chown 0.0 /data/99SuperCharger.sh; chmod 777 /data/99Sup erCharger.sh if [ "$rcpaths" ] || [ "$ics" -eq 0 ] && [ "$initrc" -eq 1 ] && [ -d "/system/etc/init.d" ]; then echo " For Super Stickiness..." echo "" $sleep fi if [ -d "/system/etc/init.d" ]; then cp -fr /data/99Supe rCharger.sh /system/etc/init.d/99SuperCharger echo " SuperCharging /system/etc/init.d folder.. ." echo "" $sleep if [ ! "`diff /data/99SuperCharger.sh /system/et c/init.d/99SuperCharger`" ]; then sed -i '/BootLoop/s/^#//' /system/etc/in it.d/99SuperCharger sed -i '/BootLoop/s/#.*/delete line/' /d ata/99SuperCharger.sh sed -i '/delete line/d' /data/99SuperCha rger.sh sed -i 's/# set -x/set -x/' /system/etc/ init.d/99SuperCharger sed -i '/Log_SuperCharger/s/# exec/exec/ ' /system/etc/init.d/99SuperCharger sed -i 's/# echo/echo/' /system/etc/init .d/99SuperCharger sed -i '/super_service;/s/^/#/' /system/ etc/init.d/99SuperCharger sed -i '/scriptmanager/ i\ # sed -i '"'s/# exec >/exec >/'"' /data/V6_SuperCharger/!WheelAlignment.sh 2>/dev/null;\ # sh /data/V6_SuperCharger/!WheelAlignment.sh & 2>/dev/null; sleep 1;\ # sed -i '"'s/exec >/# exec >/'"' /data/V6_SuperCharger/!WheelAlignment.sh 2>/dev/null;' /system/etc/init.d/99SuperCharger sed -i '/busybox mount -o remount,rw `bu sybox mount/ a\ mv \$0 /system/etc/init.d/99SuperCharger;\ for i in \`busybox ls -r /system/etc/init.d\`; do\ if [ "\$j" ]; then break; fi;\ if [ ! -d "\$i" ]; then j=\$i; fi;\ done;\echo echo echo if [ \\\/dev/null;\ sh /data/99SuperCharger.sh & 2>/dev/null;\ # sed -i '"'s/# exec >/exec >/'"' /data/V6_SuperCharger/!FixEmissions.sh 2>/dev/ null;\ # sh /data/V6_SuperCharger/!FixEmissions.sh & 2>/dev/null; sleep 1;\ # sed -i '"'s/exec >/# exec >/'"' /data/V6_SuperCharger/!FixEmissions.sh 2>/dev/ null;' /system/etc/init.d/99SuperCharger sed -i '/sleep 60;/ a\ # sed -i '"'s/# exec >/exec >/'"' /data/V6_SuperCharger/!Detailing.sh 2>/dev/nul l;\ # sh /data/V6_SuperCharger/!Detailing.sh & 2>/dev/null; sleep 1;\ # sed -i '"'s/exec >/# exec >/'"' /data/V6_SuperCharger/!Detailing.sh 2>/dev/nul l; sleep 480;' /system/etc/init.d/99SuperCharger if [ "$fixemissions" -eq 1 ]; then sed i '/!FixEmissions.sh/s/^# //' /system/etc/init.d/99SuperCharger; fi if [ "$zepalign" -eq 1 ]; then sed -i '/ !WheelAlignment.sh/s/^#//' /system/etc/init.d/99SuperCharger; fi if [ "$detailing" -eq 1 ]; then sed -i ' /!Detailing.sh/s/^# //' /system/etc/init.d/99SuperCharger; fi j= for i in `busybox ls -r /system/etc/init .d`; do if [ "$j" ]; then break; fi if [ ! -d "$i" ]; then j=$i; fi done if [ "$j" = "S98KickAssKernel" ] || [ "$ j" = "SS98KickAssKernel" ] && [ "$i" \< "99SuperCharger1" ] || [ "$j" \< "99Supe rCharger1" ]; then echo " ...with /system/etc/i nit.d/99SuperCharger!" elif [ "$j" = "SS98KickAssKernel" ] && [ "$i" \< "S99SuperCharger" ] || [ "$j" \< "S99SuperCharger" ]; then mv /system/etc/init.d/99SuperCha rger /system/etc/init.d/S99SuperCharger echo " ...with /system/etc/in it.d/S99SuperCharger!" else mv /system/etc/init.d/99SuperCha rger /system/etc/init.d/SS99SuperCharger echo " ...with /system/etc/ini t.d/SS99SuperCharger!"fi else echo " WARNING: ERROR copying file to /s ystem/init.d!" echo "" $sleep echo " Got enough free space?" echo "" $sleep echo " System Partition has `busybox df -h /system | awk '{print $4,"Free ("$5" Used)"}' | tail -n 1`" fi echo "" else echo " You have no /system/etc/init.d folder..." echo "" $sleep echo $line echo " ...so instead, use /data/99SuperCharge r.sh!" echo $line echo "" $sleep echo " Stock ROM? - Additional Configuration Req uired!" echo "" $sleep if [ "$opt" -le 10 ]; then echo -n " Some Changes are TEMPORARY & " if [ "$allrcpaths" ]; then echo "MAY NOT PERSIST!" else echo "WON'T PERSIST!" fi echo "" $sleep echo " To enable PERSISTENT SuperCharger settings...." echo "" $sleep echo " ...and OOM Grou ping Fixes..." else echo " To enable PERSISTENT OOM Grouping Fi xes..." fi echo "" $sleep if [ "$allrcpaths" ]; then echo " ...The SuperCharger Service should work!" echo "" $sleep echo " BUT if it doesn't..." echo "" $sleep fi if [ "$smrun" ]; then SuperChargerScriptManagerHelp=1 cat > $storage/SuperChargerScriptManager Help.html $storage/SuperChargerHelp.html > $scs "/data/V6_SuperCharger/PowerShift_Scripts/ $CONFIG-($MB1,$MB2,$MB3,$MB4,$MB5,$MB6)-PowerShift.sh" /dev/null busybox mount -o remount,rw \`busybox mount | grep system | awk '{print \$1,\$3} ' | sed -n 1p\` 2>/dev/null echo " PowerShifting to a different gear!" echo "" sleep 1 echo \$line awk -F , '{print " Current Minfrees = "\$1/256","\$2/256","\$3/256","\$4/256", "\$5/256","\$6/256" MB"}' /sys/module/lowmemorykiller/parameters/minfree echo \$line echo "" sleep 1 echo " Setting LowMemoryKiller to..." echo "" sleep 1echo \$line echo " ...$MB1, $MB2, $MB3, $MB4, $MB5, $MB6 MB" echo \$line echo "" sleep 1 echo $scminfree > /sys/module/lowmemorykiller/parameters/minfree echo $scminfree > /data/V6_SuperCharger/SuperChargerMinfree echo " OOM Minfree levels are now set to..." echo "" sleep 1 echo " ...\`cat /sys/module/lowmemorykiller/parameters/minfree\`" echo "" sleep 1 echo " They are also your new SuperCharger values!" echo "" echo \$line echo "" sleep 1 echo " Applying Updated Kernel/Memory Tweaks..." echo "" sleep 1 echo -n " ...";busybox sysctl -w vm.min_free_kbytes=$MFK echo "" sleep 1 echo \$line echo " Updating MFK in *99SuperCharger Boot Scripts..." echo \$line echo "" sleep 1 sed -i 's/vm.min_free_kbytes=.*/vm.min_free_kbytes=$MFK;/' /system/etc/init.d/*S uperCharger* 2>/dev/null sed -i 's/free_kbytes\`" -ne .* ] /free_kbytes\`" -ne $MFK ] /' /system/etc/init .d/*SuperCharger* 2>/dev/null sed -i 's/vm.min_free_kbytes=.*/vm.min_free_kbytes=$MFK;/' /data/99SuperCharger. sh 2>/dev/null sed -i 's/free_kbytes\`" -ne .* ] /free_kbytes\`" -ne $MFK ] /' /data/99SuperCha rger.sh 2>/dev/null echo " ===========================" echo " ) PowerShift Completed! (" echo " ===========================" echo "" busybox mount -o remount,ro /system 2>/dev/null busybox mount -o remount,ro \`busybox mount | grep system | awk '{print \$1,\$3} ' | sed -n 1p\` 2>/dev/null exit 0 EOF chown 0.0 /data/V6_SuperCharger/PowerShift_Scrip ts/*; chmod 777 /data/V6_SuperCharger/PowerShift_Scripts/* echo " A PowerShift Script was saved as..." echo "" $sleep echo " $CONFIG-($MB1,$MB2,$MB3,$MB4,$MB5,$MB6)-P owerShift.sh!" echo "" $sleep echo " Goto data/V6_SuperCharger/PowerShift_Scri pts.." echo "" $sleep echo " ...make a \"Quick Widget\" for it..." echo "" $sleep echo " ings!" echo "" $sleep echo " They'll also be your new SuperCharger va lues!" echo "" echo $line scsinfo=shown fi echo "$scadj" > /sys/module/lowmemorykiller/parameters/a dj if [ "$newlauncher" -eq 1 ]; then $sleep echo " LAUNCHER CHANGE DETECTED!" echo $line echo "" $sleep echo " REBOOT NOW TO ENABLE..." echo "" $sleep if [ "$launcheradj" -eq 0 ]; then echo " ...BULLETPROOF LAUNCHER..." elif [ "$launcheradj" -eq 2 ]; 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 $sleep echo " RUN /data/99SuperCharger.sh AFTER EACH RE BOOT!" elif [ "$SuperChargerScriptManagerHelp" -eq 1 ]; then $sleep echo " DON'T FORGET to have Script Manager load. .." echo " .../data/99SuperCharger.sh on boot!" echo " ...or make a Script Manager WIDGET fo r it!" elif [ "$opt" -le 10 ] || [ "$ics" -eq 1 ] || [ "$ReSupe rCharge" -eq 1 ]; then $sleep if [ "$ReSuperCharge" -eq 1 ]; then echo -n " Re stored" else echo -n "$CONFIG" fi echo " Settings WILL PERSIST after reboot!" echo $line echo "" ...and PowerShift between sett$sleep echo " If they don't persist, read the Owner's G uide!" echo "" else echo "" $sleep echo " If OOM Fixes are't in effect after a rebo ot..." echo "" $sleep echo " ak..." echo "" $sleep echo " uide!" echo "" fi echo $line echo "" $sleep echo " SO... you know if it works or not by..." echo "" $sleep echo " ...READING THE INFO Under The Driver's Console!" echo "" $sleep echo $line echo " PLEASE: READ THE ABOVE MESSAGES BEFORE ASKING!" echo $line echo "" $sleep echo " Because I may SNAP and call you names! ;o]" echo "" echo $line echo "" $sleep echo -n " Press The Enter Key..." read enter echo "" fi if [ -f "/system/bin/build.prop" ]; then cp -fr /system/build.pr op /system/bin; fi if [ "$opt" -ne 15 ]; then if [ "$opt" -le 10 ] || [ "$ReSuperCharge" -eq 1 ] || [ "$ics" -eq 1 ]; then ran=1; fi if [ -f "$initrcpath" ] && [ "$initrc" -eq 1 ]; then cp -fr $initrcpath $initrcpath1; fi echo " Backing up refreshed files to $storage..." echo "" $sleep if [ -d "/data/V6_SuperCharger" ]; then cp -fr /data/V6_ SuperCharger $storage; fi for rc in $initrcpath $allrcpaths; do cp -fr $rc* $stora ge/V6_SuperCharger; done if [ -f "/data/99SuperCharger.sh" ]; then cp -fr /data/9 9SuperCharger.sh $storage/V6_SuperCharger; fi if [ "`ls /system/etc/init.d/*SuperCharger*`" ]; then cp -fr /system/etc/init.d/*SuperCharger* $storage/V6_SuperCharger; fi 2>/dev/null ...read the Owner's G ...and the Launcher is weif [ "`ls /system/build.prop*`" ]; then cp -fr /system/b uild.prop* $storage/V6_SuperCharger; fi 2>/dev/null if [ "`ls /data/local.prop*`" ]; then cp -fr /data/local .prop* $storage/V6_SuperCharger; fi 2>/dev/null if [ "`ls /system/etc/hw_config.sh*`" ]; then cp -fr /sy stem/etc/hw_config.sh* $storage/V6_SuperCharger; fi 2>/dev/null if [ "`ls /system/etc/ram.conf*`" ]; then cp -fr /system /etc/ram.conf* $storage/V6_SuperCharger; fi 2>/dev/null echo " ...Re-SuperCharger backup complete!" echo "" if [ "$rebulletproof" ] && [ "$allrcpaths" ]; then opt=1 7 elif [ "$newsupercharger" ] || [ "$ics" -eq 1 ] && [ "$o pt" -ne 14 ]; then if [ "$ics" -eq 0 ]; then opt=32 echo $line echo "" $sleep if [ "$resuperable" ] || [ "$ReSuperChar ge" -eq 1 ]; then echo " Re-SuperCharger is ALMOST done!" else echo " I think this is your FIRST S uperCharge..." fi echo "" $sleep elif [ "$icssced" ] || [ "$servicesjarinstalled" ]; then echo $line echo " I Scream SUPERCHARGED !" elif [ ! "$showedicscentre" ]; then opt=25 echo $line echo "" $sleep echo " Now off to the \"ICS Service Cent re\"..." echo "" $sleep fi resuperable= 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 fi if [ "$opt" -eq 17 ] && [ ! "$rebulletproof" ] && [ "$bpapplist" ] && [ "`cat /proc/*/cmdline | grep Bullet`" != "Bullet" ]; then echo " You are currently BulletProofing..." echo "" $sleep for bpapp in $bpapplist; do echo " $bpapp"; don e echo "" echo $line echo "" $sleep echo " Un-BulletProof Previously BulletProofed Apps?" echo "" $sleep echo " You can Un-BulletProof All or Individually ;^]" echo "" $sleep echo " \"One-Shot\" scripts will remain untouched..." echo "" $sleep echo -n " Enter Y for Yes, any key for No: " read unbp echo "" echo $line case $unbp in y|Y)while :;do echo "" $sleep echo -n " Un-BulletProof (A)ll (I)ndivid ually E(X)it? " read unbpopt echo "" echo $line case $unbpopt in a|A)if [ "`ls /data/V6_SuperCharger/Bu lletProof_Apps*.sh`" ]; then rm /data/V6_SuperCharger/BulletProof_Apps*.sh; fi 2>/dev/null if [ "`ls /data/V6_SuperCharge r/BulletProof_Apps*`" ]; then rm /data/V6_SuperCharger/BulletProof_Apps*; fi 2>/ dev/null if [ "`ls /data/*BulletProof_A pps*`" ]; then rm /data/*BulletProof_Apps*; fi 2>/dev/null if [ "`ls /system/etc/init.d/* BulletProof_Apps*`" ]; then rm /system/etc/init.d/*BulletProof_Apps*; fi 2>/dev/ null echo " Un-BulletProo fed ALL Apps!" bpapplist=; opt=16 break;; i|I)for unbpapp in $bpapplist; do echo "" $sleep echo " Un-Bulletproof $u nbpapp?" echo "" echo -n " Enter Y for Ye s, any key for No: " read unbpone echo "" echo $line case $unbpone in y|Y)sed -i '/Begin '$u nbpapp'/,/End '$unbpapp'/d' /data/V6_SuperCharger/BulletProof_Apps_Fine_Tuner.sh sed -i '/'$unb papp'/d' /data/V6_SuperCharger/BulletProof_Apps_HitList echo " Un-Bull etProofed $unbpapp!" echo $line;; *);; esac done bpapplist=`cat /data/V6_SuperC harger/BulletProof_Apps_HitList` echo "" $sleep echo " Here's Your Updated Hit List!" echo "" $sleep for bpapp in $bpapplist; do ec ho " $bpapp"; done echo "" showedbpapplist=yes; opt=16 break;; x|X)echo " Ok... let's BulletPro of something!" break;; *)echo " Invalid entry... P lease try again :p" echo $line;; esac done;; *)echo " Cool Beans!";; esac if [ "$opt" -eq 17 ]; then echo $lineecho "" $sleep fi fi if [ "$opt" -eq 17 ] && [ ! "$rebulletproof" ]; then echo " This will attempt to lock an app in memory!" echo "" $sleep echo " Do you want to view the current process list?" echo "" $sleep echo " You can BulletProof Apps without viewing it!" echo "" $sleep echo -n " Enter N for No, any key for Yes: " read bp echo "" echo $line case $bp in n|N)echo " Okay... I hope you know what process to ent er!" bpblind=yes;; *)echo " Loading zOOM Stick Verifier (Quick)..." vroomverifier=0;; esac fi if [ "$vroomverifier" ]; then echo $line echo "" $sleep echo " =================================" echo "----=== zeppelinrox's bOOM Stick Verifier ===---" echo " =================================" echo "" $sleep 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` if [ "$vroomverifier" -eq 0 ]; then echo " Using zOOM Stick Mode (Quick)..."; echo " "; $sleep echo " ADJ PID Process" else echo " Using vrOOM Stick Mode (Verbose)..."; ech o ""; $sleep echo " ADJ PID Process/Path (APK)" fi 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 [ "$i" -ne 0 ] 2>/dev/null && [ -f "/proc/$i/oom_adj" ] && [ "`cat /proc/$i/cmdline`" ] && [ "`cat /proc/$i/oom_adj`" -gt -18 ] && [ "`cat /proc/$i/oom_adj`" -lt "$oomadj1" ]; then if [ "`cat /proc/$i/oom_adj`" -eq "$HL" ] && [ " $lname" = "`cat /proc/$i/cmdline`" ]; then echo "" echo " Home Launcher is on the NEXT line ! (ADJ=$HL)" fi appname=`cat /proc/$i/cmdline | sed 's/.*\///'` echo -n " `cat /proc/$i/oom_adj` " echo -n $i if [ "$vroomverifier" -eq 0 ]; then echo " $app name" else # apkname=`su -c "LD_LIBRARY_PATH=/vendor/ lib:/system/lib pm list packages -f $appname | sed 's/.*://' | sed 's/=.*//'"` apkname=`busybox find / -iname "*$appnam e*.apk" -maxdepth 3 | tail -n 1` if [ "$apkname" ]; then echo -n " `cat /proc/$i/cmdline `" echo " ($apkname)" else echo " `cat /proc/$i/cmdline`" fi 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 [ "$i" -ne 0 ] 2>/dev/null && [ -f "/proc/$i/oom_ad j" ] && [ "`cat /proc/$i/cmdline`" ] && [ "`cat /proc/$i/oom_adj`" -eq "$oomadj1 " ]; then if [ "`cat /proc/$i/oom_adj`" -eq "$HL" ] && [ " $lname" = "`cat /proc/$i/cmdline`" ]; then echo "" echo " Home Launcher is on the NEXT line ! (ADJ=$HL)" fi appname=`cat /proc/$i/cmdline | sed 's/.*\///'` echo -n " `cat /proc/$i/oom_adj` " echo -n $i if [ "$vroomverifier" -eq 0 ]; then echo " $app name" else # apkname=`su -c "LD_LIBRARY_PATH=/vendor/ lib:/system/lib pm list packages -f $appname | sed 's/.*://' | sed 's/=.*//'"` apkname=`busybox find / -iname "*$appnam e*.apk" -maxdepth 3 | tail -n 1` if [ "$apkname" ]; then echo -n " `cat /proc/$i/cmdline `" echo " ($apkname)" else echo " `cat /proc/$i/cmdline`" fi fi fidone echo "" if [ "$scadj" ] && [ "$currentadj" = "$scadj" ] && [ "$o omstick" -eq 1 ] && [ "$HL" -ne "$oomadj1" ]; then echo " HOME_LAUNCHER OOM GROUPING!" echo " ===========================" for i in `ls /proc`; do if [ "$i" -ne 0 ] 2>/dev/null && [ -f "/proc/$ i/oom_adj" ] && [ "`cat /proc/$i/cmdline`" ] && [ "`cat /proc/$i/oom_adj`" -gt " $oomadj1" ] && [ "`cat /proc/$i/oom_adj`" -lt "$oomadj2" ]; then if [ "`cat /proc/$i/oom_adj`" -eq "$HL" ] && [ "$lname" = "`cat /proc/$i/cmdline`" ]; then echo "" echo " Home Launcher is on the N EXT line! (ADJ=$HL)" fi appname=`cat /proc/$i/cmdline | sed 's/. *\///'` echo -n " `cat /proc/$i/oom_adj` " echo -n $i if [ "$vroomverifier" -eq 0 ]; then echo " $appname" else apkname=`su -c "LD_LIBRARY_PATH= /vendor/lib:/system/lib pm list packages -f $appname | sed 's/.*://' | sed 's/=. *//'"` # apkname=`busybox find / -iname " *$appname*.apk" -maxdepth 3 | tail -n 1` if [ "$apkname" ]; then echo -n " `cat /proc/$i /cmdline`" echo " ($apkname)" else echo " `cat /proc/$i/cmdli ne`" fi fi if [ "`cat /proc/$i/oom_adj`" -eq "$HL" ]; then echo ""; fi fi done echo "" echo " VISIBLE_APP OOM GROUPING" echo " ========================" for i in `ls /proc`; do if [ "$i" -ne 0 ] 2>/dev/null && [ -f "/proc/$ i/oom_adj" ] && [ "`cat /proc/$i/cmdline`" ] && [ "`cat /proc/$i/oom_adj`" -eq " $oomadj2" ]; then appname=`cat /proc/$i/cmdline | sed 's/. *\///'` echo -n " `cat /proc/$i/oom_adj` " echo -n $i if [ "$vroomverifier" -eq 0 ]; then echo " $appname" else # apkname=`su -c "LD_LIBRARY_PATH= /vendor/lib:/system/lib pm list packages -f $appname | sed 's/.*://' | sed 's/=. *//'"` apkname=`busybox find / -iname " *$appname*.apk" -maxdepth 3 | tail -n 1` if [ "$apkname" ]; thenecho -n " `cat /proc/$i /cmdline`" echo " ($apkname)" else echo " `cat /proc/$i/cmdli ne`" fi 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 [ "$i" -ne 0 ] 2>/dev/null && [ -f "/proc/$ i/oom_adj" ] && [ "`cat /proc/$i/cmdline`" ] && [ "`cat /proc/$i/oom_adj`" -gt " $oomadj1" ] && [ "`cat /proc/$i/oom_adj`" -le "$oomadj2" ]; then if [ "`cat /proc/$i/oom_adj`" -eq "$HL" ] && [ "$lname" = "`cat /proc/$i/cmdline`" ]; then echo "" echo " Home Launcher is on the N EXT line! (ADJ=$HL)" fi appname=`cat /proc/$i/cmdline | sed 's/. *\///'` echo -n " `cat /proc/$i/oom_adj` " echo -n $i if [ "$vroomverifier" -eq 0 ]; then echo " $appname" else # apkname=`su -c "LD_LIBRARY_PATH= /vendor/lib:/system/lib pm list packages -f $appname | sed 's/.*://' | sed 's/=. *//'"` apkname=`busybox find / -iname " *$appname*.apk" -maxdepth 3 | tail -n 1` if [ "$apkname" ]; then echo -n " `cat /proc/$i /cmdline`" echo " ($apkname)" else echo " `cat /proc/$i/cmdli ne`" fi 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 [ "$i" -ne 0 ] 2>/dev/null && [ -f "/proc/$i/oom_ad j" ] && [ "`cat /proc/$i/cmdline`" ] && [ "`cat /proc/$i/oom_adj`" -gt "$oomadj2 " ] && [ "`cat /proc/$i/oom_adj`" -le "$oomadj3" ]; then if [ "`cat /proc/$i/oom_adj`" -eq "$HL" ] && [ " $lname" = "`cat /proc/$i/cmdline`" ]; then echo "" echo " Home Launcher is on the NEXT line ! (ADJ=$HL)" fi appname=`cat /proc/$i/cmdline | sed 's/.*\///'` echo -n " `cat /proc/$i/oom_adj` " echo -n $i if [ "$vroomverifier" -eq 0 ]; then echo " $app name" else # apkname=`su -c "LD_LIBRARY_PATH=/vendor/ lib:/system/lib pm list packages -f $appname | sed 's/.*://' | sed 's/=.*//'"` apkname=`busybox find / -iname "*$appnam e*.apk" -maxdepth 3 | tail -n 1` if [ "$apkname" ]; then echo -n " `cat /proc/$i/cmdline `" echo " ($apkname)" else echo " `cat /proc/$i/cmdline`" fi fi 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 [ "$i" -ne 0 ] 2>/dev/null && [ -f "/proc/$i/oom_ad j" ] && [ "`cat /proc/$i/cmdline`" ] && [ "`cat /proc/$i/oom_adj`" -gt "$oomadj3 " ] && [ "`cat /proc/$i/oom_adj`" -le "$oomadj4" ]; then if [ "`cat /proc/$i/oom_adj`" -eq "$HL" ] && [ " $lname" = "`cat /proc/$i/cmdline`" ]; then echo "" echo " Home Launcher is on the NEXT line ! (ADJ=$HL)" fi appname=`cat /proc/$i/cmdline | sed 's/.*\///'` echo -n " `cat /proc/$i/oom_adj` " echo -n $i if [ "$vroomverifier" -eq 0 ]; then echo " $app name" else # apkname=`su -c "LD_LIBRARY_PATH=/vendor/ lib:/system/lib pm list packages -f $appname | sed 's/.*://' | sed 's/=.*//'"` apkname=`busybox find / -iname "*$appnam e*.apk" -maxdepth 3 | tail -n 1` if [ "$apkname" ]; thenecho -n " `cat /proc/$i/cmdline `" echo " ($apkname)" else echo " `cat /proc/$i/cmdline`" fi 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 [ "$i" -ne 0 ] 2>/dev/null && [ -f "/proc/$i/oom_ad j" ] && [ "`cat /proc/$i/cmdline`" ] && [ "`cat /proc/$i/oom_adj`" -gt "$oomadj4 " ] && [ "`cat /proc/$i/oom_adj`" -le "$oomadj5" ]; then if [ "`cat /proc/$i/oom_adj`" -eq "$HL" ] && [ " $lname" = "`cat /proc/$i/cmdline`" ]; then echo "" echo " Home Launcher is on the NEXT line ! (ADJ=$HL)" fi appname=`cat /proc/$i/cmdline | sed 's/.*\///'` echo -n " `cat /proc/$i/oom_adj` " echo -n $i if [ "$vroomverifier" -eq 0 ]; then echo " $app name" else # apkname=`su -c "LD_LIBRARY_PATH=/vendor/ lib:/system/lib pm list packages -f $appname | sed 's/.*://' | sed 's/=.*//'"` apkname=`busybox find / -iname "*$appnam e*.apk" -maxdepth 3 | tail -n 1` if [ "$apkname" ]; then echo -n " `cat /proc/$i/cmdline `" echo " ($apkname)" else echo " `cat /proc/$i/cmdline`" fi fi 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 [ "$i" -ne 0 ] 2>/dev/null && [ -f "/proc/$i/oom_ad j" ] && [ "`cat /proc/$i/cmdline`" ] && [ "`cat /proc/$i/oom_adj`" -gt "$oomadj5 " ] && [ "`cat /proc/$i/oom_adj`" -le "$oomadj6" ]; then if [ "`cat /proc/$i/oom_adj`" -eq "$HL" ] && [ " "" " CONTENT_PROVIDER OOM GROUPING" " =============================" "$HL" -gt "$oomadj4" ] && [ "$HL" -le "$oomadj5" ];$lname" = "`cat /proc/$i/cmdline`" ]; then echo "" echo " Home Launcher is on the NEXT line ! (ADJ=$HL)" fi appname=`cat /proc/$i/cmdline | sed 's/.*\///'` echo -n " `cat /proc/$i/oom_adj` " echo -n $i if [ "$vroomverifier" -eq 0 ]; then echo " $app name" else # apkname=`su -c "LD_LIBRARY_PATH=/vendor/ lib:/system/lib pm list packages -f $appname | sed 's/.*://' | sed 's/=.*//'"` apkname=`busybox find / -iname "*$appnam e*.apk" -maxdepth 3 | tail -n 1` if [ "$apkname" ]; then echo -n " `cat /proc/$i/cmdline `" echo " ($apkname)" else echo " `cat /proc/$i/cmdline`" fi fi fi done echo "" if [ "$opt" -eq 16 ]; then echo $line; echo " zOOM Stick Complete!" elif [ "$vroomverifier" -eq 1 ]; then echo $line; echo " vrOOM Stick Complete!" fi fi if [ "$vroomverifier" ] && [ "$opt" -eq 17 ] || [ "$bpblind" ] | | [ "$rebulletproof" ]; then if [ "$rebulletproof" ] && [ "$allrcpaths" ]; then echo $line echo " Installing BulletProof Apps Service to... " echo $line echo "" $sleep fi for bps in $initrcpath $allrcpaths; do sed -i '/BulletProof_Apps_Service/,/BulletProofe d_Apps_Service/d' $bps cat >> $bps > /data/97BulletProof_Apps.sh &1; # line=================================================; echo ""; echo \$line;echo " -=BulletProof Apps=- script by -=zeppelinrox=-"; echo \$line; echo ""; id=\`id\`; id=\`echo \${id#*=}\`; id=\`echo \${id%%\\(*}\`; id=\`echo \${id%%gid *}\`; if [ "\$id" != "0" ] && [ "\$id" != "root" ]; then echo " You are NOT running this script as root..."; echo ""; echo \$line; echo " ...No SuperUser for you!!"; echo \$line; echo ""; echo " ...Please Run as Root and try again..."; echo ""; echo \$line; echo ""; exit 69; elif [ "\`pgrep -l android\`" ]; then busybox mount -o remount,rw /data 2>/dev/null; if [ "\`pgrep scriptmanager | wc -l\`" -gt 1 ]; then sleep 2; echo " DO NOT PUT THIS ON A SCHEDULE!"; echo ""; sleep 2; echo " It runs every 30 seconds automatically!"; echo " ======================================="; echo ""; sleep 2; fi 2>/dev/null; echo " To verify that it's working..."; echo ""; echo " ...check out /data/Ran_BulletProof_Apps.log!"; echo ""; # stop bullet_service; while :; do echo \$line; echo " zOOM... zOOM..."; echo \$line; echo ""; bpapplist=\`cat /data/V6_SuperCharger/BulletProof_Apps_HitList\` ; for bpapp in \$bpapplist; do if [ "\`pgrep \$bpapp\`" ]; then for bp in \`pgrep \$bpapp\`; do echo -17 > /proc/\$bp/oom_adj; renice -10 \$bp; echo " BulletProofed \$bpapp!"; echo -n " \$bpapp's oom score is "; cat /proc/\$bp/oom_score; echo -n " \$bpapp's oom priority is "; cat /proc/\$bp/oom_adj; echo ""; done; else echo " Can't find \$bpapp running..."; echo " ...so it can't be BulletProof ed :("; echo ""; fi; done;sh /data/V6_SuperCharger/BulletProof_Apps_Fine_Tuner.sh; echo " This should update every 30 seconds!" > /data/Ran_BulletP roof_Apps.log; echo " \$( date +"%m-%d-%Y %H:%M:%S" ): BulletProofed Apps with \$0!" >> /data/Ran_BulletProof_Apps.log; echo " =============================="; echo " ) BulletProofing Complete! ("; echo " =============================="; echo ""; echo " Taking 30 seconds to reload... then..."; echo ""; echo " ...Gonna BulletProof Some More!"; echo ""; sleep 30 | grep "BulletProof_Apps_is_In_Effect!"; rm /data/Log_BulletProof_Apps.log 2>/dev/null; done; else \$0 & exit 0; fi; EOF chown 0.0 /data/97BulletProof_Apps.sh; chmod 777 /data/97Bulle tProof_Apps.sh cp -fr /data/97BulletProof_Apps.sh $storage/V6_SuperCharger if [ -d "/system/etc/init.d" ]; then cp -fr /data/97BulletProo f_Apps.sh /system/etc/init.d/97BulletProof_Apps if [ ! "`diff /data/97BulletProof_Apps.sh /system/etc/in it.d/97BulletProof_Apps`" ]; then sed -i 's/clear/# clear/' /system/etc/init.d/97B ulletProof_Apps sed -i 's/# exec >/exec >/' /system/etc/init.d/9 7BulletProof_Apps sed -i '/bullet_service;/s/#//' /system/etc/init .d/97BulletProof_Apps for i in /system/etc/init.d/S*; do Sfiles=$i;bre ak;done if [ "$Sfiles" != "/system/etc/init.d/S*" ]; the n mv /system/etc/init.d/97BulletProof_Apps /system/etc/init.d/S97BulletProof_App s; fi cp -fr /system/etc/init.d/*BulletProof_Apps* $st orage/V6_SuperCharger else echo $line echo "" $sleep echo " WARNING: ERROR copying file to /system/in it.d!" echo "" $sleep echo " Got enough free space?" echo "" $sleep echo " System Partition has `busybox df -h /syst em | awk '{print $4,"Free ("$5" Used)"}' | tail -n 1`" echo "" fi fi while :; do bpps=;bppid=;bpappname=;apprunning= echo $line echo "" $sleepif [ ! "$bptips" ]; then echo " Ideas: BulletProof the Phone, Media or SM S App!" echo "" $sleep if [ "$ics" -eq 1 ] && [ ! "$icssced" ];then echo $line echo " ICS TIP! Try BulletProofing The L auncher Here!" echo $line echo "" $sleep fi bptips=shown fi echo " Enter a unique segment of the process name..." echo "" $sleep echo " Example: \"Opera\" for Opera Browser..." echo "" $sleep echo -n " Or press the Enter key to exit: " read bpps echo "" echo $line if [ ! "$bpps" ]; then echo " Okay... See Ya Later! ;^]" break else touch /data/V6_SuperCharger/BulletProof_Apps_HitLis t if [ ! "`pgrep $bpps`" ]; then echo " Can't find $bpps running..." echo "" $sleep echo " ...so it can't be Bul letProofed :(" echo $line echo "" $sleep echo " Tip: You can manually edit/add ap ps to..." echo "" $sleep echo " /data/V6_SuperCharger/BulletProof _Apps_HitList!" echo "" echo $line; bpappname=$bpps else bppid=`pgrep $bpps`; apprunning=true if [ -f "/proc/$bppid/cmdline" ]; then b pappname=`cat /proc/$bppid/cmdline | sed 's/.*\///'` else echo "" echo " Grrrr... there's more tha n one match!" echo "" $sleep for b in `pgrep $bpps`; do if [ "`cat /proc/$b/cmdline`" ]; then bpappnametemp=`cat /proc/$b/cmdline | sed 's/.*\///'` echo -n " Want $bpappnam etemp? (Y)es or E(N)ter: " read pick case $pick in y|Y)bpappname=$bpappna metemp;; *);; esac echo "" $sleep fi if [ "$bpappname" ]; then echo $line; break; fi done 2>/dev/null fi fi if [ "$bpappname" ]; then bpappname=${bpappname% :*} if [ "$apprunning" ]; then $sleep echo " BulletProofing $bpappname ..." echo "" $sleep echo "-17" > /proc/`pgrep $bpps` /oom_adj renice -10 `pgrep $bpps` echo " $bpappname has been Bulle tProofed!" echo "" $sleep echo -n " $bpappname's oom score is " cat /proc/`pgrep $bpps`/oom_scor e echo "" $sleep echo -n " $bpappname's oom prior ity is " cat /proc/`pgrep $bpps`/oom_adj echo $line fi if [ "`ls /data/V6_SuperCharger/BulletPr oof_One_Shots | grep $bpappname`" ]; then $sleep; echo " This BulletProof \"One-Shot\" Script Exists! :o)" else echo "" $sleep echo " Save BulletProof \"One-Sh ot\" Script to..." echo "" $sleep echo " ...data/V6_SuperCharger/B ulletProof_One_Shots?" echo "" $sleep if [ ! "$bpwinfo" ]; then echo " If so, with Script Manager..." echo "" $sleep echo " "Quick Widget\" for it..." echo "" $sleep echo " r put it on a timed schedule!" echo "" $sleep bpwinfo=shown fi echo -n " Enter N for No,