| Index: sky/tools/android_library_cacher.py
|
| diff --git a/sky/tools/android_library_cacher.py b/sky/tools/android_library_cacher.py
|
| index 5cedc1985ebc5fa0fb096a4864b0c923e1213a70..db80d18cf13bd6eabbab2d5b194b55f93015e82d 100755
|
| --- a/sky/tools/android_library_cacher.py
|
| +++ b/sky/tools/android_library_cacher.py
|
| @@ -10,6 +10,10 @@ import os
|
| import logging
|
| import subprocess
|
|
|
| +SRC_ROOT = skypy.paths.Paths('ignored').src_root
|
| +ADB_PATH = os.path.join(SRC_ROOT,
|
| + 'third_party/android_tools/sdk/platform-tools/adb')
|
| +
|
|
|
| # TODO(eseidel): This should be shared with adb_gdb
|
| def main():
|
| @@ -23,14 +27,14 @@ def main():
|
| if not os.path.exists(args.cache_root):
|
| os.makedirs(args.cache_root)
|
|
|
| - subprocess.check_call(['adb', 'root'])
|
| + subprocess.check_call([ADB_PATH, 'root'])
|
|
|
| # TODO(eseidel): Check the build.props, or find some way to avoid
|
| # re-pulling every library every time. adb_gdb has code to do this
|
| # but doesn't seem to notice when the set of needed libraries changed.
|
|
|
| library_regexp = re.compile(r'(?P<library_path>/system/.*\.so)')
|
| - cat_maps_cmd = ['adb', 'shell', 'cat', '/proc/%s/maps' % args.pid]
|
| + cat_maps_cmd = [ADB_PATH, 'shell', 'cat', '/proc/%s/maps' % args.pid]
|
| maps_lines = subprocess.check_output(cat_maps_cmd).strip().split('\n')
|
| # adb shell doesn't return the return code from the shell?
|
| if not maps_lines or 'No such file or directory' in maps_lines[0]:
|
| @@ -53,7 +57,7 @@ def main():
|
| if not os.path.exists(dest_dir):
|
| os.makedirs(dest_dir)
|
| print '%s -> %s' % (library_path, dest_file)
|
| - pull_cmd = ['adb', 'pull', library_path, dest_file]
|
| + pull_cmd = [ADB_PATH, 'pull', library_path, dest_file]
|
| subprocess.check_call(pull_cmd, stderr=dev_null)
|
|
|
|
|
|
|