Format:SEAMA
| Magic | 5E A3 A4 17 |
|---|---|
| Extensions | .seama, .bin |
| Endianness | big |
| On this wiki | Facts · Code · Notes · Topics |
Alpha Networks' SEAMA image (used by D-Link and others): big-endian header with magic 0x5EA3A417, a metadata-size and an image-size field, a 16-byte MD5 digest and NUL-separated metadata strings before each image entity.
Header
From OpenWrt firmware-utils src/seama.h (struct seama_hdr, packed, network byte order):
| Offset | Size | Field |
|---|---|---|
| 0 | 4 | magic SEAMA_MAGIC 0x5EA3A417
|
| 4 | 2 | reserved (written as 0) |
| 6 | 2 | metasize: size of the metadata that follows (multiple of 4) |
| 8 | 4 | size: size of the image entity (0 for a metadata-only first header) |
If size is greater than zero, a 16-byte digest follows the 12-byte header (seama.c lines 183-197), then metasize bytes of metadata, then size bytes of image. The metadata is a series of NUL-terminated strings (for example a name or version string, chosen by the vendor) padded so the total is a multiple of 4 (seama.c lines 243-259, 270-285). Files can hold several entities one after another: the header diagram in seama.h shows a first header with image size 0 and no digest, followed by entities each with header, digest, metadata and image.
The tool writes <image>.seama as header, digest (computed by calculate_digest over the image; the header comment says MD5), metadata, image (seama.c lines 335-362).
binwalk
binwalk (src/structures/seama.rs lines 10-56) accepts both byte orders: it reads little-endian first and falls back to big-endian if the magic differs. It always assumes a 28-byte fixed part (12-byte header plus 16 bytes) plus the metadata, so for an initial header whose size is 0 (no digest) the reported header size is 16 bytes too long. Unverified: that real devices ship little-endian SEAMA.
Practical use
Skip the header (12 + 16 + metasize, or 12 + metasize when size is 0), then identify the payload (often a kernel/rootfs pair, see Format:Broadcom TRX, Format:U-Boot legacy uImage and Format:SquashFS). See Technique:Unpacking firmware update containers.
Sources
openwrt/firmware-utils src/seama.h (LGPL-2.1-or-later) and src/seama.c (BSD-3-Clause); ReFirmLabs/binwalk (MIT).
Code & repositories
- https://github.com/openwrt/firmware-utils @
0179ab1e367f756ac108a485f26585661d4c528c· license: GPL-2.0-or-later (declared by the contributor; GitHub's detector did not recognize a license file)
Image-building tools for router firmware: trx.c, mkchkimg.c, mktplinkfw.c, tplink-safeloader.c, seama.c/seama.h; per-file licenses (GPL-2.0-or-later, GPL-2.0-only, BSD-2-Clause, BSD-3-Clause, LGPL-2.1-or-later)
Tested on: source read, not run: source read, not built · checked 2026-10-19; last activity 2026-10-12 - https://github.com/ReFirmLabs/binwalk @
26713972e3f9f52dc37d4a421c4554b0bd9e82ef· license: MIT
binwalk 3 (Rust): signature and header parsers for TRX, CHK, SEAMA, TP-Link and other firmware formats
Tested on: source read, not run: source read, not built · checked 2026-10-19; last activity 2026-08-11