am 3a31748b: am 30b96ba7: Merge "Use ro.hardware property to detect the device"

* commit '3a31748b05bd60466edae6366a1818cd75bc8fa0':
  Use ro.hardware property to detect the device
This commit is contained in:
Dmitriy Ivanov
2015-06-29 21:27:20 +00:00
committed by Android Git Automerger

View File

@@ -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."