AW docs: clarify netlog and commandline flag requirements
No change to logic, only docs. This clarifies that WebView requires debuggable Android images for all commandline flags, including netlog. This repeats a code snippet for checking if your device supports commandline flags. Bug: 918221 Test: tools/md_browser/md_browser.py Test: Upload to gerrit > open file > click "gitiles" Change-Id: I03ebc095ee78744e9dfdbf9c113b418c57a53e7e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2029190 Reviewed-by: Shimi Zhang <ctzsm@chromium.org> Commit-Queue: Nate Fischer <ntfschr@chromium.org> Cr-Commit-Position: refs/heads/master@{#736640}
This commit is contained in:
android_webview/docs
@ -1,13 +1,33 @@
|
||||
# Commandline flags
|
||||
|
||||
## Applying flags
|
||||
## Can I apply commandline flags on my device?
|
||||
|
||||
*** note
|
||||
**Note:** this requires either a `userdebug` or `eng` Android build (you can
|
||||
check with `adb shell getprop ro.build.type`). Flags cannot be enabled on
|
||||
production builds of Android.
|
||||
**Note:** WebView only permits toggling commandline flags on devices/emulators
|
||||
running a debuggable Android OS image. **Most users cannot apply commandline
|
||||
flags, because they're using devices with production Android images.**
|
||||
***
|
||||
|
||||
You can check which Android image you have on your device with the following:
|
||||
|
||||
```sh
|
||||
# If you don't have `adb` in your path, you can source this file to use
|
||||
# the copy from chromium's Android SDK.
|
||||
$ source build/android/envsetup.sh
|
||||
|
||||
# If this outputs "userdebug" or "eng" then you can apply flags following this
|
||||
# guide. If it outputs "user" then you cannot apply flags on this device.
|
||||
$ adb shell getprop ro.build.type
|
||||
userdebug
|
||||
```
|
||||
|
||||
If the above outputs "user," then you **cannot** apply flags on the
|
||||
device/emulator. If you intend to use this device for chromium development, then
|
||||
you may consider [re-flashing the device or creating a debuggable Android
|
||||
emulator](device-setup.md).
|
||||
|
||||
## Applying flags
|
||||
|
||||
WebView reads flags from a specific file on the device as part of the startup
|
||||
sequence. Therefore, it's important to always **kill the WebView-based app**
|
||||
you're examining after modifying commandline flags, to ensure the flags are
|
||||
|
@ -10,6 +10,22 @@ Android image.
|
||||
To build WebView, or [run WebView's automated tests](./test-instructions.md),
|
||||
you'll need to set up either an emulator or a physical device.
|
||||
|
||||
## I have a device or emulator. Will it work for development?
|
||||
|
||||
You can check which Android image you have on your device with the following:
|
||||
|
||||
```sh
|
||||
# If you don't have `adb` in your path, you can source this file to use
|
||||
# the copy from chromium's Android SDK.
|
||||
$ source build/android/envsetup.sh
|
||||
|
||||
# If this outputs "userdebug" or "eng" then you're OK! If this outputs "user"
|
||||
# then you must reflash your physical device or configure a new emulator
|
||||
# following this guide.
|
||||
$ adb shell getprop ro.build.type
|
||||
userdebug
|
||||
```
|
||||
|
||||
## Emulator (easy way)
|
||||
|
||||
*** promo
|
||||
|
@ -5,15 +5,17 @@
|
||||
WebView supports the `kLogNetLog` flag to log debugging network info to a JSON
|
||||
file on disk.
|
||||
|
||||
*** aside
|
||||
For more info on commandline flags, see
|
||||
[commandline-flags.md](./commandline-flags.md).
|
||||
***
|
||||
### Please do not request netlogs from reporters
|
||||
|
||||
*** note
|
||||
**Note:** this requires either a `userdebug` or `eng` Android build (you can
|
||||
check with `adb shell getprop ro.build.type`). Flags cannot be enabled on
|
||||
production builds of Android.
|
||||
**Important**: at the moment, WebView netlog requires applying commandline
|
||||
flags. **It's not typically possible for external reporters to apply commandline
|
||||
flags, so please do not ask them to follow this guide.**
|
||||
|
||||
This guide is only for chromium developers who are set up for WebView
|
||||
development. Specifically, this guide requires the reader to use a `userdebug`
|
||||
or `eng` Android image, see [device setup](device-setup.md) and [commandline
|
||||
flags](commandline-flags.md) for more information.
|
||||
***
|
||||
|
||||
### Python script
|
||||
|
Reference in New Issue
Block a user