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)
评论列表
文章目录