def __init__(self): MyThread.__init__(self) cmd = ["adb", "shell"] self.app = Popen(cmd, stdin=PIPE) self.rot_auto(False)
def __init__(self, parent): MyThread.__init__(self) cmd = ["adb", "shell", " %s/minitouch" % (parent.path)] self.server = Popen(cmd) self.pressure = 0 self.max_x = 0 self.max_y = 0
def __init__(self, cb): MyThread.__init__(self) self.value_dict = VALUE_DICT self.id_dict = {} for name in self.value_dict: value_id, __ = self.value_dict[name] self.id_dict[value_id] = name self.cb = cb self.handle = pc_parser() self.reset()
def __init__(self, parent): MyThread.__init__(self) disp_max = max(parent.size) dev_max = max(parent.orig) args = "-P %ux%u@%ux%u/0" % (dev_max, dev_max, disp_max, disp_max) cmd = [ "adb", "shell", "LD_LIBRARY_PATH=%s %s/minicap %s" % (parent.path, parent.path, args) ] self.server = Popen(cmd)
def __init__(self): def setNonBlocking(fd): flags = fcntl.fcntl(fd, fcntl.F_GETFL) flags = flags | os.O_NONBLOCK fcntl.fcntl(fd, fcntl.F_SETFL, flags) MyThread.__init__(self) cmd = ["adb", "shell", "pm path jp.co.cyberagent.stf.rotationwatcher"] out, __ = Popen(cmd, stdout=PIPE).communicate() apk_path = out.split(":")[1].split()[0] cmd = [ "adb", "shell", "CLASSPATH='%s' exec app_process /system/bin jp.co.cyberagent.stf.rotationwatcher.RotationWatcher" % (apk_path) ] self.app = Popen(cmd, stdout=PIPE) setNonBlocking(self.app.stdout)
def start(self): MyThread.start(self)