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

Issue 749239 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Sep 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug

Blocked on:
issue 674250
issue 758670



Sign in to add a comment

APK Wrapper Script Enhancements

Project Member Reported by agrieve@chromium.org, Jul 26 2017

Issue description

A follow up to  bug 674250 :

out/Debug/chrome_public_apk logcat
  * Should start from "now" by default rather than give history
  * Should filter to chrome processes by default
  * To accomplish this, should use device_util.GetLogcatMonitor() with custom filtering based on pids / uids.

out/Debug/chrome_public_apk shell [cmd]
  * Device shell with pwd=app's data directory
  * Without [cmd]:
    * Shortcut for "adb shell -t run-as $PKG"
  * With [cmd]
    * Shortcut for "adb shell run-as $PKG [cmd]"

out/Debug/chrome_public_apk ps
  * List app's processes via DeviceUtils.GetPids()

out/Debug/chrome_public_apk mem-usage
  * Wrapper for DeviceUtils.GetMemoryUsageForPid()







 
Also: We should delete / move the generated incremental install scripts that are in the bin/ directory, since this supersedes them.
More to be done:
Currently "launch" with a URL is broken. If you have multiple browsers installed, it's showing a chooser (it should always target the given apk).

To fix, it needs to be taught to lookup the APK's activity (or in our case, activity-alias) that supports the VIEW action in an <intent-filter>
Project Member

Comment 3 by bugdroid1@chromium.org, Aug 10 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d8e9a0d88ab866e34098a71f7e13ccea4ee868e6

commit d8e9a0d88ab866e34098a71f7e13ccea4ee868e6
Author: Andrew Grieve <agrieve@chromium.org>
Date: Thu Aug 10 05:11:33 2017

Apk wrapper scripts: Fix output_dir, use file caching, custom gdb libs dir

The output directory was just plain wrong.
File caching speeds up incremental install some.
Using a custom gdb directory makes for less re-downloading of libs.

BUG= 749239 

Change-Id: Ifb181a5d9218973d65e124f04bdb9e5fb94e75c1
Reviewed-on: https://chromium-review.googlesource.com/609162
Reviewed-by: Peter Wen <wnwen@chromium.org>
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#493242}
[modify] https://crrev.com/d8e9a0d88ab866e34098a71f7e13ccea4ee868e6/build/android/apk_operations.py
[modify] https://crrev.com/d8e9a0d88ab866e34098a71f7e13ccea4ee868e6/build/android/gyp/create_apk_operations_script.py

Project Member

Comment 4 by bugdroid1@chromium.org, Aug 11 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a54c4bd8807fa54a6b9fe5d5959270cfe5385f7f

commit a54c4bd8807fa54a6b9fe5d5959270cfe5385f7f
Author: Andrew Grieve <agrieve@chromium.org>
Date: Fri Aug 11 04:19:41 2017

Android: Use a .json file to record incremental install details

With the recent addition of apk wrapper scripts, the
bin/install_foo_incremental scripts are now just confusing.
This changes them to instead be .json files.

BUG= 749239 

