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

Unified Diff: sky/tools/android_library_cacher.py

Issue 880143002: Remove skydb dependency on build/android/pylib (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | sky/tools/skydb » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
« no previous file with comments | « no previous file | sky/tools/skydb » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698