Andy McFadden | 0198b14 | 2009-04-02 14:48:56 -0700 | [diff] [blame^] | 1 | #!/bin/bash |
| 2 | # |
| 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". |
| 6 | |
| 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 | |
| 10 | # Check each file in turn. This is much faster with "dexdump -c", but that |
| 11 | # was added post-cupcake. |
| 12 | for file in $files; do |
| 13 | echo $file |
| 14 | errout=`adb shell "dexdump /data/dalvik-cache/$file > dev/null"` |
| 15 | echo $errout | grep ERROR > /dev/null |
| 16 | if [ $? -eq 0 ]; then |
| 17 | echo " Failure in $file: $errout" |
| 18 | fi |
| 19 | done |
| 20 | |
| 21 | exit 0 |
| 22 | |