yashsingh1/xdaforums huggingface dataset:
[Android Software Development] bombadier:
CM11S can't see any reason why it would not work on cm12

tapatyping fae the bacon
[Android Software Development] osm0sis:
Whoo! Almost 22900 for v2.0, and 7800 and 2600 for v1.7 mobile and Linux, respectively! :D

Here's a feature I've been meaning to implement for awhile, to allow people to fine tune the resulting file size of the ramdisk/img! All compression formats accept 1-9, some also accept 0, just be aware that support for the kernel to boot with different compression levels varies as well. :cowboy:

Android Image Kitchen v2.2:

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

- Add advanced repackimg --level commandline option to control the compression level of the repacked ramdisk.

- Update mkbootimg and mkbootfs binaries from my repos.

- Update to the latest Cygwin binaries and libraries.

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

- Add advanced repackimg --level commandline option to control the compression level of the repacked ramdisk.

- Update mkbootfs binary from my repo (AIK-mobile).

- Update xz binary (5.2.1) (AIK-mobile).

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.
[Android Software Development] Pannam:
Thank you,

this is the only tool that actually worked to unpack lz4 compressed lg g3 snapdragon 805 chip boot image. i was trying to make a cwm recovery for my device so will the normal command to make recovery image (cwm) automatically compile or do i have to re use your tool to recompile the recovery image ? :confused:
[Android Software Development] osm0sis:
Not sure what you mean by "the normal command," but if you unpacked with it, and you require lz4 support to repack the ramdisk, then why wouldn't you also make the image with my kitchen?
[Android Software Development] Pannam:
i am making a cwm recovery image.

i unpacked my stock and boot recovery images then i place them in cwm working directory with all necessary editing. Now, when i run the cwmr command

make -j4 recoveryimage

it doesn't repack it with lz4 support. can i just repack without that command with your kitchen and it will work ? :confused:
[Android Software Development] osm0sis:
No idea. Not directly what my kitchen is for. If your cwm has lz4 ramdisk support in the kernel then you should be able to take the zImage you've made and my kitchen can create the repacked image with lz4 ramdisk but I can't guide you any further than that.
[Android Software Development] shoey63:
[MENTION=4934256]Pannam[/MENTION]

If you build a cwm recovery image, you should be able to just flash it without the kitchen, provided of course, your bootloader is unlocked
[Android Software Development] Pannam:
Its lg g3 and my bootloader is locked but we can bypass it by using a bump tool. Yes i can flash it. Just unsure if i need to repack ramdisk with lz4 compression or not. If its a yes then it has to integrated within the cwm building process.
[Android Software Development] NitrogenX2:
hi my friends

i want edit kernel and cchange selinux for note 4 kernel on lollipop

please help me.... tnx for reply :good::good:
[Android Software Development] shoey63:
After successfully splitting the boot.img, try adding this to the end of the kernel command line

androidboot.selinux=permissive

and repack.
[Android Software Development] NitrogenX2:
tnx for replying man

i unpack kernel with َAIK tool after unpacking i have 2 folder

ramdisk and split_img

where add this command line ??

tnx for help me and sorry for me to amator :rolleyes:
[Android Software Development] Chaospudding:
Acer Iconia B1-730 (Non-HD) Tablet - Unpack "boot.img"

Hi there, I'm having a problem with what I'm trying to do, but I'll provide as much information about my device and what I'm trying to achieve below (Also I'm new to this, so my understanding of some things might be a bit lacking). I will say in advance that my unsuccessful attempts using the tools on this thread may be due to my own error as well, and any suggestions on what I may be doing wrong will help.

Any help is greatly appreciated :)

NOTE: This is my first post on xda, so posting links is going to be a bit difficult ... I will still try to provide as much information as I can.

Goal

- When I start up the tablet, there is an initial "Acer" boot logo, which I'm assuming is in the boot.img file (and I've been attempting to extract that with no success). I would like to change this logo.

-

Note

: I've already managed to extract and change the secondary "looping" logo in the system.img and re-flashed it on the tablet no problem.

My Device

- As mentioned above, I'm trying to modify an Acer Iconia B1-730 (Non-HD) Tablet

- Android Version: 4.4.2

- ROM Size: 16GB

- RAM Size: 1GB

What I've Tried

- I've downloaded the tools from another post on xda regarding this tablet, and successfully flashed it no problem (www --->

android-tech.rocks

)

- What I've been trying to modify after was the

boot.img

, though using the tools in this thread (and many others) I've been receiving messages like "

Android boot magic not found

"

-

Note

: The tool I was attempting to use in this thread was the "

/Android Image Kitchen/unpackimg.bat

".

- Another thing I tried was extracting the boot.img directly from the partition on the tablet, which for me I believe was

/dev/block/mmcblk0p2

(Instead of the one downloaded from the site I mentioned above), and using another tool on this forum somewhere (I will post it when I find it again) I managed to get these 5 files (

boot.img-base

,

boot.img-cmdline

,

boot.img-pagesize

,

boot.img-zImage

, and

boot.img-ramdisk.gz

). The boot.img-ramdisk.gz archive is about 1.6GB in size, but I am unable to gunzip/cpio it, as I continue to receive messages such as "

Android magic not found

" and "

boot.img-ramdisk.gz: not in gzip format

" and "

cpio: premature end of archive

".

I'm sort of at a loss of what to do right now about un-packing/re-packing the boot.img.

NOTE: I need to make 10 posts before I can attach my boot.img files, so if you require any for review please message me elsewhere and I can do my best to get them to you :)
[Android Software Development] shoey63:
It's in split_img. It's called boot.img-cmdline. (self explanatory I would have thought) Edit it and repack
[Android Software Development] NitrogenX2:
i open boot.img-cmdline and add new line you say but enforcing !

not change

boot.img-cmdline was empty after edit 2 line add
[Android Software Development] shoey63:
Don't add new lines. In the boot.img-cmdline file, leave a space at the end of the existing text (it shouldn't be empty), add the new command and make sure you save it. Then repack it. If still enforcing then changes need to be done to the kernel itself (boot.img-zimage). This means recompiling the kernel with selinux changes, and is beyond the scope of this thread.
[Android Software Development] osm0sis:
1.6 GIGAbytes?! If so, sounds like there may be some header values switched like on some newer Samsung devices.
[Android Software Development] Chaospudding:
Thank you for the reply, but I'm not sure what that means haha. Also yes, 1.52GB to be exact (for the ramdisk), and 1.17GB for the kernel.

Is there something I can do to properly extract the ramdisk gz file?

Any suggestions to point me in the right direction will help :)
[Android Software Development] osm0sis:
Check out the OPs for links to the Samsung issue to read more. Unless you get the specific tool to split them correctly, they'll remain enormous and useless.
[Android Software Development] roshan2989:
hello there anyone know how to make zimage-dtb to boot.img...i just can extract boot.img.
[Android Software Development] aaki_rocker:
thanks a lot !

the simplest kernel editing tool.

so happy to run adb root from the default kernel.

finally now i can s-off my htc butterfly s. :)
[Android Software Development] fadern:
Hi,

im trying to unpack the boot image from a Amami cm12 but i dont get all the files. It only gives me init, logo.rle and a sbin folder.

Ive tried to run the the script from both linux and windows.
[Android Software Development] shoey63:
You should find ramdisk.cpio and ramdisk-recovery.cpio in the sbin folder. It's like that because sony doesn't have a dedicated recovery partition, and cm uses a script to hijack FOTA-kernel.
[Android Software Development] :
Link to flashable zip?
[Android Software Development] osm0sis:
OP?
[Android Software Development] :
I've tried to flash zip, but it fails.

Twrp log reports: E:Failed to sysMapFile '/download/UPDATE-AIK.Mobile.Installer.v1.8-ALL.zip'

P.S. Why i able to view links only on Xda free app?
[Android Software Development] osm0sis:
Works fine here in TWRP, and presumably the other 3700 people who installed it. Download again to make sure it's not corrupt?

XDA app questions are for the XDA app threads. I use Chrome. ;)
[Android Software Development] Holer Togni:
Just saying thank you for these incredibly useful tools. I've just successfully edited the N9 5.1.1 ramdisk with them and it was a breeze!
[Android Software Development] blueyes:
confirmed working

Updated[/B] 2015-04-02[/QUOTE]

Knew it would work on my N6 and 7 but you can add the LG GPad 8.3 LTE. EVEN with a locked bootloader I'm able to adjust boot IMG.. Made it permissive just to test and booted right up.
[Android Software Development] osm0sis:
Great news! Please don't quote the entire OP though, it's generally frowned upon. :)

