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

Side by Side Diff: build/android/gyp/apk_install.py

Issue 13269002: Allow the build to install apks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | build/common.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/usr/bin/env python
2 #
3 # Copyright 2013 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file.
6
7 """Installs an APK.
8
9 """
10
11 import optparse
12 import os
13 import subprocess
14 import sys
15
16 BUILD_ANDROID_DIR = os.path.join(os.path.dirname(__file__), '..')
17 sys.path.append(BUILD_ANDROID_DIR)
18
19 from pylib import build_utils
20
21
22 def main(argv):
23 parser = optparse.OptionParser()
24 parser.add_option('--android-sdk-tools',
25 help='Path to Android SDK tools.')
26 parser.add_option('--apk-path',
27 help='Path to .apk to install.')
28 parser.add_option('--stamp',
29 help='Path to touch on success.')
30 options, _ = parser.parse_args()
31
32 # TODO(cjhopman): Should this install to all devices/be configurable?
33 install_cmd = [
34 os.path.join(options.android_sdk_tools, 'adb'),
35 'install', '-r',
36 options.apk_path]
37
38 subprocess.check_call(install_cmd)
39
40 if options.stamp:
41 build_utils.Touch(options.stamp)
42
43
44 if __name__ == '__main__':
45 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « no previous file | build/common.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698