Windows ports of the necessary Linux utils for Android image (kernel/recovery) mod work:
unpackbootimg, mkbootimg: https://github.com/osm0sis/mkbootimg
bzip2, chmod, cpio, cut, dd, file, gzip, lzop, printf, tail xz;
cygbz2-1, cygcrypto-1.0.0, cyggcc_s-1, cygiconv-2, cygintl-8, cyglzma-5, cyglzo2-2, cygmagic-1, cygwin1, cygz: http://cygwin.com/
See the Mobile Edition (AIK-mobile) initial release notes for the specifics on the native Android version.
Likewise for the Linux Edition (AIK-Linux) initial release notes.
My original intent was to have this package dependency-free, but as you can see, I did have to include Cygwin. Initially just for mkbootimg since the huaixzk standalone version wouldn't work (it wasn't loading the kernel as binary, thanks trevd); then I discovered that using the GNUWin32 cpio to unpack somehow didn't play nice with repacking the ramdisk in a usable state, so at that point I decided I might as well go Cygwin across the board. As it is, I've included the latest Cygwin-dependent executables and required libraries from their repos and built my own custom Cygwin image and ramdisk utilities built from the latest sources.
Originally only for Google Pixel/Nexus/AOSP standard boot.img files, built-in support has now expanded to ChromeOS signed boot.img files, Loki patched boot.img files, Sony ELF kernel.elf files (repacked as boot.img for unlocked bootloaders), MTK headers for zImage/ramdisk, and LG Bump/Samsung SEAndroid footers for boot.img.
The main advantage here is you don't need Cygwin shell or PERL scripts. Other guides exist but none of them are universal for target device, compression and/or developed for Windows, Android ARM/x86/MIPS, and now Android ARM64/x86_64/MIPS64. With this universality in mind I've automated the whole process with batch/shell scripts.
My development work on my many projects comes out of my free time, so if you enjoy this project or anything else I've done on xda, please do hit the donate link from my profile. Thank you for your support!
2) Either use the command-line "unpackimg <image-filename.img>", or simply drag-and-drop the image. This will split the image and unpack the ramdisk to a subdirectory.
3) Alter the ramdisk as you like.
4) The repackimg batch script requires no input and simply recombines the previously split zImage with the newly packed modified ramdisk using all the original image information (which was also split and saved).
5) The cleanup batch script resets the folder to its initial state, removing the split_img+ramdisk directories and any new packed ramdisk or image files.
There are two optional, advanced command-line arguments for repackimg: "--original", which will cause it to repack using the original split ramdisk instead of repacking, this is useful for testing or trimming dumps; and "--level" with 1-9 and possibly 0 allows changing the compression level used to repack to more closely match the original.
Usage is similar for the Android and Linux versions, again, just review the release notes for them.
Hopefully this is some help to someone. It's been extremely useful for me in my messing around with kernel ramdisks, which is why I created it in the first place.
Questions, comments and feedback welcome.
Credits & Thanks: All authors of the included binaries and libraries for their amazing work, as linked (or linked via GitHub) above. Peteragent5, alansj & iridaki for the general methods used in their PERL scripts and Linux guides. SuperR. & tobias.waldvogel for the general methods used in their kernel.elf unpacking scripts. Chainfire for the ChromeOS and SEAndroid general methods.
cybojenix for the Bump general method.
Thanks to Goatshocker for testing out things for the HTC image issues, leading to the workaround and subsequent fix, avinashrocks1990 & tajimura for testing out compression support and the large pagesize fix, civato for testing out dtb support, talich for testing out the Linux version, shoey63 for testing out Linux + ELF support, and moonbutt74 for testing out Android-x86 support. Huge thank you to trevd and Modding.MyMind/SHM for all the contributing work they've each done and support they've provided.
Disclaimer: Naturally, you take all the responsibility for what happens to your device when you start messing around with things.
AIK - v1.0: 1540; +HTCFix: 430. v1.5: 4718. v1.6: 3556. v1.8: 8678; +Lok2Img: 1629. v1.9: 2580. v2.0: 22886. v2.2: 20522. v2.3: 14524. v2.4: 84432; +LokiAddon: 20071. v2.5: 5004.
Mobile - v1.0: 311. v1.1: 265. v1.2: 302. v1.3: 100. v1.4: 486. v1.5: 224. v1.6: 3303. v1.7: 7798. v1.8: 16286. v1.9: 3800. v2.0: 5444. v2.1: 2526. v2.2: 926. v2.3: 1346. v2.4: 18426. v2.5: 2586.
Linux - v1.0: 75. v1.1: 208. v1.2: 233. v1.3: 112. v1.4: 421. v1.5: 173. v1.6: 1838. v1.7: 2596. v1.8: 4818. v1.9: 604; +v1.9.1: 1068. v2.0: 1836. v2.1: 1240. v2.2: 466. v2.3: 522. v2.4: 8126. v2.5: 1052.
Android Image Kitchen, Tool/Utility for the Android General
Source Code: https://github.com/osm0sis/Android-Image-Kitchen
Current Stable Version: 2.6
Stable Release Date: 2017-02-27
Last Updated 2017-03-08