Cronet Android sample's startNetLog not working
Reported by
c...@mobvoi.com,
May 9 2016
|
||||
Issue descriptionUserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.108 Safari/537.36 Example URL: Steps to reproduce the problem: 1. Follow the procedure to build and install cronet Android smaple app 2. Call startNetLog before start network connection What is the expected behavior? Log is written to sdcard What went wrong? No log is written to sdcard Did this work before? N/A Chrome version: 49.0.2623.108 Channel: stable OS Version: Flash Version: Shockwave Flash 21.0 r0
,
May 9 2016
Also, depending on the version of Android running on the device, it could require explicit permissions.
,
May 9 2016
What version of Android are you using? I spent a while debugging essentially this problem Friday, and came up with a solution today. I'll upload a CL shortly.
,
May 9 2016
I drafted a CL to address the Android M permissions issue: https://codereview.chromium.org/1961943003
,
May 10 2016
Thanks Paul, your CL fixes this issue. I was thinking about this might be related to permission but it's weird that logcat does not print any error log.
,
May 11 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/6f4a1e97c63ae7307010f1059948f1ffb4bb8cba commit 6f4a1e97c63ae7307010f1059948f1ffb4bb8cba Author: pauljensen <pauljensen@chromium.org> Date: Wed May 11 14:36:24 2016 [Cronet] Change sample app to save netlog to app's files directory Previously it saved to the external storage directory which doesn't work without changes in Android Marshmallow. I proposed addressing this in http://crrev.com/1961943003 but it greatly complicated the sample app and saving a netlog, potentially containing private data, into a directory visible by all apps shouldn't be encouraged. BUG= 610174 R=xunjieli Review-Url: https://codereview.chromium.org/1971643002 Cr-Commit-Position: refs/heads/master@{#392918} [modify] https://crrev.com/6f4a1e97c63ae7307010f1059948f1ffb4bb8cba/components/cronet/android/sample/AndroidManifest.xml [modify] https://crrev.com/6f4a1e97c63ae7307010f1059948f1ffb4bb8cba/components/cronet/android/sample/src/org/chromium/cronet_sample_apk/CronetSampleActivity.java
,
May 11 2016
Okay, no permissions should be required now. The netlog can be pulled from the device via: adb root adb pull /data/data/org.chromium.cronet_sample_apk/cache/netlog.json |
||||
►
Sign in to add a comment |
||||
Comment 1 by cbentzel@chromium.org
, May 9 2016Components: -Internals>Network Internals>Network>Library
Labels: -OS-Linux -Pri-2 OS-Android Pri-3