Change-Id: Id58c4f5501ce485381d3f912291dbfa729e11e61
Reviewed-on: https://chromium-review.googlesource.com/609141
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: John Budorick <jbudorick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#493663}
[modify] https://crrev.com/a54c4bd8807fa54a6b9fe5d5959270cfe5385f7f/build/android/apk_operations.py
[modify] https://crrev.com/a54c4bd8807fa54a6b9fe5d5959270cfe5385f7f/build/android/gyp/create_apk_operations_script.py
[modify] https://crrev.com/a54c4bd8807fa54a6b9fe5d5959270cfe5385f7f/build/android/gyp/write_build_config.py
[delete] https://crrev.com/49f0e9e4a8dc3abea84013913a86184bd6f2fade/build/android/incremental_install/create_install_script.py
[modify] https://crrev.com/a54c4bd8807fa54a6b9fe5d5959270cfe5385f7f/build/android/incremental_install/installer.py
[add] https://crrev.com/a54c4bd8807fa54a6b9fe5d5959270cfe5385f7f/build/android/incremental_install/write_installer_json.py
[modify] https://crrev.com/a54c4bd8807fa54a6b9fe5d5959270cfe5385f7f/build/android/pylib/gtest/gtest_test_instance.py
[modify] https://crrev.com/a54c4bd8807fa54a6b9fe5d5959270cfe5385f7f/build/android/pylib/instrumentation/instrumentation_test_instance.py
[modify] https://crrev.com/a54c4bd8807fa54a6b9fe5d5959270cfe5385f7f/build/android/pylib/local/device/local_device_gtest_run.py
[modify] https://crrev.com/a54c4bd8807fa54a6b9fe5d5959270cfe5385f7f/build/android/pylib/local/device/local_device_instrumentation_test_run.py
[modify] https://crrev.com/a54c4bd8807fa54a6b9fe5d5959270cfe5385f7f/build/android/pylib/local/device/local_device_test_run.py
[modify] https://crrev.com/a54c4bd8807fa54a6b9fe5d5959270cfe5385f7f/build/android/test_runner.py
[modify] https://crrev.com/a54c4bd8807fa54a6b9fe5d5959270cfe5385f7f/build/android/test_runner.pydeps
[modify] https://crrev.com/a54c4bd8807fa54a6b9fe5d5959270cfe5385f7f/build/config/android/internal_rules.gni
[modify] https://crrev.com/a54c4bd8807fa54a6b9fe5d5959270cfe5385f7f/build/config/android/rules.gni

Project Member

Comment 5 by bugdroid1@chromium.org, Aug 11 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2de71eade34e55b034df7b016e3e66fc9673c303

commit 2de71eade34e55b034df7b016e3e66fc9673c303
Author: catapult-deps-roller@chromium.org <catapult-deps-roller@chromium.org>
Date: Fri Aug 11 16:54:37 2017

Roll src/third_party/catapult/ 0eeb5baed..7e08027e9 (15 commits)

https://chromium.googlesource.com/external/github.com/catapult-project/catapult.git/+log/0eeb5baed7a4..7e08027e9800

