yashsingh1/xdaforums huggingface dataset:
[Android Software Development] osm0sis:
Android Image Kitchen v1.9 + AIK-mobile/AIK-Linux v1.3

Update ALL the things! :D

Android Image Kitchen v1.9

- Rebuilt slimmed magic file from the latest source, adding Android magics to hopefully provide some more info if an image fails due to format differences.

- Extend "No files found" to cover both split_img and ramdisk directories.

- Add ramdisk directory to overwrite warning check in unpackimg.

- Latest mkbootimg/libmincrypt patches from AOSP, plus some fixes.

- Updated unpackbootimg with board name export support.

- Added "board name" support to repackimg.

- Clean up mkbootimg cmdline handling in repackimg.

- Latest Cygwin binaries and libraries.

AIK-mobile v1.3 + AIK-Linux v1.3

- Add ramdisk directory to overwrite warning check in unpackimg.

- Different busybox binary (1.21.1) statically compiled to work on both ARM + x86 (with emulation, may need manual installation still). (AIK-mobile)

- Added fallback to system busybox if not found in AIK bin directory (ie. delete /data/local/AIK-mobile/bin/busybox if you want to use your ROM's). (AIK-mobile)

- Latest mkbootfs patches from AOSP. (AIK-mobile)

- Latest mkbootimg/libmincrypt patches from AOSP, plus some fixes.

- Updated unpackbootimg with board name export support.

- Added "board name" support to repackimg.

- Minor output cleanups to match mobile. (AIK-Linux)

More on my own build changes in the commits here: https://github.com/osm0sis/mkbootimg/commits/master

Installation information and details on each edition can be found in the OP for Win32 or the AIK-mobile and AIK-Linux initial release notes.

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.
[Android Software Development] Davy Bartoloni:
i've just make a tool to fix the GZIP for the mediatek recovery...

and now i can decompress the image :)
[Android Software Development] Gold_Phenix:
Is possible to add support xperia S kernel.elf ?

Wysłane z mojego LT26i przy użyciu Tapatalka
[Android Software Development] jurben:
AIK-Linux-1.3:

inconsistent file naming in unpackimg.sh line 66 and 76 make error :

line 66:

mv "$file-ramdisk.gz" "$file-ramdisk.cpio$compext";

line 76:

$unpackcmd "../split_img/$file-ramdisk.cpio.$compext" $extra | cpio -i;

should be:

$unpackcmd "../split_img/$file-ramdisk.cpio$compext" $extra | cpio -i;

(cpio$compext not cpio.$compext)
[Android Software Development] adeelraj:
can i add other devices kernel zimage or kernel config.gz or ramdisk

if i unpack boot.img of franco kernel nexus 4

which things can i add to my device unpacked boot.img.

my device specs are same as nexus 4

will it boot?

plz guide me anyone on this.q
[Android Software Development] osm0sis:
Kernel source is device-specific, so it stands to reason the compiled source (zImage) would be too, right? We already spent a page and a half answering pretty much these exact questions the last time you asked them, I suggest you go read them again then Google anything you don't understand:

http://xdaforums.com/showthread.php?t=2073775&page=35
[Android Software Development] reS28raM:
Thanks bro! Just installed and tested for the first time and was wondering what was wrong good finding
[Android Software Development] osm0sis:
Ah! Thanks! Those were the last changes I made, bringing it in line with AIK-mobile and totally forgot to test it on Linux since it worked on mobile (..where I didn't forget that change ;)).

I've been compiling the latest lz4 binary and magic file so I could do a v1.4 with more than just that fix. I also started tracking my own updated mkbootfs for AIK-mobile from CM adding the latest commits from AOSP: https://github.com/osm0sis/mkbootfs

Ran into a snag with file 5.19 though, I compiled it the same way as I did 5.18 but when you actually try to use the compiled binary to determine a filetype it doesn't work, just bails with "Aborted". No idea what's wrong; the magic file works everywhere else, so it's not that. I'm going to mess with it some more tomorrow maybe, then release v1.4 with whatever one works. :good:
[Android Software Development] Alkemix:
AIK linux 1.3 doesn't work well... boot.img generated not good. Boot loop on Galaxy Nexus and Kitkat F2FS roms. If I use Windows OS boot.img is made right.

But I need Ubuntu Linux 100% working :( I don't want use Windows !!!
[Android Software Development] reS28raM:
Unpacked latest TWRP for Nexus 5, modified the ramdisk, repacked the image, put it into a zipfile and flashed. All went well, tool worked great. :)

AIK 1.3 on Debian with the fix some posts above.

Thanks friends, great tool.
[Android Software Development] :
bbx86

osm0sis,

sorry to post on thread, couldn't find option to attach the other way

m
[Android Software Development] osm0sis:
Here we go again! New versions up in the OP! Should be good this time for awhile; at least until I get the chance to finish cooking up some other stuff I've been working on. :cyclops: Couldn't make a fully working native ARM compile of file 5.19 so I stuck with 5.18. :good:

AIK-mobile v1.4 + AIK-Linux v1.4

- Updated mkbootimg/unpackbootimg with a couple minor fixes.

- Fix a filenaming typo I missed from the last version that broke unpacking. (AIK-Linux)

- Latest lz4 binary (r117).

- Update to slimmed magic file (from file 5.19) with my own fixes.

- Add my own mkbootfs, forked from CM and updated with the latest AOSP fixes.

More on my own build changes in the commits here: https://github.com/osm0sis/mkbootimg; https://github.com/osm0sis/mkbootfs

Installation information and details on each edition can be found in the AIK-mobile and AIK-Linux initial release notes.

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.
[Android Software Development] Alkemix:
Now.. It is perfect ! All work very fine ! Wonderful tool !!! Thanks a lot [MENTION=4544860]osm0sis[/MENTION] :cool: :good:
[Android Software Development] shoey63:
Will test latest and report back:)

Edit: latest Linux version works a treat :thumbup:
[Android Software Development] osm0sis:
;)

Here's my latest tool, which goes VERY nicely with AIK-mobile for modding on-the-go:

http://xdaforums.com/showthread.php?p=53543397#post53543397 :D
[Android Software Development] osm0sis:
[MENTION=5580710]ShinySide[/MENTION] [MENTION=4179234]trevd[/MENTION]

Android Boot Image Info Utility

Printing information for "test_img\gtab4-smt230nu-crazy-boot.img"

Header:
magic : ANDROID!
kernel_size : 5227016 (004fc208)
kernel_addr : 0x10008000

ramdisk_size : 3437871 (0034752f)
ramdisk_addr : 0x11000000
second_size : 0 (00000000)
second_addr : 0x10f00000

tags_addr : 0x00082800 [color=red]<- dt_size ?![/color]
page_size : 33554432 (02000000) [color=red]<- WTF ?![/color] | [color=blue]should be 2048 (0x00000800), fixes sizes and kernel/ramdisk output[/color]
dt_size : 268435712 (10000100) [color=red]<- tags_addr ?![/color] | [color=blue]should be 534528 (0x00082800), fixes dtb output but there's 1 page trailing data[/color]
unused : 2048 (00000800) [color=red]<- page_size ?![/color]

name :
cmdline :

Other:
magic offset : 0x00000000
base : 0x10000000

Basically, everything's fine up until the 3rd line of the header, where it all goes tits up. I worked out the correct pagesize by looking at it, since it's actually the same as most images (2048), and then the correct dt_size by finding the end of the dtb and adding a page (per usual). From those I noticed those numbers existed in the header, just in the wrong order. There's an unused section of the header that is for future expansion in the standard (bootimg.h) and it's supposed to be empty but isn't here and that's how they shifted everything around.

So instead of: "tags_addr, page_size, dt_size, unused"; we're looking at: "dt_size, something, tags_addr, page_size", they swapped the last two and the first two and started using the area they weren't supposed to. :confused:

Also, just like that random Pantech Vega image someone supplied during the dtb testing there is extra data after the final page of the dtb; perhaps that's what the extra "WTF/something" part that was formerly unused is being used for by them.

TL;DR: It's all f*cked up and I can't support it. :( No idea what Samsung is playing at. :mad:

If you really need to unpack+repack you could hexedit the 3rd line to what it should be, unpack, repack, then hexedit it back to Samsung's crazy garbage.
[Android Software Development] ShinySide:
Its been accomplished really recently. It's all on his github ;)

http://xdaforums.com/showthread.php?t=2785612
[Android Software Development] osm0sis:
FTFY. ;)

