Ejemplo n.º 1
0
    def onMonitor(self, message):
        isHasUpate = string.find(message, "发现新版本,是否升级?") != -1 and string.find(
            message, "start_dialog") != -1
        if isHasUpate:
            print "发现新版本,是否升级?"
            params = {}
            self.hookApp(llxx_result(message, "update_dialog", params))
            self.addNextMonitor(
                llxx_monitorupdate(self._llxx_monitorunit_listener))
            self.remove()
            # print message

        isDownloading = string.find(message, "正在下载") != -1
        if isDownloading:
            node = self.findTextNode(message, "正在下载")
            if node != None:
                progress = node["text"].encode('utf-8')
                params = {}
                params["progress"] = progress.replace("正在下载...", "")
                params["text"] = node["text"].encode('utf-8')
                #params["node"] = node
                self.hookApp(
                    llxx_result(message, "update_dowload_process", params))
                if params["progress"] == "100%":
                    self.addNextMonitor(
                        llxx_monitorinstall(self._llxx_monitorunit_listener))
                    self.remove()
Ejemplo n.º 2
0
    def onMonitor(self, message):
        isInstall = string.find(message, "start_activity") != -1
        if isInstall:
            params = {}
            self.hookApp(llxx_result(message, "ui_update", params))
            print message

        ## 安装完成
        isInstallOk = string.find(message, "start_dialog") != -1
        if isInstallOk:
            params = {}
            self.hookApp(llxx_result(message, "ui_update", params))
            print message
 def onMonitor(self, message):
     isShow = string.find(message, "start_dialog") != -1 and string.find(
         message, "知道了") != -1
     if isShow:
         # print message
         params = {}
         self.hookApp(llxx_result(message, "llxx_monitor_dialog", params))
         self.remove()
Ejemplo n.º 4
0
    def onMonitor(self, message):
        isInstall = string.find(
            message, "start_activity") != -1 and string.find(
                message,
                "com.android.packageinstaller.PackageInstallerActivity") != -1
        if isInstall:
            params = {}
            self.hookApp(llxx_result(message, "apk_install", params))
            # print message

        ## 安装完成
        isInstallOk = string.find(message, "安装完成") != -1 and string.find(
            message, "打开")
        if isInstallOk:
            params = {}
            params["sucess"] = True
            self.hookApp(llxx_result(message, "apk_install_report", params))
            self._isinstallok = True
            self.remove()