diff options
author | Andy McFadden <> | 2009-04-02 14:54:57 -0700 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-04-02 14:54:57 -0700 |
commit | bea515bfdda37408c16e4ee4636619e8b330b727 (patch) | |
tree | 5348eef183b04951fd16b401851656123d734cfa /tools | |
parent | 0198b1443707d575d30c2b20f1bc3766a9221e96 (diff) | |
download | android_dalvik-bea515bfdda37408c16e4ee4636619e8b330b727.tar.gz android_dalvik-bea515bfdda37408c16e4ee4636619e8b330b727.tar.bz2 android_dalvik-bea515bfdda37408c16e4ee4636619e8b330b727.zip |
AI 144290: Older versions of dexdump plow on after a checksum failure and usually
crash. Watch for any activity on stderr instead of looking for an
error message.
BUG=1758365
Automated import of CL 144290
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/dexcheck | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/dexcheck b/tools/dexcheck index a4f7399b5..6495d50bc 100755 --- a/tools/dexcheck +++ b/tools/dexcheck @@ -9,11 +9,14 @@ 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"` - echo $errout | grep ERROR > /dev/null - if [ $? -eq 0 ]; then + errcount=`echo $errout | wc -w` > /dev/null + if [ $errcount != "0" ]; then echo " Failure in $file: $errout" fi done |