Skip to content
/ pymdt Public

Python library for mdt firmware manipulation

Notifications You must be signed in to change notification settings

eti1/pymdt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

pymdt

Manipulation of mdt firmware images

Examples

Build an elf from a splitted mdt image:

#unsplit.py:

from pymdt import *

# unsplit the dump into an elf
ELFFile.from_mdt('dump/modem','build/modem.elf')

$ ls dump/

modem.mdt modem.b01 modem.b02 [etc...]

$ mkdir build

$ ./unsplit.py

$ ls build

modem.elf

Patch an elf, then split it

#patch.py

from pymdt import *

# load an elf
elf = ModemFirmware('build/modem.elf')

# Patch something
elf.put_data(0x89000000, "BREAKTHEBOOT")

# Fix the hash segment
elf.regen()

# Save the patched elf
elf.write("build/modem_patched.elf")

# Save the splitted image
elf.write_mdt("build/modem")

$ ls build/

modem.elf

$ ./patch.py

$ ls build/

modem.elf modem_patched.elf modem.mdt modem.b01 modem.b02 [etc...]

About

Python library for mdt firmware manipulation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages