I used to use a script on my original SGS to defrag the sql databases. I came across a similar code but its giving me errors
Script is:
and outputted recursive errors stating
I'm assuming the location is wrong (had a browse around the system but couldn't find location of any sql DB)
or is it something else I'm missing (like incomplete busybox)?
any help would be much appreciated.
Script is:
Code:
#!/system/bin/sh
# ==============================================================
# Optimize SQlite databases of apps
# ==============================================================
echo "";
echo "*********************************************";
echo "Optimizing and defragging your database files (*.db)";
echo "Ignore the 'database disk image is malformed' error";
echo "Ignore the 'no such collation sequence' error";
echo "*********************************************";
echo "";
for i in \
`busybox find /data -iname "*.db"`;
do \
/system/xbin/sqlite3 $i 'VACUUM;';
/system/xbin/sqlite3 $i 'REINDEX;';
done;
if [ -d "/dbdata" ]; then
for i in \
`busybox find /dbdata -iname "*.db"`;
do \
/system/xbin/sqlite3 $i 'VACUUM;';
/system/xbin/sqlite3 $i 'REINDEX;';
done;
fi;
if [ -d "/datadata" ]; then
for i in \
`busybox find /datadata -iname "*.db"`;
do \
/system/xbin/sqlite3 $i 'VACUUM;';
/system/xbin/sqlite3 $i 'REINDEX;';
done;
fi;
for i in \
`busybox find /sdcard -iname "*.db"`;
do \
/system/xbin/sqlite3 $i 'VACUUM;';
/system/xbin/sqlite3 $i 'REINDEX;';
done;
Code:
/system/xbin/sqlite3: not found
or is it something else I'm missing (like incomplete busybox)?
any help would be much appreciated.