Project

General

Profile

diag_mdlog

This is a small proprietary Qualcomm program which can store DIAG logs on the filesystem.

It features the following --help output:

 Usage for diag_mdlog:

-f, --filemsm:   mask file name for MSM
-m, --filemdm:   mask file name for MDM
-l, --filelist:  name of file containing list of mask files
-o, --output:    output directory name
-p, --peripheral:        bit mask for the peripherals interested
-s, --size:      maximum file size in MB
-w, --wait:      waiting for directory
-n, --number:    maximum file number
-k, --kill:      kill existing instance of diag_mdlog
-c  --cleanmask:         Send mask cleanup to modem at exit
-d  --disablecon:        Disable console messages
-e  --enablelock:        Run using wake lock to keep APPS processor on
-b  --nonrealtime:       Have peripherals buffer data and send data in non-real-time
-r  --renamefiles:       Rename dir/file names to time when closed
-a  --hdlcdisable:       Disbale hdlc encoding
-h, --help:      usage help

e.g. diag_mdlog -f <mask_file name> -o <output dir> -s <size in bytes> -c

mask files (--filemsm, --filemdm)

It works using so-called mask files which contain the raw byte sequences to be sent to /dev/diag to enable certain log masks. The defailed format is TBD.

The default mask file name (if none is specified) depends on the processor that you want to diag:

/sdcard/diag_logs/Diag.cfg
/sdcard/diag_logs/mdm/Diag.cfg
/sdcard/diag_logs/mdm2/Diag.cfg
/sdcard/diag_logs/mdm3/Diag.cfg
/sdcard/diag_logs/mdm4/Diag.cfg
/sdcard/diag_logs/qsc/Diag.cfg
/sdcard/diag_logs/Diag.cfg
/sdcard/diag_logs/Diag.cfg
/sdcard/diag_logs/Diag.cfg
/sdcard/diag_logs/Diag.cfg

--filelist

As an alternative to mask files, there s the filelist_ concept, whcih is a text file containing a list of mask files. The default filelist file is /sdcard/diag_logs/Diag_list.txt

--wait

This waits for the specified directory to become available/writable before proceeding. Useful in case you wait for mountin an SD card or the like.

--cleanmask

This clears the debug mask at the time of a clean shutdown of the process

--renamefiles

Renames the files when they are closed. Filenames will be based on timestamps in a format of /dir/diag_log_%Y%m%d_%H%M%S.qmdl where dir corresponds to the --outputdir option given.

--outputdir

The default output directories are

Add picture from clipboard (Maximum size: 48.8 MB)