[Android Software Development] osm0sis:
Android ARM/ARM64, x86/x86_64 + MIPS/MIPS64 version of Android Image Kitchen! Now you can easily modify ramdisks on the go! :D

AIK-mobile:

- Almost complete feature parity with the Windows/Linux version, 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 (AVBv1) signing of the repacked image, and --forceelf to make an older unpacked Sony ELF file repack as an ELF. The only thing missing is --local since AIK-mobile's ability to unpack/repack while booted in Android is too complex to easily allow moving the unpack/repack directory around.

- The flashable zip installs AIK for your Android architecture (ARM/ARM64, x86/x86_64, MIPS/MIPS64) to /data/local/AIK-mobile/ and a helper script created at /system/xbin/aik (alternately /su/bin/aik or /sbin/supersu/bin/aik if SuperSU systemless root is detected, or, /sbin/.magisk/img/aik-mobile/bin/aik or /data/adb/modules/aik-mobile/bin/aik if Magisk is detected).

- Type "aik" in Terminal Emulator to automatically go to the install directory and get a root prompt, then use, eg. "unpackimg.sh boot.img" to get started.

- Running su -c "/data/local/AIK-mobile/bin/aik --restore" will recreate the aik helper script in the appropriate place (see above), e.g. after a ROM flash with su.img SuperSU or magisk.img Magisk removed.

- "aik --uninstall" should be self-explanatory, and "--help" is also available for all included scripts.

Now also possible to run entirely from a file explorer app, see this post for details!

To run from TWRP (recovery shell), follow the instructions in this post.

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-dexed.jar: 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

busybox: https://busybox.net/; https://github.com/osm0sis/android-busybox-ndk

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

xz: https://tukaani.org/xz/

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

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

Originally all but busybox were compiled natively on my Nexus 7 2013 using a KBox2 build environment, now cross-compiled with the NDK on my PC and my own AIK Build Farm. :cowboy:

Notes:

You may delete /data/local/AIK-mobile/bin/busybox if you want to use your ROM's busybox instead.

Linux will be next on the list, and should be pretty easy since I did all of the shell script leg work with the Android version. ;) (y)

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.