rotationclient.py 文件源码

python
阅读 17 收藏 0 点赞 0 评论 0

项目:adbmirror 作者: fhorinek 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号