Commit e9a4662f authored by Andrew Grieve's avatar Andrew Grieve Committed by Commit Bot

SuperSize: Use a fallback apkanalyzer path when sdk is missing the tool

Turns out downstream sdk tools is too old and doesn't have the tool.

Change-Id: I4a08d1658854647f473923263137530c7910deba
Reviewed-on: https://chromium-review.googlesource.com/995583Reviewed-by: default avatarPeter Wen <wnwen@chromium.org>
Commit-Queue: agrieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#548055}
parent 20a0254e
...@@ -162,9 +162,14 @@ def GetNmPath(tool_prefix): ...@@ -162,9 +162,14 @@ def GetNmPath(tool_prefix):
def GetApkAnalyzerPath(output_directory): def GetApkAnalyzerPath(output_directory):
build_vars = _LoadBuildVars(output_directory) build_vars = _LoadBuildVars(output_directory)
return os.path.normpath(os.path.join( sdk_analyzer = os.path.normpath(os.path.join(
output_directory, build_vars['android_sdk_root'], 'tools', 'bin', output_directory, build_vars['android_sdk_root'], 'tools', 'bin',
'apkanalyzer')) 'apkanalyzer'))
if os.path.exists(sdk_analyzer):
return sdk_analyzer
# Older SDKs do not contain the tool, so fall back to the one we know exists.
return os.path.join(SRC_ROOT, 'third_party', 'android_tools', 'sdk',
'tools', 'bin', 'apkanalyzer')
def GetObjDumpPath(tool_prefix): def GetObjDumpPath(tool_prefix):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment