Also use adb via a full path

This commit is contained in:
Daniel Martí 2014-07-03 18:21:33 +02:00
parent 3dbf99a7f2
commit a8d4c8705f
2 changed files with 5 additions and 2 deletions

View file

@ -136,6 +136,9 @@ def read_config(opts, config_file='config.py'):
'android': [ 'android': [
os.path.join(config['sdk_path'], 'tools', 'android'), os.path.join(config['sdk_path'], 'tools', 'android'),
], ],
'adb': [
os.path.join(config['sdk_path'], 'platform-tools', 'adb'),
],
} }
for b, paths in bin_paths.items(): for b, paths in bin_paths.items():

View file

@ -32,7 +32,7 @@ config = None
def devices(): def devices():
p = FDroidPopen(["adb", "devices"]) p = FDroidPopen([config['adb'], "devices"])
if p.returncode != 0: if p.returncode != 0:
raise Exception("An error occured when finding devices: %s" % p.output) raise Exception("An error occured when finding devices: %s" % p.output)
lines = p.output.splitlines() lines = p.output.splitlines()
@ -100,7 +100,7 @@ def main():
logging.info("Installing %s..." % apk) logging.info("Installing %s..." % apk)
for dev in devs: for dev in devs:
logging.info("Installing %s on %s..." % (apk, dev)) logging.info("Installing %s on %s..." % (apk, dev))
p = FDroidPopen(["adb", "-s", dev, "install", apk]) p = FDroidPopen([config['adb'], "-s", dev, "install", apk])
fail = "" fail = ""
for line in p.output.splitlines(): for line in p.output.splitlines():
if line.startswith("Failure"): if line.startswith("Failure"):