Skip to content

Commit 30b96ba

Browse files
dimitry-Gerrit Code Review
authored andcommitted
Merge "Use ro.hardware property to detect the device"
2 parents 6201465 + 91dcbe9 commit 30b96ba

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

scripts/gdbclient

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,6 @@ fi
1212
# as well.
1313
source $ANDROID_BUILD_TOP/build/envsetup.sh
1414

15-
function adb_get_product_device() {
16-
local candidate=`adb shell getprop ro.product.device | tr -d '\r\n'`
17-
if [ -z $candidate ]; then
18-
candidate=`adb shell getprop ro.hardware | tr -d '\r\n'`
19-
fi
20-
echo $candidate
21-
}
22-
2315
# returns 0 when process is not traced
2416
function adb_get_traced_by() {
2517
echo `adb shell cat /proc/$1/status | grep -e "^TracerPid:" | sed "s/^TracerPid:\t//" | tr -d '\r\n'`
@@ -45,7 +37,7 @@ function gdbclient() {
4537
echo "Usage: gdbclient <pid|processname> [port number]"
4638
return -1
4739
fi
48-
local DEVICE=$(adb_get_product_device)
40+
local DEVICE=`adb shell getprop ro.hardware | tr -d '\r\n'`
4941

5042
if [ -z "$DEVICE" ]; then
5143
echo "Error: Unable to get device name. Please check if device is connected and ANDROID_SERIAL is set."

0 commit comments

Comments
 (0)