| Index: build/android/adb_install_apk.py
|
| diff --git a/build/android/adb_install_apk.py b/build/android/adb_install_apk.py
|
| index ea39aeaa6fe1e33941ea75048eeccab73eae0846..5d0fd171494090e70247d0552a4cf3d4f2bb6c33 100755
|
| --- a/build/android/adb_install_apk.py
|
| +++ b/build/android/adb_install_apk.py
|
| @@ -37,6 +37,8 @@ def AddInstallAPKOption(option_parser):
|
| dest='build_type',
|
| help='If set, run test suites under out/Release. '
|
| 'Default is env var BUILDTYPE or Debug.')
|
| + option_parser.add_option('-d', '--device', dest='device',
|
| + help='Target device for apk to install on.')
|
|
|
|
|
| def ValidateInstallAPKOption(option_parser, options, args):
|
| @@ -70,6 +72,13 @@ def main(argv):
|
| ValidateInstallAPKOption(parser, options, args)
|
|
|
| devices = android_commands.GetAttachedDevices()
|
| +
|
| + if options.device:
|
| + if options.device not in devices:
|
| + raise Exception('Error: %s not in attached devices %s' % (options.device,
|
| + ','.join(devices)))
|
| + devices = [options.device]
|
| +
|
| if not devices:
|
| raise Exception('Error: no connected devices')
|
|
|
|
|