def get_video(self): fileName, ok = QFileDialog.getSaveFileName(self, "文件保存", os.getcwd(), "mp4 (*.mp4)") if fileName != '': adb = Myclassconf() adb.pull_video(fileName) self.send_text.emit('录像保存完毕%s' % fileName)
def clean_data(self): adb = Myclassconf() packName = self.packName_text.toPlainText() if packName != '': data_log = adb.clean_pack_data(packName) self.waring(data_log) else: self.waring('填个包名')
def install(self): adb = Myclassconf() apk_path = self.packPath_text.toPlainText() if apk_path != '': install_log = adb.install_apk(apk_path) self.send_text.emit(install_log) else: self.send_text.emit('左边加载下路径或者自己填个绝对路径')
def uninstall(self): adb = Myclassconf() packName = self.uninstall_packName_text.toPlainText() if packName != '': uninstall_log = adb.uninstall_apk(packName) self.waring(uninstall_log) else: self.waring('左边输入框填个包名')
def start_video(self): adb_log = Myclassconf() if self.fool_video == 1: self.send_text.emit('不要重复开启录制') elif self.time_min_text.text() == '0' and self.time_sec_text.text( ) == '0': self.send_text.emit('填入录制时间') else: video_time = int(self.time_min_text.text()) * 60 + int( self.time_sec_text.text()) print(video_time) self.video_pid = adb_log.video(video_time) self.send_text.emit('正在录制视频,视频长短为%s秒' % str(video_time))
def start_adb(self): adb = Myclassconf() server_log = adb.start_adb() self.waring(server_log)
def phone_state(self): adb = Myclassconf() devices = adb.get_phone() self.waring(devices)
def adb_ver(self): adb = Myclassconf() ver = adb.get_adb() self.waring(ver)
def closeEvent(self, *args, **kwargs): self.fool_ram = 0 self.fool_cpu = 0 if self.fool_video != 0: adb = Myclassconf() adb.stop_video(self.video_pid)
def close_video(self): adb = Myclassconf() adb.stop_video(self.video_pid) self.send_text.emit('录像线程已关闭')
def clean_log(self): adb = Myclassconf() adb.clear_log()
def log(self): fileName, ok = QFileDialog.getSaveFileName(self, "文件保存", os.getcwd(), "txt (*.txt)") if fileName != '': adb_log = Myclassconf() adb_log.get_log(fileName)
def jietu(self): adb = Myclassconf() adb.jietu() self.send_text.emit('截图完毕')
def FocusedActivity(self): adb = Myclassconf() activity_log = adb.get_FocusedActivity() self.send_text2.emit(activity_log)
def android_version(self): adb = Myclassconf() version_log = adb.get_android_version() self.waring(version_log)
def close_adb(self): adb = Myclassconf() close_adb_log = adb.close_adb() self.waring(close_adb_log)