FORUMS
Remove All Ads from XDA
H10 Turbo

[TOOL][AIK]Android Image Kitchen (Mobile) - Modify Ramdisks on the Go [27-01-15]

1,037 posts
Thanks Meter: 1,139
 
Post Reply Email Thread

Modify Ramdisks on the go!

Code:
#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 -

Quote:
Originally Posted by osm0sis

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!



Features:

- 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.



Notes:
  • 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.



Downloads -

AIK Mobile Installer (v1.7) for Xperia 2012



To - Do:
  • Modify the scripts to make it work with 'unpackbootimg' and 'mkbootimg' binaries
  • You tell.



Credits -
  • osm0sis for everything related to Android Image Kitchen!
  • munjeni for his 'kernel_dump' and 'kernel_make' binaries
  • AGONTUK for some help with commands

The Following 10 Users Say Thank You to ChinmayKunkikar For This Useful Post: [ View ] Gift ChinmayKunkikar Ad-Free
 
 
26th January 2015, 08:11 PM |#2  
ChinmayKunkikar's Avatar
OP Senior Member
Flag Pune
Thanks Meter: 1,139
 
Donate to Me
More
Reserved
The Following 5 Users Say Thank You to ChinmayKunkikar For This Useful Post: [ View ] Gift ChinmayKunkikar Ad-Free
26th January 2015, 08:11 PM |#3  
ChinmayKunkikar's Avatar
OP Senior Member
Flag Pune
Thanks Meter: 1,139
 
Donate to Me
More
May need this one too
The Following 5 Users Say Thank You to ChinmayKunkikar For This Useful Post: [ View ] Gift ChinmayKunkikar Ad-Free
27th January 2015, 09:48 AM |#4  
zeetwo-raj's Avatar
Senior Member
Thanks Meter: 160
 
More
Nice mate
Will try it..
The Following User Says Thank You to zeetwo-raj For This Useful Post: [ View ] Gift zeetwo-raj Ad-Free
27th January 2015, 03:31 PM |#5  
ChinmayKunkikar's Avatar
OP Senior Member
Flag Pune
Thanks Meter: 1,139
 
Donate to Me
More
Quote:
Originally Posted by zeetwo-raj

Nice mate
Will try it..

Don't forget to review it.
The Following 5 Users Say Thank You to ChinmayKunkikar For This Useful Post: [ View ] Gift ChinmayKunkikar Ad-Free
29th January 2015, 03:34 PM |#7  
pirej's Avatar
Senior Member
Flag Skopje
Thanks Meter: 3,203
 
More
Thank you, nice to have this tool too
The Following User Says Thank You to pirej For This Useful Post: [ View ] Gift pirej Ad-Free
1st November 2017, 12:33 PM |#8  
Junior Member
Thanks Meter: 0
 
More
Download link is down. Can You please reupload?
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes