3 # This requires read permission on /data/dalvik-cache. On an eng build this
4 # works, on userdebug you will need to "adb root", or "su" followed by
5 # "chmod 777 /data/dalvik-cache".
7 # Get the list of files. Use "sed" to drop the trailing carriage return.
8 files=`adb shell "cd /data/dalvik-cache; echo *" | sed -e s/.$//`
9 if [ "$files" = "*" ]; then
10 echo 'ERROR: commands must run as root on device (try "adb root" first?)'
16 # Check each file in turn. This is much faster with "dexdump -c", but that
17 # was added post-cupcake.
19 # The dexdump found in older builds does not stop on checksum failures and
21 for file in $files; do
23 errout=`adb shell "dexdump /data/dalvik-cache/$file > dev/null"`
24 errcount=`echo $errout | wc -w` > /dev/null
25 if [ $errcount != "0" ]; then
26 echo " Failure in $file: $errout"