You are on page 1of 41

#!/system/bin/sh # V6 SuperCharger, OOM Grouping & Priority Fixes created by zeppelinrox.

echo "" echo " REMINDER: ONLY USE BUSYBOX v1.18.2 OR LOWER!!" echo "" sleep 2 #set -o errexit cat > /sdcard/SuperCharger.html <<EOF Hi! I hope that the V6 SuperCharger script is working well for you!<br> <br> First be sure to have <a href="http://market.android.com/details?id=com.jrummy.b usybox.installer">BusyBox</a> installed or else the scripts won't work!<br> Also, only install <b>BusyBox v1.18.2 or lower!</b> v1.18.3 and above sometimes give errors on some ROMs!<br> <br> A nice app for running the script is <a href="http://market.android.com/details? id=os.tools.scriptmanager">Script Manager</a><br> It can even load scripts on boot - on ANY ROM!<br> Plus, it even has WIDGETS!<br> So you can actually put a V6 SuperCharger shortcut on your desktop, launch it, a nd have a quick peek at your current status!<br> <br> But first, you need to set up Script Manager properly!<br> In the "Config" settings, enable "Browse as Root."<br> Then browse to where you saved the V6 SuperCharger script, select it, and in the script's properties box, be sure to select "Run as Root."<br> <b>Do NOT run this file at boot!</b> (You don't want to run the install on every boot, do you?)<br> Run the V6 SuperCharger script, touch the screen to access the soft keyboard, an d enter your choice :)<br> <br> <b>Stock ROMs</b>: After running the script, have Script Manager load the newly created <b>/data/99SuperCharger.sh</b> on boot<br> In the "Config" settings, be sure that "Browse as Root" is enabled.<br> Press the menu key and then Browser. Navigate up to the root, then click on the "data" folder.<br> Click on 99SuperCharger.sh and select "Script" from the "Open As" menu.<br> In the properties dialogue box, check "Run as root" and "Run at boot" and "Save" .<br> And that's it!<br> Script Manager will load your most recent settings on boot!<br> If you run the script later and with different settings, you don't have to recon figure anything.<br> Script Manager will just load the new /data/99SuperCharger.sh on boot automagica lly :)<br> <br> <b>Custom ROMs</b>: If you have a custom rom that loads /system/etc/init.d boot scripts,<br> You DON'T need to use Script Manager to load a boot script. It will all be autom atic!<br> Also, if you can run boot scripts from the /system/etc/init.d folder, there are other options.<br> For example you can use an app like Terminal Emulator to run the script.<br> If your ROM has the option, <b>DISABLE "Lock Home In Memory.</b> This takes effe ct immediately.<br> Alternately, <u>if you need to free up extra ram</u>, you can use "Lock Home in Memory" as a "Saftey Lock".<br> ie. Use it to toggle your launcher from "Bulletproof" (0) or Hard To Kill (1) to "Weak" (2) in the event that you want to make the launcher an easy kill and fre e up extra ram ;)<br>

<br> <b>If Settings Don't Stick:</b> If you have Auto Memory Manager, DISABLE SuperUs er permissions and if you have AutoKiller Memory Optimizer, DISABLE the apply se ttings at boot option!<br> Also, if you have a <b>Custom ROM</b>, there might be something in the init.d fo lder that interferes with priorities and minfrees.<br> If you can't find the problem, a quick fix is to have Script Manager run <b>/sys tem/etc/init.d/99SuperCharger</b> "at boot" and "as root."<br> <br> Another option is to make a Script Manager widget for <b>/system/etc/init.d/99Su perCharger</b> or <b>/data/99SuperCharger.sh</b> on your homescreen and simply l aunch it after each reboot.<br> <br> For those with a <b>Milestone</b>, I made a version for <b>Androidiani Open Reco very</b> too :D<br> Just extract the zip to the root of the sdcard (it contains the directory struct ure), load AOR, and there will be a SuperCharger Menu on the main screen! <br> <br> For more SuperCharging help and info,<br> See the <a href="http://forum.xda-developers.com/showthread.php?t=991276">V6 Sup erCharger Thread</a><br> Feedback is Welcome!<br> <br> -=zeppelinrox=- @ <a href="http://forum.xda-developers.com/showthread.php?t=9912 76">XDA</a> & <a href="http://www.droidforums.net/forum/droid-hacks/148268-scrip t-v6-supercharger-htk-bulletproof-launchers-fix-memory-all-androids.html">Droid< /a> Forums<br> EOF if [ ! -f "/system/xbin/busybox" ] && [ ! -f "/xbin/busybox" ] && [ ! -f "/syste m/bin/busybox" ] && [ ! -f "/bin/busybox" ] && [ ! -f "/system/sbin/busybox" ] & & [ ! -f "/sbin/busybox" ]; then echo " BusyBox NOT FOUND..." echo "" sleep 4 echo " ...No Supe for you!!" echo "" sleep 4 echo " ...Please install BusyBox and try again..." echo "" sleep 4 echo " Loading Market..." echo "" sleep 4 am start http://market.android.com/details?id=com.jrummy.busybox.install er echo " I hope that helped! :)" echo "" sleep 4 echo " If you continue, problems can occur..." echo "" sleep 2 echo " ... and even bootloops!" echo "" sleep 2 echo " Continue anyway...?" echo "" sleep 2 echo -n " Enter Y for Yes, any key for No: " read bbnotfound echo ""

case $bbnotfound in y Y)echo " uh... right... okay..." echo "" sleep 2;; *)echo " Buh Bye..." exit 69;; esac else echo "Busybox Found!" echo "" sleep 2 test=`busybox head -n 1 awk '{print $1}'` if [ "$test" = "BusyBox" ]; then echo " AWKing Awesome... AWK test passed..." echo "" sleep 2 else echo "" echo " There was an AWK error..." echo "" sleep 4 echo " ...what the AWK!!" echo "" sleep 4 echo " ...Please reinstall BusyBox and try again..." echo "" sleep 4 echo " Loading Market..." echo "" sleep 4 am start http://market.android.com/details?id=com.jrummy.busybox .installer echo " I hope that helped! :)" echo "" sleep 4 echo " If you continue, problems can occur..." echo "" sleep 2 echo " ... and even bootloops!" echo "" sleep 2 echo " Continue anyway...?" echo "" sleep 2 echo -n " Enter Y for Yes, any key for No: " read awkerror echo "" case $awkerror in y Y)echo " uh... right... okay..." echo "" sleep 2;; *)echo " Buh Bye..." exit 69;; esac fi fi uid=`id awk '{print $1}'` if [ "$uid" = "uid=0(root)" ] [ "$uid" = "uid=0" ]; then echo "Nice! You're Running as Root/SuperUser!" echo ""

sleep 2 else echo " You are NOT running this script as root..." echo "" sleep 4 echo " ...No SuperUser for you!!" echo "" sleep 4 echo " ...Please Run as Root and try again..." echo "" sleep 4 echo " Loading Help File..." echo "" sleep 4 am start -a android.intent.action.VIEW -n com.android.browser/.BrowserAc tivity -d file:///sdcard/SuperCharger.html echo " I hope that helped! :)" echo "" sleep 4 echo " If you continue, problems can occur..." echo "" sleep 2 echo " ... and even bootloops!" echo "" sleep 2 echo " Continue anyway...?" echo "" sleep 2 echo -n " Enter Y for Yes, any key for No: " read nosuperuser echo "" case $nosuperuser in y Y)echo " uh... right... okay..." echo "" sleep 2;; *)echo " Buh Bye..." exit 69;; esac fi line================================================= speed=2 sleep="sleep $speed" unknown=0 ran=0 scminfree= sccminfree= scadj= smrun=`pgrep scriptmanager` froyo=0 gb=0 rambytes=`free awk '{ print $2 }' sed -n 2p` ram=$(($rambytes/1024)) bbversion=`busybox head -n 1 awk '{print $1,$2}'` oomstick=0 showbuildpropopt=0 if [ -f "/data/local.prop" ]; then buildprop=0 else buildprop=1 fi

clear echo " REMINDER: ONLY USE BUSYBOX v1.18.2 OR LOWER!!" echo "" $sleep echo " You are currently using $bbversion" echo "" $sleep if [ "$bbversion" \> "BusyBox v1.18.2" ]; then echo " WARNING! Your BusyBox is greater than v1.18.2" echo "" $sleep echo " You may have issues such as bootloops..." echo "" $sleep echo " ...proceed at your own risk!!" echo "" $sleep fi if [[ -n "$smrun" ]]; then echo " Touch the screen to bring up soft keyboard." else echo " Try Script Manager... it's easier!" fi echo "" $sleep if [ -f "/data/SuperChargerOptions" ]; then sleep="sleep `awk -F , '{print $1}' /data/SuperChargerOptions`" echo " Previous scrolling speed options loaded..." echo "" $sleep echo " ...it can be changed under Options!" else 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 cspeed case $cspeed in 0)sleep="sleep $cspeed";break;; 1)sleep="sleep $cspeed";break;; 2)sleep="sleep $cspeed";break;; 3)sleep="sleep $cspeed";break;; *)echo "" echo " Invalid entry... Please try again :)" $sleep clear echo " REMINDER: ONLY USE BUSYBOX v1.18.2 OR LOWER!!" echo "" echo " You are currently using $bbversion" echo "" if [ "$bbversion" \> "BusyBox v1.18.2" ]; then echo " WARNING! Your BusyBox is greater than v1.18.2" echo "" echo " You may have issues such as bootloops..." echo ""

echo " echo ""

...proceed at your own risk!!"

fi if [[ -n "$smrun" ]]; then echo " Touch the screen to bring up soft keyboard." else echo " Try Script Manager... it's easier!" fi echo "" echo " Scrolling speed options..." echo "" echo " 1(fast), 2(normal), 3(slow)" echo "";; esac done echo "$cspeed" > /data/SuperChargerOptions echo "" $sleep echo " Settings have been saved!" echo "" $sleep echo " Note: They can be changed later under Options!" fi if [ -f "/proc/`pidof com.android.launcher`/oom_adj" ]; then launcheradj=$(cat /proc/`pidof com.android.launcher`/oom_adj) else launcheradj= fi homeadj=`getprop ro.HOME_APP_ADJ`;FA=`getprop ro.FOREGROUND_APP_ADJ`;PA=`getprop ro.PERCEPTIBLE_APP_ADJ`;VA=`getprop ro.VISIBLE_APP_ADJ` if [[ -z "$PA" ]]; then froyo=1 else gb=1 fi if [[ -n "$launcheradj" ]] && [ "$launcheradj" -gt -20 ] 2>/dev/null; then HL="$launcheradj" else HL="$homeadj" unknown=1 echo "" echo $line echo "" $sleep echo " If Home is Locked in Memory..." echo "" $sleep echo " ..confirm status via Status Checker!(Option 1)" fi if [ -f "/data/SuperChargerMinfree" ]; then cp -fr /data/SuperChargerMinfree /data/SuperChargerMinfreeOld scminfree=`cat /data/SuperChargerMinfree` fi if [ -f "/data/SuperChargerAdj" ]; then scadj=`cat /data/SuperChargerAdj` fi $sleep while : echo "" do

MB0=4;MB1=0;MB2=0;MB3=0;MB4=0;MB5=0;MB6=0 SP1=0;SL1=0;SL2=0;SL3=0;SL4=0;SL5=0;SL6=0 error=0;restore=0;rc=0;rcbu=0;UnSuperCharged=0;UnSuperChargerError=0;SuperCharg erScriptManagerHelp=0;SuperChargerHelp=0 rcpath="/system/etc/rootfs/init.mapphone_umts.rc" rcfile=${rcpath##*/} rcbackup="$rcpath.unsuper" if [ -e "$rcpath" ]; then rc=1 fi if [ -e "$rcbackup" ]; then rcbu=1 fi currentminfree=`cat /sys/module/lowmemorykiller/parameters/minfree` currentadj=`cat /sys/module/lowmemorykiller/parameters/adj` if [ -f "/data/SuperChargerCustomMinfree" ]; then sccminfree=`cat /data/SuperChargerCustomMinfree` fi echo $line echo "For help and info, see /sdcard/SuperCharger.html" echo $line $sleep echo "\\\\\\\\ V 6 S U P E R C H A R G E R - M E N U ////" echo " ==============================================" echo "1. SuperCharger & Launcher Status for Update 9" echo "==================== 256 HP ====================" echo "2. UnLedded (Multitasking){6,8,22,24,26,28 mb}" echo "3. Ledded (Balanced){6,8,26,28,30,32 mb}" echo "4. Super (Aggressive){6,8,28,30,35,50 mb}" echo "==================== 512 HP ====================" echo "5. UnLedded (Multitasking) {6,12,40,60,80,100}" echo "6. Ledded (Balanced) {6,12,55,75,95,125}" echo "7. Super (Aggressive){6,12,75,100,125,150}" echo "==================== 768+ HP ===================" echo "8. Super 768HP(Aggresive){6,12,150,175,200,250}" echo "9. Super 1000HP(Agressive){6,12,200,225,250,300}" echo "================================================" echo -n "10. Cust-OOMizer" if [ -f "/data/SuperChargerCustomMinfree" ]; then awk -F , '{print " {"$1/256","$2/256","$3/256","$4/256","$5/256"," $6/256 " mb}"}' /data/SuperChargerCustomMinfree else echo " Settings {Create Or Restore!}" fi echo $line echo "11. OOM Grouping Fixes + Hard To Kill Launcher" echo "12. OOM Grouping Fixes + BulletProof Launcher" echo $line echo "13. UnKernelizer - UnDo Kernel/Memory Tweaks" echo "14. UnSuperCharger" echo $line echo "15. BulletProof App! {Hit or Miss}" echo "16. Engine Flush - Quick Boost & Eliminate Lag!" echo "17. Nitro Lag Nullifier {Experimental}" echo "18. Use V6 SuperCharger with Terminal Emulator!" echo $line echo "19. Help File! {Open /sdcard/SuperCharger.html}" echo "20. Help Online! {Open XDA SuperCharger Thread}" echo "21. Options" echo "22. Re-SuperCharger! {Restore Prior V6 Settings}"

echo echo echo echo echo if [

"23. REBOOT! (WARNING - There is NO Warning!)" "24. Exit" $line "" -n " Launcher is"; "$HL" -gt "$VA" ]; then echo ".... so.... weak.... :(" status=4 elif [ "$HL" -eq "$VA" ]; then echo " Locked In Memory ie. Very Weak!" status=3 elif [ "$froyo" -eq 1 ]; then if [ "$HL" -eq "$FA" ]; then echo -n " BULLETPROOF!" status=1 else echo -n " HARD TO KILL!" status=2 fi echo " ie. SUPERCHARGED!" oomstick=1 else if [ "$HL" -ge "$FA" ] && [ "$HL" -lt "$PA" ]; then echo -n " BULLETPROOF!" status=1 else echo -n " HARD TO KILL!" status=2 fi echo " ie. SUPERCHARGED!" oomstick=1 fi if [ "$ran" -eq 0 ]; then if [[ -n "$scadj" ]] && [ "$oomstick" -eq 0 ] && [ "$buildprop" -eq 0 ]; then echo "" echo " SuperCharged Launcher Is NOT In Effect!" echo " You may need to use the build.prop option..." echo " Select 2 - 12 from the menu NOW to access it!" showbuildpropopt=1 fi echo "" if [[ -n "$scminfree" ]] && [ "$currentminfree" != "$scminfree" ]; then echo " Current Values DON'T MATCH Prior SuperCharge!" echo " Select Help File! from the menu for Repairs!" elif [[ -n "$scminfree" ]] && [ "$currentminfree" = "$scminfree" ];then echo " Current Values MATCH Prior SuperCharge!" echo " That means that it's working! ;)" fi echo "" if [[ -n "$scadj" ]] && [ "$currentadj" != "$scadj" ]; then echo " OOM Grouping Fixes ARE NOT In Effect!" echo " That means the boot script did NOT run..." echo " Select Help File! from the menu for Repairs!" elif [[ -n "$scadj" ]] && [ "$currentadj" = "$scadj" ]; then echo " OOM Grouping Fixes ARE In Effect!" echo " That means the boot script ran!" fi fi if [[ -z "$scminfree" ]]; then

echo " SuperCharger Minfrees NOT FOUND! Have Fun!" fi echo "" 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 if [ -f "/data/SuperChargerMinfreeOld" ]; then awk -F , '{print " Prior V6 minfrees = "$1/256","$2/256","$3/256","$4/2 56","$5/256","$6/256 " mb"}' /data/SuperChargerMinfreeOld fi echo $line echo "" echo " You have $ram mb of RAM on your device..." if [ "$ram" -le 256 ]; then echo -n " 256 HP" elif [ "$ram" -le 512 ]; then echo -n " 512 HP" elif [ "$ram" -le 768 ]; then echo -n " 768 HP" else echo -n " 1000 HP" fi echo " settings are recommended!" echo "" echo " Slot 3 Sets Free RAM & is your New Task Killer!" echo " Lag? Disable Lock Home in Memory & Compcache!" echo "" if [[ -n "$smrun" ]]; then echo " In Config, select Run as Root & Browse as Root!" echo " But DO NOT run this script at boot!" 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 echo "" echo -n " Please enter option [1 - 24]: " read opt echo "" $sleep if [ "$opt" -ne 24 ] 2>/dev/null; then mount -o remount,rw /system 2>/dev/null for m in /dev/block/mtdblock* do mount -o remount,rw $m /system 2>/dev/null done fi echo $line echo " \\\\\\\\ V6 SUPERCHARGER ////" echo " =======================" echo "" $sleep case $opt in 1) echo " V6 SUPERCHARGER AND LAUNCHER STATUS!";;

2) echo " 256HP LEDDED + HARD TO KILL LAUNCHER!" CONFIG="256HP Ledded" MB1=6;MB2=8;MB3=22;MB4=24;MB5=26;MB6=28;; 3) echo " 256HP UNLEDDED + HARD TO KILL LAUNCHER!" CONFIG="256 UnLedded" MB1=6;MB2=8;MB3=26;MB4=28;MB5=30;MB6=32;; 4) echo " 256HP SUPER UNLEDDED + HARD TO KILL LAUNCHER!" CONFIG="256HP Super" MB1=6;MB2=8;MB3=28;MB4=30;MB5=35;MB6=50;; 5) echo " 512HP LEDDED + HARD TO KILL LAUNCHER!" CONFIG="512HP Ledded" MB1=6;MB2=12;MB3=40;MB4=60;MB5=80;MB6=100;; 6) echo " 512HP UNLEDDED + HARD TO KILL LAUNCHER!" CONFIG="512 UnLedded" MB1=6;MB2=12;MB3=55;MB4=75;MB5=95;MB6=125;; 7) echo " 512HP SUPER UNLEDDED + HARD TO KILL LAUNCHER!" CONFIG="512HP Super" MB1=6;MB2=12;MB3=75;MB4=100;MB5=125;MB6=150;; 8) echo " 768HP SUPER UNLEDDED + HARD TO KILL LAUNCHER!" CONFIG="768HP Super" MB1=6;MB2=12;MB3=150;MB4=175;MB5=200;MB6=250;; 9) echo " 1000HP SUPER UNLEDDED + HARD TO KILL LAUNCHER!" CONFIG="1000HP Super" MB1=6;MB2=12;MB3=200;MB4=225;MB5=250;MB6=300;; 10)echo " CUST-OOMIZER + HARD TO KILL LAUNCHER!" CONFIG="CUST-OOMIZED" if [ -f "/data/SuperChargerCustomMinfree" ]; then echo $line echo "" $sleep echo " Your Prior CUST-OOMIZED values are..." echo "" $sleep awk -F , '{print " "$1/256",",$2/256",",$3/256",", $4/256",",$5/256",",$6/256 " mb"}' /data/SuperChargerCustomMinfree echo "" $sleep echo " Your Current Minfree values are..." echo "" $sleep awk -F , '{print " "$1/256",",$2/256",",$3/256",", $4/256",",$5/256",",$6/256 " mb"}' /sys/module/lowmemorykiller/parameters/minfre e echo "" $sleep if [ "$currentminfree" = "$sccminfree" ]; then echo " Even though they are the same..." echo "" $sleep fi echo -n " Restore Previous CUST-OOMIZED settings" if [ "$currentminfree" = "$sccminfree" ]; then echo " anyway?" else echo "?" fi echo "" $sleep echo -n " Enter Y for Yes, any key for No: " read crestore

echo "" echo $line case $crestore in y Y)restore=1 MB1=`awk -F , '{print $1/256}' /data/SuperChargerCusto mMinfree`;MB2=`awk -F , '{print $2/256}' /data/SuperChargerCustomMinfree`;MB3=`a wk -F , '{print $3/256}' /data/SuperChargerCustomMinfree`;MB4=`awk -F , '{print $4/256}' /data/SuperChargerCustomMinfree`;MB5=`awk -F , '{print $5/256}' /data/S uperChargerCustomMinfree`;MB6=`awk -F , '{print $6/256}' /data/SuperChargerCusto mMinfree`; echo " Cust-OOMized Settings will be Restored!";; *)echo " Running CUST-OOMIZER...";; esac fi if [ "$restore" -eq 0 ] 2>/dev/null; then echo $line echo "" $sleep echo " Enter your desired lowmemorykiller OOM levels!" echo "" $sleep echo " Slot 3 determines your fee ram the most!!" echo "" $sleep echo " To restart, enter a letter to go to main menu." echo "" $sleep echo -n " Slot 1: ";read MB1 if [ "$MB1" -gt 0 ] 2>/dev/null; then echo -n " Slot 2: ";read MB2 if [ "$MB2" -gt 0 ] 2>/dev/null; then echo -n " Slot 3: ";read MB3 if [ "$MB3" -gt 0 ] 2>/dev/null; then echo -n " Slot 4: ";r ead MB4 if [ "$MB4" -gt 0 ] 2>/dev/null; then echo -n " S lot 5: ";read MB5 if [ "$MB5" -gt 0 ] 2>/dev/null; then echo -n " Slot 6: ";read MB6 if [ "$MB6" -gt 0 ] 2>/d ev/null; then echo "" echo $line echo " Cu st-OOMized Settings Accepted!" else error=1 fi else error=1 fi else error=1 fi else error=1 fi

