File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 11
11
# shell, but not functions (like gettop), so we need to source envsetup in here
12
12
# as well.
13
13
source $ANDROID_BUILD_TOP /build/envsetup.sh
14
+ echo
14
15
15
16
function adb_get_product_device() {
16
17
local candidate=` adb shell getprop ro.hardware | tr -d ' \r\n' `
@@ -96,10 +97,15 @@ function gdbclient() {
96
97
fi
97
98
fi
98
99
99
- local EXE=` adb shell readlink /proc/$PID /exe | tr -d ' \r\n' `
100
+ local ID=` adb shell id -u`
101
+ if [ " $ID " != " 0" ]; then
102
+ echo " Error: gdbclient only works if you've run 'adb root'"
103
+ return -4
104
+ fi
100
105
106
+ local EXE=` adb shell readlink /proc/$PID /exe | tr -d ' \r\n' `
101
107
if [ -z " $EXE " ]; then
102
- echo " Error: no such pid= $PID - is process still alive?"
108
+ echo " Error: couldn't find executable for pid $PID --- is the process still alive?"
103
109
return -4
104
110
fi
105
111
You can’t perform that action at this time.
0 commit comments