blob: 6495d50bcecb9587e5afa86667febc62dfbee01b [file] [log] [blame]
#!/bin/bash
#
# This requires read permission on /data/dalvik-cache. On an eng build this
# works, on userdebug you will need to "adb root", or "su" followed by
# "chmod 777 /data/dalvik-cache".
# Get the list of files. Use "sed" to drop the trailing carriage return.
files=`adb shell "cd /data/dalvik-cache; echo *" | sed -e s/.$//`
# Check each file in turn. This is much faster with "dexdump -c", but that
# was added post-cupcake.
#
# The dexdump found in older builds does not stop on checksum failures and
# will likely crash.
for file in $files; do
echo $file
errout=`adb shell "dexdump /data/dalvik-cache/$file > dev/null"`
errcount=`echo $errout | wc -w` > /dev/null
if [ $errcount != "0" ]; then
echo " Failure in $file: $errout"
fi
done
exit 0