Home » 2016 » August » 21 » kitchen images
10:25 AM
kitchen images





[DEV][TOOL] Android Image Kitchen - Unpack/R | Android Development and Hacking | XDA Forums

Android Image Kitchen -- Unpack/Repack Kernel+Recovery Images, and Edit the ramdisk.

Windows ports of the necessary Linux utils for Android image (kernel/recovery) mod work:

bzip2, cpio, cut, file, gzip, lzop, xz;

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 unpackbootimg, mkbootimg, and mkbootfs executables from the latest CM and AOSP sources.

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, or Android ARM/x86/MIPS. With this universality in mind I've automated the whole process with batch/shell scripts.

Instructions

1) Unzip.

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.

Enjoy!

Questions, comments and feedback welcome.

Credits Thanks: All authors of the included binaries and libraries for their amazing work, as linked above. Peteragent5, alansj iridaki for the general methods used in their PERL scripts and Linux guides. 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, shoey63 + talich for testing out the Linux version, and moonbutt74 for testing out Android-x86 support. Huge thank you to trevd and Modding.MyMind 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.

Download counts:

AIK - v1.0: 1540; +HTCFix: 430. v1.5: 4718. v1.6: 3556. v1.8: 8678; +Lok2Img: 1629. v1.9: 2580. v2.0: 22886.

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.

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

XDA:DevDB Information

Android Image Kitchen, Tool/Utility for the Android General

Contributors




Views: 323 | Added by: iviangame | Tags: images, kitchen | Rating: 0.0/0
Total comments: 0
avatar