Qualcomm’s QXDM is an amazing tool for getting diagnostic information from mobile phones. It supports automation where you can write scripts to interface with the COM object exposed by QXDM.

The default installation of QXDM comes with a number of examples on how to use this object. Unfortunately, all the examples are in Perl. Although I like Perl, recently I have been using Python for all my scripting needs. It’s actually very easy to convert all these scripts to Python. Here’s how:

  • First, you need Python to be able to access COM objects. For this purpose, I used the Python comtypes package. Download and install it from SourceForge.

  • Now, you can do the following in your script:

from comtypes.client import CreateObject

# For ISF file post-processing
IISF = CreateObject("DMCoreAutomation.ItemStoreFiles") 

# For accessing data directly from QXDM. 
# Note that the script needs to be run as admin.
QXDM = CreateObject("QXDM.Application")