Key facts
- Identify, unpack, inspect, edit, and repack an Allwinner IMAGEWTY firmware image without confusing it with Android sparse images or super.img.
- Record the finished model, PCB identifier and revision, RAM, storage capacity, display or touch variant, and the firmware source.
- Preserve the downloaded archive and original image unchanged.
An .img filename does not identify one universal firmware format. An Allwinner update may be an IMAGEWTY package used by PhoenixSuit or LiveSuit, an Android sparse partition image, a raw ext4 filesystem, or a modern super.img container. Each format needs a different tool. Identify the file first, then choose the unpacking method.
Important: unpacking a copy is usually low risk, but repacking and flashing are not. A valid-looking image can still be wrong for the board, memory, display, touch controller, storage layout, or verified-boot configuration. Keep the original package, record its SHA-256 hash, and do not flash unless you have a tested recovery path for the exact device.
Quick answer: choose the tool by format
| What you have | How to recognize it | Suitable tool |
|---|---|---|
| Allwinner IMAGEWTY firmware package | The file starts with the ASCII text IMAGEWTY | imagewty-tool for information, extraction, and repacking |
| Android sparse partition image | Header magic is 0xed26ff3a, or simg2img accepts it | AOSP simg2img and img2simg |
| Raw ext4 partition image | file reports an ext filesystem | Linux ext4 tools; mount a copy read-only before editing |
Android dynamic-partition super.img | Contains logical partitions and metadata | AOSP lpunpack; rebuilding requires the original layout parameters |
| Amlogic or Rockchip package | Vendor-specific header or documentation, not IMAGEWTY | Use the matching vendor toolchain, not an Allwinner unpacker |
If the first row matches, the shortest current workflow is imagewty-tool info firmware.img, then imagewty-tool extract firmware.img. The project is a third-party community utility, not an official Allwinner product, so validate its output before relying on it.
Before unpacking firmware
- Confirm the exact device. Record the finished model, PCB identifier and revision, RAM, storage capacity, display or touch variant, and the firmware source.
- Work on a duplicate. Preserve the downloaded archive and original image unchanged. Do not rename a modified file over the only known-good copy.
- Record a checksum. Save the original SHA-256 value with your notes.
- Check free space. Extraction can need several times the size of the compressed package.
- Plan recovery first. Know how the exact board enters FEL, recovery, or SD-card recovery mode before flashing a test build.
mkdir allwinner-work
cp firmware.img allwinner-work/firmware-original.img
cd allwinner-work
sha256sum firmware-original.img
On macOS, use shasum -a 256 firmware-original.img. Keep the hash in a text file outside the working directory.
Identify the IMG format first
Do not select a tool from the extension alone. Inspect the beginning of the file and ask the operating system what it can recognize:
file firmware-original.img
xxd -l 16 firmware-original.img
An IMAGEWTY package begins with the eight-byte text IMAGEWTY. The name refers to the Allwinner container header, not to every image used on every Allwinner device. The header has appeared in multiple versions, and a tool that supports one package generation may reject another.
An Android sparse image uses the magic value 0xed26ff3a. Because common hex viewers show multi-byte values in file order, the first four bytes normally appear as 3a ff 26 ed. A raw ext4 image has a filesystem structure rather than an IMAGEWTY package header. A super.img adds dynamic-partition metadata and must be treated as a logical-partition container.
Current and legacy tool options
imagewty-tool
imagewty-tool is an open-source C utility that can inspect, extract, and repack IMAGEWTY files. Its documented tests cover images produced by PhoenixSuit 1.19 with header versions 3 and 4. The author describes the project as an amateur tool, so test it on a copy and review open issues for your package version.
OpenixIMG
OpenixIMG is a cross-platform C++17 project for unpacking Allwinner firmware and partitions. Its output can use an unpacked-image or imgRePacker-style layout. Check the project's current documentation before assuming that a specific build can repack your format.
imgRePacker and old unPacker downloads
Older guides often recommend imgRePacker or a Windows program named unPacker. These names still appear in searches, but abandoned file-sharing links and repackaged executables are difficult to verify. Do not download an unsigned binary from a random mirror merely because an old guide links to it. If a legacy workflow is essential, obtain the tool from its identifiable original project or a trusted archive, scan it, and use an isolated system.
AOSP partition tools
simg2img, img2simg, and lpunpack solve different Android partition tasks after you have opened the outer firmware container. They do not replace an IMAGEWTY unpacker.
Build and inspect with imagewty-tool
Review the repository and release notes before building. On a Linux system with Git, a C compiler, and Make, the documented source workflow is:
git clone https://github.com/fuxdasec/imagewty-tool.git
cd imagewty-tool
make
./imagewty-tool info ../firmware-original.img
The info command should identify the container and list its contents without changing the image. Save that output. If the program reports an unsupported header, invalid offsets, or a checksum problem, stop. Do not force the image through a tool for a different package generation.
A published release may be more convenient than compiling, but verify that it comes from the project's own Releases page. Record the version or commit used so that the same result can be reproduced later.
Extract an IMAGEWTY package
Run extraction against the working copy:
./imagewty-tool extract ../firmware-original.img
The tool creates a directory named after the input image with a .dump suffix. Keep its structure and configuration files intact. Partition payloads may include names such as boot.fex, system.fex, vendor.fex, or a dynamic-partition image. A .fex suffix alone still does not tell you whether the payload is Android sparse, raw ext4, or another binary format.
Before editing anything, make a second copy of the complete dump. A useful validation is to repack the untouched dump first. If an unchanged extraction cannot be rebuilt and inspected successfully, it is not a safe basis for modifications.
Inspect a system.fex or system.img partition
Check the extracted partition instead of assuming that every system.fex is sparse:
file firmware-original.img.dump/system.fex
xxd -l 16 firmware-original.img.dump/system.fex
If it is Android sparse, convert a copy to a raw image with the AOSP utility:
cp firmware-original.img.dump/system.fex system-working.fex
simg2img system-working.fex system.raw.img
file system.raw.img
Test the raw ext4 image read-only first:
sudo mkdir -p /mnt/allwinner-system
sudo mount -o loop,ro system.raw.img /mnt/allwinner-system
ls -la /mnt/allwinner-system
sudo umount /mnt/allwinner-system
A successful mount only proves that the filesystem can be read. It does not prove that Android will boot it. File ownership, permissions, extended attributes, SELinux labels, filesystem size, AVB metadata, and the device's partition map can all matter.
Edit a partition without losing critical metadata
Make another copy of the raw image before enabling writes. Use a Linux environment and tools that preserve numeric user and group IDs, Unix modes, symbolic links, capabilities, extended attributes, and SELinux contexts. A desktop file manager or ZIP round trip can silently change them.
Do not make broad build.prop changes on the assumption that they improve performance. Unknown or obsolete properties can prevent boot, break radio or graphics behavior, or do nothing at all. Change only the minimum file required for a documented device-specific purpose, and keep a manifest of every modified path.
If verified boot is enabled, changing a protected partition can cause verification failure even when the filesystem itself is valid. This guide does not bypass bootloader locking, AVB, encryption, or signature checks.
Convert the partition back only when required
If the original payload was Android sparse and the outer package expects a sparse partition, convert the edited raw image back with img2simg:
img2simg system.raw.img system.new.fex
Do not run this step for an originally raw partition. Compare the original and new formats with file and their first bytes. Confirm that the new partition stays within the original allocation. A larger file can overlap another partition or make the outer package invalid.
The optional sparse block size must match the target's requirements when a device or packaging tool imposes one. Do not copy a value such as 512 MB from an unrelated tutorial. That number can describe an image size in one old example, not a universal Allwinner setting.
What to do with super.img
Recent Android devices may store system, vendor, product, and other logical partitions inside super.img. Use the AOSP lpunpack tool to extract it:
mkdir super-unpacked
lpunpack super.img super-unpacked
Rebuilding super.img is not a generic one-line reversal. lpmake needs the correct metadata size, metadata slots, block-device size, partition groups, partition sizes, attributes, and slot layout. Capture the original metadata and use the device's own build configuration. Guessing these values can produce an image that cannot be flashed or booted.
Repack the Allwinner IMAGEWTY container
After placing the correctly formatted replacement payload in the copied dump, repack it to a new filename:
./imagewty-tool repack firmware-original.img.dump firmware-modified.img
./imagewty-tool info firmware-modified.img
sha256sum firmware-modified.img
The repacker updates container checksums for formats it supports. That is necessary, but not sufficient, validation. Compare the original and modified info output: partition names, order, offsets, sizes, and package version should differ only where your planned change requires it.
Extract the newly repacked image into a fresh directory and compare its payload with the intended working set. Keep the new SHA-256 hash, tool version, command log, and file-change manifest together.
Validate before any flash
- Repack without changes first. Prove that the chosen tool can round-trip this exact package.
- Inspect the rebuilt package. Confirm its header, partitions, sizes, and checksums.
- Extract the rebuilt package. Verify that its contents match what you intended to package.
- Confirm the target again. Match model, PCB revision, memory, storage, display, touch hardware, and original firmware lineage.
- Use the vendor's documented flashing method. Do not mix a package from one toolchain with another flashing program unless the manufacturer explicitly supports it.
- Keep recovery media and the original image ready. Test only on hardware that you can afford to recover or lose.
There is no checksum or desktop test that can guarantee a modified firmware will boot on physical hardware. A controlled round trip reduces packaging mistakes, but it does not establish hardware compatibility or signature validity.
Troubleshooting common failures
| Problem | Likely cause | Safe next check |
|---|---|---|
| Tool says the IMG format is unknown | The file is not IMAGEWTY, the header version is unsupported, or the download is incomplete | Run file and xxd, verify the source and checksum, then identify the actual vendor format |
simg2img rejects system.fex | The payload is already raw, compressed, encrypted, damaged, or not an Android sparse image | Inspect the header and file result instead of renaming it |
| Raw image will not mount | Wrong filesystem, damaged image, unsupported feature, or the image is still sparse | Use read-only filesystem inspection and check the conversion log |
| Repacked image is much larger | Wrong sparse/raw conversion, added data, filesystem expansion, or incorrect output layout | Stop and compare each partition with the untouched round-trip build |
| Flasher rejects the modified package | Container checksum, signature, size, header, or toolchain mismatch | Restore the original package and review the documented signing and packaging process |
| Package flashes but the device does not boot | Hardware mismatch, broken filesystem metadata, AVB failure, wrong partition layout, or invalid modification | Use the prepared recovery path and restore the exact original image |
Frequently asked questions
What is IMAGEWTY?
IMAGEWTY is a header and container format found in some Allwinner firmware packages, including images used by PhoenixSuit or LiveSuit workflows. It is not a guarantee that the image matches a particular device, and it is not the format of every Allwinner firmware file.
Where can I download imgRePacker?
Avoid anonymous mirrors and expired file-sharing links. Prefer a maintained open-source project with visible source and release history, such as imagewty-tool, or locate the identifiable original imgRePacker distribution and verify it before use. Run unknown legacy Windows utilities only in an isolated environment.
Can imgRePacker unpack an Amlogic IMG file?
Do not assume it can. Amlogic packages use a different vendor toolchain and container format. Identify the Amlogic image and use a tool documented for that exact format. An IMAGEWTY utility is not a generic firmware editor.
What does simg2img do?
simg2img converts an Android sparse image into a raw image. It does not unpack the outer Allwinner firmware package, edit files automatically, or make an image safe to flash.
Can I unpack super.img?
Yes. AOSP's lpunpack extracts logical partitions from super.img. Repacking requires exact dynamic-partition metadata and allocation parameters from the target build.
Is an edited firmware image safe to flash?
Not merely because it repacks without errors. Safety depends on exact hardware compatibility, correct filesystem metadata and sizes, signature or verified-boot requirements, a supported flashing method, and a tested recovery plan.
Sources and scope
This guide was reviewed on October 13, 2026 against the imagewty-tool documentation and its published releases; the OpenixIMG project; and the Android Open Source Project implementations of simg2img, img2simg, the Android sparse format header, and lpunpack. Community-tool support can change, and device-specific service documentation takes priority.
