0

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:
Nate Fischer
2020-01-30 00:37:38 +00:00
committed by Commit Bot
parent 690392f7ff
commit 0f46ff8743
3 changed files with 49 additions and 11 deletions

@ -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