[script] repack-zImage.sh: Unpack and repack a zImage without kernel source, V. 5

mumbozver

Member
Feb 13, 2011
48
39
0
Thank for great work.

I have request, can You add LZMA compressed zImage support?
Lastest fugumod has LZMA compression, I tried Lestatious 1.8 - Fugumod 2.2 ALPHA 14 from here
 

mumbozver

Member
Feb 13, 2011
48
39
0
If you need something, I could give it to you ... just ask me :)
I already can extract init files from running kernel, however if they not deleted by later init scripts.
For me more interesting to change init scripts, and put it back to kernel image without compiling kernel myself or ask You to put something in initramfs. Repacking kernel images just more faster.
 

nullghost

Retired Recognized Developer
Jan 4, 2011
143
209
0
Oxford, OH
twitter.com
mizch: I'm getting an error related to the variable at_min
Code:
Trying size: 7793816  3896908./repack-zImage.sh: line 284: [: : integer expression expected
At some points it seems to have integers assigned to it, while at other points it seems to have the string "yes" assigned to it.
 

vishwanathptl

Retired Recognized Developer
Jun 1, 2009
260
927
0
34
Bangalore
mizch great work.

but it wont work on my zImage. its froyo kernel (GALAXY FIT s5670).

my zImage is abt 2.0 MB if pulled from mobile and its abt 3.0 MB if extracted from boot.img.

i am confused. i am not getting the rite zImage. plz help me. if u say i wil post both the zimages here. trying from 2 months but not getting anything.
 

mizch

Senior Member
Nov 11, 2010
158
78
0
I need to be able to reproduce the error here. So please provide a download link to the zImage in question (it's not a problem if it is buried in some .tar for flashing) and I'll look how I can help you.
 

mizch

Senior Member
Nov 11, 2010
158
78
0
Sorry, I cannot extract the zImage for you. This is out of scope for this program and for me. Please ask in a forum which handles your brand of phone how to get at the zImage. When you've extracted it and if the script here doesn't handle it, I'll gladly try to help.

I simply cannot be expected to know where each of those many hardwares around bury their zImage, nor do a Google research on this for any number of them. So I hope you can understand that you're on your own with that.
 

vishwanathptl

Retired Recognized Developer
Jun 1, 2009
260
927
0
34
Bangalore
its k i can understand but wen i tried with HTC Android Kitchen 0.161 - by dsixda, it extracted zImage and ramdisk. but wen i compared my ramdisk with the initramfs of I5700, there wer some files missing in mine. i dont kmow if kitchen extracted the ramdisk completely. Can u help me with this? can u tell me that kitchen extracted the ramdisk completely? Plz..... here is my boot img extracted from my device.The previous one was from firmware files downloaded from samfirmware.com.

http://www.mediafire.com/?9eq16hbxtgkjcb9
 

brisk5181

Senior Member
Jan 17, 2011
142
11
0
www.galaxycommunity.com
Hmm, not working for me:

I always got this error:

./repack-zImage.sh -uv
Warning: there is aready an unpacking directory. If you have files added on
your own there, the repacking result may not reflect the result of the
current unpacking process.
mkdir -p /work/arm/1/zImage_unpacked
cd /work/arm/1/zImage_unpacked

repack-zImage.sh: Can't find a gzip header in file 'zImage'
Terminated


I am using openSUSE 11.2 "Emerald" - Kernel \r (\l).

I tried 2 zImages, one is from

http://derek.theblog.ca/galaxys-i9000m-gingerbread-upgrade
(file: http://www.multiupload.com/N8D9XZ1PIF)

and the speedmod kernel speedmod-kernel-k13e-500hz.tar

Both result the same error.

I tried both V6 and V4 of the script, same thing

Anyone can help?
 

arunmcops

Inactive Recognized Developer
Apr 20, 2010
1,375
860
0
Bareilly
Hi mizch,
I am getting this error when i am trying to unpack any zImage

repack-zImage.sh: Can't find a gzip header in file 'zImage'
Terminated

(Ubuntu 11.04 x32)

But same kernel i tried to unpack on Ubuntu 10.04/10.10 x64 works perfectly.

So this can't be scripts fault . OS fault possible ?
 

Dharam_Maniar

Retired Recognized Developer
Nov 24, 2010
2,555
3,009
0
30
Hi mizch,
I am getting this error when i am trying to unpack any zImage

repack-zImage.sh: Can't find a gzip header in file 'zImage'
Terminated

(Ubuntu 11.04 x32)

But same kernel i tried to unpack on Ubuntu 10.04/10.10 x64 works perfectly.

So this can't be scripts fault . OS fault possible ?
well, that can be the reason...I got it working on 10.10, and cdesai couldnt get it worked for 11.04...