Skip to content

APKG packages

Stefaan Ghysels edited this page Aug 30, 2020 · 4 revisions

WD packages come in apkg format.

An apkg package is tar archive with a 200 byte header. This header contains the product ID, which means an apkg package can only be installed on a specific type of WD My Cloud products.

The archive contains a single directory with the package name.

Unpack

dd if=package.bin of=package.tar bs=200 skip=1 | tar -x

Show the header

dd if=package.bin bs=200 count=1 | xxd

mksapkg tool

The mksapkg tool (unix only) signs the package, archives it into a tarball and adds a platform specific header.

For a long time, only the 32 bit OS3 version was available. An x64 version is available now as well.

Dependencies: openssl and lib-xml2. See also the docker file.

Header fields

TODO

XOR checksum

The last field of the header is the XOR checksum. More info in Michael Roland's Firmware modding repo.

Creating an APKG package

See the example