summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorDmitriy Ivanov <dimitry@google.com>2015-06-26 19:51:28 -0700
committerDmitriy Ivanov <dimitry@google.com>2015-06-29 11:27:30 -0700
commit91dcbe968b11858de90dc1d1a4878c68c57d0344 (patch)
treeff54c4002ba459c79cee4ce1370dabe3d85ed80e /scripts
parent6201465c3c7ff383fe08ed033ea71d467b21b8b0 (diff)
downloadandroid_development-91dcbe968b11858de90dc1d1a4878c68c57d0344.tar.gz
android_development-91dcbe968b11858de90dc1d1a4878c68c57d0344.tar.bz2
android_development-91dcbe968b11858de90dc1d1a4878c68c57d0344.zip
Use ro.hardware property to detect the device
Bug: http://b/22120411 Change-Id: Ida9bc157b560edbe8c2db67f5df5109c192fef9d
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/gdbclient10
1 files changed, 1 insertions, 9 deletions
diff --git a/scripts/gdbclient b/scripts/gdbclient
index 2a846389a..c17059084 100755
--- a/scripts/gdbclient
+++ b/scripts/gdbclient
@@ -12,14 +12,6 @@ fi
# as well.
source $ANDROID_BUILD_TOP/build/envsetup.sh
-function adb_get_product_device() {
- local candidate=`adb shell getprop ro.product.device | tr -d '\r\n'`
- if [ -z $candidate ]; then
- candidate=`adb shell getprop ro.hardware | tr -d '\r\n'`
- fi
- echo $candidate
-}
-
# returns 0 when process is not traced
function adb_get_traced_by() {
echo `adb shell cat /proc/$1/status | grep -e "^TracerPid:" | sed "s/^TracerPid:\t//" | tr -d '\r\n'`
@@ -45,7 +37,7 @@ function gdbclient() {
echo "Usage: gdbclient <pid|processname> [port number]"
return -1
fi
- local DEVICE=$(adb_get_product_device)
+ local DEVICE=`adb shell getprop ro.hardware | tr -d '\r\n'`
if [ -z "$DEVICE" ]; then
echo "Error: Unable to get device name. Please check if device is connected and ANDROID_SERIAL is set."