yashsingh1/xdaforums huggingface dataset:
[HTC One X] THANHVO31:
I use dsixda's Android Kitchen (cgywin) and handle the job rather smoothly without bother to the phone.

Please give it a try since it is OK with an 'average Joe' like me.

Advanced Options

11 - Deodex files in your ROM
12 - Add task killer tweak for speed (stock ROM only)
13 - Add /data/app functionality
14 - Add Nano text editor + sysro/sysrw
15 - Add Bash (command shell)
16 - Add Apps2SD
17 - Add /etc/init.d scripts support (busybox run-parts)
18 - Add custom boot animation functionality
19 - Porting tools (experimental)
[COLOR="Red"][B]20 - Tools for boot image (unpack/re-pack/etc.)[/B][/COLOR]
21 - Unpack data.img
22 - Sign APK or ZIP file(s)
23 - Convert update-script or updater-script
24 - Miscellaneous optins / Plugin scripts

99. Build ROM from working folder
00. About/Update kitchen
0. Exit
[HTC One X] Rycon33:
@THANHVO31, if you don't mind, can you make a simple tutorial on how to make it work using the dsixda kitchen? I tried it last time but really don't know what to do next after I extract dsixda kitchen and after installing cygwin on my windows 7 computer.:confused:

TIA

EDIT:nevermind, now i managed to get the kitchen working, will try the repacking of boot image later using this

EDIT2:man i'm stuck here after i extract a boot image, there's no option to re-pack

Boot image tools

----------------

Enter a choice:

a = Extract kernel+ramdisk (regular format) from boot.img in any folder

x = Exit

NOTE: Some options will not be shown in this menu *until* a specific

action above is selected or a specific working folder is created.

e.g. You won't see the option to re-pack a boot.img unless you unpack

the boot.img first!

?
[HTC One X] Daekin:
I know that....my solution is for common users that do not have Linux or want to mess with Cygwin and all kitchen and ROM cooking stuff....it is simple and fast enough... :)

btw..If I had my Linux virtual machine with me wwhen someone asked to repack franco kernel I would never had released this tool since I would also used DSIXDA kitchen :p
[HTC One X] Rycon33:
@Daekin, your work is really appreciated here and I myself have used your tool many times on repackaging different kernels around.

Btw, with regards to dsixda, I got question, I was able to unpacked boot images but then after I go to menu again I don't have option for re-packing, which folder do i have to use or where do I move the zimage and ramdisk?
[HTC One X] THANHVO31:
The trick is I put the boot.img in an empty rom.zip (should still have META-INF and empty system folder) so I have all option. Extract, rebuild, convert, convert other boot.img,... everything. Finally use build function after exchange initrd.gz or modding init.rc. You got it.
[HTC One X] Rycon33:
thank you very much man, got it working:)
[HTC One X] android_888:
Hello I have tried to install Franco's kernel. Now I am stucked in a bootlop. I read those steps. But something I don't understand.. what and where is source boot.img and destination boot.img? Or I must place boot.img of my kernel inside tools/src_img folder and tools/dst_img folder?

Thank you
[HTC One X] Daekin:
you need to provide those boot images for yourself, this application is only repacking them....

like instructions say: source is the boot image that contains kernel you want to flash, destination image is one from target ROM where you want to flash kernel into.

btw. if you are using ARHD, there is nice thread here by GuyAdams
[HTC One X] hutzdani:
So the Destination boot.img is the one that's packed with the rom ?
[HTC One X] ClydeB1:
Correct (and Source is the one from your new kernel)
[HTC One X] n3ocort3x:
no matter what i do it creates no newboot.img...

I tried 7 zip, i tried winrar (zip), i named both files boot.img, zipped only the 2 folders... Its sucessful in recovery but no newboot.img... can anyone tell me why it wont work ? Here is exactly what ive done:

)Download the .rar with the injector

)extract both folders on desktop

)named both kernels boot.img and put it in src and dst folder

)zipped that two folders to a various filename (with winrar and 7 zip)

)copied in the root of the sd card

)flashed it

)it runs and process is a sucess

)no newboot.img in root of SD