[MENTION=6207927]713brianp27[/MENTION] please edit your post.
[Android Software Development] blueyes:
Sorry didn't mean to quote entire OP. Thanks for a great tool. Love to try it on kltevzw but gave mine to my daughter when I got N6.
[Android Software Development] juliusssss:
Hi,

I'm trying to edit ramdisk from xiaomi mi2's boot.img , it's based on android lp 5.0.2.

But when i repack it without any change, mi2 doesn't boot. Is it a problem of the boot.img or the tool doesn't support lp's boot.img?

With JB and KK works fine, it's a great tool.

Thanks.
[Android Software Development] osm0sis:
Per usual, link to the original img?
[Android Software Development] juliusssss:
Here is the boot.img.

Thanks in advance. :o
[Android Software Development] akamustang:
I tried to unpack then repack twrp without any changes, but the newly repacked version failed to work.

More specifically this Nexus 6 recovery image: https://dl.twrp.me/shamu/twrp-2.8.6.0-shamu.img.html

Any hints?
[Android Software Development] JRJ442:
Something must have went wrong on your end. I repacked 15 Shamu images for regular TWRP, and 15 for Multi-ROM TWRP and they all flashed fine.
[Android Software Development] akamustang:
Turns out this was a great tip, I went from Win7 with an ancient SDK installed somewhere (not sure if this someone took preference) to a clean Win8 and it seems to be working now.
[Android Software Development] JRJ442:
Glad I couldn't really be of much help. Lol. I still run Win7. Maybe just the install got screwy the first time. Glad you got it though.
[Android Software Development] kpirnie:
Seems to work good on Win10 Preview
[Android Software Development] adeii:
Can I unpack custom recovery for one model, change kernel file, repack and got working custom recovery for another model?! Both are Samsung Galaxy models.
[Android Software Development] shoey63:
Nope, due to different screen resolutions, chipset, backlight path, fstab etc.
[Android Software Development] osm0sis:
Finally got some time. Been busy with work and other stuff. ;) Sorry for the wait. :o

Are you using Windows, Android or Linux? Using "repackimg --original" resulted in an image with a different sha1sum from your original (and shouldn't), so HxD comparing the two revealed the headers are completely identical, including the ramdisk hash (and therefore all the main data), but there's an extra block of data at the end of your image, that isn't technically part of anything, starting at hex offset 00752800 which must be causing the trouble; something like a security hash they added in Lollipop?
[Android Software Development] JRJ442:
Good idea on keeping the GApps thread closed so people can't flood the thread. The amount of questions in the old thread made my head spin. Lol
[Android Software Development] osm0sis:
Thanks. However, this should be posted in the GApps Q&A/Discussion thread, not in my completely unrelated AIK thread. ;)
[Android Software Development] heXacode:
[MENTION=4544860]osm0sis[/MENTION] long time no talk. I'm currently on the AT&T Note 4 and working with a team to try to get permanent root. We are stuck because write protection is tied into aboot.img. In order to turn it off I have to modify 0x0 to 0x1 to disable PWR_WP. I talked to bsmitty83 about what would work with unpacking aboot.img and he directed me to you. This is not a boot.img but an aboot.img and he said your AIO (all-in-one tool) should do the trick to unpack aboot.img. I'm using Linux Mint 17.1 and have your Android Image Kitchen tools on here. Is that the same thing as AIO? Anyways, I ran the terminal from the AIK-Linux folder and did ./unpackimg.sh aboot.img and it just says Android boot magic not found. This is my first time trying to unpack an .img or doing any of this stuff but working hard on it.

Will this work for aboot.img even though it's not boot.img? I have boot.img but that's not what I'm after since all the issues are in aboot.img in mmcblk0p7 block.

Here's the terminal image of aboot.img highlighted from mmcblk0p7:

Here's the aboot.img
[Android Software Development] :
[MENTION=3508760]heXacode[/MENTION], I do not think this project will do the job. For humor sakes I tried it against my own project and still nothing. The aboot.img is different from a boot.img by far.

I think you may need to approach this task from another angle.

---------- Post added at 03:30 AM ---------- Previous post was at 03:27 AM ----------

[MENTION=3508760]heXacode[/MENTION], I am curious as to how you got your hands on the aboot.img? My wife has a device which I too also need to modify in order to get permanent root but I cannot figure out for the life of me how to pull it from the device as of yet.
[Android Software Development] heXacode:
Yeah aboot.img doesn't get the same treatment as boot.img. I had to research what people even view it with and there was very little answers till I saw an image of someone viewing aboot. The program is Hex-Rays IDA Dissembler. Works very well. I'm on v6.6.