else error=1 fi else error=1 fi fi;; 11)echo " OOM GROUPING FIXES PLUS..." echo "" echo " ...HARD TO KILL LAUNCHER!";; 12)echo " OOM GROUPING FIXES PLUS..." echo "" echo " ...BULLETPROOF LAUNCHER!";; 13)echo " ====================" echo " //// UNKERNELIZER \\\\\\\\" if [ ! -f "/system/etc/init.d/99SuperCharger" ] && [ ! -f "/system/etc/ init.d/S99SuperCharger" ] && [ ! -f "/data/99SuperCharger.sh" ] && [ "$rc" -ne 1 ]; then echo $line echo "" $sleep echo " There's Nothing to UnKernelize!" echo "" opt=0 fi;; 14)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=0;; esac;; 15)echo " =======================" echo " //// BULLETPROOF APP \\\\\\\\";; 16)echo " ====================" echo " //// ENGINE FLUSH \\\\\\\\";; 17)echo " ===========================" echo " //// NITRO LAG NULLIFIER \\\\\\\\";; 18)echo " ======================" echo " //// SYSTEM INSTALL \\\\\\\\";; 19)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 " I hope that helped! :)" echo "" opt=0;; 20)echo " ===================" echo " //// HELP ONLINE \\\\\\\\" echo $line echo "" $sleep echo " Loading web site for more help..." echo "" $sleep am start http://goo.gl/qM6yR echo " I hope that helped! :)" echo "" opt=0;; 21)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 cspeed case $cspeed in 0)sleep="sleep $cspeed";break;; 1)sleep="sleep $cspeed";break;; 2)sleep="sleep $cspeed";break;; 3)sleep="sleep $cspeed";break;; *)echo "" echo " Invalid entry... Please try again :)" echo "" $sleep;; esac done echo "$cspeed" > /data/SuperChargerOptions echo "" $sleep echo " Settings have been saved!" echo "" opt=0;; 22)echo " =======================" echo " //// RE-SUPERCHARGER \\\\\\\\" echo $line echo "" $sleep 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 echo "" $sleep case $resuper in y Y)echo " Re-SuperCharging from you SD Card..." echo "" $sleep if [ -f "/sdcard/V6_SuperCharger/build.prop" ]; then cp -fr /sdcard/V6_SuperCharger/build.prop /syste m/build.prop if [ -f "/system/bin/build.prop" ]; then cp -fr /sdcard/V6_SuperCharger/build.pro p /system/bin/build.prop fi fi if [ -f "/sdcard/V6_SuperCharger/local.prop" ]; then cp -fr /sdcard/V6_SuperCharger/local.prop /data/ local.prop fi if [ -f "/sdcard/V6_SuperCharger/userinit.sh" ]; then cp -fr /sdcard/V6_SuperCharger/userinit.sh /data /local/userinit.sh fi if [ -f "/sdcard/V6_SuperCharger/init.mapphone_umts.rc" ]; then cp -fr /sdcard/V6_SuperCharger/init.mapphone_umt s.rc /system/etc/rootfs/init.mapphone_umts.rc fi if [ -f "/sdcard/V6_SuperCharger/99SuperCharger" ]; then cp -fr /sdcard/V6_SuperCharger/99SuperCharger /s ystem/etc/init.d/99SuperCharger fi if [ -f "/sdcard/V6_SuperCharger/S99SuperCharger" ]; the n cp -fr /sdcard/V6_SuperCharger/S99SuperCharger / system/etc/init.d/S99SuperCharger fi if [ -f "/sdcard/V6_SuperCharger/99SuperCharger.sh" ]; t hen cp -fr /sdcard/V6_SuperCharger/99SuperCharger.sh /data/99SuperCharger.sh fi if [ -f "/sdcard/V6_SuperCharger/SuperChargerAdj" ]; the n 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/SuperChargerCustomMinfr ee" ]; 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 echo " ...Re-SuperCharging Complete..." echo "" $sleep echo " ...Now Re-Start this script!" echo "" opt=0;; *)echo " Returning to main menu..." echo "" opt=0;; esac;; 23)echo " !!POOF!!" echo " If it don't go poofie, just reboot manually!" $sleep sync echo 1 > /proc/sys/kernel/sysrq echo b > /proc/sysrq-trigger reboot;; 24)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 <= Valid Option => 24 !!"; echo "" sleep 2 echo -n " hehe... Press Enter key to continue... ;) "; read enterKey echo "" opt=0;; esac echo $line echo "" $sleep if [ "$error" -eq 1 ]; then echo " Input Error! Try again :)" sleep 2 elif [ "$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 if [ "$unknown" -eq 1 ]; then echo " Is Home is Locked in Memory?" echo "" $sleep echo -n " If it is, Enter Y for Yes, any key for No: " read homelocked

echo "" echo $line echo "" $sleep case $homelocked in y Y)unknown=0 HL="$VA" if [ "$HL" -gt "$VA" ]; then status=4 elif [ "$HL" -eq "$VA" ]; then status=3 elif [ "$froyo" -eq 1 ]; then if [ "$HL" -eq "$FA" ]; then status=1 else status=2 fi else if [ "$HL" -ge "$FA" ] && [ "$HL" -lt "$ PA" ]; then status=1 else status=2 fi fi;; *)unknown=0;; esac fi 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 1 ]; then

