tracing: Cannot write traces on android M without permissions |
||||||
Issue descriptionRepro: - 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.
,
Apr 13 2016
adb_profile_chrome detects this an suggests allowing permissions via settings. I didn't realize there's an automated way to do that too.
,
Apr 13 2016
We should definitely update both the manual testing plan (https://docs.google.com/document/d/1-4myFLT5tV8fkPz8Ffep6LdyCGg2UsI7X7mMPzOkLv0/edit#) and the public memory-infra documentation (https://chromium.googlesource.com/chromium/src/+/master/components/tracing/docs/memory_infra_startup_tracing.md).
,
Apr 13 2016
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
,
Apr 13 2016
There's build/android/adb_profile_chrome_startup for that. Feel free to add new flags there if necessary.
,
Apr 13 2016
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.
,
Oct 5 2016
,
Oct 5 2016
,
Jan 4 2017
,
Jan 25 2017
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 |
||||||
Comment 1 by primiano@chromium.org
, Apr 13 2016Summary: tracing: Cannot write traces on android M without permissions (was: MemoryInfra: Cannot write traces on android M without permissions)