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

Issue 884993003: Make gdb debugging on un-rooted devices work for Android 5.x. (Closed)

Created:
5 years, 10 months ago by mille
Modified:
5 years, 10 months ago
Reviewers:
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

Make gdb debugging on un-rooted devices work for Android 5.x. Android 5.x does not allow running the gdb executable in /data/local/tmp. For gdb to be executable by the package it need to be located in /data/data/{PACKAGE-NAME} which is allowed to run the exucutable. BUG=453379 Committed: https://crrev.com/b5b0414406e7b56204e11eb0f9c463fdfc295c4e Cr-Commit-Position: refs/heads/master@{#313737}

Patch Set 1 #

Patch Set 2 : Address debugging Release builds #

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

Messages

Total messages: 13 (2 generated)
mille
jbudorick: Does this look okay? Do you (Chrome on Android) have the same problem, if ...
5 years, 10 months ago (2015-01-29 13:50:31 UTC) #2
jbudorick
On 2015/01/29 13:50:31, mille wrote: > jbudorick: Does this look okay? Do you (Chrome on ...
5 years, 10 months ago (2015-01-29 17:01:33 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/884993003/1
5 years, 10 months ago (2015-01-29 17:41:32 UTC) #5
commit-bot: I haz the power
Committed patchset #1 (id:1)
5 years, 10 months ago (2015-01-29 18:18:48 UTC) #6
commit-bot: I haz the power
Patchset 1 (id:??) landed as https://crrev.com/b5b0414406e7b56204e11eb0f9c463fdfc295c4e Cr-Commit-Position: refs/heads/master@{#313737}
5 years, 10 months ago (2015-01-29 18:19:41 UTC) #7
Feng Qian
On 2015/01/29 18:19:41, I haz the power (commit-bot) wrote: > Patchset 1 (id:??) landed as ...
5 years, 10 months ago (2015-01-30 01:30:32 UTC) #8
jbudorick
On 2015/01/30 01:30:32, Feng Qian wrote: > On 2015/01/29 18:19:41, I haz the power (commit-bot) ...
5 years, 10 months ago (2015-01-30 01:35:02 UTC) #9
jbudorick
On 2015/01/30 01:35:02, jbudorick wrote: > On 2015/01/30 01:30:32, Feng Qian wrote: > > On ...
5 years, 10 months ago (2015-01-30 02:02:50 UTC) #10
jbudorick
On 2015/01/30 02:02:50, jbudorick wrote: > On 2015/01/30 01:35:02, jbudorick wrote: > > On 2015/01/30 ...
5 years, 10 months ago (2015-01-30 02:28:28 UTC) #11
mille
On 2015/01/30 02:28:28, jbudorick wrote: > On 2015/01/30 02:02:50, jbudorick wrote: > > On 2015/01/30 ...
5 years, 10 months ago (2015-01-30 09:48:47 UTC) #12
jbudorick
5 years, 10 months ago (2015-01-30 14:03:25 UTC) #13
Message was sent while issue was closed.
On 2015/01/30 09:48:47, mille wrote:
> On 2015/01/30 02:28:28, jbudorick wrote:
> > On 2015/01/30 02:02:50, jbudorick wrote:
> > > On 2015/01/30 01:35:02, jbudorick wrote:
> > > > On 2015/01/30 01:30:32, Feng Qian wrote:
> > > > > On 2015/01/29 18:19:41, I haz the power (commit-bot) wrote:
> > > > > > Patchset 1 (id:??) landed as
> > > > > > https://crrev.com/b5b0414406e7b56204e11eb0f9c463fdfc295c4e
> > > > > > Cr-Commit-Position: refs/heads/master@{#313737}
> > > > > 
> > > > > This CL breaks adb_gdb on a rooted N5 (running L), please fix it or
> revert
> > > the
> > > > > CL.
> > > > 
> > > > I tried this on a rooted N5 on L prior to giving approval... argh.
> > > 
> > > Checked again, unable to reproduce this error on a rooted N5 on L.
> > > 
> > > > 
> > > > > fqian@isabella:/usr/local/google/code/clankium-master/src$
> adb_gdb_chrome
> > > > > --verbose
> > > > > Auto-config:
> > > > >
> > > >
> > >
> >
>
--adb=/usr/local/google/code/clankium-master/src/third_party/android_tools/sdk//platform-tools/adb
> > > > > Auto-config:
> > > > >
> > > >
> > >
> >
>
--toolchain=/usr/local/google/code/clankium-master/src/third_party/android_tools/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin
> > > > > Host gdb client:
> > > > >
> > > >
> > >
> >
>
/usr/local/google/code/clankium-master/src/third_party/android_tools/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gdb
> > > > > Auto-config:
> > > > >
> > > >
> > >
> >
>
--gdbserver=/usr/local/google/code/clankium-master/src/third_party/android_tools/ndk/prebuilt/android-arm/gdbserver/gdbserver
> > > > > Auto-config:
> > > > >
--symbol-dir=/usr/local/google/code/clankium-master/src/out/Release/lib
> > > > > Device build fingerprint:
> > > > > google/hammerhead/hammerhead:L/LRW77/1438570:userdebug/dev-keys
> > > > > Host build fingerprint:  
> > > > > google/hammerhead/hammerhead:L/LRW77/1438570:userdebug/dev-keys
> > > > > Auto-config: --no-pull-libs (fingerprint match)
> > > > > Found process PID: 32348
> > > > > Shell UID: 0
> > > > > Command prefix: ''
> > > > > Command suffix: ''
> > > > > Pushing gdbserver
> > > > >
> > > >
> > >
> >
>
/usr/local/google/code/clankium-master/src/third_party/android_tools/ndk/prebuilt/android-arm/gdbserver/gdbserver
> > > > > to /data/data/com.google.android.apps.chrome/gdbserver-adb-gdb-14746
> > > > > run-as: Package 'com.google.android.apps.chrome' is not debuggable
> > > > 
> > > > This line stands out to me.
> > 
> > Indeed, this line appears to be the problem. We don't package Release builds
> > with android:debuggable
> >
>
(https://code.google.com/p/chromium/codesearch#chromium/src/build/android/ant/...),
> > so the run-as will fail when attempting to run with those packages.
> > 
> > > > 
> > > > > /system/bin/app_process.real: No such file or directory
> > > > > Pulling app_process from device
> > > > > Setting network redirection (host:5039 -> device:5039)
> > > > > Starting gdbserver in the background:
> > > > > adb shell 
> > /data/data/com.google.android.apps.chrome/gdbserver-adb-gdb-14746
> > > > > :5039 --attach 32348 
> > > > > background job pid: 14872
> > > > > Job control: [1]+ 14872 Done                    ( "$ADB" shell
> > > $COMMAND_PREFIX
> > > > > $TARGET_GDBSERVER :$TARGET_PORT --attach $PID $COMMAND_SUFFIX >
> > > $GDBSERVER_LOG
> > > > > 2>&1 )
> > > > > ERROR: GDBServer could not attach to PID 32348!
> > > > > Failure log (use --verbose for more information):
> > > > > /system/bin/sh:
> > > > > /data/data/com.google.android.apps.chrome/gdbserver-adb-gdb-14746: not
> > found
> > > > > Killing background gdbserver process: 14872
> > > > > Removing target gdbserver binary:
> > > > > /data/data/com.google.android.apps.chrome/gdbserver-adb-gdb-14746.
> > > > > Cleaning up: /tmp/fqian-adb-gdb-tmp-14746
> 
> Latest patch should address debugging for Release builds on rooted devices.

Since your original patch was already committed, could you upload the fix to a
separate review?

Powered by Google App Engine
This is Rietveld 408576698