skia2/platform_tools/android/bin/utils/setup_adb.sh
Derek Sollenberger 78b35230aa Archive or update unsupported Android scripts and third-party dependencies.
- nothing uses ashmem;
  - cpufeatures and native_app_glue are now pulled from the NDK;
  - no bots use the scripts in platform_tools/android/bin;
  - update scripts to work with GN instead of GYP.

Change-Id: I14f47eeadb3047505e232dd10385f58ef12c73f4
Reviewed-on: https://skia-review.googlesource.com/5422
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Derek Sollenberger <djsollen@google.com>
2016-12-02 14:11:24 +00:00

26 lines
606 B
Bash

# Copyright 2015 Google Inc.
#
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
if [ $PYADB ] && [ -a "$PYADB" ]; then
echo "Python ADB detected, going to use that"
ADB="python ${PYADB}"
return
fi
if [ "$(which adb)" != "" ]; then
ADB="$(which adb)"
elif [ -d "$ANDROID_SDK_ROOT" ]; then
ADB="${ANDROID_SDK_ROOT}/platform-tools/adb"
else
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