MrDangerous
Android Enthusiast
I thought this looked interesting and sure enough the spectrum ICS does not have sqlite3 installed. I installed it using the play store program however I didn't try to run the script as it looked like it had some hard coded /dev mount points in it.
SQLite3: phone is snappier than ever - Droid Charge - RootzWiki
SQLite3: phone is snappier than ever - Droid Charge - RootzWiki
Code:
#!/system/bin/sh
#
# Detailing Script (SQLite VACUUM & REINDEX) created by zeppelinrox.
#
# Credit avgjoemomma (from XDA) for the added reindex bit :)
#
line=================================================
clear
echo ""
echo $line
echo " -=Detailing=- script by -=zeppelinrox=-"
echo $line
echo ""
sleep 1
if [ ! "`id | grep =0`" ]; then
sleep 2
echo " You are NOT running this script as root..."
echo ""
sleep 3
echo $line
echo " ...No SuperUser for you!!"
echo $line
echo ""
sleep 3
echo " ...Please Run as Root and try again..."
echo ""
echo $line
echo ""
sleep 3
exit 69
fi
echo " Commencing SQLite VACUUM & REINDEX!"
echo ""
sleep 1
echo " Please IGNORE any errors that say..."
echo " ======"
echo ""
sleep 1
echo " \"malformed database\" OR \"collation sequence\"!"
echo " ================== =================="
echo ""
sleep 1
echo " ...as they won't effect SQLite Optimization!"
echo ""
sleep 1
echo $line
echo " This may take awhile... please wait..."
echo $line
echo ""
sleep 1
echo $line
echo " Mounting RootFS and System as R/W"
echo $line
echo ""
sleep 1
fsyst=`mount | grep "/system" | grep -v grep | awk -F " " '{print $3}'`
mount -o rw,remount -t rootfs rootfs /
mount -o rw,remount -t $fsyst /dev/block/stl10 /system
echo $line
echo " On to the databases!"
echo $line
echo ""
sleep 1
for i in `busybox find /d* -iname "*.db"`; do
sqlite3 $i 'VACUUM;';
echo " VACUUMED: $i"
sqlite3 $i 'REINDEX;';
echo " REINDEXED: $i"
done
echo ""
sleep 1
echo " =========================="
echo " ) Detailing Completed! ("
echo " =========================="
echo ""
sleep 1
echo $line
echo " Mounting RootFS and System as R/O"
echo $line
echo ""
mount -o ro,remount -t rootfs rootfs /
mount -o ro,remount -t $fsyst /dev/block/stl10 /system
echo ""
echo " ==========================="
echo " ) Everything Completed! ("
echo " ==========================="
exit 0