and followed by a echo 1 to let the system continue create cachesHaven't download it yet but I'm just curious. Is this a "sync" followed by echoing "3" to the drop_cache file?
Sent from my Nexus S using xda premium
sync;Adrenaline Shot
This script act like an adrenaline shot for your phone.
It helps you to clear your system cache, get more free ram for you and gravely boost your phone's performance !![]()
whenever u feel lagShould the terminal emulator typing repeat in every reboot (soft reset)?
really ?0.0sync;
sleep 1
echo "3" > /proc/sys/vm/drop_caches;
echo "1" > /proc/sys/vm/drop_caches;
sleep 1
echo " ** Turbo Boosted ** ";
Is that all?
Not new. This script persists already in a lot of ROMs and tweaks.
okay I'll make changesMy engine flush script included with V6 SuperCharger... it haz...
![]()
Just type "flush" in terminal
And what's up with the naming?
There is a well known Adrenaline Shot script plus there is a certain 3G TurboCharger but anyway instead of using 2 names (?) you should call it "Adrenaline Boost" or something
My engine flush script included with V6 SuperCharger... it haz...
![]()
Just type "flush" in terminal
And what's up with the naming?
There is a well known Adrenaline Shot script plus there is a certain 3G TurboCharger but anyway instead of using 2 names (?) you should call it "Adrenaline Boost" or something
if [ "$opt" -eq 16 ]; then
# see http://www.droidforums.net/forum/liberty-rom-d2/122733-tutorial-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 ""
$sleep
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 need to reboot!"
echo ""
$sleep
echo " Credit to imoseyon for making this known!"
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
SourceCode:
That's it. Not much to see here. The first command writes any cache data that hasn't been written to the disk out to the disk. The second command tells the kernel to drop what's cached. Not much to it. This invalidates the write cache as well as the read cache, which is why we have the sync command first.Code:# sync # echo 3 > /proc/sys/vm/drop_caches
Try this onedo u mean this one ?Code:if [ "$opt" -eq 16 ]; then # see http://www.droidforums.net/forum/liberty-rom-d2/122733-tutorial-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 "" $sleep 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 need to reboot!" echo "" $sleep echo " Credit to imoseyon for making this known!" 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![]()
echo " Reported \"Free\" RAM = $ramreportedfree MB"
echo ""
busybox sync; echo 3 > /proc/sys/vm/drop_caches
sleep 3
echo 1 > /proc/sys/vm/drop_caches
ramused=$((`free | awk '{ print $3 }' | sed -n 2p`/1024))
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));ramreportedfree=$(($ramfree + $ramcached))
echo $line
echo " ...RAM Stats AFTER Engine Flush"
wow i din noticed that u hav new version , still can report ram free , awesomeTry this oneCode:echo " Reported \"Free\" RAM = $ramreportedfree MB" echo "" busybox sync; echo 3 > /proc/sys/vm/drop_caches sleep 3 echo 1 > /proc/sys/vm/drop_caches ramused=$((`free | awk '{ print $3 }' | sed -n 2p`/1024)) 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));ramreportedfree=$(($ramfree + $ramcached)) echo $line echo " ...RAM Stats AFTER Engine Flush"
Plus you ain't sleeping between the echo 3 and echo 1 - so sometimes that won't work.![]()
the line which shows ram doesnt worksTry this oneCode:echo " Reported \"Free\" RAM = $ramreportedfree MB" echo "" busybox sync; echo 3 > /proc/sys/vm/drop_caches sleep 3 echo 1 > /proc/sys/vm/drop_caches ramused=$((`free | awk '{ print $3 }' | sed -n 2p`/1024)) 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));ramreportedfree=$(($ramfree + $ramcached)) echo $line echo " ...RAM Stats AFTER Engine Flush"
Plus you ain't sleeping between the echo 3 and echo 1 - so sometimes that won't work.![]()
Thanks I appreciate the good wordswow i din noticed that u hav new version , still can report ram free , awesomeone of the best devs out there
thanks for your guidance![]()