jsandin / esp-bin2elf

Converts a flash dump from an esp8266 device into an ELF executable file for analysis and reverse engineering.
81 stars 13 forks source link

Support OTA upgradable ROMs #1

Open jsandin opened 7 years ago

jsandin commented 7 years ago

ROMs that support OTA upgrades have two slots and a different memory layout. esp-bin2elf should support slot selection, and should (when instructed) populate the elf sections with the application from the selected slot.

ryanm101 commented 4 years ago

esptool.py v2.5.0 Image version: 1 Entry point: 4010057c 3 segments Segment 1: len 0x00a20 load 0x40100000 file_offs 0x00000008 Segment 2: len 0x002fc load 0x3ffe8000 file_offs 0x00000a30 Segment 3: len 0x002a4 load 0x3ffe82fc file_offs 0x00000d34 Checksum: 22 (valid)

Output from esptool image_info for a 1M rom supporting ota (i think)

zayfod commented 4 years ago

I think this is addressed with the added offset argument to the EspRom class added here: https://github.com/zayfod/esp-bin2elf

It allows reading secondary bootloaders and OTA applications withing a flash image.