I just need a simple script and or a command line to decompile and recompile the kernel.img from the zImage for ubuntu. I have looked everywhere and could not find anything about the kernel.img that is inside of the zImage. Thanks in advanced!
anthony062991 said:
I just need a simple script and or a command line to decompile and recompile the kernel.img from the zImage for ubuntu. I have looked everywhere and could not find anything about the kernel.img that is inside of the zImage. Thanks in advanced!
Click to expand...
Click to collapse
Not. you can't decompile a zImage. only compiling a new kernel from the sources is possible.
Related
Just yesterday nikholtus told me
"you cannot repack a ramdisk twice. you always have to use a kernel.sin as source. a ramdisk extracted from kernel.elf will not work"
now ^^ that was strange, because if we can pack once we should be able to repack over and over again. So i went about trying to find what the problem was.
The problem as i understand is, the people over here at Xperia 2012 forum seem to use 7zip to extract the ramdisk from kernel.elf as explained in atarii's thread here
But we need to understand, that the proper method to unpack a ramdisk is
Code:
mkdir ramdisk-contents
cd ramdisk-contents
guncip -c ../ramdisk.img | cpio -i
using the 7zip method will destroy all symlinks and will NOT retain file permissions in the ramdisk
Thus such an extracted ramdisk will NOT be able to be reused by repacking it.
U might just have made alot of people do a tactical facepalm.
lol, that i didn't know this
now i have touch recovery (on my P)
very happy
btw lazy bummers (or even lazy developers) can use my kernel kitchen (link in my sig)
it can unpack and repack a kernel.elf for you as many times as you wish to make it do so
championswimmer said:
Just yesterday nikholtus told me
"you cannot repack a ramdisk twice. you always have to use a kernel.sin as source. a ramdisk extracted from kernel.elf will not work"
Click to expand...
Click to collapse
blame atarii
(i joke of course!)
nice one champ!!
Reviving old threads here, but alas, you are the only ones who know.
So if I unpack a ramdisk with 7zip and repack it later on, I won't be able to boot?
someone755 said:
Reviving old threads here, but alas, you are the only ones who know.
So if I unpack a ramdisk with 7zip and repack it later on, I won't be able to boot?
Click to expand...
Click to collapse
Sure,it will f))ck up the system!!
so unpacking a ramdisk should type the line like you post? so that it can be repack,right?
i can't access the third line command
is all of the step3 in unpack elf should change to the strings like you post?
and what is guncip?
gunzip
slsamg7112 said:
i can't access the third line command
is all of the step3 in unpack elf should change to the strings like you post?
and what is guncip?
Click to expand...
Click to collapse
gunzip as knows as
Linux Command - Unix Command.
Sent from Xperia Sola
but how it works? should i need anything else?
and it always says cpio is not a executable or bat file
how to solve it? thanks
I've heard from a very good source that our kernels don't in fact have symlinks. That same source has also said that the OP here is wrong and the ramdisk may be used as many times as we wish. And that we may use 7zip for unpacking it.
So yeah, I'll be using 7zip...
Hello all, how to unpack boot.img from CM9?
I trying to use unpack-bootimg.pl and have error:
Could not find any embedded ramdisk images. Are you sure this is a full boot image?
Click to expand...
Click to collapse
also i trying unpack it with split_boot.img and have this error:
Android Magic not found in boot.img. Giving up.
Click to expand...
Click to collapse
How to unpack?
P.s me need unpack initramfs for change init.rc for change cpu freq on boot
TheSooth said:
Hello all, how to unpack boot.img from CM9?
I trying to use unpack-bootimg.pl and have error:
also i trying unpack it with split_boot.img and have this error:
How to unpack?
P.s me need unpack initramfs for change init.rc for change cpu freq on boot
Click to expand...
Click to collapse
You can use unyaffs.
I attached it. Just open an CMD Window,
then cd PATH
Then unyaffs boot.img
View attachment Unyaffs.rar
I have met some problem with boot.img and need some help if there's somebody know it.
I used unmkbootimg and mkbootimg, I unpacked a boot.img then got zimage and initramfs.cpio.gz, I repacked it without any edit but the new boot.img becames smaller, it changed from 13M to 7.9M, and the phone couldn't boot from new boot.img,
and there is no question if I use a boot.img extracted from an android3.x-version rom, but if the android version changes to 4.x, the unpack-repack process would lose much size...I tested on mi2s' rom......I don't know if there are some files that will be lost in unpack process, or say the process just ignore files other than zimage and initramfs...
does anybody knows why?
binghemoye said:
I have met some problem with boot.img and need some help if there's somebody know it.
I used unmkbootimg and mkbootimg, I unpacked a boot.img then got zimage and initramfs.cpio.gz, I repacked it without any edit but the new boot.img becames smaller, it changed from 13M to 7.9M, and the phone couldn't boot from new boot.img, does anybody knows why?
Click to expand...
Click to collapse
It could be because of incorrect settings for mkbootimg or there more files,than zImage and initramfs, needed for proper work. Hard to say without more information.
Sorry for my bad English.
B.B.N. said:
It could be because of incorrect settings for mkbootimg or there more files,than zImage and initramfs, needed for proper work. Hard to say without more information.
Sorry for my bad English.
Click to expand...
Click to collapse
There is no question if I use a boot.img extracted from an android3.x version rom, but if the android version changes to 4.x, the unpack-repack would lose much size...I tested on mi2s' rom......I don't know if there are some files that will be lost in unpack process, or say the process just ignore files other than zimage and initramfs...
Hi all,I am new to android world.I am trying to create a own kernel image.I have downloaded Kernel source for gt-s6012 and built it. I got zImage by building kernel . How can i get boot.img and ramdisk.img from this zImage. I have searched throughout Google but couldn't find a proper answer. Any clues ?
Boot.img are image where both kernel (zimage) and ramdisk are stored. You should make one with bootimg tools, and you can get ramdisk from your phone (search xda). At the other hand you can use anykernel template and it's even easier. Hope it helps
Matthew_333 said:
Boot.img are image where both kernel (zimage) and ramdisk are stored. You should make one with bootimg tools, and you can get ramdisk from your phone (search xda). At the other hand you can use anykernel template and it's even easier. Hope it helps
Click to expand...
Click to collapse
Thanks for the suggestion..Can you provide any link or procedure to make the boot.img from zImage and ramdisk.
So i have extracted the boot.img file from my favourite ROM using abootimg and got the following:
bootimg.cfg
intird.img
zImage
Now i can see that the bulk of the kernel is in the zImage file though for the life of me i can't work out how to extract it.. Can it even be done?
I want to add overclocking to my old Grouper device i have the commits. if i could just see the file structure i can replace the files needed within the arch/arm folder and recompile i'd be done! i've searched everywhere though no one seems to advise on how to do it.
Thanking you in advance.