New issue
Advanced search Search tips

Issue 918727 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug



Sign in to add a comment

Commandline script should fail clearly on user devices

Project Member Reported by ntfschr@chromium.org, Jan 2

Issue description

I believe this would apply to clank as well as WebView, but this certainly applies to WebView.

Commandline flags are only read from the flag file on debuggable devices (userdebug, eng). Right now this isn't super obvious when using commandline-setting scripts.

Wishlist (all of the following assume a user device):

 * `build/android/adb_system_webview_command_line` (with no args) should print something like "flags are not supported on user devices"
 * `build/android/adb_system_webview_command_line --some-flag` should fail with an explicit error message stating that flags are not supported (right now it fails, but it's not obvious why)
 * ^ all of the above, but for adb_chrome_public_command_line, Generated Wrapper Scripts, etc.

Despite bullet point number 2, it's still actually possible to write to the flags file manually. In this case, per bullet 1, the scripts print the value of the file (even though such a value is not respected by the product). So, I think both bullet points are justified.
 
I investigated for Chrome. It appears it is possible to read from the commandline file on a non-debuggable device. See this preference: https://cs.chromium.org/chromium/src/chrome/android/java/src/org/chromium/chrome/browser/ChromeApplication.java?l=124&rcl=e633ec7b45db12d9e4e8555049d626f487c9cabf

Although, I think the flags script itself still fails on non-rooted devices.
Components: Tools
Labels: QuickFix
Status: Available (was: Untriaged)

Sign in to add a comment