[Android Software Development] osm0sis:
Another longtime request. New Linux version of Android Image Kitchen up in the OP! Bringing my updated binaries back home! ;)

Now also supporting macOS out-of-the-box (i.e. no Homebrew or MacPorts addons needed) with v3.0+!

AIK-Linux:

- Complete feature parity with the Windows/Android versions, including compression support, --original to repack with the original ramdisk, --origsize to pad the repacked image to the size of the original, --level to change the compression level of the repacked ramdisk, --avbkey to change the key used for Android Verified Boot signing of the repacked image, and --forceelf to make an older unpacked Sony ELF file repack as an ELF.

- Unpacks as root by default to maintain full control over all repacked ramdisk file ownership/permissions, --nosudo argument available to attempt unpack/repack as user if possible.

- All scripts allow unpacking/repacking with the current directory instead of the AIK directory if --local is the first command-line argument.

- "--help" is also available for all included scripts.

- Unpack with "tar -xzvf AIK-Linux-*.tar.gz" in your home directory then you can go to AIK-Linux and use, eg. "./unpackimg.sh boot.img" to get started.

mkbootimg, unpackbootimg: https://github.com/osm0sis/mkbootimg

pxa-mkbootimg, pxa-unpackbootimg: https://github.com/osm0sis/pxa-mkbootimg

elftool: https://github.com/osm0sis/elftool

unpackelf: https://github.com/osm0sis/unpackelf

mboot: https://github.com/osm0sis/mboot

dumpimage, mkimage: https://www.denx.de/wiki/U-Boot/WebHome

mkmtkhdr: https://github.com/osm0sis/mkmtkhdr

loki_tool: https://github.com/djrbliss/loki

futility: https://github.com/osm0sis/futility

boot_signer.jar (requires JRE 8+): https://xdaforums.com/android/software-hacking/signing-boot-images-android-verified-t3600606

blobpack, blobunpack: https://github.com/AndroidRoot/BlobTools

dhtbsign: https://github.com/osm0sis/dhtbsign

rkcrc: https://github.com/rockchip-linux/rkflashtool

sony_dump: https://xdaforums.com/crossdevice-dev/sony/tool-unpack-format-sony-kernel-image-t3530077

lz4: https://lz4.github.io/lz4/

magic: https://www.darwinsys.com/file/

cpio, dd, file, lzop, tail, truncate, xz; libiconv.2, libintl.8, liblzma.5, liblzo2.2, libmagic.1 (macOS): https://www.macports.org/

gzip, bzip2, lzop, xz; awk, basename, bash, cpio, cut, dd, dirname, env, file, find, grep, hexdump, java, printf, rev, sed, stat, sudo, tail, truncate, wc (Linux): (required system packages/commands)

GitHub: https://github.com/osm0sis/Android-Image-Kitchen/commits/AIK-Linux

Most included binaries were compiled using my patched crosstool-ng i686 and x86_64 Cygwin to Linux cross-compiler toolchains, now as part of my own AIK Build Farm. :cowboy:

macOS compiles built with osxcross. Instructions available via my Build Farm post.

I'm not going to interfere with anyone's Linux installations, nor needlessly bundle a ton of commonly available binaries, so if you need extra compression support you need to have those packages installed. In my Ubuntu Server VM gzip, bzip2 and xz/lzma all seem to come pretty much by default, and "apt-get install lzop bsdmainutils" handles lzop and hexdump. Java depends on your setup, but openjdk-8-jre will be what most will want if not already included. lz4 would be the only one that would have to be built from source on many distros, so I have considered it an exception, built it and included it myself.

Thanks to shoey63 and talich for testing. Cheers! :)

If you are reporting a problem with your device, please clearly state your device name and model/variant as well as provide a link to the image file.