Skip to content

My personal mtkclient wrapper for getting bootloader or kernel logs from a mediatek device

License

Notifications You must be signed in to change notification settings

chickendrop89/mtk-log-util

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mtk-log-util

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.

Usage

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)

Basic Examples

Extracting pstore memory region. Will work only if DRAM was not cleared (eg. after panic)

python logutil.py pstore

Extracting preloader/tee/lk logs. Will work only if the partition exists

python logutil.py expdb

Notes

This script does not take pstore compression into account, and might result in the first half of the data being corrupted if enabled.

Requirements

  • Python 3.9 or newer
  • Cloning with --recurse-submodules to fetch mtkclient repo

About

My personal mtkclient wrapper for getting bootloader or kernel logs from a mediatek device

Topics

Resources

License

Stars

Watchers

Forks

Languages