My personal mtkclient wrapper for getting bootloader or kernel logs from a mediatek device
This script extracts expdb partition/pstore memory region and extracts ASCII strings from them.
mtk-log-util - mtkclient wrapper for getting bootloader or kernel logs from a mediatek device
positional arguments:
{expdb,pstore} Choose extraction method: expdb (partition) or pstore (memory)
filename Output file to save ASCII strings
options:
-h, --help show this help message and exit
--mtkclient-args MTKCLIENT_ARGS
Extra mtkclient arguments (default: "")
--pstore-address PSTORE_ADDRESS
Pstore memory address (default: 0x48090000)
--pstore-size PSTORE_SIZE
Pstore memory size (default: 0xe0000)
--auto-detect-pstore Auto-detect pstore address and size from expdb partition (pstore only)
--dont-peek-via-da Don't do a peek via Download Agent (use in case of issues) (pstore only)
Extracting pstore memory region. Will work only if DRAM was not cleared (eg. after panic)
python logutil.py pstoreExtracting preloader/tee/lk logs. Will work only if the partition exists
python logutil.py expdbThis script does not take pstore compression into account,
and might result in the first half of the data being corrupted if enabled.
- Python 3.9 or newer
- Cloning with
--recurse-submodulesto fetchmtkclientrepo