From d5460e1185bdccb08a55d9a21debcfb457d9cd4d Mon Sep 17 00:00:00 2001 From: Sergei Trofimov Date: Tue, 13 Dec 2016 11:26:32 +0000 Subject: [PATCH] android: pick ANDROID_HOME/platform-tools over PATH When ANDROID_HOME is defined, ANDROID_HOME/platform-tools was appended to the PATH in the environment of the Python interpreter. That meant that if an adb binary was in PATH, it would be picked in preference to the one under ANDROID_HOME. This is now reversed so that ANDROID_HOME takes precedence. --- devlib/utils/android.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devlib/utils/android.py b/devlib/utils/android.py index 6e56c58..1a195a6 100644 --- a/devlib/utils/android.py +++ b/devlib/utils/android.py @@ -424,7 +424,7 @@ def _initialize_with_android_home(env): logger.debug('Using ANDROID_HOME from the environment.') env.android_home = android_home env.platform_tools = os.path.join(android_home, 'platform-tools') - os.environ['PATH'] += os.pathsep + env.platform_tools + os.environ['PATH'] = env.platform_tools + os.pathsep + os.environ['PATH'] _init_common(env) return env