New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 602815 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner:
Xoogler
Closed: Jan 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug



Sign in to add a comment

tracing: Cannot write traces on android M without permissions

Project Member Reported by mariakho...@chromium.org, Apr 12 2016

Issue description

Repro:
 - Flash device to run Android M+
 - Set up tracing as per https://chromium.googlesource.com/chromium/src/+/master/components/tracing/docs/memory_infra_startup_tracing.md
 - Attempt to record startup traces

Expected:
 - Startup trace appears in /sdcard/Downloads

Actual
 - Error writing startup trace

The issue is that starting in M+, the user has to grant the browser permission to access files on disk via permission requesting popup in addition to manifest permissions listed for Chrome.

The current workaround is to trigger some sort of local file operation in chrome, e.g. navigate to file:///sdcard/Downloads and allow Chrome to access disk before gathering startup traces.

 
Cc: nduca@chromium.org skyos...@chromium.org oysteine@chromium.org kraynov@chromium.org petrcermak@chromium.org charliea@chromium.org
Summary: tracing: Cannot write traces on android M without permissions (was: MemoryInfra: Cannot write traces on android M without permissions)
Argh, this seems a general problem with tracing on Android M.
I guess we should add some "pm grant" instruction to the startup tracing doc (or better create a script that takes care of that)
Don't have the time this week to figure out what is the right sequence of pm grant to do. Any takers?
kraynov@ mind taking a look?

P.S: petrcermak should we add this to the manual testing plan (https://docs.google.com/document/d/1-4myFLT5tV8fkPz8Ffep6LdyCGg2UsI7X7mMPzOkLv0/edit#) ?
adb_profile_chrome detects this an suggests allowing permissions via settings. I didn't realize there's an automated way to do that too.
Q: should we be using adb_profile_chrome instead of these manual instructions [1]? Does it set startup tracing or does something more?


[1] https://chromium.googlesource.com/chromium/src/+/master/components/tracing/docs/memory_infra_startup_tracing.md
There's build/android/adb_profile_chrome_startup for that. Feel free to add new flags there if necessary.
Owner: kraynov@chromium.org
Status: Assigned (was: Available)
kraynov@ can you look at this. In detail:
1) What it takes to run memory-infra statup (as described by the docs) using adb_profile_chrome_startup on Android L? Should we use new flags or does it just work?

2) On Android M, can you see what is the right set of "adb shell pm grant" commands (if any, maybe I am just wrong) that would drop the need of manual confirmation?

Thanks.
Cc: -petrcermak@chromium.org
Cc: -petrcermak@chromium.org
Components: Internals>Instrumentation>Memory
Status: WontFix (was: Assigned)
Obsolete, can't reproduce on Android M using //build/android/adb_* scripts.
Probably because of this code: https://cs.chromium.org/chromium/src/third_party/catapult/devil/devil/android/device_utils.py?l=2457

Sign in to add a comment