diff options
author | Andy McFadden <> | 2009-04-02 14:48:56 -0700 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-04-02 14:48:56 -0700 |
commit | 0198b1443707d575d30c2b20f1bc3766a9221e96 (patch) | |
tree | 6b2d99577e8cecc3abb7dd1f68d158aec441e296 /tools | |
parent | e1f560a62949e9a673a58a37a8c72dc8b15d9563 (diff) | |
download | android_dalvik-0198b1443707d575d30c2b20f1bc3766a9221e96.tar.gz android_dalvik-0198b1443707d575d30c2b20f1bc3766a9221e96.tar.bz2 android_dalvik-0198b1443707d575d30c2b20f1bc3766a9221e96.zip |
AI 144278: Some changes to make examination of flaky devices easier.
Added "dexcheck" shell script, which runs the dexdump checksum
verification against every file in /data/dalvik-cache.
Added "-c" flag to dexdump, which quits after the checksum test
(faster than sending everything to /dev/null).
Initialize a ZipArchive struct earlier; without this dexdump was
crashing in some situations when dealing with a nonexistent file.
BUG=1749836
Automated import of CL 144278
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/dexcheck | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tools/dexcheck b/tools/dexcheck new file mode 100755 index 000000000..a4f7399b5 --- /dev/null +++ b/tools/dexcheck @@ -0,0 +1,22 @@ +#!/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. +for file in $files; do + echo $file + errout=`adb shell "dexdump /data/dalvik-cache/$file > dev/null"` + echo $errout | grep ERROR > /dev/null + if [ $? -eq 0 ]; then + echo " Failure in $file: $errout" + fi +done + +exit 0 + |