How faizwildanritonga/spreadtrum_flash works
This is a Spreadtrum firmware dumper: users issue command-line or interactive commands to connect to a device, load and execute download agents, then inspect, back up, modify, or erase device storage. The main command dispatcher is spd_dump.c; common.c contains protocol, device communication, partition, and image/NV routines. The README documents broader partition, security, RPMB, eFuse, and NV workflows than the sampled command excerpts show. Those less-visible links are omitted or marked unverified rather than inferred from names alone.
Main entry points: spd_dump.c Command dispatcher · common.c BSL protocol · Wrapper.cpp Transport wrapper · spd_cmd.h Command definitions
Components 15
Command workflows
- Command dispatcher
spd_dump.c - Boot-stage control
spd_dump.c - Firmware transfer
spd_dump.c - Storage commands
spd_dump.c - Security and NV commands
spd_dump.c
Device and protocol
- BSL protocol
common.c - Device I/O
common.c - Command definitions
spd_cmd.h
Storage and images
- Partition operations
common.c - Image and NV processing
common.c - Local files
Platform transport
- USB or SPRD driver
- Windows COM channel
BMPlatform.cpp - Transport wrapper
Wrapper.cpp
Other components
- CLI user
Connections 17
- CLI user → Command dispatcher: issues commands
- Command dispatcher → Boot-stage control: dispatches
spd_dump.c - Command dispatcher → Firmware transfer: dispatches
spd_dump.c - Command dispatcher → Storage commands: dispatches
spd_dump.c - Command dispatcher → Security and NV commands: dispatches
spd_dump.c - Boot-stage control → BSL protocol: sends commands
spd_dump.c - Firmware transfer → BSL protocol: sends data
- Storage commands → Partition operations: operates on
- Security and NV commands → Image and NV processing: uses routines
- BSL protocol → Device I/O: transfers packets
common.c - BSL protocol → Command definitions: uses constants
- Partition operations → Device I/O: reads and writes
common.c - Partition operations → Local files: saves or loads
- Image and NV processing → Local files: processes images
- Device I/O → USB or SPRD driver: connects through
- Device I/O → Transport wrapper: uses on Windows
- Transport wrapper → Windows COM channel: delegates to
Wrapper.cpp