[5 Aug 2012][TOOL][CWM] zImage Injector v1.1 [MULTI-REPACK][AROMA] - FIXED

Search This thread

besttt

Senior Member
Jun 19, 2012
3,990
4,512
54
athens
in the log you can see:
Code:
> Building boot.imgabout to run program [/tmp/mkbootimg.sh] with 1 args
BOARD_KERNEL_CMDLINE 
BOARD_KERNEL_BASE 200000
PAGE_SIZE 131072
[COLOR="red"][B]Error: wrong pagesize: 131072[/B][/COLOR]
BOARD_KERNEL_CMDLINE 
BOARD_KERNEL_BASE 200000
PAGE_SIZE 131072
[B][COLOR="Red"]Error: wrong pagesize: 131072[/COLOR][/B]
cat: can't open '/tmp/ramdisks/boot.img-cmdline': No such file or directory
cat: can't open '/tmp/ramdisks/boot.img-base': No such file or directory

usage: mkbootimg
       --kernel <filename>
       --ramdisk <filename>
       [ --second <2ndbootloader-filename> ]
       [ --cmdline <kernel-commandline> ]
       [ --board <boardname> ]
       [ --base <address> ]
       [ --pagesize <pagesize> ]
       [ --ramdiskaddr <address> ]
       -o|--output <filename>
run_program: child exited with status 1
so input and output kernel have some unusual (and unsupported page size).
I have never used non-HTC (a.k.a AOSP and CM) kernels so I dot exactly know why the page is that.
try repacking Sense kernels and post log to see what page size is used there...

but I think you would need updated unpacbootimg/mkbootimg binaries for your kernels...
where i can find that binaries???look the log my friend now all ok if i use kernels from cm9 why cant create kernels from cm 10 or cm 10.1 they are for same devises not other cant create kernels above cm9 kernel why?
 

Attachments

  • 2recovery.rar
    2.1 KB · Views: 13
Last edited:

Daekin

Senior Member
Mar 23, 2009
2,107
1,872
Bratislava
Samsung Galaxy S21 Ultra
hard to say where to find working binaries....search XDA forums in CM10 threads...

the reason for not being able to repack those kernels is because CM10 and above use different page size parameter inside boot.img (problably because either it is JB kernel or it is 3.x kernel)
 
  • Like
Reactions: besttt

besttt

Senior Member
Jun 19, 2012
3,990
4,512
54
athens
hard to say where to find working binaries....search XDA forums in CM10 threads...

the reason for not being able to repack those kernels is because CM10 and above use different page size parameter inside boot.img (problably because either it is JB kernel or it is 3.x kernel)
ok and where to put that binaries if i found
 

Top Liked Posts

  • There are no posts matching your filters.
  • 88
    I have created small CWM package that can be used to inject zimage from one boot.img into other boot.img so that one can create proper boot.img for specific ROM that contains desired ramdisk.

    NEW: Now supports full multi-source to multi-target repacking!


    Usage
    1. download attached RAR
    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
    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)
    5. put repacked injector ZIP file to SD card
    6. flash the ZIP file which will result in creating new boot images in the root of internal SD card (they will be named using following pattern: kernel-ramdisk.img)
    7. mount as USB mass storage and grab new boot images to PC

    Screenshots

    2cih4qq.gif
    23kce81.png
    zkiypf.png
    et7daf.png



    Troubleshooting

    Problem
    You must use this tool prior using USB mass storage in recovery or else output boot images will not be created.
    It is a bug of recovery.

    Solution
    Copy ZIP file to SD card in ROM and then reboot to recovery or reboot recovery once more prior using the tool.


    Download
    thunder07 said:
    Hi i revamped zimage injector with aroma and added a couple of options to it,
    i added repack from sd option where the kernels and ramdisk are take from /sdcard/kernels/ & /sdcard/ramdisks/ to make it easier to manage through the phone,
    i also added a flash option so that you can flash kernel through the phone after repacking it (although we cant use it some ppl with s-off can make use of it),
    kernel&ramdisk must be named boot.img and placed in the zip or in the sdcard in correct folders for this to work, also repack a single kernel works in the same way.
    lastly i added repacks into a repack folder to keep the sdcard organised... this is especially helpful for ROM repackers
    i just though you should release it..


    Compatibility

    This tool should be compatible with all devices running CWM-based recovery.
    You will only need to replace the update-binary with the one for your device.
    6
    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 ;)
    4
    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
    3
    Update v1.0 final

    OK, I added final version of injector in the OP

    ENJOY!
    3
    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

    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