any ideas ?
[HTC One X] Daekin:
if you are using old CWM with hacked USB mount and you flashed that when connected to PC, it would fail because of inaccessible SD card. unplug phone and try again (or install latest CWM or TWRP and do not mount USB storage when flashing zImage injector)
[HTC One X] eyosen:
@Daekin,

Thanks for a great tool, and I am really glad that you didnt have your linux box with you when you first needed to repack franco's kernel. I use it frequently to repack newly released kernels to Energy Rom and it makes repacking a breeze.

I have one quick question: Does it matter whether I use an already repacked image for src_img in your tool? Sorry, if this has been asked before. I didn't see it.
[HTC One X] GuyAdams:
No it doesnt matter as Daekin's tool removes the kernel from the source image file and adds it to the RAM disk of the destination image.
[HTC One X] eyosen:
Thanks GuyAdams. I thought so.
[HTC One X] GuyAdams:
No problems :)
[HTC One X] n3ocort3x:
I ve found the bug, it´s my Laptop with win7 x64 on it... On others it works like a charm
[HTC One X] eyosen:
I have the same setup. So it must be the PC drivers.
[HTC One X] DeeZZ_NuuZZ:
why i cant repack boot.img from 2.05 with eternity 3.4 ? it says me in recovery bad zip or so ... -.-
[HTC One X] Daekin:
Probably because it is not compatible with android 4.0.4. I did not get new test base in my hands yet. Will try later.
[HTC One X] DeeZZ_NuuZZ:
ok but without repacking the new base is working good, too. we don't need to repacking them...maybe with faux kernel are problems but with the other all is good^^
[HTC One X] eyosen:
Daekin,

I repacked franco's R9 and eternity's 0.92b under 4.0.4 without problems. When I tried with eternity's 3.4 based 0.11, no newboot.img file gets created. Attached is the recovery.log for those operations I pulled.
[HTC One X] DeeZZ_NuuZZ:
but why i was unable to repack it with eternity's ... -.- ...i tried it many times but it wont work -.- ...
[HTC One X] eyosen:
One additional piece of information:

Using CWM Recovery 5.8.4.0.

If I mount SDcard in recovery to transfer zImage file to phone, unmount it, and then flash zImage package, no newboot gets created. When I reboot into recovery again, and without mounting anything, flash the zImage package, I get the newboot.img file.

So something is changing between SDCard mount-unmount operations.

EDIT: Just tested it with eternity 3.4 based 0.11 and it worked as expected.
[HTC One X] eyosen:
When rezipping, make sure you have only

META-INF

tools

directories on root of your zip as shown.

View attachment 1131265
[HTC One X] DeeZZ_NuuZZ:
i have only these but i think its like it was with your repacking ...and i dont use anymore the new based rom and yes :p
[HTC One X] Spl4tt:
awsome. just did this

i was so happy when it really booted =D

awsome work, makes it so much easier x)
[HTC One X] starbase64:
Hi,

thx for the tool, works very well.

Edit: Guide for german users :D > http://goo.gl/RkrF4

cheers

starbase64
[HTC One X] DeeZZ_NuuZZ:
ok thank u...may i made something wrong :D