Nice one. Yeah, I have no interest in trying to incorporate workarounds for the myriad ways manufacturers decide to break with standards.. So it's good that people are willing to build the custom tools required when Samsung and others don't want to play by the rules. :good: :)

Following your link, looks like that extra page of data might be a non-standard boot image signing method. Good to know!
[Android Software Development] ShinySide:
Yeah I wouldn't either. Especially for that since that might strictly for tab 4 and may never work with anything else.

Thanks for continuing looking into it tho. I forgot I posted in here or would told ya when it was posted so you didn't waste time trying to reevent the wheel. Keep up the good work bud :thumbup:
[Android Software Development] Junaid1460:
will this tool support initramfs boot.img

i mean can it unpack boot.img from galaxy s2 or galaxy note
[Android Software Development] osm0sis:
As usual, you tell me please. I only support the Android standards and I don't own a thousand devices. Confirmed working are in the OPs, so if it's not there I haven't heard.

AIK-mobile v1.5 Beta

I'm also letting the cat out of the bag a little early since I want to be nice and thorough; AIK-mobile v1.5 Beta is available for those who would like to test. Full x86 and MIPS support has been added with an intelligent installer to push the correct binaries to your device. [MENTION=5864662]moonbutt74[/MENTION] has agreed to try x86 and it appears to work great, so I'd really like at least one MIPS user to test if possible before I do a general release. :)

A lot of work went into this. I changed my compiling method for AIK-mobile/Linux from manually on-device for ARM-only and PC for Linux, to automated on PC for ARM, x86, MIPS and Linux, writing myself an "AIK Build Farm" to orchestrate the 18 compiles required. :cowboy:
[Android Software Development] Junaid1460:
for me ur earlier version not working

but you can test any boot.img from s2/note forum

if you have enough time
[Android Software Development] osm0sis:
I have time, but not to go randomly hunting for device images. Links please. ;)
[Android Software Development] Fishmanzero:
First thank you for your nice work!

And it is possible to add support to samsung devices ( I have a Captivate i897 myself)? Tried some CM base Captivate kernels and it dosen't work.

Samsung devices are using particular kernel image layout perhaps, as well as various compress methods like bzip, lzo, etc as far as I know.

Semaphore thread for your reference. http://xdaforums.com/showthread.php?t=1816087

P.S. Tool works without problem with Galaxy Nexus kernels~
[Android Software Development] TheForceUnleashed:
Is anyone having a problem that the program cannot find the boot.img? It says "no image file supplied" clearly though I have the boot.img on the root of the folder.

Barnes and Noble Nook Tablet, kernel 3.0.58
[Android Software Development] trevd:
It maybe because the boot image is signed. much like some htc boot.img can you upload an example so I can talk a look, alternatively you can look yourself by loading the image into an hex editor. and looking for the ascii string ANDROID! , that's the real start of the boot image. :laugh:

@osm0sis - Which remains me If you want to handle kindle fire images the boot image is offset by 808 bytes. ;)
[Android Software Development] osm0sis:
Thanks! I'll take a look on my day off Wednesday hopefully to see if it's something bizarre like the HTC images or what.

That's actually the error text from my batch file, so I'm not sure why it wouldn't read it. Make sure the zip is unzipped correctly and the boot.img should be in the same dir as the .bat files. Drag and drop to unpackimg.bat. By your sig it should work for all your devices except maybe the Nook. Also please point us to a thread/link with the boot.img in question and I'll attempt to reproduce myself. :)

@trevd: Man, so many foolish offsets! Not sure how I'd support them unless the split_img became more intelligent and spit out an offset file as well (hint hint ;)).. also, I was wondering what your thoughts were on that one byte difference with the repacked htc images that weren't working on the last page?
[Android Software Development] trevd:
LOL , I feel the elbow In my ribs... Don't worry it's going to scan the full image looking for the android magic..... been working on it today. :D

Anyways, To your weird byte problem... Can you upload the image ( either one will do ) I just want to make sure but it looks like it's changing the ramdisk_addr which would obviously explain why it doesn't boot afterwards.
[Android Software Development] frapeti:
I am getting this:

i9070 boot image
[Android Software Development] GEKTHEBOSS:
R: [DEV][TOOL] Android Image Kitchen - Unpack/Repack Kernel/Recovery + ramdisk [Win32

I dont get ramdisk !

Sony xperia u cm 9.1 fxp boot.img / kernel .elf
[Android Software Development] trevd:
Re: [DEV][TOOL] Android Image Kitchen - Unpack/Repack Kernel/Recovery + ramdisk [Win3

Hi folks.

Can I suggest, if you run into problems that you upload the boot image in question.

Thanks
[Android Software Development] khan_frd2002:
+1 But for Samsung device
[Android Software Development] osm0sis:
You're going to have to be more specific. Did you even try it yet on your device?

Link me to an image at least.

Edit: Sleuth that I am, I checked out where you post and it looks like you own a Samsung Vibrant, so another Galaxy S basically, check out my posts on the next page, since it's a reasonable assumption that you've got the same issue as the Captivate and Advance.

Still need to know what device you were talking about as well. Like I said, from your sig., it should work on all your devices except maybe the Nook.
[Android Software Development] osm0sis:
Actually this is pretty straight forward. Android recovery/boot.img's usually contain both the zImage (kernel binary) and the ramdisk. Those Semaphore zips don't contain a boot.img, only the zImage, so there is nothing to split and no ramdisk to unpack. Same seems to be the case for the other kernel I looked into for this device, SpeedMod. I also tried Devil3 (from Hellybean), which has a legitimate boot.img and it actually has the same output as the Galaxy S Advance, so please also read below.

Okay, so Samsung Galaxy S Advance. The kernel image I tried (CoCore) produced the same result (smiley face cmdline and eof for gzip since it didn't split correctly), so it does seem to have something different going on, possibly Samsung specific packaging for ODIN that unpackbootimg can't handle, and it's also possible it just doesn't contain a ramdisk. I'll try to look into it to be sure. Thanks for the report. For reference, the cwm recovery zips I found for this device also don't contain proper images, they only replace the recovery binary/system files, so would not be the right type of file for this project either.

Model/variant name kumquat. ;) I'll post on this in a bit since FXP is taking a million years to download.

Edit: 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.
[Android Software Development] osm0sis:
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://xdaforums.com/wiki/index.php?title=Extract_initramfs_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 try to mess around with it when I've got a bit more free time.

Edit 2: This allows a proper repack of this type of image, but it requires an arm cross-compiler, and a bunch of device-specific kernel and ASM files, so it's not portable in the least and so can't be added to AIK :(: https://github.com/aapo/galaxys2_kernel_repack

Another complex script option is posted below. :good:
[Android Software Development] Fishmanzero:
Thank you for investigating the non-standard devices.

For Samsung, I was using the following script to deal with stock based zImages. It provides support for regular compress methods, but cannot handle other like xz or lzma.

http://xdaforums.com/showthread.php?t=901152

This script successfully extracts the ramdisk and is able to repack the zImage after modification.

And regarding ICS AOSP/CM, I found http://xdaforums.com/showthread.php?t=1711150

POST #24

POST #71

Just using his modified CM9 so that should be working for CM9 images. Don't know the changes from CM9 to CM10.

Hope the above give some help...

Thank you again for your work on this.
[Android Software Development] mcbyte_it:
I confirm that these Kitchen Tools works great to unpack/repack Samsung Galaxy S3 i9300 kernels, I used it successfully on kernels from ROMs ELLA, ELLC, EMA2, repacked kernels work just fine !

I used this tool with Windows 8 Pro x64.
[Android Software Development] DraXonic:
Re: [DEV][TOOL] Android Image Kitchen - Unpack/Repack Kernel/Recovery + ramdisk [Win3

This tool is working for me for both recovery.img and boot.img
[Android Software Development] osm0sis:
Oh man, wait until you guys all see what trevd's cooking up, it's going to blow all of this out of the water pretty much. ;)
[Android Software Development] trevd:
No pressure then! ;)
[Android Software Development] GEKTHEBOSS:
R: [DEV][TOOL] Android Image Kitchen - Unpack/Repack Kernel/Recovery + ramdisk [Win32

So i can only use android kernel kitchen for unpack my kernels (xperia u kumquat)?
[Android Software Development] DraXonic:
Re: [DEV][TOOL] Android Image Kitchen - Unpack/Repack Kernel/Recovery + ramdisk [Win3

U can try for that and we u want to cheak if it is working just unpack one working kernel and repack and flash that..without any customs..:)
[Android Software Development] osm0sis:
Nope it just won't work, as I posted in the 2nd post and in my tests on this page. Sorry! Sony uses a different format.
[Android Software Development] Junaid1460:
here is the mediafire link for kernel

http://www.mediafire.com/download/t1imczaknfmid69/Forest-CM11-kernel-V3b.zip
[Android Software Development] :
Will still need someone to test that boot.img. When I first started working on my binaries many months ago I ran in to a problem where it would unpack everything properly but when I would built and flash it later I got hung up on my screen.

[MENTION=4544860]osm0sis[/MENTION] is good at what he does, but some verification is always a good thing to have :).
[Android Software Development] skulldreamz:
Let me know if you guys need any testing for the m7, m8, or G2. Would love to help..
[Android Software Development] osm0sis:
Just opened it up in HxD, there's no header at all, so definitely not standard. :(

Guess I'll lump the Note in with all those S variants in the 2nd OP. Can you confirm the S2 is in the same boat?
[Android Software Development] shoey63:
I can. Recovery is INSIDE zImage for both
[Android Software Development] :
justa question

in /proc do you have a file config.gz?

if so it contains your kernel's _defconfig build file

there's useful info in that.
[Android Software Development] Junaid1460:
for sure both s2 and note 1 are sharing smdk4210.

the ramdisk in these kernel packed as uncompressed cpio archives
[Android Software Development] fonz93:
I have been using the 1.8 versions for 2-3 months without any problem in Windows 7 x64!! i am now downloading the 1.9 version, i have an Huawei Y300-0100
[Android Software Development] DarkAngel:
Tried it on two of my Sprint Phones,

L900 ( Note 2 ) [ KK ] <-------- on the list

L600 ( Mega ) [ KK ] <-------- not on the list

unpacked, made some changes and repacked. Worked great, no errors.

:D:good:
[Android Software Development] osm0sis:
Android Image Kitchen v2.0:

- Add my own mkbootfs, forked from CM and updated with the latest AOSP fixes.

- Update slimmed magic file (from file 5.19) with my own fixes.

- Remove repackimg -o since it was confusing with the -o "output" option for the unpackbootimg/mkbootimg binaries; --original still works.

- Fix unpackimg drag-and-drop execution on images from a different harddrive.

- Tweak all binary self-compiles with optimizations to improve speed, and stripping to reduce filesize, thanks to SHM.

- Update to the latest Cygwin binaries and libraries.

NEW! AIK v2.0 Loki Add-On using the latest official loki_tool (2.1-072014) which I've compiled for Cygwin from PhilZ's updated source. Unzip over top of AIK. Usage is UnLokImg, UnpackImg, Edit ramdisk, RepackImg, ReLokImg. Note: Your device's aboot.img dump must be in the script directory to Re-Loki.

AIK-mobile v1.5 + AIK-Linux v1.5:

- Remove repackimg -o since it was confusing with the -o "output" option for the unpackbootimg/mkbootimg binaries; --original still works.

- Add prebuilt busybox binaries (1.21.1) for x86 and mips. (AIK-mobile)

- Changed root prompt context to u:r:system_app:s0 for data partition execution support on Android L. (AIK-mobile)

- Make /system/xbin/aik a symlink to /data/local/AIK-mobile/bin/aik and add option to restore symlink, e.g. after a ROM flash with "su -c '/data/local/AIK-mobile/bin/aik --restore'". (AIK-mobile)

- Cross-compile to arm, x86 and mips for all binaries to massively increase supported devices. (AIK-mobile)

- Change all binaries to static compiles to avoid PIE (Position-Independent Executable) issues for Android L support. (AIK-mobile)

- Switch to using my own AIK Build Farm with the NDK and my Cygwin-to-Linux cross-compilers so I can build for all platforms/architectures at the same time.

- Tweak all binary self-compiles with optimizations to improve speed, and stripping to reduce filesize, thanks to SHM.

- Fix xz and file binary execution on Android L by compiling them as PIE for now, since they won't seem to compile truly static. (AIK-mobile)

- Rewrite installer in shell script to be architecture independent (update-binary would fail otherwise), and detect device architecture to install the correct binaries. (AIK-mobile)

- Update lz4 binary (r120).

More on my own build changes in the commits here: https://github.com/osm0sis/mkbootimg; https://github.com/osm0sis/mkbootfs.

Installation information and details on each edition can be found in the OP for Win32 or the AIK-mobile and AIK-Linux initial release notes.

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.