diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2017-06-01 07:33:07 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2017-06-01 07:33:07 +0000 |
commit | 53c627bdc205835f80d9c84706becebe86302db9 (patch) | |
tree | 16cbc42364994cee6f0479f575e906f7dcad4755 | |
parent | 899300e9d621866969fab2eb2bf3baaef44aeba7 (diff) | |
parent | 9c29690314577c966c69c481547d3c376abb257f (diff) | |
download | devlib-oreo-dr1-release.tar.gz |
release-request-e5546013-e96c-4ee5-90aa-42a79d072375-for-git_oc-dr1-release-4057695 snap-temp-L89700000069427448android-8.0.0_r34android-8.0.0_r33android-8.0.0_r27android-8.0.0_r26android-8.0.0_r25android-8.0.0_r24android-8.0.0_r23android-8.0.0_r22android-8.0.0_r21oreo-dr3-releaseoreo-dr2-releaseoreo-dr1-release
Change-Id: I948ea4fc263612fc0143707023ddd06e048dfb97
-rw-r--r-- | devlib/utils/android.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/devlib/utils/android.py b/devlib/utils/android.py index bd49ea4..be8b960 100644 --- a/devlib/utils/android.py +++ b/devlib/utils/android.py @@ -451,7 +451,15 @@ def _initialize_without_android_home(env): logger.debug('Discovering ANDROID_HOME from adb path.') env.platform_tools = os.path.dirname(adb_full_path) env.android_home = os.path.dirname(env.platform_tools) - _init_common(env) + try: + _init_common(env) + except: + env.aapt = which('aapt') + if env.aapt: + logger.info('Using aapt: ' + env.aapt) + else: + raise RuntimeError('aapt not found, try setting ANDROID_HOME to \ + Android SDK or run LISA from android environment') return env |