if [ "$froyo" -eq 1 ]; then echo " Launcher is equal to Foreground App..." else echo " Launcher is greater than Foreground App..." echo "" $sleep echo " ...is less than Perceptible App..." fi echo "" $sleep echo " ...and is less than Visible App..." echo "" $sleep echo $line echo " Home Launcher is BULLETPROOF!" 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 else if [ "$opt" -ge 2 ] && [ "$opt" -le 14 ]; 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 12 ]; then echo "============= Information Section ============" echo " =======================" echo "" $sleep if [ -f "/system/build.prop.unsuper" ]; then echo " Leaving ORIGINAL build.prop backup intact ..." else echo " Backing up ORIGINAL build.prop..." cp -r /system/build.prop /system/build.prop.unsu per 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 echo "" $sleep fi if [ "$opt" -ne 13 ]; 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 rm /sdcard/SuperChargerHelp.html fi if [ -f "/data/local/userinit.sh" ]; then sed -i '/.*99SuperCharger/d' /data/local/userini t.sh fi if [ -f "/data/local.prop" ]; then sed -i '/BEGIN OOM_ADJ_Settings/,/.*SuperCharged /d' /data/local.prop sed -i '/.*_ADJ/d' /data/local.prop fi sed -i '/BEGIN OOM_ADJ_Settings/,/.*SuperCharged/d' /sys tem/build.prop sed -i '/.*_ADJ/d' /system/build.prop if [ -f "/system/bin/build.prop" ]; then sed -i '/BEGIN OOM_ADJ_Settings/,/.*SuperCharged /d' /system/bin/build.prop sed -i '/.*_ADJ/d' /system/bin/build.prop fi fi if [ "$opt" -le 13 ] && [ "$rc" -eq 1 ]; then echo " Found "$rcpath echo "" $sleep if [ "$opt" -eq 11 ] [ "$opt" -eq 12 ]; then echo " $rcfile will be OOM Fixed!" elif [ "$opt" -eq 13 ]; then echo " $rcfile to be UnKernelized!" else echo " $rcfile to be SuperCharged!" fi echo "" $sleep if [ "$rcbu" -eq 1 ]; then echo " Backup already exists... leaving backup i ntact" else cp -r $rcpath $rcbackup echo " Backing up ORIGINAL settings..." fi

echo "" $sleep fi if [ "$opt" -eq 14 ]; 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" ] & & [ "$rc" -ne 1 ] && [ "$rcbu" -ne 1 ]; then echo " I Got Nothing To Do! Try SuperCharging fi rst!" echo "" $sleep UnSuperCharged=1 cat > /sdcard/UnSuperCharged.html <<EOF There was nothing to uninstall!<br> <br> For more SuperCharging help and info,<br> See the <a href="http://forum.xda-developers.com/showthread.php?t=991276">V6 Sup erCharger Thread</a><br> Feedback is Welcome!<br> <br> -=zeppelinrox=- @ <a href="http://forum.xda-developers.com/showthread.php?t=9912 76">XDA</a> & <a href="http://www.droidforums.net/forum/droid-hacks/148268-scrip t-v6-supercharger-htk-bulletproof-launchers-fix-memory-all-androids.html">Droid< /a> Forums<br> EOF echo $line echo " See /sdcard/UnSuperCharged.html for assis tance!" echo $line echo "" $sleep fi if [ "$rcbu" -eq 1 ]; then echo " BACKUP FOUND!" echo "" $sleep echo " Restore"$rcpath echo "" $sleep cp -fr $rcbackup $rcpath rm $rcbackup elif [ "$rc" -eq 1 ]; then echo " ERROR... ERROR... ERROR... ERROR..." echo ""

$sleep echo " BACKUP NOT FOUND!" echo "" $sleep echo "CAN'T restore your ROM's default minfree v alues!" echo "" sleep 3 UnSuperChargerError=1 cat > /sdcard/UnSuperChargerError.html <<EOF The backup file, $rcbackup, WAS NOT found!<br> Please do a manual restore of $rcfile from your ROM's update file!<br> <br> For more SuperCharging help and info,<br> See the <a href="http://forum.xda-developers.com/showthread.php?t=991276">V6 Sup erCharger Thread</a><br> Feedback is Welcome!<br> <br> -=zeppelinrox=- @ <a href="http://forum.xda-developers.com/showthread.php?t=9912 76">XDA</a> & <a href="http://www.droidforums.net/forum/droid-hacks/148268-scrip t-v6-supercharger-htk-bulletproof-launchers-fix-memory-all-androids.html">Droid< /a> Forums<br> EOF echo $line echo " See /sdcard/UnSuperChargerError.html for help!" echo $line echo "" sleep 4 echo " Clean "$rcpath echo "" sed -i '/.*SuperCharger/,/.*SuperCharged/d' $rcp ath sed -i '/.*_ADJ/d' $rcpath sed -i '/parameters\/adj/d' $rcpath sed -i '/lowmemorykiller/d' $rcpath sed -i '/vm\/.*oom.*/d' $rcpath sed -i '/kernel\/panic.*/d' $rcpath $sleep fi fi if [ "$opt" -le 10 ] [ "$opt" -eq 14 ]; then if [ -f "/data/local.prop" ]; then sed -i '/.*SuperCharger/,/END OOM_MEM_Settings/d ' /data/local.prop sed -i '/.*_MEM/d' /data/local.prop fi sed -i '/.*SuperCharger/,/END OOM_MEM_Settings/d' /syste m/build.prop sed -i '/.*_MEM/d' /system/build.prop if [ -f "/system/bin/build.prop" ]; then sed -i '/.*SuperCharger/,/END OOM_MEM_Settings/d ' /system/bin/build.prop sed -i '/.*_MEM/d' /system/bin/build.prop fi fi if [ "$opt" -ne 13 ]; then if [ -f "/system/etc/init.d/99SuperCharger" ] [ -f "/ system/etc/init.d/S99SuperCharger" ]; then if [ "$opt" -ne 11 ] && [ "$opt" -ne 12 ]; then

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

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

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

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

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

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

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

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

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

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

fi echo " cher APPLIED!"

...Hard To Kill Laun

