ImgUtil


ImgUtil is a Win32 utility for modifying Android boot images. (It was formerly named "bootutil.exe".)

Often you need to modify a boot image in small ways, e.g. modifying default.prop inside a ramdisk. There are the standard ways to completely take apart a boot image. After modifications, you can pack the image back together again. This is all a bit needless. There is also the problem of trying to save Linux ownership, mode and symlinks on a Windows system. It's easier to just extract what you need, modify it, then replace the original file.

Usage: imgutil [flags] image [file...] /l list files /x extract files /r replace files /i insert files /a append files /s symlink (target) /d delete files /p strip padding /t use file timestamps /m file mode /g group id /u user id /c set command line /v verbose

An example:

C:\>imgutil boot.img /x /v default.prop C:\>your-text-editor default.prop C:\>imgutil boot.img /r /v default.prop

ImgUtil can handle bare ramdisks, Linux style images with ramdisks and Android style images with ramdisks.

Special Filenames

There are eight filenames that are handled specially: dtb, kernel, payload, ramdisk, recovery, second, signature, stub.

Layout of image

You can use the /x and /r flags to extract or replace any of the special filenames along with normal ramdisk files.

C:\>imgutil bootimg /x /v payload init.rc

Kernels may be uncompressed, an uncompressed stub with a compressed payload or a standalone compressed payload. A device tree binary (DTB) may optionally be at the end. "payload" as a filename always refers to the decompressed payload.

Beta Stuff

Nook images before 2021 used a stub, a compressed payload and a table of offsets. This is a bit non-standard and created some problems. Previous versions of ImgUtil handled it correctly. Currently, this capability has not (yet) been reintegrated with the latest version. If there is interest it will be.

Download the executable.