Index: platform_tools/android/bin/android_setup.sh |
diff --git a/platform_tools/android/bin/android_setup.sh b/platform_tools/android/bin/android_setup.sh |
index b94d230fb53e2c1bf2a06de7cad83da2b8ef3e03..df002bf9a41f843b848fd2fdfb5d071e67515bc8 100755 |
--- a/platform_tools/android/bin/android_setup.sh |
+++ b/platform_tools/android/bin/android_setup.sh |
@@ -220,8 +220,14 @@ adb_push_if_needed() { |
ANDROID_LS=`$ADB $DEVICE_SERIAL shell ls -ld $ANDROID_DST` |
if [ "${ANDROID_LS:0:1}" == "-" ]; then |
- #get the MD5 for dst and src |
- ANDROID_MD5=`$ADB $DEVICE_SERIAL shell md5 $ANDROID_DST` |
+ #get the MD5 for dst and src depending on OS and/or OS revision |
+ ANDROID_MD5_SUPPORT=`$ADB $DEVICE_SERIAL shell ls -ld /system/bin/md5` |
+ if [ "${ANDROID_MD5_SUPPORT:0:15}" != "/system/bin/md5" ]; then |
+ ANDROID_MD5=`$ADB $DEVICE_SERIAL shell md5 $ANDROID_DST` |
+ else |
+ ANDROID_MD5=`$ADB $DEVICE_SERIAL shell md5sum $ANDROID_DST` |
+ fi |
+ |
if [ $(uname) == "Darwin" ]; then |
HOST_MD5=`md5 -q $HOST_SRC` |
else |