fi fi echo "" $sleep echo " Applying Kernel/Memory Tweaks..." echo "" $sleep echo " oom_kill_allocating_task = 0" echo " panic_on_oom = 0" echo " panic_on_oops = 1" echo " panic = 0" echo "" $sleep cat > /data/99SuperCharger.sh <<EOF #!/system/bin/sh # V6 SuperCharger, OOM Grouping & Priority Fixes created by zeppelinrox. execute=0; currentadj=\`cat /sys/module/lowmemorykiller/parameters/adj\`; currentminfree=\`cat /sys/module/lowmemorykiller/parameters/minfree\`; scadj=\`cat /data/SuperChargerAdj\`; scminfree=\`cat /data/SuperChargerMinfree\`; if [ "\$currentadj" != "\$scadj" ]; then execute=1; elif [[ -n "\$scminfree" ]] && [ "\$currentminfree" != "\$scminfree" ]; then execute=1; fi; if [ "\$execute" -eq 1 ]; then mount -o remount,rw /system 2>/dev/null; for m in /dev/block/mtdblock*; do mount -o remount,rw \$m /system 2>/dev/null; done; echo \$scadj > /sys/module/lowmemorykiller/parameters/adj; EOF if [ -f "/data/SuperChargerMinfree" ]; then echo " echo "\$scminfree" > /sys/module/lowmemo rykiller/parameters/minfree;" >> /data/99SuperCharger.sh fi if [ "$buildprop" -eq 0 ]; then echo " sed -i '/.*_ADJ/d' /system/build.prop;" >> /data/99SuperCharger.sh echo " sed -i '/.*_MEM/d' /system/build.prop;" >> /data/99SuperCharger.sh if [ -f "/system/bin/build.prop" ]; then echo " sed -i '/.*_ADJ/d' /system/build .prop;" >> /data/99SuperCharger.sh echo " sed -i '/.*_MEM/d' /system/build .prop;" >> /data/99SuperCharger.sh fi fi cat >> /data/99SuperCharger.sh <<EOF busybox sysctl -w vm.oom_kill_allocating_task=0; busybox sysctl -w vm.panic_on_oom=0; busybox sysctl -w kernel.panic_on_oops=1; busybox sysctl -w kernel.panic=0; mount -o remount,ro /system 2>/dev/null; for m in /dev/block/mtdblock*;

do mount -o remount,ro \$m /system 2>/dev/null; done; fi; EOF chown 0.0 /data/99SuperCharger.sh chmod 777 /data/99SuperCharger.sh if [ ! -f "/data/local/userinit.sh" ]; then echo "#!/system/bin/sh" > /data/local/userinit.s h; fi echo "sh /data/99SuperCharger.sh;" >> /data/local/userin it.sh chown 0.0 /data/local/userinit.sh chmod 777 /data/local/userinit.sh if [ -d "/system/etc/init.d" ]; then for i in /system/etc/init.d/S*; do Sfiles=$i;bre ak;done if [ "$Sfiles" = "/system/etc/init.d/S*" ]; then cp -fr /data/99SuperCharger.sh /system/e tc/init.d/99SuperCharger echo "sh /data/99SuperCharger.sh;" >> /s ystem/etc/init.d/99SuperCharger chown 0.0 /system/etc/init.d/99SuperChar ger chmod 777 /system/etc/init.d/99SuperChar ger echo "sh /system/etc/init.d/99SuperCharg er;" >> /data/local/userinit.sh else cp -fr /data/99SuperCharger.sh /system/e tc/init.d/S99SuperCharger echo "sh /data/99SuperCharger.sh;" >> /s ystem/etc/init.d/S99SuperCharger chown 0.0 /system/etc/init.d/S99SuperCha rger chmod 777 /system/etc/init.d/S99SuperCha rger echo "sh /system/etc/init.d/S99SuperChar ger;" >> /data/local/userinit.sh fi else echo $line echo "" $sleep echo " Stock ROM? - Additional Configuration Req uired!" echo "" $sleep if [ "$opt" -le 10 ]; then echo " Some Changes are TEMPORARY & WON' T PERSIST!" echo "" $sleep echo " To enable PERSISTENT SuperCharger settings..." echo "" $sleep echo " ing Fixes..." ...HTK Launcher and OOM Group

else echo " To enable PERSISTENT OOM Grouping Fixes..." fi echo "" $sleep if [[ -n "$smrun" ]]; then SuperChargerScriptManagerHelp=1 cat > /sdcard/SuperChargerScriptManagerHelp.html <<EOF Yay! You already have <a href="http://market.android.com/details?id=os.tools.scr iptmanager">Script Manager!</a><br> After running the script, have Script Manager load the newly created <b>/data/99 SuperCharger.sh</b> on boot<br> In the "Config" settings, enable "Browse as Root."<br> Press the menu key and then Browser.<br> Navigate up to the root, then click on the "data" folder.<br> Click on 99SuperCharger.sh and select "Script" from the "Open As" menu.<br> In the properties dialogue box, check "Run as root" and "Run at boot" and "Save" .<br> And that's it!<br> Script Manager will load your most recent settings on boot!<br> <br> Another option is to make a Script Manager widget for <b>/data/99SuperCharger.sh </b> on your homescreen and simply launch it after each reboot.<br> <br> If you run the script later and with different settings, you don't have to recon figure anything.<br> Script Manager will just load the new /data/99SuperCharger.sh on boot automagica lly :)<br> <br> For more SuperCharging help and info,<br> See the <a href="http://forum.xda-developers.com/showthread.php?t=991276">V6 Sup erCharger Thread</a><br> Feedback is Welcome!<br> <br> -=zeppelinrox=- @ <a href="http://forum.xda-developers.com/showthread.php?t=9912 76">XDA</a> & <a href="http://www.droidforums.net/forum/droid-hacks/148268-scrip t-v6-supercharger-htk-bulletproof-launchers-fix-memory-all-androids.html">Droid< /a> Forums<br> EOF echo "Use THIS app to load 99SuperCharge r.sh on boot!" echo "" $sleep echo $line echo " See /sdcard/SuperChargerScriptMan agerHelp.html" echo $line else echo " ..Please ENABLE boot scripts to b e run from..." echo " .../system/etc/i nit.d folder!" echo " Easier: Script Manager can solve everything ;)" echo "" $sleep SuperChargerHelp=1 cat > /sdcard/SuperChargerHelp.html <<EOF To enable init.d boot scripts, go <a href="http://forum.xda-developers.com/showt