As for pulling aboot.img I use Linux and temp root on my phone. Open up terminal and enter these:

su

adb shell

dd if=/dev/block/platform/msm_sdcc.1/by-name/aboot of=/data/local/tmp/aboot.img

chmod 644 /data/local/tmp/aboot.img

exit

exit

su

adb pull /data/local/tmp/aboot.img aboot.img
[Android Software Development] osm0sis:
dd to change the bytes you need using temp root. Check out my Odds and Ends thread and my BootUnlocker script for commands similar to what you'll want. :good:
[Android Software Development] :
Thanks, an yea, IDA is a great tool but unfortunately I am running on linux lol. How did you go about gaining temp root.

I can't grab the aboot.img without temp root which is my current issue. Even if I could just gain temp root for like five seconds I could do what I need to do lol.
[Android Software Development] shoey63:
You can try kingroot, but just be aware they will know your IMEI in the process. Done it myself on Sony xz ages ago.(nothing untoward happened). In fact, just did it again on my new Z3:p

I just installed supersu afterwards to get rid of the Chinese crap :sly:
[Android Software Development] heXacode:
You can use Ida on Linux. They have a Linux version of it but I don't know where exactly it is. I had to use Wine instead to run a Windows based program on Linux.

Try Kingroot as suggested for temp root.
[Android Software Development] :
Didn't know they had ported it over to linux! If they did do this then I will hunt it down for sure since it is my favorite hacking tool. Thanks again bro. Will try kingroot and see what happens. My wife owns a Sharp Aquos through Boost Mobile and Sharp just simply sucks all around. Can't even get development support from them people. They are borderline MediaTek haha.
[Android Software Development] heXacode:
I know the feeling. Let me know if you need additional help.
[Android Software Development] :
Hmm, not a fan about the imei situation. Will have to handle that first then.
[Android Software Development] Rittik:
Re: [DEV][TOOL] Android Image Kitchen - Unpack/Repack Kernel/Recovery + ramdisk [Win3

aqesome gonna give it a try

-Rik[Rittik]
[Android Software Development] Alroid:
plz HELP: what is "cmdline.txt". the kitchen asked it... how and where can i find/build it?

thanks
[Android Software Development] osm0sis:
cmdline is automatically split from the image when you unpack it, under \split_img\, and automatically parsed when you repack, so you shouldn't have to do anything. Either you're using it incorrectly or there's a device incompatibility as I've discussed over the last few pages.

Please provide a link to the img you're trying to work with and device info as per the OPs.
[Android Software Development] Alroid:
Here is the link to img when the kernel is extracted. There is not such file inside it...maybe it is done by developer to protect it? I just want to chane the boot logo.

Sony XP (LT22i)/Fidelity ROM v10/ThP kernel (http://www.mediafire.com/download.php?hu93igvuhx3b0h9) (The elf file has been extracted from zip)

https://www.dropbox.com/s/k5ck46kkp74bk0x/extract.png

Thank you my Friend :good:
[Android Software Development] osm0sis:
That's not my tool, that's championswimmer's. :confused:

Either way, Sony ELF files aren't supported, as per the OPs. Sorry! :(
[Android Software Development] Alroid:
ok,I'll ask him.anyway Thank you osm0sis for your quick responses ;)
[Android Software Development] erdal67:
could someone explain how to use it?

:good:
[Android Software Development] osm0sis:
The OP explains it very well. Please give it another read.
[Android Software Development] DraXonic:
Re: [DEV][TOOL] Android Image Kitchen - Unpack/Repack Kernel/Recovery + ramdisk [Win3

This tool is awsm already edited 4TWRPs and 6 kernels... :)
[Android Software Development] osm0sis:
If anyone has encountered an issue with the repacked kernels not charging when the phone is shut down, I just discovered that issue with the help of 4 people over in the GN franco.Kernel thread in the last day. I narrowed it down to the charger binary not getting the appropriate executable permission when it's being repacked (should be 750, or rwx-r-x---, but instead gets 644 rw-r--r--), and determined it was likely mkbootfs at fault since every other file in the ramdisk has correct permissions.

I contacted trevd, he confirmed that could be a problem with using older versions of mkbootfs and has gone the extra mile yet again and compiled the latest (JB 4.2.2) Cygwin-based mkbootfs.exe and it correctly sets the permissions on charger now. As far as I know this is the only place that has a recent enough win32 compile to address that problem, so that's a nice little minor first for us here. :)

For those who have been playing with their kernels' ramdisks, check to see if your device is affected. If so, simply repack it with trevd's compile of mkbootfs.exe, available at the following link, by dropping it into the android_win_tools folder, unpacking your image and repacking again:

http://d-h.st/D25

In other good news, the time is approaching for trevd's all-in-one utility. His github repo for it is now open for viewing so feel free to stop by and peruse it if you're code inclined or just want to see how things are progressing: https://github.com/trevd/android_external_bootimage_tools/commits/master :D
[Android Software Development] GEKTHEBOSS:
Ill try again with my xu with new kernel!:)
[Android Software Development] osm0sis:
Likely still won't work. The kernel format Sony uses isn't the typical Android image. :(
[Android Software Development] tajimura:
Getting unsupported pagesize error after changing ramdisk. Anyone?

Nobody cares what/where is this sent from.
[Android Software Development] trevd:
Nice signature. Ironically in this case we do care where it was sent from :) or at least what device you are using?
[Android Software Development] avinashrocks1990:
works well when i unpack a haida kernel

but when it try to unpack anzu kernel i get and error

gzip:/....../boot.img-ramdisk.gz: unexpected end of file

/......./cpio: premature end of archive

please help
[Android Software Development] osm0sis:
Again. What device? Please provide direct links to the image in question so I can look.

Unfortunately, that output either means there is no ramdisk with that image, or, its not in the android standard image format.

Since it works for your other images my guess would be the former. Read the info for the Galaxy S images (linked in the OPs) for more on the latter since the output was the same.
[Android Software Development] avinashrocks1990:
i'm using sony xperia neo v(haida) and arc s(anzu)

i'm able to unpack some kernels(img) but get errors on some
[Android Software Development] osm0sis:
Right well the Sony xperia info in the OP under "confirmed not working" may apply to you as well then. Direct links to the files and I'll be able to tell you for sure. This is also written in the OP.
[Android Software Development] avinashrocks1990:
strange thing is it works for some kernel and doesn't works for the others for the same device

not working

http://goo.im/devs/nAa/kernels/3.0.x/jb/haida/3.0.8-nAa-02_MT11.img

http://www.mediafire.com/?n6f0fvl48ufzi5v
[Android Software Development] osm0sis:
Thanks. I'll take a look this afternoon just to be sure, but the easiest explanation for what you're seeing is that some kernels choose to include a ramdisk, some don't. If there's no ramdisk there's nothing to unpack and edit. ;):)
[Android Software Development] Haze39:
:)

