Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(297)

Issue 16831013: [Android] Add an action to check/record attached devices (Closed)

Created:
7 years, 6 months ago by cjhopman
Modified:
7 years, 5 months ago
Reviewers:
shashi, Yaron
CC:
chromium-reviews, craigdh+watch_chromium.org, bulach+watch_chromium.org, yfriedman+watch_chromium.org, ilevy-cc_chromium.org, klundberg+watch_chromium.org, frankf+watch_chromium.org
Visibility:
Public.

Description

[Android] Add an action to check/record attached devices When doing a gyp_managed_install, we install APKs to the attached device. Currently this can fail in many ways (no device attached, multiple devices attached, device offline, device doesn't have root, etc.). In addition, we need to detect changes to the attached device (particularly when the device is switched, when an APK is uninstalled/updated). The current approach is to check all this information in the action interacting with the device. This means that when there is some problem we print the same warning messages for every APK that is built, and, in some cases, multiple times for each APK. Also, we have to run every install/push action every build because we detect changes to the attached device in that action. This change creates a new build action, "get device configurations". This action inspects the attached devices, filters out offline devices, filters out devices without root, and then writes a configuration file with the id+metadata for the first non-filtered device. This configuration is then used by each of the build steps that interacts with the device. This consolidates all the device checking to a single place, and the build actions don't need to do any checking. In addition, to detect changes in the attached device, we only need to run this single action every build and the install/push actions will only change when the device/metadata changes. Also, with this change we can now gracefully handle the case where multiple devices are attached (currently just write the configuration for the first valid device and install to that one). Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=209582

Patch Set 1 : #

Total comments: 18

Patch Set 2 : #

Patch Set 3 : Rebase #

Patch Set 4 : remove redundant check #

Patch Set 5 : Rebase #

Patch Set 6 : Blah #

Unified diffs Side-by-side diffs Delta from patch set Stats (+252 lines, -71 lines) Patch
M build/android/gyp/apk_install.py View 1 2 3 5 chunks +17 lines, -28 lines 0 comments Download
M build/android/gyp/create_device_library_links.py View 1 4 chunks +13 lines, -12 lines 0 comments Download
A build/android/gyp/get_device_configuration.py View 1 chunk +75 lines, -0 lines 0 comments Download
M build/android/gyp/push_libraries.py View 1 4 chunks +11 lines, -15 lines 0 comments Download
A build/android/gyp/util/build_device.py View 1 2 3 4 5 1 chunk +98 lines, -0 lines 0 comments Download
M build/android/push_libraries.gypi View 1 chunk +2 lines, -5 lines 0 comments Download
M build/android/setup.gyp View 2 chunks +26 lines, -5 lines 0 comments Download
M build/common.gypi View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M build/java_apk.gypi View 1 4 chunks +6 lines, -6 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
cjhopman
7 years, 6 months ago (2013-06-19 22:57:47 UTC) #1
shashi
https://chromiumcodereview.appspot.com/16831013/diff/2001/build/android/gyp/apk_install.py File build/android/gyp/apk_install.py (right): https://chromiumcodereview.appspot.com/16831013/diff/2001/build/android/gyp/apk_install.py#newcode26 build/android/gyp/apk_install.py:26: def GetNewMetadata(bd, apk_package): A more descriptive name than bd, ...
7 years, 6 months ago (2013-06-20 03:16:19 UTC) #2
cjhopman
https://codereview.chromium.org/16831013/diff/2001/build/android/gyp/apk_install.py File build/android/gyp/apk_install.py (right): https://codereview.chromium.org/16831013/diff/2001/build/android/gyp/apk_install.py#newcode26 build/android/gyp/apk_install.py:26: def GetNewMetadata(bd, apk_package): On 2013/06/20 03:16:19, shashi wrote: > ...
7 years, 6 months ago (2013-06-25 16:43:10 UTC) #3
shashi
lgtm https://codereview.chromium.org/16831013/diff/2001/build/android/gyp/util/build_device.py File build/android/gyp/util/build_device.py (right): https://codereview.chromium.org/16831013/diff/2001/build/android/gyp/util/build_device.py#newcode64 build/android/gyp/util/build_device.py:64: has_root = adb.EnableAdbRoot() OK, did not realise it ...
7 years, 6 months ago (2013-06-25 17:23:30 UTC) #4
cjhopman
yfriedman@ for OWNERS
7 years, 5 months ago (2013-07-01 20:17:44 UTC) #5
Yaron
rs lgtm
7 years, 5 months ago (2013-07-01 20:42:53 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/cjhopman@chromium.org/16831013/41001
7 years, 5 months ago (2013-07-01 22:04:01 UTC) #7
commit-bot: I haz the power
Retried try job too often on chromium_presubmit for step(s) presubmit http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=chromium_presubmit&number=13325
7 years, 5 months ago (2013-07-01 22:12:54 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/cjhopman@chromium.org/16831013/51001
7 years, 5 months ago (2013-07-01 22:23:48 UTC) #9
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 5 months ago (2013-07-01 22:42:50 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/cjhopman@chromium.org/16831013/51001
7 years, 5 months ago (2013-07-01 23:29:02 UTC) #11
commit-bot: I haz the power
7 years, 5 months ago (2013-07-02 01:52:34 UTC) #12
Message was sent while issue was closed.
Change committed as 209582

Powered by Google App Engine
This is Rietveld 408576698