unpack boot.img from CM9 - Android Q&A, Help & Troubleshooting

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

Related

[APP] Xperia ROM Manager

Features:
- Extract custom IMG.
- Create IMG files.
- Convert SIN To IMG.
New features will be added, as you request.
Please report all bugs, so i can fix them!
Update 26.feb!
Little cleanup.
Update 13.mar!
Changed name.
Changed small things.
Added option to convert SIN to IMG.
Update 21.mar!
Changed name.
Code rewrite and cleanup.
Changed menu.
Added option to create IMG file.(need some testing, SOMEONE HELP ME WITH THIS.)
Say thanks to:
velnens123 - for this little tool
aZuZu - for making SIN2IMG
unyaffs, mkyaffs and cygwin creator
For Windows 32-bit Only!
This does'nt modify sin files!
Please help me with creating IMG file!
download now, will see how it works. thanx
velnens123 said:
Here is a tool for extracting xRecovery and other recovery img files.
Features:
- Extract system.img
- Extract data.img
- Extract cache.img
- Extract recovery.img
- Extract boot.img
- Extract userdata.img
- Extract misc.img
- Extract custom img.
New features will be added, as you request.
Please report all bugs, so i can fix them!
Click to expand...
Click to collapse
please add feature to convert yaffs img to ext2 img.... and keep file permission,owner....
Hope i will make it!
brixzen said:
please add feature to convert yaffs img to ext2 img.... and keep file permission,owner....
Click to expand...
Click to collapse
I will see what i can do!
does this 'extract out of the phone' or does it 'extract files out of the images'?
Sorry for a silly question, but what would I use it for? Is it like for messing around with roms' content?
how can i extract it ??? when i write path to the img and press enter it says : open image file failed
thetrisatria said:
download now, will see how it works. thanx
Click to expand...
Click to collapse
working ndak om??
I love a feature that can backup stock firmware (in format *.sin), so that I can use flash tool to rescue the phone whenever it die
Answers for questions.
i_hate_sonyericsson said:
does this 'extract out of the phone' or does it 'extract files out of the images'?
Click to expand...
Click to collapse
Graveir said:
Sorry for a silly question, but what would I use it for? Is it like for messing around with roms' content?
Click to expand...
Click to collapse
fifo171 said:
how can i extract it ??? when i write path to the img and press enter it says : open image file failed
Click to expand...
Click to collapse
Benjoy Ericsson said:
I love a feature that can backup stock firmware (in format *.sin), so that I can use flash tool to rescue the phone whenever it die
Click to expand...
Click to collapse
1. It extract files out of the images.
2. Yes, make backup in xRecovery, then extract system.img.
3. Make sure you dont write .img at end, put your img files in same folder as unyaffs.
4. I dont think its possible.
you might want to note in the original post that modified sin files can't be flashed w/ the flash tool, if thats what your reply means.
i'd assume that, but not everyone would.. and maybe note the download is for win32 only.
thanks!
Exception: STATUS_ACCESS_VIOLATION at eip=004010B0
eax=5D9BD014 ebx=00000068 ecx=00001500 edx=00BE0DAA esi=0028CD34 edi=61179FC3
ebp=0028CCD8 esp=0028CCA0 program=C:\Xperia_ROM_Manager\unyaffs.exe, pid 2100, thread main
cs=0023 ds=002B es=002B fs=0053 gs=002B ss=002B
Stack trace:
Frame Function Args
0028CCD8 004010B0 (00BC8398, 00000000, 612058E8, 00401333)
0028CD08 004013AF (00000002, 00BC8358, 00BC8250, 00000001)
0028CD68 61006CD3 (00000000, 0028CDA4, 61006570, 7EFDE000)
End of stack trace
Is this app to extract kernel.sin ??
I need a script to extract kernel.sin
THIS IS REALLY OLD! I dont think it can extract kernel.sin. Download kernel sources instead!
Sent from my XPERIA X8 using xda premium
velnens123 said:
THIS IS REALLY OLD! I dont think it can extract kernel.sin. Download kernel sources instead!
Sent from my XPERIA X8 using xda premium
Click to expand...
Click to collapse
Not all kernels has source code to compile.

[Q] kernel.img (zImage) help?

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.

Some tips regarding Unpack/Repack from kernel.elf

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...

[Q] Rockchip kernel image file - how to build?

I have a working Kernel - http://forum.xda-developers.com/attachment.php?attachmentid=1743802&d=1361298599
but I need prepare a new one - compilation it is no problem, but how to prepare img file for taht?.
I heard that this is a Rockchip kernel image file - so I am a looking for information how to build this kind of kernel?
Procesor is RK3066.
mafamafa said:
I have a working Kernel - http://forum.xda-developers.com/attachment.php?attachmentid=1743802&d=1361298599
but I need prepare a new one - compilation it is no problem, but how to prepare img file for taht?.
I heard that this is a Rockchip kernel image file - so I am a looking for information how to build this kind of kernel?
Procesor is RK3066.
Click to expand...
Click to collapse
If that is a zImage, then you need to pack it into boot.img in order to flash.
There are many boot.img tools out there which can help you. But the thing is you will be needing your device's original boot.img (Which can be extracted from your device depending upon the partition) which contains the Ramdisk in order to be successful.
coolsandie said:
If that is a zImage, then you need to pack it into boot.img in order to flash.
There are many boot.img tools out there which can help you. But the thing is you will be needing your device's original boot.img (Which can be extracted from your device depending upon the partition) which contains the Ramdisk in order to be successful.
Click to expand...
Click to collapse
In fact it is a regular (no gziped) image not a zImage. The file after unpacking from RK3066 format starts with bytes d3 f0 21 (to unpack I'm using rkutils ).
But I don't understand why we need to make boot.img with this file and only after that, upload boot.img to the device. Normally it should be possible just to upload kernel.img to the partition where kernel is stored, no?
After kernel from the link above is uploaded to this partition, the device boots up without problem. But when we compile new kernel and upload it (after converting with rk-tools ) it is not even possible to boot the device.
Any idea what's going on? Is compiling a kernel, then converting to rk3066 format is enough ?
flowher said:
In fact it is a regular (no gziped) image not a zImage. The file after unpacking from RK3066 format starts with bytes d3 f0 21 (to unpack I'm using rkutils ).
But I don't understand why we need to make boot.img with this file and only after that, upload boot.img to the device. Normally it should be possible just to upload kernel.img to the partition where kernel is stored, no?
After kernel from the link above is uploaded to this partition, the device boots up without problem. But when we compile new kernel and upload it (after converting with rk-tools ) it is not even possible to boot the device.
Any idea what's going on? Is compiling a kernel, then converting to rk3066 format is enough ?
Click to expand...
Click to collapse
Ok, I just had a look at your link and yes, it contains the kernel.img file. So it should be the kernel image file which needs to be flashed. What you actually needed to do is, unpack that kernel image using the tools of your choice and you'll get the ramdisk, zImage etc when unpacking. If you have compiled kernel from Sources, then you need to replace the zImage with yours (Found in arch/arm/boot) if your compilation was successful without errors and repack it to form the kernel.img.
But that doesn't mean it should boot compulsorily, it may not boot depending upon various weird reasons. You may have to fix it by yourself. Nearest bet is using your device's config file (Found in /proc/config.gz) and use that to compile your kernel. You can find all infos regarding what I've mentioned in this thread:
http://forum.xda-developers.com/showthread.php?t=1748297

boot.img changes after unpack-repack without edit

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...

Categories

Resources