Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1124)

Issue 855943002: Fixed running gdb on rooted device (Closed)

Created:
5 years, 11 months ago by ripp
Modified:
5 years, 10 months ago
Reviewers:
klundberg, jbudorick
CC:
chromium-reviews, klundberg+watch_chromium.org, yfriedman+watch_chromium.org, jbudorick+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fixed running gdb on rooted device The command passed as a parameter to some implementations of "su" must be enclosed in quotation marks. Otherwise, the command contains spaces, can be splited into several commands. For example 'su -c echo foo' can be executed by "su" as two commands: "echo" and "foo". The right way to run this is 'su -c "echo foo"'. This patch fixes "su" behaviour and still works fine without --su-prefix flag Added quotes around adb shell command R=jbudorick@chromium.org, klundberg@chromium.org TEST=Run build/android/adb_gdb with parameter --su-prefix="su -c", on device which is rooted with "SuperSU v1.99 - Copyright (C) 2012-2014 - Chainfire" Committed: https://crrev.com/8fe7481f6b9d9c4012390b959fc7a305111a5a23 Cr-Commit-Position: refs/heads/master@{#312845}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+6 lines, -6 lines) Patch
M build/android/adb_gdb View 3 chunks +6 lines, -6 lines 0 comments Download

Messages

Total messages: 9 (1 generated)
ripp
5 years, 11 months ago (2015-01-19 14:48:41 UTC) #1
jbudorick
lgtm
5 years, 11 months ago (2015-01-20 14:23:20 UTC) #2
ripp
Hello. Is this ok to initiate commit, or I should wait for LGTM from klundberg?
5 years, 11 months ago (2015-01-23 08:14:44 UTC) #3
jbudorick
On 2015/01/23 08:14:44, ripp wrote: > Hello. > Is this ok to initiate commit, or ...
5 years, 11 months ago (2015-01-23 14:02:49 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/855943002/1
5 years, 11 months ago (2015-01-23 14:05:47 UTC) #6
commit-bot: I haz the power
Committed patchset #1 (id:1)
5 years, 11 months ago (2015-01-23 14:52:20 UTC) #7
commit-bot: I haz the power
Patchset 1 (id:??) landed as https://crrev.com/8fe7481f6b9d9c4012390b959fc7a305111a5a23 Cr-Commit-Position: refs/heads/master@{#312845}
5 years, 11 months ago (2015-01-23 14:53:28 UTC) #8
Feng Qian
5 years, 10 months ago (2015-01-26 21:33:30 UTC) #9
Message was sent while issue was closed.
On 2015/01/23 14:53:28, I haz the power (commit-bot) wrote:
> Patchset 1 (id:??) landed as
> https://crrev.com/8fe7481f6b9d9c4012390b959fc7a305111a5a23
> Cr-Commit-Position: refs/heads/master@{#312845}

This CL breaks normal 'adb_gdb_command':

Command prefix: ''
....
adb shell  "/data/local/tmp/gdbserver-adb-gdb-32726 :5039 --attach 28144"
background job pid: 366
Job control: [1]+   366 Done                    ( "$ADB" shell $COMMAND_PREFIX
\"$TARGET_GDBSERVER :$TARGET_PORT --attach $PID\" > $GDBSERVER_LOG 2>&1 )
ERROR: GDBServer could not attach to PID 28144!
Failure log (use --verbose for more information):
/system/bin/sh: no closing quote
...

Powered by Google App Engine
This is Rietveld 408576698