yashsingh1/xdaforums huggingface dataset:
[Android Software Development] G.M.L:
Go to first page first post and download it from the attachments in the end of the post
[Android Software Development] ob1silvia:
I'm trying to tell you none of the links work try clicking on them will not download
[Android Software Development] ashyx:
All working fine here.
[Android Software Development] franzyroy:
For me, the links works fine, I downloaded them, and I tried them again 1 min ago, no problem!
[Android Software Development] ob1silvia:
Was using chromium would not let me download for some reason. Used chrome worked thanks for responding
[Android Software Development] KaMyKaSii:
Is it normal for AIK to generate symlinks after extracting the ramdisk? I wanted to use AnGrep to look for content in the ramdisk folder and for this I should copy it to the internal memory. The problem is that when I try to copy the /ramdisk/sdcard symlink is respected and the content of my internal memory begins to be copied as well. The only solution is I select the files manually by avoiding the symlinks?
[Android Software Development] osm0sis:
Yeah it's cpio, that's how it's got to work. You should harden your method by using find to exclude symlinks and feed them into a for loop to do the grep, or something.
[Android Software Development] Xoib:
Hello,

I am trying to unpack the boot image from the image-bullhead-n2g47o on my macOS 10.12.4 :

➜ Android-Image-Kitchen git:(AIK-Linux) ✗ ./unpackimg.sh boot.img
chmod: bin/chromeos/*: No such file or directory

Android Image Kitchen - UnpackImg Script
by osm0sis @ xda-developers

Supplied image: boot.img

Setting up work folders...

Image type: Android

Unsupported format.
Error!
./unpackimg.sh: line 101: return: can only `return' from a function or sourced script
Splitting image to "split_img/"...
./unpackimg.sh: line 122: cd: split_img: No such file or directory
./unpackimg.sh: line 123: ../bin/x86_64/: No such file or directory
Error!

Is there something I am missing?

Also thanks [MENTION=4544860]osm0sis[/MENTION] for your work!
[Android Software Development] zainifame:
[MENTION=4544860]osm0sis[/MENTION] sir i don't know it will be help or not but this library contain intel partition and etc, hope it will be help for intel image unpack/pack

search 1

search 2

more intel repositories there
[Android Software Development] osm0sis:
macOS isn't supported unfortunately, so I'm guessing that's a big part of the issue. Please use a Linux VM if you can. There's also always AIK-mobile - even better with a good file explorer like FX to allow for touch execution - since we definitely all have an Android device. :)

It also looks like you maybe just cloned it from git.. there are no binaries in the repositories, use the tar.gz from the OP.
[Android Software Development] osm0sis:
Can a Pixel phone owner here please test a repacked boot image from my AIK v2.7 on the post-May bootloader update Pixel and report back? I'm curious whether the reported second_offset workaround to re-append the original signature would work on Pixel as it did on the Xiaomi Mi Max, since they're the same signing method.

Please try both repackimg --original and repackimg with no changes.

I'm guessing no; sounds like Google's bootloader went from not enforcing it at all to being the most strict, but I wanted to know for sure. If no, I'll have to look into automating Chainfire's newly researched signing method: https://xdaforums.com/android/software-hacking/signing-boot-images-android-verified-t3600606

[MENTION=3209971]cam30era[/MENTION] [MENTION=5169465]DespairFactor[/MENTION]
[Android Software Development] Fumetsujo:
Useful, thank you!
[Android Software Development] Surge1223:
Yeah sound like research time for me lol
[Android Software Development] kirito9:
[MENTION=4544860]osm0sis[/MENTION] Hi, would it be possible to build a kernel on android using this as a start?
[Android Software Development] osm0sis:
Possibly, but it would be quite a bit of work and something like Termux might be a better all-in-one solution nowadays.
[Android Software Development] kirito9:
Thanks, unfortunately Termux only works with 5.0+.

Another question, an xda user mentioned to me that it might be possible to get root on a device by using something like KBOX2/3 and accessing the root file system of the android device. Well the KBOX2 project site says that. Would it be possible to root a device like that? Pushing the files then applying permissions. I'm thinking yes but the problem here now would be on android 6 which requires a modified boot.img . Thoughts?
[Android Software Development] osm0sis:
Can't access root on KBox without root, naturally. It provides a chroot fake root filesystem however, so it doesn't matter. Anyway, this is all totally off topic for this thread. If you have any more questions ask in my Odds and Ends thread please. :)
[Android Software Development] kirito9:
Riight, sorry for the OT ?.
[Android Software Development] cam30era:
[MENTION=4544860]osm0sis[/MENTION],

No problem with Pixel C on 7.1.2. But it's ChromeOS, and didn't get a new bootloader. My Pixel XL is a VZW version with an unlockable bootloader, unfortunately.

Edit: meant to say May security update...
[Android Software Development] ale8530:
[MENTION=4544860]osm0sis[/MENTION]

I have sent 5 dollars donation for you :) (ale.8530@gmail.com)

Thanks for your work
[Android Software Development] osm0sis:
Thank you very much! As I was telling another kind donator awhile back, donations are so very appreciated and help keep me motivated to experiment with whatever crazy scripting hacks pop into my head for making our Android lives easier, and especially with regards to persevering with updates for the absolute beast that AIK has become. :)
[Android Software Development] Geofferey:
I want to thank you personally. I use this on a regular basis to modify images. I saw you thanked a post of mine on Chainfires AVB .zip so thought I'd also take this chance to bring up image signing in your tool.

I actually modified your repackimg.sh to sign the images when finished because it is cumbersome to sign after modifying every time.

I know you're trying to keep this project as dependency free as possible and java is a depend but this is becoming necessary even on some unlocked bootloaders. It would be an honor if I could help contribute something to this project. You may want to add more checks like if image is AOSP, this is basic rough draft of feature.

if [ -f image-new.img ] && [ -f bin/BootSignature.jar ]; then
echo "Image types = boot, recovery, laf"
echo " "
read -p "Enter image type: " IMGTYPE
echo " "
fi

if [ -f image-new.img ] && [ -f bin/BootSignature.jar ]; then
echo "Signing..."
java -jar bin/BootSignature.jar /$IMGTYPE image-new.img avb.pk8 avb.x509.der image-new_signed.img
echo " "
fi
[Android Software Development] osm0sis:
Thanks! Yes, I'll likely be rolling back the "second_signature" workaround in favor of proper AVB signing for AIK v2.8; I'll be fitting it into AIK's current signature detection and re-signing logic somehow.

Do you have a Pixel or Pixel XL? Can you quickly satisfy my curiosity by answering the questions I posed in this post? Then I can get moving in earnest on making java a(n optional) dependency. :rolleyes:;):p
[Android Software Development] Geofferey:
Yes I do have a pixel. Refer to this post. I think I may have answered your question before I even knew you had asked lol. I did not perform on post may bl but my bootloader is locked so same diff.

Just to be clear... You're asking if AIK appends the original signature to image during repacking? It does but making any mods will nullify the original signature.
[Android Software Development] Hacker $007 $:
I add an init.qti.ims.sh to ramdisk and it shows

Error While open it in Notepad++ so can you help me to fix this...
[Android Software Development] osm0sis:
Can't really help you blind. I guess try Notepad2 instead of ++?
[Android Software Development] franzyroy:
Hello [MENTION=4544860]osm0sis[/MENTION]

I've a problem, maybe I'm blind and I missed it. Sorry in this case!

I want to modify a TWRP and I want to add some files into the ramdisk folder. My issue is there, I can add some files in the sub-folders, when I repack the TWRP, it works, but not when I put the files into the ramdisk folder.

My question:

Is there a method that I missed?

I hope to be clear! :cyclops:
[Android Software Development] KaMyKaSii:
Do you want to put files in the ramdisk root? What exactly are these files?
[Android Software Development] franzyroy:
Yes

The files are some files which are into the stock recovery of same device.
[Android Software Development] osm0sis:
No, it should work fine. I created an empty "test.bin" file in ramdisk and it shows up in subsequent unpacks even. On Windows even! :p

As for whether it boots, I think it just depends what these files are.. are they overriding something important? Are they large? TWRP images usually are right up to the limit of the partition size, so adding too much will push it over and it won't flash correctly.
[Android Software Development] franzyroy:
Strange. For me, it doesn't work. I gonna try again.

Thanks!
[Android Software Development] KaMyKaSii:
Are you porting TWRP? As osm0sis said, if you replace important files with others that don't have the necessary code, it is likely that your device will not boot. It's not AIK's fault. Are you sure that for the test you created the new file on ramdisk root, did the repack, cleaned the folder, renamed "image_new.img" to "boot.img", extracted again and verified the existence of the new file?
[Android Software Development] franzyroy:
I will check again when I will be on my PC. When I unpack the new image, I've an error and I can nothing see because the ramdisk folder is empty due to the error.
[Android Software Development] osm0sis:
That's weird. Please upload the before (unpacks) and after (fails to unpack) files.
[Android Software Development] franzyroy:
I've successful by another method, I took a TWRP which already had these files and I replaced files by mine. The compilation has been finalized without issue. Anyway my TWRP doesn't work but this is another problem, so for the moment, I give up. I'll come back here when already I'll find the cause to my failure.

Thanks for your help!;)
[Android Software Development] osm0sis:
Alright.. so nothing for me to fix then?
[Android Software Development] franzyroy:
No I've already successful to add 2 files, so it was my bad.
[Android Software Development] franzyroy:
. [MENTION=4544860]osm0sis[/MENTION]

I have all solved my problems.
[Android Software Development] osm0sis:
Sounds good! :good:

P.S. AVB incoming very soon, just finishing the write-up. :)
[Android Software Development] Jitheshwar:
Hi there,I'm getting the following error after updating to AIK 2.8(mobile)

Android Image Kitchen - UnpackImg Script
by osm0sis @ xda-developers

Supplied image: boot.img

Setting up work folders...

Image type: AOSP

Splitting image to "split_img/"...
BOARD_KERNEL_CMDLINE console=ttyS1,115200n8
BOARD_KERNEL_BASE 00000000
BOARD_NAME
BOARD_PAGE_SIZE 2048
BOARD_HASH_TYPE sha1
BOARD_KERNEL_OFFSET 00008000
BOARD_RAMDISK_OFFSET 01000000
BOARD_SECOND_OFFSET 00f00000
BOARD_TAGS_OFFSET 00000100
BOARD_DT_SIZE 53248

Unpacking ramdisk to "ramdisk/"...

Compression used: gzip
gzip: ../split_img/boot.img-ramdisk.cpio.gz: No such file or directory

Done!
[Android Software Development] osm0sis:
Device? Image? How are you executing it?

Give me some details, I have zero problems here.
[Android Software Development] Jitheshwar:
LAVA iris X1 Beats. Earlier till 2.7 version aik worked fine.

here is my boot.img https://drive.google.com/file/d/0B-8eEgl5y093dkNnNHNXOHZtN1E/view but I got same error with other images

I executed the script using both root browser and terminal emulator but both gave same error

Compression used: gzip
gzip: ../split_img/innjooboot.img-ramdisk.cpio.gz: No such file or directory

this error results in no files in ramdisk folder
[Android Software Development] Jitheshwar:
I'm not facing this issue in my another device. Tried unpacking the same boot.img it's worked. I think the latest version of aik is incompatible with that mobile.
[Android Software Development] osm0sis:
I'd say you should download v2.8 again and reflash. It unpacks on all of my devices no problem.. Something weird going on for sure.

Edit: [MENTION=7606820]Jitheshwar[/MENTION], if that doesn't work then the only thing I can think of is that your devices's toolbox/toybox is extremely limited/broken and this change is what's causing your issue on that device: https://github.com/osm0sis/Android-...949#diff-4db37212a41881b7528d0c62ae97a8faL181

Basically that would mean your `mv` (move) command doesn't accept "-f" (force) so the ramdisk doesn't get renamed to what the unpack command then expects.

Try removing the -f from that line in v2.8 and let me know if it resolves it; I might just have to start relying on my included busybox for more of the pedestrian tasks as well.
[Android Software Development] Jitheshwar:
Thanks [MENTION=4544860]osm0sis[/MENTION] that's worked.
[Android Software Development] osm0sis:
Excellent! You can also put the -f back and make it like: $bb mv -f

That's how it'll officially be in v2.9 down the road. :) :good:
[Android Software Development] Hacker $007 $:
how to unpack Zimage and modify it
[Android Software Development] osm0sis:
It's compiled code so generally you can't modify it.
[Android Software Development] Innfinite4evr:
Hi, [MENTION=3493222]om0[/MENTION]sis I tried AIK on my mobile.. Flashed the zip via twrp..and AIK is located in /data/local/AIK-mobile .I tried unpacking bootml.IMG and it worked...but symlinks are getting linked to their actual path .and ramdisk size is in gb's. Any workaround for this issue.?

PS: I'm using aosip nougat 7.1
[Android Software Development] osm0sis:
It's a non-issue. They're symlinks; that's how they work. The ramdisk isn't actually that large, especially not when repacked.
[Android Software Development] Fillint:
Hi,When I try to unpack samsung galaxy s5 (sm-g900h) boot.img file, the kitchen fails to detect board name & hash type. It appears to repack successfully but when I try to flash the resulting boot.img file using Odin, It fails to boot.

Here is the link to my boot.img:

https://ufile.io/vvy9i

Setting up work folders . . .

Image type: AOSP

Footer with "SEAndroid" type detected.

Splitting image to "split_img/" . . .

BOARD_KERNEL_CMDLINE
BOARD_KERNEL_BASE 10000000
BOARD_NAME
BOARD_PAGE_SIZE 2048
BOARD_HASH_TYPE unknown
BOARD_KERNEL_OFFSET 00008000
BOARD_RAMDISK_OFFSET 01000000
BOARD_SECOND_OFFSET 00f00000
BOARD_TAGS_OFFSET 00000100
BOARD_DT_SIZE 565248

Unpacking ramdisk to "ramdisk/" . . .

Compression used: gzip
7433 blocks

Done!
[Android Software Development] osm0sis:
Thanks! Looks like an edge case with the hash type code, or possibly another Samsung deviation from the boot.img standard. I'll check it out!

Also, for my own future reference, yet another Samsung deviation (this time with Spreadtrum) to look into supporting down the road:

https://github.com/USA-RedDragon/sprd-mkbootimg-tools/commits/master

https://github.com/samsung-sc8830/lineage_device_samsung_gtexswifi/tree/cm-13.0/boot

This is different from the Spreadtrum board signing from other OEMs which I have linked in the Unsupported section of the OPs.
[Android Software Development] osm0sis:
So... Normally the header has 528 bytes allocated for the board and cmdline sections, but on this image it is 532, so even though it is sha1 the location of the hash is offset by another 4 bytes, of course confusing everything. This wouldn't be the first time Samsung/OEMs have done something like this to the AOSP standard; the "AOSP-PXA" version I added support for in AIK v2.8 similarly has 536 bytes for the board+cmdline.

Is this a stock image? Were there any modifications to it (Magisk, SuperSU, etc.)? Does your variant of the Galaxy S5 have a different board than others? I had previous reports it worked on that device. If you manually change the split_img/*-hashtype file contents to sha1 does the repacked image boot?
[Android Software Development] Fillint:
Actually this is the boot.img from the stock firmware and I didn't modified boot partition (used exploits for rooting). As a matter of fact, this device is one of the few variants of Galaxy S5 using Exynos 5422 Octa. Anyway, thanks for your suggestions I will try and report back tomorrow.

Additional info on this phone:

http://www.gsmarena.com/samsung_galaxy_s5_(octa_core)-6237.php
[Android Software Development] AymenDe7:
[MENTION=4544860]osm0sis[/MENTION]

i there any way to unpack boot.img ''galaxy s2 i9100 '' :(

plz help me

https://mega.nz/#!pg0VnZiJ!GX3IZrntNzaXInP8G_8zs4vuczRhb322vLz5ghvzXTA

Android Image Kitchen - UnpackImg Script
by osm0sis @ xda-developers

Supplied image: boot.img

Setting up work folders...

Unrecognized format.
Error!
[Android Software Development] osm0sis:
Nope. Here's the last time I looked into the i9100 S2 (and a couple others) Samsung "headerless" images: https://xdaforums.com/showpost.php?p=71320175&postcount=432

It's on my list to take yet another look, but it doesn't seem likely.
[Android Software Development] Fillint:
This trick worked like a charm!

Everything seems fine, however there is no cmdline when repacking boot file. Should I add cmdline manually like hashtype? (Is it even necessary when system boots?)
[Android Software Development] osm0sis:
cmdline and board name aren't necessary if the device doesn't need it and the image you gave me doesn't have either present. They show empty because they are. Nothing to worry about. :)

Interesting that your device appears to accept both Samsung's version and the standard. It's a bit of a gamble and might not work everywhere, but I'll have unknown repack as sha1 with a printed warning starting in AIK v2.9. :good:
[Android Software Development] KaMyKaSii:
[MENTION=4544860]osm0sis[/MENTION], changing ramdisk compression to some worse than gzip can speed up boot time of the device? Especially in the manufacturer's logo, it takes 15 seconds on my device. The partition has 16MB but the true space used (after extract and repack with AIK) is only 9.2MB so I think it's okay to lower the compression level. Thank you
[Android Software Development] osm0sis:
Kernel still needs to support that compression format or it won't boot. This has been asked and answered a few times already.
[Android Software Development] hsbadr:
AIK v2.8 for Unix (Linux and MacOS)

[MENTION=4544860]osm0sis[/MENTION] :

I've added support for MacOS (64-Bit) to the latest AIK v2.8 for Linux. All binaries (except U-Boot and SIN) are built on MacOS Sierra v10.2.6:

Darwin MultiSystem 16.7.0 Darwin Kernel Version 16.7.0: Thu Jun 8 19:12:26 PDT 2017; root:xnu-3789.70.15~12/RELEASE_X86_64 x86_64 i386 MacBookPro8,1 Darwin

A new directory macos is added under bin for MacOS:

case $(uname -s) in
Darwin|Macintosh)
arch="macos";
;;
Linux)
arch=`uname -m`;
;;
*)
cleanup;
echo "Unsupported operating system.";
abort;
exit 1;
;;
esac

For backward compatibility, "Andoid" image type is also supported as "AOSP".

Please feel free to use the attached TAR as you see fit.
[Android Software Development] robcore:
Interesting isn't it? I've been hacking on the old qcom samsung s4 . The i337m I use has the device name set explicitly in stock kernels, whereas the I9505 versions don't. Either works just fine! As for the cmdline, I'm guessing the newer devices' cmdlines are populated entirely by the bootloader as opposed to partially like my old one. That's mere speculation though.
[Android Software Development] carlosggb:
Good morning!

Im having a boot issue with the latest version (2.8) and magisk v12. I have used older versions in the past with no problems (on my sprint note 4, stock based rom MM).

My issue is that after flashing the AIK mobile my phone won't boot and stay on the very first splash screen, i was able to bypass it by flashing the kernel again, but if i flash magisk too then the issue reappears.

Is there a proper way to uninstall AIK Mobile? I tried deleting the data/local folder but i don't find the other files, i need to get magisk root back.

Thanks in advance
[Android Software Development] Jitheshwar:
Everything related to AIK goes to /data/local/AIK-mobile path, you'll​ not see every file in your AIK directory that appeared in AIK-mobile zip as AIK's script will flash only those files which are related to your mobile Architecture and there is no chance of bootloop or stucking on logo since AIK doesn't modify system partition. Magisk might be causing issue try flashing older version of magisk or stable version (for more info head over to magisk thread).
[Android Software Development] carlosggb:
Dude, i ain't a rookie ok?

Two things

1-i reported politely an issue

2-i asked how to completely uninstall aik

You simply didn't helped the cause but thanks anyways for taking some time to reply.
[Android Software Development] osm0sis:
I agree the issue doesn't make any sense since Magisk and AIK-mobile should have almost zero effect on each other, and nothing changed in the installer with v2.8 (or v2.7 for that matter), so I do think the other user was being helpful in suggesting you check in with the Magisk forum as well since it's a pretty bizarre sounding problem.

Anyway, to answer your question, `aik --uninstall` should do the trick. :)
[Android Software Development] Jitheshwar:
Oohh. Sorry I don't want to hurt you. I'm just trying to help.

I just said that whether AIK is causing the issue and where the contents of it will be placed. By deleting the AIK-mobile folder you can remove AIK. I thought you could figure out about removing AIK by reading my reply. Sorry if I hurt you.
[Android Software Development] carlosggb:
Apologies accepted, the thing is that I already deleted the folder and still cannot boot with magisk.

Any other suggestions?
[Android Software Development] Jitheshwar:
Have you did any modifications to your boot.img using AIK(unpacking and repacking with or without any changes to the ramdisk), if yes then flash back stock boot first and then magisk. Are sure that magisk is compatible with your device? And make sure you didn't flashed any other zip to root your​ phone (like SuperSU.zip) since they will conflict with each other and prevent the device from booting, in such case restore/flash the stock ROM after that flash magisk.
[Android Software Development] osm0sis:
Use the MagiskMount zip (from one of the Magisk threads) in recovery and delete the AIK-mobile directory from /magisk; no reason it should be causing any problems, and I feel like I would have heard about it by now since the last installer change related to magisk was v2.6, but hey, who knows?

Can anybody else using Magisk confirm or refute? :)
[Android Software Development] Paschfire:
Well... On Nexus 5, DU11.5-06/30 N-7.1.2, FKr108, Magisk v13(54e6a79) beta, AIK-2.8.

No issues I can speak of.

AIK works while booted into TWRP Recovery using Materialised theme GUi as well while using Terminal app with the OS booted, I having no issues between Magisk v13(54e6a79) beta or AIK-2.8.
[Android Software Development] nclwz:
About extra files

About extra files

I use the three tools found by comparison

（extra files： \split_img\boot.img-hash And \ramdisk\charger）

Why not the same？ What impact

I do compare pictures but I can not Upload external links

I hope you can give me email address i give you pictures

Waiting for your reply

thanks
[Android Software Development] osm0sis:
If I get what you're saying, you're wondering why my image kitchen has those files and others do not.

My tools have wider support for images with both sha1 and sha256 hash type, so that information gets written out to split_img. Please read the OP for all the information, details in the changelogs and/or on GitHub.

As for the ramdisk file, I'm not sure why others wouldn't have that.. maybe theirs don't handle the symlinks correctly?
[Android Software Development] nclwz:
Thank you for your reply

Thanks for the tools and contributions，You are great:good:

i love it

And you know my English is very good

（I guess your expression will be Confused Nick Young）（joke）