$ git log 0eeb5baed..7e08027e9 --date=short --no-merges --format='%ad %ae %s'
2017-08-11 perezju [experimental] Chrome on Android Go user stories
2017-08-11 jbudorick Revert of ApkHelper: Add GetViewActivityName(). Make GetActivityName() more strict (patchset #2 id:20001 of https://codereview.chromium.org/2994053002/ )
2017-08-11 perezju Revert of [devil] Extract logging common behavior to its own module. (patchset #3 id:40001 of https://codereview.chromium.org/2972253002/ )
2017-08-10 jbudorick [devil] Disable window animations in device provisioning.
2017-08-10 htwiggsmith Update tag filter to return all stories when no tags are selected
2017-08-10 dskiba Write startup HTML profile into the specified file.
2017-08-10 phsilva Gathering Device Information in Telemetry
2017-08-10 eakuefner [Catapult] Remove special-purpose diagnostic addition modules
2017-08-10 htwiggsmith Add some Google Analytics events to the dashboard
2017-08-10 benjhayden Rename diagnostic reserved names to camelCase.
2017-08-10 loloangela Fix errors related to invalid-name pt. 2
2017-08-10 loloangela Fix errors related to invalid-name pt. 1
2017-08-10 perezju [Telemetry] Change API of ShouldStopBrowserAfterStoryRun
2017-08-10 agrieve ApkHelper: Add GetViewActivityName(). Make GetActivityName() more strict
2017-08-10 jbudorick [devil] Extract logging common behavior to its own module.

Created with:
  roll-dep src/third_party/catapult
BUG=752963, 749239 ,753077, 748566 , 749239 


Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, see:
http://www.chromium.org/developers/tree-sheriffs/sheriff-details-chromium#TOC-Failures-due-to-DEPS-rolls


CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_optional_gpu_tests_rel
TBR=sullivan@chromium.org

Change-Id: Ie9e36907f7b9cfbef956a2c01eec99bd8d262e8f
Reviewed-on: https://chromium-review.googlesource.com/612370
Reviewed-by: <catapult-deps-roller@chromium.org>
Commit-Queue: <catapult-deps-roller@chromium.org>
Cr-Commit-Position: refs/heads/master@{#493775}
[modify] https://crrev.com/2de71eade34e55b034df7b016e3e66fc9673c303/DEPS

Project Member

Comment 6 by bugdroid1@chromium.org, Aug 11 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6f34424ff93b31f73b481b7e04ebba0e675983a3

commit 6f34424ff93b31f73b481b7e04ebba0e675983a3
Author: Andrew Grieve <agrieve@chromium.org>
Date: Fri Aug 11 19:21:56 2017

Revert "Android: Use a .json file to record incremental install details"

This reverts commit a54c4bd8807fa54a6b9fe5d5959270cfe5385f7f.

Reason for revert: Broke incremental test runner scripts

Original change's description:
> Android: Use a .json file to record incremental install details
> 
> With the recent addition of apk wrapper scripts, the
> bin/install_foo_incremental scripts are now just confusing.
> This changes them to instead be .json files.
> 
> BUG= 749239 
> 
> Change-Id: Id58c4f5501ce485381d3f912291dbfa729e11e61
> Reviewed-on: https://chromium-review.googlesource.com/609141
> Commit-Queue: Andrew Grieve <agrieve@chromium.org>
> Reviewed-by: John Budorick <jbudorick@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#493663}

TBR=agrieve@chromium.org,jbudorick@chromium.org

Change-Id: I7382c38378838433fceaf675552f7a7f1720c675
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug:  749239 
Reviewed-on: https://chromium-review.googlesource.com/612189
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#493831}
[modify] https://crrev.com/6f34424ff93b31f73b481b7e04ebba0e675983a3/build/android/apk_operations.py
[modify] https://crrev.com/6f34424ff93b31f73b481b7e04ebba0e675983a3/build/android/gyp/create_apk_operations_script.py
[modify] https://crrev.com/6f34424ff93b31f73b481b7e04ebba0e675983a3/build/android/gyp/write_build_config.py
[add] https://crrev.com/6f34424ff93b31f73b481b7e04ebba0e675983a3/build/android/incremental_install/create_install_script.py
[modify] https://crrev.com/6f34424ff93b31f73b481b7e04ebba0e675983a3/build/android/incremental_install/installer.py
[delete] https://crrev.com/fe3eca658d823618f49a923763a997a8789cde5d/build/android/incremental_install/write_installer_json.py
[modify] https://crrev.com/6f34424ff93b31f73b481b7e04ebba0e675983a3/build/android/pylib/gtest/gtest_test_instance.py
[modify] https://crrev.com/6f34424ff93b31f73b481b7e04ebba0e675983a3/build/android/pylib/instrumentation/instrumentation_test_instance.py
[modify] https://crrev.com/6f34424ff93b31f73b481b7e04ebba0e675983a3/build/android/pylib/local/device/local_device_gtest_run.py
[modify] https://crrev.com/6f34424ff93b31f73b481b7e04ebba0e675983a3/build/android/pylib/local/device/local_device_instrumentation_test_run.py
[modify] https://crrev.com/6f34424ff93b31f73b481b7e04ebba0e675983a3/build/android/pylib/local/device/local_device_test_run.py
[modify] https://crrev.com/6f34424ff93b31f73b481b7e04ebba0e675983a3/build/android/test_runner.py
[modify] https://crrev.com/6f34424ff93b31f73b481b7e04ebba0e675983a3/build/android/test_runner.pydeps
[modify] https://crrev.com/6f34424ff93b31f73b481b7e04ebba0e675983a3/build/config/android/internal_rules.gni
[modify] https://crrev.com/6f34424ff93b31f73b481b7e04ebba0e675983a3/build/config/android/rules.gni

Project Member

Comment 7 by bugdroid1@chromium.org, Aug 11 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2ec70f330246b17f3806f56e93b9357a5e1f05bc

commit 2ec70f330246b17f3806f56e93b9357a5e1f05bc
Author: Andrew Grieve <agrieve@chromium.org>
Date: Fri Aug 11 20:47:43 2017

Reland: Android: Use a .json file to record incremental install details

This reverts commit 6f34424ff93b31f73b481b7e04ebba0e675983a3.

Reason for reland: Fixes test run scripts

With the recent addition of apk wrapper scripts, the
bin/install_foo_incremental scripts are now just confusing.
This changes them to instead be .json files.

Change-Id: I32b29b7a464697004b5d7eda57cc04e61a81d763
No-Try: true
Bug:  749239 
Reviewed-on: https://chromium-review.googlesource.com/612190
Reviewed-by: John Budorick <jbudorick@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#493844}
[modify] https://crrev.com/2ec70f330246b17f3806f56e93b9357a5e1f05bc/build/android/apk_operations.py
[modify] https://crrev.com/2ec70f330246b17f3806f56e93b9357a5e1f05bc/build/android/gyp/create_apk_operations_script.py
[modify] https://crrev.com/2ec70f330246b17f3806f56e93b9357a5e1f05bc/build/android/gyp/create_test_runner_script.py
[modify] https://crrev.com/2ec70f330246b17f3806f56e93b9357a5e1f05bc/build/android/gyp/write_build_config.py
[delete] https://crrev.com/5d3d8140989b31a392735887adfb0f253faceaea/build/android/incremental_install/create_install_script.py
[modify] https://crrev.com/2ec70f330246b17f3806f56e93b9357a5e1f05bc/build/android/incremental_install/installer.py
[add] https://crrev.com/2ec70f330246b17f3806f56e93b9357a5e1f05bc/build/android/incremental_install/write_installer_json.py
[modify] https://crrev.com/2ec70f330246b17f3806f56e93b9357a5e1f05bc/build/android/pylib/gtest/gtest_test_instance.py
[modify] https://crrev.com/2ec70f330246b17f3806f56e93b9357a5e1f05bc/build/android/pylib/instrumentation/instrumentation_test_instance.py
[modify] https://crrev.com/2ec70f330246b17f3806f56e93b9357a5e1f05bc/build/android/pylib/local/device/local_device_gtest_run.py
[modify] https://crrev.com/2ec70f330246b17f3806f56e93b9357a5e1f05bc/build/android/pylib/local/device/local_device_instrumentation_test_run.py
[modify] https://crrev.com/2ec70f330246b17f3806f56e93b9357a5e1f05bc/build/android/pylib/local/device/local_device_test_run.py
[modify] https://crrev.com/2ec70f330246b17f3806f56e93b9357a5e1f05bc/build/android/test_runner.py
[modify] https://crrev.com/2ec70f330246b17f3806f56e93b9357a5e1f05bc/build/android/test_runner.pydeps
[modify] https://crrev.com/2ec70f330246b17f3806f56e93b9357a5e1f05bc/build/config/android/internal_rules.gni
[modify] https://crrev.com/2ec70f330246b17f3806f56e93b9357a5e1f05bc/build/config/android/rules.gni

Project Member

Comment 8 by bugdroid1@chromium.org, Aug 12 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c5b4b8c6ac8c00c744e65916d13e041e35c39611

commit c5b4b8c6ac8c00c744e65916d13e041e35c39611
Author: catapult-deps-roller@chromium.org <catapult-deps-roller@chromium.org>
Date: Sat Aug 12 02:05:34 2017

Roll src/third_party/catapult/ b55e40d94..5db51352a (6 commits)

https://chromium.googlesource.com/external/github.com/catapult-project/catapult.git/+log/b55e40d94068..5db51352aa5c

$ git log b55e40d94..5db51352a --date=short --no-merges --format='%ad %ae %s'
2017-08-11 kraynov Android systrace: atrace_helper /proc/meminfo global stats.
2017-08-11 ashleymarie Temporary fix for multiple passes to mean pass not flaky
2017-08-11 benjhayden Split TelemetryInfo into separate diagnostics.
2017-08-11 benjhayden Remove HistogramSet support from compare_samples.
2017-08-11 htwiggsmith Integrate tag filter into test picker
2017-08-11 agrieve Reland of ApkHelper: Add GetViewActivityName(). Make GetActivityName() more strict

Created with:
  roll-dep src/third_party/catapult
BUG=754825, 749239 


Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, see:
http://www.chromium.org/developers/tree-sheriffs/sheriff-details-chromium#TOC-Failures-due-to-DEPS-rolls


CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_optional_gpu_tests_rel
TBR=sullivan@chromium.org

Change-Id: If61ff1ad45ae5736538fdc58e6890741ced4177d
Reviewed-on: https://chromium-review.googlesource.com/612677
Reviewed-by: <catapult-deps-roller@chromium.org>
Commit-Queue: <catapult-deps-roller@chromium.org>
Cr-Commit-Position: refs/heads/master@{#493937}
[modify] https://crrev.com/c5b4b8c6ac8c00c744e65916d13e041e35c39611/DEPS

Project Member

Comment 9 by bugdroid1@chromium.org, Aug 14 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5ea0fac1b2f7415d14aab0048b8db74835924532

commit 5ea0fac1b2f7415d14aab0048b8db74835924532
Author: Andrew Grieve <agrieve@chromium.org>
Date: Mon Aug 14 17:18:45 2017

Make apk wrapper scripts target specific Activity for launch

Now when multiple browser are installed, it doesn't show the app picker.

Bug:  749239 
Change-Id: Id750e600892c328d2a19a5c68ea822923d0b7a8e
Reviewed-on: https://chromium-review.googlesource.com/612430
Reviewed-by: John Budorick <jbudorick@chromium.org>
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#494084}
[modify] https://crrev.com/5ea0fac1b2f7415d14aab0048b8db74835924532/build/android/apk_operations.py

Status: Started (was: Available)

Comment 11 by wnwen@chromium.org, Aug 17 2017

Cc: wnwen@chromium.org
Project Member

Comment 12 by bugdroid1@chromium.org, Aug 17 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6e034f741663115de8c0f1577f7d00989b753ca9

commit 6e034f741663115de8c0f1577f7d00989b753ca9
Author: Andrew Grieve <agrieve@chromium.org>
Date: Thu Aug 17 19:01:36 2017

Make "out/Debug/bin/system_webview_apk argv" work

By telling GN what the flags file is.

Bug:  749239 
Change-Id: Ibb13ad0389fc88c3c94e120ef33d5f1f7d3a6665
Reviewed-on: https://chromium-review.googlesource.com/616206
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Richard Coles <torne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#495264}
[modify] https://crrev.com/6e034f741663115de8c0f1577f7d00989b753ca9/android_webview/system_webview_apk_tmpl.gni

Project Member

Comment 13 by bugdroid1@chromium.org, Aug 22 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/711b3f2fc767848a1cff0f180640b85ed5cf06d7

commit 711b3f2fc767848a1cff0f180640b85ed5cf06d7
Author: Andrew Grieve <agrieve@chromium.org>
Date: Tue Aug 22 14:07:39 2017

apk_operations: Add shell, ps, mem-usage

Additionally:
 * Fixes the device cache complaining about being out-of-date when the
   --all error is shown.
 * Adds a bit of color

Bug:  749239 
Change-Id: I07a572b3bbf2d1f0b9760adc07383193a67d076c
Reviewed-on: https://chromium-review.googlesource.com/615126
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: John Budorick <jbudorick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#496297}
[modify] https://crrev.com/711b3f2fc767848a1cff0f180640b85ed5cf06d7/build/android/apk_operations.py
[modify] https://crrev.com/711b3f2fc767848a1cff0f180640b85ed5cf06d7/build/android/gyp/create_apk_operations_script.py
[modify] https://crrev.com/711b3f2fc767848a1cff0f180640b85ed5cf06d7/build/config/android/rules.gni

Project Member

Comment 14 by bugdroid1@chromium.org, Aug 22 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1a11ed901e72565077a6d4b86675e9715900ecf3

commit 1a11ed901e72565077a6d4b86675e9715900ecf3
Author: Andrew Grieve <agrieve@chromium.org>
Date: Tue Aug 22 17:42:30 2017

apk_operations: Add commands: compile-dex, disk-usage

Bug:  749239 
Change-Id: I3495fa9b0804f63c17a06e6858525acd37a0d0fe
Reviewed-on: https://chromium-review.googlesource.com/619254
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: John Budorick <jbudorick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#496356}
[modify] https://crrev.com/1a11ed901e72565077a6d4b86675e9715900ecf3/build/android/apk_operations.py

Comment 15 by wnwen@chromium.org, Aug 23 2017

Tried out LogcatMonitor, seems to come with a lot of caveats. Namely it does record logcat, but it doesn't seem to be designed for ongoing monitoring. Is the operation desired as follows?

- User calls 'wrapper logcat'
- Logcat is cleared
- Any future logcat is filtered by any pid corresponding to 'wrapper ps'
  - In our case it would mean any logs from chrome processes
- User exits with Ctrl-C
Project Member

Comment 16 by bugdroid1@chromium.org, Aug 23 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c00a2c04ec5ed420c4f9591b87324cea19b6d999

commit c00a2c04ec5ed420c4f9591b87324cea19b6d999
Author: Andrew Grieve <agrieve@chromium.org>
Date: Wed Aug 23 21:59:57 2017

Delete helpers in //build/android obsoleted by apk_operations.py

Bug:  749239 
Change-Id: Ibc5df0c9124aac60e2aea98ea47e4d394f64733d
Reviewed-on: https://chromium-review.googlesource.com/616380
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: John Budorick <jbudorick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#496825}
[modify] https://crrev.com/c00a2c04ec5ed420c4f9591b87324cea19b6d999/build/android/BUILD.gn
[delete] https://crrev.com/08d97f5965742fe22a88ae3d3799973176de3664/build/android/adb_android_webview_command_line
[delete] https://crrev.com/08d97f5965742fe22a88ae3d3799973176de3664/build/android/adb_cast_shell_command_line
[delete] https://crrev.com/08d97f5965742fe22a88ae3d3799973176de3664/build/android/adb_content_shell_command_line
[delete] https://crrev.com/08d97f5965742fe22a88ae3d3799973176de3664/build/android/adb_device_functions.sh
[delete] https://crrev.com/08d97f5965742fe22a88ae3d3799973176de3664/build/android/adb_gdb_android_webview_shell
[delete] https://crrev.com/08d97f5965742fe22a88ae3d3799973176de3664/build/android/adb_gdb_chrome_public
[delete] https://crrev.com/08d97f5965742fe22a88ae3d3799973176de3664/build/android/adb_gdb_content_shell
[delete] https://crrev.com/08d97f5965742fe22a88ae3d3799973176de3664/build/android/adb_gdb_cronet_sample
[delete] https://crrev.com/08d97f5965742fe22a88ae3d3799973176de3664/build/android/adb_gdb_mojo_shell
[delete] https://crrev.com/08d97f5965742fe22a88ae3d3799973176de3664/build/android/adb_kill_android_webview_shell
[delete] https://crrev.com/08d97f5965742fe22a88ae3d3799973176de3664/build/android/adb_kill_chrome_public
[delete] https://crrev.com/08d97f5965742fe22a88ae3d3799973176de3664/build/android/adb_kill_content_shell
[delete] https://crrev.com/08d97f5965742fe22a88ae3d3799973176de3664/build/android/adb_run_android_webview_shell
[delete] https://crrev.com/08d97f5965742fe22a88ae3d3799973176de3664/build/android/adb_run_chrome_public
[delete] https://crrev.com/08d97f5965742fe22a88ae3d3799973176de3664/build/android/adb_run_content_shell
[delete] https://crrev.com/08d97f5965742fe22a88ae3d3799973176de3664/build/android/adb_run_mojo_shell
[delete] https://crrev.com/08d97f5965742fe22a88ae3d3799973176de3664/build/android/adb_run_system_webview_shell
[delete] https://crrev.com/08d97f5965742fe22a88ae3d3799973176de3664/build/android/enable_asserts.py

Re #15:
Yeah, seems like LogcatMonitor isn't really what we want then. Probably we should just call adb_wrapper.Logcat() directly.

- I would like the logcat to *not* be cleared, but do want it to show only from now on. For newer android versions, we can use -T1 flag. For older android versions, we can run "adb shell log START_HERE", and then ignore all lines from the output until we find START_HERE.

- To filter by PID:
  - Keep a map of pid->should_show
  - Every time a log line comes in with a pid not in the map, run GetPids() to see if the pid belongs to Chrome
  - Alternative, we could run "adb shell dumpsys package $PACKAGE_ID" to get a list of user IDs for the package,
    - Then run "adb shell ps -p $PID" to figure out which user owns the process

Exit via Ctrl-C

Comment 18 by wnwen@chromium.org, Aug 24 2017

Sounds doable, let's just call logcat directly then. Not clearing sounds better, that way we don't erase possibly useful logcat accidentally. We can have an option like -c to pass through and clear if that's really desired.

Hmm... I might go with the simplier should_show option for now and switch if GetPids() is really slow.

Comment 19 by wnwen@chromium.org, Aug 24 2017

Blockedon: 758670
Project Member

Comment 20 by bugdroid1@chromium.org, Aug 25 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0ffb5547ab782127323bf647a7deea4c7ae15483

commit 0ffb5547ab782127323bf647a7deea4c7ae15483
Author: Andrew Grieve <agrieve@chromium.org>
Date: Fri Aug 25 22:18:25 2017

apk_operations: Allow script to be executed directly.

Might be convenient to not always have to build wrappers.

Bug:  749239 
Change-Id: I5b81e5ca5060e5a5ad222f29649a3bfe622da73a
Reviewed-on: https://chromium-review.googlesource.com/627196
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: John Budorick <jbudorick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#497560}
[modify] https://crrev.com/0ffb5547ab782127323bf647a7deea4c7ae15483/build/android/apk_operations.py

Project Member

Comment 21 by bugdroid1@chromium.org, Aug 29 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/22b2d80f565c5459049d1a24841102065d5770e5

commit 22b2d80f565c5459049d1a24841102065d5770e5
Author: Andrew Grieve <agrieve@chromium.org>
Date: Tue Aug 29 15:33:32 2017

apk_operations.py: Fix "ps" when only incremental apk is built

Bug:  749239 
Change-Id: Ief8e4a7fc9d0ca33cc09588c59fe6551a3825abf
Reviewed-on: https://chromium-review.googlesource.com/639991
Reviewed-by: Peter Wen <wnwen@chromium.org>
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#498116}
[modify] https://crrev.com/22b2d80f565c5459049d1a24841102065d5770e5/build/android/apk_operations.py

Project Member

Comment 22 by bugdroid1@chromium.org, Aug 29 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5f6dca0acc24e5e7f19d06597a3997d608538dd6

commit 5f6dca0acc24e5e7f19d06597a3997d608538dd6
Author: Peter Wen <wnwen@chromium.org>
Date: Tue Aug 29 16:03:09 2017

Android: Fix non-incremental apk operation ps

Specifying subparser's 'apk_path' overrode parent parser's default for
that same argument, causing it to be None for commands like ps.

BUG= 749239 

Change-Id: I800dfd936b94aeca6763c555eaa4b12cccf1bc45
Reviewed-on: https://chromium-review.googlesource.com/639612
Commit-Queue: Peter Wen <wnwen@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#498125}
[modify] https://crrev.com/5f6dca0acc24e5e7f19d06597a3997d608538dd6/build/android/apk_operations.py

Project Member

Comment 23 by bugdroid1@chromium.org, Aug 29 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/41d65d426a3b79bf858078d523090e230756d35d

commit 41d65d426a3b79bf858078d523090e230756d35d
Author: Peter E Conn <peconn@chromium.org>
Date: Tue Aug 29 16:22:29 2017

apk_operations.py: Re-add "run" option.

It was accidentally removed in:
  https://chromium-review.googlesource.com/c/chromium/src/+/627196

Bug:  749239 
Change-Id: I3d62c4b5e2890713e6d39d2cbc93d1c42b3fc078
Reviewed-on: https://chromium-review.googlesource.com/640701
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Commit-Queue: Peter Conn <peconn@chromium.org>
Cr-Commit-Position: refs/heads/master@{#498132}
[modify] https://crrev.com/41d65d426a3b79bf858078d523090e230756d35d/build/android/apk_operations.py

Project Member

Comment 24 by bugdroid1@chromium.org, Aug 30 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a3583091cadb3dcafcbcc4dbaee83ef4d6a47006

commit a3583091cadb3dcafcbcc4dbaee83ef4d6a47006
Author: Andrew Grieve <agrieve@chromium.org>
Date: Wed Aug 30 00:59:17 2017

apk_operations.py: Fix incremental install claiming apk is not built

Broken by 22b2d80

TBR=wnwen
NOTRY=true

Bug:  749239 
Change-Id: Iff01932e5543498046cc740504fa680e2c0c6576
Reviewed-on: https://chromium-review.googlesource.com/642529
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#498320}
[modify] https://crrev.com/a3583091cadb3dcafcbcc4dbaee83ef4d6a47006/build/android/apk_operations.py

Project Member

Comment 25 by bugdroid1@chromium.org, Sep 2 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ab889f118b4ff8e994894a7210bab89523310be9

commit ab889f118b4ff8e994894a7210bab89523310be9
Author: Andrew Grieve <agrieve@chromium.org>
Date: Sat Sep 02 01:09:14 2017

apk_operations.py: Add "devices" command, for listing devices

I find I often forget which device serial maps to which Android OS
version (which "adb devices -l" does not tell you).

Bug:  749239 
Change-Id: I83df804427da9953e7253c744b1109f2d1ddc7a5
Reviewed-on: https://chromium-review.googlesource.com/648091
Reviewed-by: Eric Stevenson <estevenson@chromium.org>
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#499365}
[modify] https://crrev.com/ab889f118b4ff8e994894a7210bab89523310be9/build/android/apk_operations.py

Status: Fixed (was: Started)
Project Member

Comment 27 by bugdroid1@chromium.org, Jun 27 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e9e46b9ee6f7b9b6bb5334854faa6545bbb5df0d

commit e9e46b9ee6f7b9b6bb5334854faa6545bbb5df0d
Author: Sam Maier <smaier@chromium.org>
Date: Wed Jun 27 13:37:04 2018

Raising timeout on slow compile dex command

Bug:  749239 
Change-Id: Id7b49e187deb91d8201d45029f58ef84f97fae3e
Reviewed-on: https://chromium-review.googlesource.com/1115515
Reviewed-by: agrieve <agrieve@chromium.org>
Commit-Queue: Sam Maier <smaier@chromium.org>
Cr-Commit-Position: refs/heads/master@{#570746}
[modify] https://crrev.com/e9e46b9ee6f7b9b6bb5334854faa6545bbb5df0d/build/android/apk_operations.py

Sign in to add a comment