2016-01-14 06:53:55 +00:00
|
|
|
# Copyright 2015 Google Inc.
|
2013-04-29 12:09:31 +00:00
|
|
|
#
|
2016-01-14 06:53:55 +00:00
|
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
|
|
# found in the LICENSE file.
|
2013-04-29 12:09:31 +00:00
|
|
|
|
2016-04-07 17:57:27 +00:00
|
|
|
if [ $PYADB ] && [ -a "$PYADB" ]; then
|
|
|
|
echo "Python ADB detected, going to use that"
|
|
|
|
ADB="python ${PYADB}"
|
|
|
|
return
|
|
|
|
fi
|
|
|
|
|
2013-04-29 12:09:31 +00:00
|
|
|
if [ "$(which adb)" != "" ]; then
|
|
|
|
ADB="$(which adb)"
|
2014-10-30 12:57:31 +00:00
|
|
|
elif [ -d "$ANDROID_SDK_ROOT" ]; then
|
|
|
|
ADB="${ANDROID_SDK_ROOT}/platform-tools/adb"
|
2013-04-29 12:09:31 +00:00
|
|
|
else
|
2014-10-30 12:57:31 +00:00
|
|
|
echo $ANDROID_SDK_ROOT
|
|
|
|
echo "No ANDROID_SDK_ROOT set (check that android_setup.sh was properly sourced)"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! -x $ADB ]; then
|
|
|
|
echo "The adb binary is not executable"
|
|
|
|
exit 1
|
|
|
|
fi
|