#include <std_disclaimer.h> /* * Your warranty is now void. * * I am not responsible for bricked devices, dead SD cards, * thermonuclear war, or you getting fired because the alarm app failed. * YOU are choosing to make these modifications, and if you * point the finger at me for messing up your device, I will laugh at you. * Yes I copied the post header from Cyanogenmod because I was too lazy to make one. */
Android Image Kitchen (a.k.a AIK) was originally created by osm0sis to Unpack and Repack kernels, and edit the ramdisks.
AIK was not supported by our devices (Xperia P/U/Sola/Go) because our kernels have something called 'different packaging using non-standard, Linux "ELF" header' file.
More information here -
Okay, unpackbootimg crashes trying to unpack the boot.img from FXP204-cm-9-20130126-UNOFFICIAL-kumquat because it has the wrong "magic" at the top. trevd pointed this out as a definite incompatibility for some devices a couple pages back. Trying trevd's split_img from the first page, it actually reports the "Wrong magic" error and shows that the file has an ELF header not an ANDROID!. Opening in HxD shows that there is no ANDROID! header later on as with some HTC devices, so ELF is the only header, and we're basically dealing with a different, unsupported filetype here. On the upside, there is no real gap in the data, so there might not be a ramdisk packed with it anyway.
For the other two devices in question above (S Advance + Captivate) it also reports the wrong magic, but with a blank line. Opening these in HxD shows there is no header at all and it just goes directly into the zImage. There are a couple gaps in the middle that could signify the placement of a ramdisk, but without a split_img tool that can handle these raw Samsung files that don't follow the Android image header standard, I don't think there's much I can do.
Edit: Here's the info on how to split them http://forum.xda-developers.com/wiki...fs_from_zImage (thanks trevd), but, again, not much I could easily do to make my batch scripts figure out which it is and split/repack correctly. I'll mess around with it when I've got a bit more free time, but this tool was intended for the Android standard image filetype.
But, munjeni already has some great tools to to the unpacking and repacking kernels.
Therefore, with the help of munjeni's tools, I was able to modify osm0sis's scripts to get AIK mobile working for our devices.
Now you can easily modify ramdisks on the go!
- Compression support, and --original to repack with the original ramdisk.
- The flashable zip installs AIK for your Android architecture (ARM) to /data/local/AIK-mobile/ and a helper script symlinked at /system/xbin/aik
- 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. Not working for now.
- Running su -c "/data/local/AIK-mobile/bin/aik --restore" will remake the /system/xbin/aik symlink, e.g. after a ROM flash.
- Move the image file into the working directory with a file explorer and make sure it has no spaces in its name to avoid any possible issues. You may delete /data/local/AIK-mobile/bin/busybox if you want to use your ROM's busybox instead.
- This is just the AIK-mobile version. Please don't ask for the Desktop/Linux versions of these as they are going to take a while.
AIK Mobile Installer (v1.7) for Xperia 2012
To - Do:
- Modify the scripts to make it work with 'unpackbootimg' and 'mkbootimg' binaries
- You tell.
- osm0sis for everything related to Android Image Kitchen!
- munjeni for his 'kernel_dump' and 'kernel_make' binaries
- AGONTUK for some help with commands