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

Side by Side Diff: build/android/pylib/__init__.py

Issue 16360003: Android: allows using adb from a chromium checkout without envsetup.sh (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: inline constant Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | build/android/pylib/android_commands.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4
5 import os
6 import subprocess
7 import sys
8
9
10 if sys.platform == 'linux2' and not os.environ.get('ANDROID_SDK_ROOT'):
11 # If envsetup.sh hasn't been sourced and there's no adb in the path,
12 # set it here.
13 try:
14 with file(os.devnull, 'w') as devnull:
15 subprocess.call(['adb', 'version'], stdout=devnull, stderr=devnull)
16 except OSError:
17 print 'No adb found in $PATH, fallback to checked in binary.'
18 os.environ['PATH'] += os.pathsep + os.path.abspath(os.path.join(
19 os.path.dirname(__file__),
20 '..', '..', '..',
21 'third_party', 'android_tools', 'sdk', 'platform-tools'))
OLDNEW
« no previous file with comments | « no previous file | build/android/pylib/android_commands.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698