通信人家园

 找回密码
 注册

只需一步,快速开始

短信验证,便捷登录

搜索

军衔等级:

  新兵

注册:2006-10-2
跳转到指定楼层
1#
发表于 2025-10-19 14:30:36 |只看该作者 |正序浏览
#python + QXDM5高通平台通过自动化截取log方法及代码
准备工作:

1.安装QXDM5

2.配置adb 环境变量

3.使用python 3以上

4.完成代码如下

```
import sys
import time
import os

if sys.platform.startswith("linux"):
    sys.path.append('/opt/qcom/QXDM/Support/python')

elif sys.platform.startswith("win"):
    sys.path.append('C:\Program Files (x86)\Qualcomm\QXDM5\Support\python') #QXDM5的默认路径
    sys.path.append('C:\Program Files (x86)\Qualcomm\QUTS\Support\python')

elif sys.platform.startswith("darwin"):
    sys.path.append('/Applications/Qualcomm/QUTS/QUTS.app/Contents/Support/python')

import QutsClient
import QxdmAutomationClient
import QxdmAutomationService.ttypes


class deviceManager(object):
    #通过模块的devicesID获取QXDM需要连接设备的devicehandle, protocolHandle
    def getDeviceInfo(self,devid,getPortName="Diagnostics"):
        protocolHandle = ""
        deviceHandle = ""
        comport = ""

```
  1. import sys
  2. import time
  3. import os

  4. if sys.platform.startswith("linux"):
  5.     sys.path.append('/opt/qcom/QXDM/Support/python')

  6. elif sys.platform.startswith("win"):
  7.     sys.path.append('C:\Program Files (x86)\Qualcomm\QXDM5\Support\python') #QXDM5的默认路径
  8.     sys.path.append('C:\Program Files (x86)\Qualcomm\QUTS\Support\python')

  9. elif sys.platform.startswith("darwin"):
  10.     sys.path.append('/Applications/Qualcomm/QUTS/QUTS.app/Contents/Support/python')

  11. import QutsClient
  12. import QxdmAutomationClient
  13. import QxdmAutomationService.ttypes


  14. class deviceManager(object):
  15.     #通过模块的devicesID获取QXDM需要连接设备的devicehandle, protocolHandle
  16.     def getDeviceInfo(self,devid,getPortName="Diagnostics"):
  17.         protocolHandle = ""
  18.         deviceHandle = ""
  19.         comport = ""
复制代码


举报本楼

本帖有 3 个回帖,您需要登录后才能浏览 登录 | 注册
您需要登录后才可以回帖 登录 | 注册 |

版规|手机版|C114 ( 沪ICP备12002291号-1 )|联系我们 |网站地图  

GMT+8, 2025-10-19 20:18 , Processed in 0.128161 second(s), 15 queries , Gzip On.

Copyright © 1999-2025 C114 All Rights Reserved

Discuz Licensed

回顶部