Quantcast
Channel: xda-developers - Galaxy S III General
Viewing all articles
Browse latest Browse all 3987

[Script Error] SQLite database defragging - solved

$
0
0
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:
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;

and outputted recursive errors stating
Code:

/system/xbin/sqlite3: not found
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.

Viewing all articles
Browse latest Browse all 3987

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>