Example #1
0
 def install_package(self, pkgpath):
     """install a package on android device:
     push package and install with shell command
     """
     cmd = APK_INSTALL % (self.deviceid, pkgpath)
     exit_code, ret = shell_command(cmd)
     return ret
Example #2
0
File: test.py Project: cjq/autoTest
def _get_device_ids():
    """get android deivce list of ids"""
    result = []
    exit_code, ret = shell_command("adb devices")
    for line in ret:
        if str.find(line, "\tdevice") != -1:
            result.append(line.split("\t")[0])
    return result
Example #3
0
 def shell_cmd(self, cmd="", timeout=15):
     cmdline = "adb -s %s shell %s" % (self.deviceid, cmd)
     return shell_command(cmdline, timeout)