hread.php?t=1017291">HERE</a><br> This is for Motorolas! At least some of them anyway.<br> If that page is incompatible with your phone, do some reasearch!<br> <br> A very nice and easy solution is to simply use<br> Script Manager to load scripts on boot - on ANY ROM!<br> Here is the <a href="http://market.android.com/details?id=os.tools.scriptmanager ">Market Link</a><br> So first, you use Script Manager to run the V6 SuperCharger script.<br> Then use it again to load the newly created <b>/data/99SuperCharger.sh</b> on bo ot<br> In the 99SuperCharger.sh properties dialogue box, check "Run as root" and "Run a t boot" and "Save".<br> And that's it!<br> Script Manager will load your most recent settings on boot!<br> <br> Another option is to make a Script Manager widget for <b>/data/99SuperCharger.sh </b> on your homescreen and simply launch it after each reboot.<br> <br> If you run the script later and with different settings, you don't have to recon figure anything.<br> Script Manager will just load the new /data/99SuperCharger.sh on boot automagica lly :)<br> <br> For more SuperCharging help and info,<br> See the <a href="http://forum.xda-developers.com/showthread.php?t=991276">V6 Sup erCharger Thread</a><br> Feedback is Welcome!<br> <br> -=zeppelinrox=- @ <a href="http://forum.xda-developers.com/showthread.php?t=9912 76">XDA</a> & <a href="http://www.droidforums.net/forum/droid-hacks/148268-scrip t-v6-supercharger-htk-bulletproof-launchers-fix-memory-all-androids.html">Droid< /a> Forums<br> EOF echo $line echo "See /sdcard/SuperChargerHelp.html for more help!" echo $line fi echo "" $sleep fi echo "$scadj" > /sys/module/lowmemorykiller/parameters/a dj if [ "$opt" -le 10 ]; then if [ -d "/system/etc/init.d" ]; then echo $line echo "" $sleep fi echo " Setting lowmemorykiller to $MB1,$MB2,$MB3 ,$MB4,$MB5,$MB6 mb" echo "" echo "$scminfree" > /sys/module/lowmemorykiller/ parameters/minfree currentminfree=`cat /sys/module/lowmemorykiller/ parameters/minfree` ran=1 $sleep echo " OOM minfrees levels are now set to..."

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

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

...and the Launcher is we

...check the help

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

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

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

$sleep echo " But some people swear that it's great!" echo "" echo $line echo "" $sleep while : do echo -n " Enter 1 to Install, 2 to Uninstall, 3 to Exit:" read nitro case $nitro in 1)nitroinstall=1;break;; 2)nitroinstall=0;break;; 3)nitroinstall=;break;; *)echo "" echo " Invalid entry... Please try again :)" echo "" $sleep;; esac done echo "" echo $line if [[ -n "$nitroinstall" ]]; then if [ "$nitroinstall" -eq 1 ]; then if [ ! -f "/system/build.prop.unsuper" ]; then echo " Backing up ORIGINAL build.prop... " cp -r /system/build.prop /system/build.p rop.unsuper else echo " Leaving ORIGINAL build.prop backu p intact..." fi echo $line echo "" $sleep fi if [ -f "/system/bin/build.prop" ] && [ ! -f "/system/bi n/build.prop.unsuper" ]; then cp -r /system/bin/build.prop /system/bin/build.p rop.unsuper fi sed -i '/Nullifier/,/Nullified/d' /system/build.prop if [ "$nitroinstall" -eq 1 ]; then cat >> /system/build.prop <<EOF # Nitro Lag Nullifier by zeppelinrox. # DO NOT DELETE COMMENTS. DELETING COMMENTS WILL BREAK UNINSTALL ROUTINE! ENFORCE_PROCESS_LIMIT=false MAX_SERVICE_INACTIVITY= MIN_HIDDEN_APPS= MAX_HIDDEN_APPS= CONTENT_APP_IDLE_OFFSET= EMPTY_APP_IDLE_OFFSET= MAX_ACTIVITIES= ACTIVITY_INACTIVE_RESET_TIME= # End of Nullified Entries EOF echo " Nitro Lag Nullifier installed..." else echo " Uninstalled Nitro Lag Nullifier..."

fi echo "" $sleep echo " ...Reboot required!" echo "" echo $line chmod 644 /system/build.prop if [ -f "/system/bin/build.prop" ]; then cp -fr /system/build.prop /system/bin/build.prop chmod 644 /system/bin/build.prop fi fi echo "" $sleep echo " Returning to main menu..." $sleep fi if [ "$opt" -eq 18 ]; then echo " This will copy V6 SuperCharger to /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 bash V6 and enter..." echo "" $sleep echo " THAT'S IT!" echo "" $sleep echo " Note that su is short for SuperUser..." echo "" echo $line echo "" $sleep echo " So... continue installation?" echo "" $sleep echo -n " Enter Y for Yes, any key for No: " read v6xbin echo "" echo $line case $v6xbin in y Y)if [ "$0" == "V6" ]; then echo " You are already running it from system/xb in!" else dd if=$0 of=/system/xbin/V6 2>/dev/null echo " Installation was incredibly successful !" fi;; *)echo " Well... forget it then...";; esac echo $line

echo "" $sleep fi if [ "$opt" -ge 2 ] && [ "$opt" -le 12 ] [ "$opt" -eq 18 ] " -eq 24 ]; then echo " SuperCharging, OOM Grouping & Priority Fixes.." echo "" $sleep echo " ...BulletProof & Hard To Kill Launchers..." echo "" $sleep echo " ...by -=zeppelinrox=- @ XDA & Droid Forums" sleep 2 fi if [ "$opt" -eq 24 ]; then echo "" echo " Buh Bye :)" echo "" $sleep exit 0 fi fi mount -o remount,ro /system 2>/dev/null for m in /dev/block/mtdblock* do mount -o remount,ro $m /system 2>/dev/null done done [ "$opt

You might also like