hello

thank you for your good work "AIK"

S4 GT-i9505 lollipop 5.01 tw personal custom rom (amend for "xprivacy" boot.img on)

win7 64bit + 32bit ubuntu 15.04 on virtualbox

for ubuntu "AIK-Linux-v1.8-ALL.tar.gz" works very well (not yet tested the modified boot.img)

win7 64bit for, installed on C: "Android.Image.Kitchen.v2.2-Win32.zip" unpackimg.back did not work (AIK does not see the "boot.img" in the folder

thank you again for your work :good:
[Android Software Development] osm0sis:
Read the instructions. Drag and drop. :good:
[Android Software Development] Haze39:
:p

hello

I understood thank

:good:
[Android Software Development] geowolf1000:
Hi i used succesfull aik mobile for previous versions of twrp to change themes and splash screens

Latest 2.8.6.1 change theme but reboot or any power mode fail and stuck

Only power button to hard reset

With ui.zip theme works fine

Is any solution for this?
[Android Software Development] z31s1g:
I doubt this has anything to do with the AIK.

If repacking the recovery has worked with previous versions of twrp, that's where the culprit is. And while its possible to include the theme in the repack, I wouldn't recommend it.

TWRP 2870 is around the corner, so maybe just stick to the ui.zip for today and try again tomorrow (or the day after tomorrow).
[Android Software Development] geowolf1000:
I use the custom theme with splash and theme included but i have also paste ui.zip to theme folder is a workable trick

I post for knowledge

Is aik known problem and must update ? For future version ?

Or is twrp problem?
[Android Software Development] z31s1g:
If you use the ui.zip, there's no need to include the theme into the repack.

As said, most likely it's some hiccup with twrp itself. If you want to discuss this further, let's take it to the theme thread.