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

Issue 610174 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: May 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug



Sign in to add a comment

Cronet Android sample's startNetLog not working

Reported by c...@mobvoi.com, May 9 2016

Issue description

UserAgent: 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
 
Cc: mef@chromium.org xunji...@chromium.org
Components: -Internals>Network Internals>Network>Library
Labels: -OS-Linux -Pri-2 OS-Android Pri-3
Is this internal or external sdcard that you are mentioning?

Comment 2 by mef@chromium.org, May 9 2016

Cc: pauljensen@chromium.org
Also, depending on the version of Android running on the device, it could require explicit permissions.
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.
Cc: -pauljensen@chromium.org
Owner: pauljensen@chromium.org
Status: Started (was: Unconfirmed)
I drafted a CL to address the Android M permissions issue:
https://codereview.chromium.org/1961943003

Comment 5 by c...@mobvoi.com, 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.
Project Member

Comment 6 by bugdroid1@chromium.org, 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

Status: Fixed (was: Started)
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