EDIT: mhm starbase i red your new guide ...and i think there is a mistake...the ramdisk is in boot.img of the roms, right?
[HTC One X] BanBoo:
Hey there, I`ve just comared the German and the English guide (And tried it of course)... and you mixed up the "src" and the "dst" folder in the German guide.

The Boot.img from the new kernel goes to the src folder and the Boot.img from the Rom u want to use have to be in the dst folder... otherwise it wont work!

Hope i helped and dont got it twisted myself ;)!

EDIT: Sry a little late
[HTC One X] starbase64:
Hi,

sorry for my mistake, now corrected.

cheers

starbase64
[HTC One X] ddfox:
Thanks, successful.
[HTC One X] Daekin:
new UPDATE

finally managed to make next version of injector tool - as promised it is able to repack one kernel into multiple ROMs at once....can automate a lot of work ;)
[HTC One X] GuyAdams:
Great work mate, thanks for your continued efforts :)
[HTC One X] Daekin:
you're welcome...it will ease repacking kernels for you... :)

I also thought about the other direction - multi sourcing: repacking many kernels for one ROM....

or perhaps multi source multi ROM? :D

well...maybe....in the future
[HTC One X] n3ocort3x:
awesome stuff Daekin ! You know... thats the HUGEST timesaver for me. Many many thanks for your efforts in this ! :highfive:
[HTC One X] GuyAdams:
That would be useful, especially after HTC drop source code, kernel development always seems to take off after that :)
[HTC One X] n3ocort3x:
+1 (nothing more to say)
[HTC One X] KLUVJ:
hey, i was wondering if any of you can clarify things....

so unzip the rar

put the boot.img of a custom kernel in the specified folder

put all the boot.img of rom(s) original boot.img in other folder

repack all the files into zip

(NO NEED TO SIGN)?

and flash in cwm.

after that, you will get the boot.img you need to flash.

another question, if you put multiple original boot.img, how will the repacked boot.img be specified so as to know which rom its for?

Thanks
[HTC One X] Daekin:
1. cwm recovery by default does not check signatures, so I never signed zips to save time, I only checked MD5 sums of downloaded ones to verify thay downloaded OK

2. the resulting files will be called as originals, so you could do this:

you put boot.img in src_img folder and you put boot_arhd6.img, boot_ic630.img and boot_coredroid.img in dst_img folder

and you will get boot_arhd6.img, boot_ic630.img and boot_coredroid.img files on root of SD card that will contain new zImage from boot.img file
[HTC One X] Daekin:
Update - multi-source Repack

I have added new version that is capable of repacking several kernels for one ROM...

the principle is the same as in version 0.2 only there is one destination boot.img and several source boot.img-s
[HTC One X] H89P:
Hi,

got a little problem with 0.3 here

tried to repack a kernel and put the new in src and old in dst -> repacked and flashed through CWM.

in CWM it says building,... but nothing there. There isn't a new boot.img on my SD Card
[HTC One X] Daekin:
PUBLIC BETA TEST: zImage Injector v1.0 [MULTI-REPACK]

OK, the best version of zImage Injector is here...

I have made it to do M to N repacking (multiple sources to multiple targets)!

Please test it and post feedback here before I add it to OP.

Download link: zImage_Injector_v1.0.rar
[HTC One X] Daekin:
ok...and what did you name the target img?

in 0.2 the SOURCE file MUST be named boot.img

in 0.3 the DESTINATION file MUST be named boot.img

also I found out that sometimes when you mount SD card in recovery, then it is not accessible from the scripts anymore (maybe if I forced remount there...)

in that case reboot recovery again and run injector befor doing USB mount

this is recovery bug in my opinion

EDIT: you can attach recovery.log for more information
[HTC One X] H89P:
ok tried the beta now and bot files are named boot.img

same as before no .img on my sdcard

and I also didn't mount the sd card, just flashed and then rebooted

Edit:attached recovery log, just zipped it ;)
[HTC One X] eyosen:
If you mount SDcard under CWM before flashing the zips (for example, to copy the zipfiles from PC to sdcard and then unmount), newboot.img doesn't get created. Reboot to recovery before flashing the zip files.
[HTC One X] H89P:
as I said I did NOT mount the sdcard,

pushed injector from pc to phone with phone = ON

rebooted to CWM

flashed

rebooted
[HTC One X] eyosen:
Hi Daekin,

As a frequent user of your 0.1 package, I want to thank you for making my life so easier in repacking. With two new packages, this gets much simpler. One quick suggestion: Is there a particular reason why the directories are named src_img and dst_img? Wouldn't it be a lot easier to give them more informative names such as kernel(s) and ramdisk(s) for simple users like me? Everytime I need to repack something, I have to re-read the instructions in your OP to get it right. I may just be me :D

---------- Post added at 01:21 PM ---------- Previous post was at 01:20 PM ----------

Sorry I missed reading that part :silly:

I had the same problem and the reason was what I explained above. I will test it now and come back to you.

EDIT:

I tested 0.3 with 2 faux kernels and 5 franco kernels.

It's true no newboot.img is created because the created files have the same name as the original files placed in the src_img folder.

Compared original and created files MD5 they are different. Attached is also the recovery.log file in zip format.
[HTC One X] Daekin:
OK I wil check it, it seems like bug in build script...

I will use friendly name in final version of 1.0

can you test if it works for you? or it has the same bug as version 0.3?
[HTC One X] eyosen:
@Daekin,

No problems here with 0.3, see EDIT part in my second post above.
[HTC One X] Daekin:
OK thanks for confirmation :)

if 1.0 version is working too, I will rename that folders to friendly names and release it in OP as the only version...waiting for feedback now
[HTC One X] starbase64:
Hi,

how do I rename the files for multiple repacking?

Source:

Franco_boot.img

Faux_boot.img

.

.

.

?

or

Target:

ViperX_boot.img

ARHD_boot.img

.

.

.

?

How then is the result?

Franco_ViperX_boot.img

Franco_ARHD_boot.img

Faux_ViperX_boot.img

Faux_ARHD_boot.img

.

.

.

?

cheers

starbase64
[HTC One X] eyosen:
0.2 also works. However, 1.0 doesn't. Here is the relevant info from recovery.log

http://pastebin.com/QYyRrhx5

---------- Post added at 02:38 PM ---------- Previous post was at 02:33 PM ----------

From the looks of it in the script file,

/sdcard/$i-$j-output.img

is the output format, i source, j destination.
[HTC One X] Daekin:
OK I will look into it...
[HTC One X] starbase64:
Hi,

multiple repack doesn´t work, here is my recovery.log.

cheers

starbase64
[HTC One X] eyosen:
Hi Daekin,

Hope you don't mind. I did some debugging on the mkbootimg.sh script.

The spaces are causing the problem. When changed to

src_img=$(printf "%s " *.img)

dst_img=$(printf "%s " *.img)

1.0 works fine and creates all possible combinations of boot images. The only annoyance is that the resulting filenames have 2 .img's in them..No biggie though. Thanks for your injector.....

recovery.log
[HTC One X] n3ocort3x:
Daekin... What should I say ??? >> AWESOME, v.1.0 work as it should. output files should be named kernel.ramdisk.img (but this is only cosmetical and is easy to solve)

Here... buy yourself some cigarettes or coffee or Redbull or whatever :laugh:

PP ID: 183093192Y4910506
[HTC One X] Daekin:
thank you very much for helping :)

just returned home from Dark Night Rises movie in cinema :cool:...will update OP soon

thank you very much friend, much appreciated...but does it work for you even without the change eyosen mentioned?
[HTC One X] eyosen:
On my to do list to see the movie.

Removed my stupid comment :D

It is late here and I wasn't thinking.
[HTC One X] n3ocort3x:
No i changed the spaces also. Btw. Thanks for that eyosen totally forgot to credit you in a hurry.
[HTC One X] Daekin:
alright..I already changed that, I also did output file renaming so it is nicer :) will test it nad then update OP...
[HTC One X] eyosen:
Thanks :cool:
[HTC One X] Daekin:
Update v1.0 final

OK, I added final version of injector in the OP

ENJOY!
[HTC One X] gempitax:
Nice. Let say i have kernel1.img,kernel2.img, and ramdisk1.img,ramdisk2.img it will create four new kernel1-ramdisk1.img,...,kernel2-ramdisk2.img ?
[HTC One X] eyosen:
Read the OP please.
[HTC One X] Daekin:
yes, all possible combinations
[HTC One X] starbase64:
Hi,

v1.0 works very nice, big thanks.

cheers

starbase64
[HTC One X] n3ocort3x:
i run into some troubles and dont know how to go further :laugh:

example:

I put my kernel into the Kernel directory (ncx055.img)

after that i put the roms into the Ramdisk folder (icj05.img, cm10pre11.img, cm10r6.img)

i put them into a zip and copy them onto SD (into recovery)

then i reboot recovery and install the .zip

then i reboot recovery again and grab the new files (this works)

but the created images wont boot, all of them stuck @ HTC boot screen

Daekin... any ideas ? Am I doing something wrong ?
[HTC One X] Daekin:
every kernel needs also related modules, you have to flash modules that originally came with that kernel versions
[HTC One X] Daekin:
AROMA version

@thunder07 has made special AROMA version with more functions...head over OP to grab it there.
[HTC One X] Thunder07:
can you change this line please

to
[HTC One X] starbase64:
I fear that he already knew, he tinkers kernel itself.
[HTC One X] n3ocort3x:
yeah i know that :) but it wont work ! nvm its no biggy, i look into recovery.log and check back ramdisk itself after unpack it, maybe i find the error

correct
[HTC One X] Daekin:
Ahaa sorry, I did not paid enough attention on who was posting :) the answer has to be somewhere in randisks...
[HTC One X] Daekin:
done (+inserted that note about s-off inside brackets)
[HTC One X] n3ocort3x:
np ! when i checked back i let you know !
[HTC One X] crescal:
a typo in the OP:

should be /sdcard/ramdisks/

---------- Post added at 05:15 AM ---------- Previous post was at 04:20 AM ----------

i can't produced bootable repakced kernel with the latest injector too, here's what i did:

1. put faux006u.img into /zip/tools/kernels/ and cm10p12 into /zip/tools/ramdisk/

2. boot into recovery

3. flash the injector

4. grap the faux006u-cm10p12.img in the root of sd card

5. flash modules

6. reboot to bootloader

7. flash kernel and erase cache, then reboot

8. stuck at htc white screen

actually i compared the one i produced with the one others' produced, the size were exactly the same but the md5 were different.
[HTC One X] Onepagebook:
Same here too :(

I have never got any problem by using old version (before 1.0)..

but too bad, I delete the old version.

here are what I have..

when I use aroma version, I can't find the repacked boot image

using non-aroma version, I could find the "boot-boot.img under root of SD card after recovery flash"

BUT after fastboot flash, just exactly stuck at htc white screen for sure :)
[HTC One X] Daekin:
for aroma version @thunder07 will give support as it is his mod,

for non-aroma: I will look and fix issues. but if you put only 1 kernel and 1 ramdisk, it should produce perfectly bootable kernel, so you might bedoing something wrong (UV too much? or perhaprs faux not compatible with JB :p)
[HTC One X] crescal:
thanks but i just tried this and still not bootable....perhaps i should try kernels other than faux's

edit:

ok now i can produce bootable kernel using the aroma version:

rename both kernels to boot.img and then put them into the corresponding folder in the zip file.

flash the zip and choose single repack.

the product will be named as "newboot.img"
[HTC One X] eyosen:
Daekin,

During debugging the prerelease script, I saw that the cmdline parameter was empty. Didn't think much of it since I don't know what it should be. Can that be the reason?

http://pastebin.com/Fc3Z578Q
[HTC One X] Daekin:
that is OK, there are no extra command line arguments in ramdisk (al teast I have not seen any for HOX, for HD2 there was console=null)

but it is OK if it is empty, this is not reason of errors
[HTC One X] Onepagebook:
Thanks buddy, will look at by using older version and compare:)

Thanks for the hard work:)

BTW..my rom base is 2.05 so it should not have anything to do with JB:)

Edit:

by using the old version 0.1, I have no problem at all for repacking.

up and running for 006u:)
[HTC One X] Thunder07:
i found the problem and a fix ill upload it soon
[HTC One X] Daekin:
ahaa...I only saw reference to CM10 boot.img so that is why I said that...
[HTC One X] Onepagebook:
Thunder07 and Daekin,

you 2 are doing hard and great job..no problem at all:)
[HTC One X] Daekin:
version 1.1 online

uploaded updated version that should fix some multi-repack issues...

aroma version by @thunder07 updated too
[HTC One X] salman saso:
Thank u for ur hard work but still I didnt get these

2.unpack it and place all source boot images (with new kernels) into tools/kernels folder

3.place destination boot images (with target ramdisks) into tools/ramdisks folder

I unpack the rar

then put the new kernal zip and my boot image from ARHD 8 in tools/kernal folder

Am I right

then I didn understand this (3.place destination boot images (with target ramdisks) into tools/ramdisks folder)

from where I get destination and what is this could u please explain to me

Thank you
[HTC One X] Thunder07:
kernel zip??

you place the kernel.img <--- from kernel developer into the kernel folder

you place the kernel.img <--- from rom into ramdisk folder

rezip the tools & meta-inf into a zip format,

place on the sdcard and flash through CWM
[HTC One X] salman saso:
OK Thank u that easy

Ok now 4.pack all unpacked content into ZIP that can be flashed in CWM (original two folders must be in the root of ZIP to be CWM compatible)

what does it mean by 2 folder

I try to flash the one I ZIP it give me aborted
[HTC One X] Daekin:
when you extract there is META-INF and tools folders.

so select these 2 folders, and zip them.
[HTC One X] salman saso:
Thank u for quick feedback

I try to do this twice but still cant be flashed

is there a spical way for ziping folder or its normal zip

I even try to put the boot images inside the folders without unziping injector

thank u and forgive my noobnes loll
[HTC One X] Daekin:
I distribute nonaroma version as RAR so that I enforce users to unpack it, then add boot.img diles inside and the ZIP it back...

and it must be regular ZIP - so create that in 7zip, WinRAR or TotalCommander in WIndows for example, WinZip can default to his proprietary comprassion which is not readable by CWM. plain old ZIP it should be :)
[HTC One X] salman saso:
I try •zImage_Injector_v1.1 Aroma.zip and cant be flashed I use rar,zip and 7-zip programs but still not flashing

•zImage_Injector_v1.1.rar I try this one it flashed but it will not create the boot.img even after reboot system and recovery

do to recovery bug

I hope u check this it may have problem
[HTC One X] Daekin:
have you used injector BEFORE doing USB mount in recovery?

if not, you need to reboot recovery and try again BEFORE doing USB mount

EDIT: found one little bug..I will reupload nonaroma version.... until then create Repacked folder on SD card and it should work then

EDIT2: reuploaded (redownload if you have problems)
[HTC One X] mach0boi:
Can anyone explain to me these 2 options in the aroma?

- Kernels/Ramdisks from ZIP

- Kernels/Ramdisks from SDcard?

What should we choose?
[HTC One X] Daekin:
it depends on where you have your kernels/ramdisks

...from ZIP is the same as non-Aroma - it will extract files fro mzip and use them

...from SD card will read kernels and ramdisks from SDcard subfolders so there is no need to repack injector zip with boot.imgs, just place them in correct folders on sdcard and run injector with this option...
[HTC One X] Thunder07:
If you place the kernel you want and the one with the ramdisk inside the zip itself then choose the zip option

If you place them in the sdcard in the ramdisks/kernels folder you use the sdcard option.

Sent from my HTC One X
[HTC One X] theDroidfanatic:
If you mount usb storage before flashing zip to make the boot.g, it wont work, always mount usb storage afterwards, ig you need to.
[HTC One X] dchd310870:
Are the Modules also known as the ramdisks? I cant find those anywhere.

Also, I cant get into USB storage when im in recovery. How are you guys doing it?

HOX with Coredroid V4.4
[HTC One X] Daekin:
modules are not ramdisks.

it goes like this:

boot.img contains 2 files: kernel (zimage) and ramdisk (initrd.gz)

modules are .ko files that go to /system/lib/modules and they can be flashed via CWM - you need to download original zip that contained the kernel, it contains modules too.

and what exactly do you mean you cannot access USB storage? from recovery? from PC? does it give you error?

use CWM 5.7.4.0 or TWRP 2.3.1.0 not any other!