Standalone extraction — whole-flash backup and layout reconstruction, no matching PAC or on-device partition table required.
Highlights
💾 Whole-flash backup — dump --full
sprdflash dump --full --enter-download --pac any-rda8910.pac --out ./dump
Reads the entire flash into flash.bin, auto-discovering its size by
binary-searching READ_FLASH — this FDL2 has no geometry command, so an in-range
read replies READ_FLASH and an out-of-range one replies INVALID_CMD, and the
boundary is the flash size. Needs only any RDA8910 PAC for the FDL stages.
Hardware-verified on an Air724UG: size auto-found as 8 MiB, every partition
matching its offset in the image.
🧩 Reconstruct a layout from a dump — layout
sprdflash layout --flash ./dump/flash.bin --out layout.xml
Recovers a proposed <BMAConfig> from a full dump alone — no device, no
matching PAC. It classifies on-flash content: U-Boot uImage code regions (magic
0x27051956, exact size, header + payload CRC-32 verified), LuatOS luadb,
and the wear-levelled NOR filesystem back half (longest single-generation run =
the live FS). Hardware-verified: 5/5 flash-resident partition bases + reserved
sizes reproduced byte-exact vs the real PAC.
Region names are generic content-type defaults (uimage_0, luadb_0,
filesystem_0, nv_0) — the flash stores no partition role names, and roles are
firmware-specific. What a dump can't give (documented): role names, the FDL
loaders (they live in SRAM, not NOR), and the PAC's erase/control directives.
🔎 Capability probe — parts
Probes an FDL2's capabilities and flash extent. On the RDA8910, every
introspection command (READ_PARTITION, chip/flash info) replies INVALID_CMD,
which is why the layout has to be recovered from content rather than queried.
Verifying downloads
echo 'ajsb85@firechip.dev ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJXmKlNp62mfIFNHT4Duv6vcTwfqb/M6OUs34upSpN/L' > allowed_signers
ssh-keygen -Y verify -f allowed_signers -I ajsb85@firechip.dev -n file \
-s sprdflash-v0.8.0-x86_64-unknown-linux-gnu.sig \
< sprdflash-v0.8.0-x86_64-unknown-linux-gnu
gh attestation verify sprdflash-v0.8.0-x86_64-unknown-linux-gnu --repo ajsb85/sprdflash-rsChanges
- feat(cli):
dump --full— standalone whole-flash backup with size discovery - feat(cli):
layout— reconstruct a proposed<BMAConfig>from a dump - feat(cli):
parts— probe FDL2 capabilities / flash extent - feat(core):
crc32(IEEE) + thereconstructmodule
Full Changelog: v0.7.0...v0.8.0