ffrs

一、写一个定时器,5分钟连接一次

def new_connect_device():
    global ip_port_str
    try:
        connect_device("android:///%s" % ip_port_str)
        logger.info("连接设备成功")
        return ADB(ip_port_str)
    except Exception:
        logger.error("连接设备失败, 重新连接")
    
schedule.every(5).minutes.do(new_connect_device)

while True:
    schedule.run_pending()
    time.sleep(3)

 二、另外开启cmd窗口,输入命令使其一直打印log至本地

adb logcat -v threadtime>1.txt

分类:

技术点:

相关文章:

  • 2021-04-14
  • 2021-09-16
  • 2021-12-05
  • 2021-07-29
  • 2021-12-04
  • 2021-12-04
  • 2022-12-23
猜你喜欢
  • 2021-06-04
  • 2021-04-23
  • 2021-12-27
  • 2022-01-02
  • 2021-09-25
  • 2021-12-04
  • 2021-07-01
相关资源
相似解决方案