[Q] Help flashing custom zImage on nAa-jb-03 - Sony Ericsson XPERIA X10 Mini

Hi All,
A totally newbie question. I have compiled the naA-jb kernel at my end (no changes, just recompiled) and have the zImage file. I want to flash this on my U20i device now. However, I cannot find a way to do it. I read about fastboot, but it seems that X10 mini pro does not support fast boot. I tried the search key press, and connecting to PC for fast boot). In Flashtool the button to install the Kernel is always greyed out. Is there any way in which I can flash the kernel? My X10 mini pro is running naA-jb-03 kernel. I'm using Windows 8. Thanks.

Well I was able to solve the issue by using the Android Kernel Kitchen by championswimmer. Basically revolved around extracting the existing ftf file and creating a new kernel.sin file using the kitchen. Then replaced the kernel.sin in the original ftf. If there is any other way, you are welcome to answer.

New in nAa-jb-05
With nAa-jb-05 the above method will not work. This is so because it introduces lz4 compression for zImage and the ramdisk. Working on a way to get over this and will post an update.

So one way to do is as follows:
1. In flashTool, Use Extractors -> ELF and select the kernel.sin file from the original ftf.
2. It will output 2 files kernel.elf.Image and kernel.elf.2
3. Take kernel.elf.2 and use lz4 to decompress using the -d option.
4. Above step will output the ramdisk cpio file.
5. Use the existing method of Kernel tools to gz the cpio file and place your compiled zImage to get kernel.sin.
6. Use bundle creator in flashTool to create ftf.

Structure of nAa-jb-05
OK just to keep things in my mind clear:
1. Extract kernel.sin file from the ftf file using winrar or 7-zip
2. This kernel.sin file contains the kernel zImage and the ramdisk
3. In the nAa-jb-05 version of the kernel.sin file, the ramdisk (which is cpio'ed already) is compressed using lz4 compression. The zImage is also compressed using lz4, but that is during the kernel compilation time.
4. To extract the zImage and the ramdisk from the kernel.sin file, we can use the FlashTool. Fire up the Sin Editor and select the kernel.sin file. You can now click on the "Dump Data" button. This will dump the kernel.elf file and the kernel.partinfo file.
5. Now the kernel.elf (~ 8 MB in nAa-jb-05) can be extracted using the "Extractors -> Elf" option in FlashTool.
6. 2 files will be dumped from the ELF, the kernel zImage by the name kernel.elf.Image and the kernel.elf.2 file which is the lz4 compressed ramdisk.
7. If you open up the kernel.elf.Image file in a hex editor, you will be able to see the standard [0x00 0x00 0xa0 0xe1] pattern.
8. If you open up the kernel.elf.2 file you will see the lz4 magic sequence 0x184C2102 (little endian).
9. Now you can decompress the kernel.elf.2 using lz4 (you will need to compile on linux/(Ubuntu) from source). Also note that the magic number should be 0x184C2102 and not 0x184C2103 during the compilation stage.
10. Once decompressed you get the ramdisk.cpio.
11. You should be good from here.
I will follow-up with the "stich-up" up to "kernel.sin" with modified/re-compiled zImage method shortly.

Stitch-up related:
1. If modifying the init-ramdisk contents make sure to cpio and then do a lz4 compression.
2. Put it in the input folder of kernel-tool-master by championswimmer.
3. Place the compiled zImage (by selecting lz4 during compilation, config) in the input folder too.
4. Create a kernel.sin file using the kernel-tool-master
5. Use the kernel.sin file created above, to create ftf file using the Bundle creation option in FlashTool.

If changing version string kernel recompile
Also, take care that in case you modify the kernel during compilation, (such that you change the version string etc.), then you will need to recompile all the loadable kernel modules again. In this case, you would be required to re-compile the wireless modules again.

As a side-note, there is no need to use the build_wifi script for building the kernel modules. These are legacy, not required for 05 version of the kernel. modules_install should be good enough.

AW: [Q] Help flashing custom zImage on nAa-jb-03
QueryType said:
As a side-note, there is no need to use the build_wifi script for building the kernel modules. These are legacy, not required for 05 version of the kernel. modules_install should be good enough.
Click to expand...
Click to collapse
Are you interested in joining our Team? Please PM...
Sent from my U20i using xda app-developers app

Related

Howto - unpack,change,repack boot.img

Hi, for those interested I wrote following steps (ubuntu 10.10 32b):
(based on excellent http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack,_Edit,_and_Re-Pack_Boot_Images )
I included compiled tools mkbootfs , mkbootimg and perl scripts unpack-bootimg.pl and repack-bootimg.pl.
Repack-bootimg.pl is edited and the needed parameters for our folio are included ([email protected] [email protected] vmalloc=192M video=tegrafb console=ttyS0,115200n8 usbcore.old_scheme_first=1 tegraboot=sdmmc tegrapart=recovery:122000:a00:800,linux:a0e00:1000:800,loader:300:400:800,mbr:700:200:800,system:900:20000:800,cache:20900:80000:800,misc:a0900:400:800,userdata:a1f00:80000:800 boardtype=PR)
1) unpack attachement mytools.tgz into your home, in your home the folder ~/mytools is created:
tar -xzf mytools.tgz
2) copy existing boot.img into ~/mytools (from foliomod update.zip)
3) ./unpack-bootimg.pl boot.img
- old kernel from boot.img is extracted: boot.img-kernel.gz
- content of contained ramdisk is extracted in folder: boot-img.ramdisk
4) copy new compiled kernel (zImage) into ~/mytools (from <source>/kernel/arch/arm/boot/zImage , you have to compile yourself with the weeds2000 quide http://forum.xda-developers.com/showthread.php?p=10331797#post10331797)
5) make all desired changes into ramdisk folder
6) repack new boot.img with a new kernel and changed ramdisk
./repack-bootimg.pl zImage boot.img-ramdisk boot-new.img
7) new boot image is created as boot-new.img
8) if you want just to experiment, you can take any full foliomod dexter's update.zip (1.3d), put the new boot image inside instead original one.
It is possible to remove the other 2 images (recovery and system) if you want just to flash kernel. NOTE! But you have to remove the extrating command for recovery and system from update.zip/meta-inf/com/google/android/update-script.
p.s. Feel free to correct me, if something wrong with the steps. It's my first attempt to compile kernel
I am on FolioMod 1.3d and I use the kernel built without patches from http://tegramid.com/wiki/Main_Page(Full GPL source bundle including framework) for a day without problems. I had to do a full wipe. It's meant for testing, I don't say that kernel from source is better or worse.
Many thanks to Dexter because everything is based on his release, weeds2000 because of his kernel compile quide and tsh who placed the sources on the git and to all who try hacking our folio
thx for this, that 'll be usefull
thanks for the guide.
i have managed to do every thing up to the repack
when i type
Code:
perl repack-bootimg.pl boot.img-kernel.gz boot.img-ramdisk.gz boot.img
i get error
Code:
boot.img-ramdisk.gz Not a directory at repack-bootimg.pl line 13.
even though it is definatly in their. any idea how to get it to work?
You don't have to provide the folder instead of the packed Ramdisk-File!
Because this script is made doing changes in Ramdisk and kernel..
So you can change the scripts inside the boot.img-ramdisk folder and the script will repack and add it to the new boot.img!
permission denied
i have done everything as you said, but while using split_bootimg.pl i got "permission denied". please suggest me what to do?
1. Enable read/write permissions for that file.
2. Tobr, you made a mistake in repack-bootimg.pl. You forgot to add " ./ " before mkbootimg.
Jon2555 said:
1. Enable read/write permissions for that file.
2. Tobr, you made a mistake in repack-bootimg.pl. You forgot to add " ./ " before mkbootimg.
Click to expand...
Click to collapse
The script was downloaded from internet not written by me. And it worked for me just fine. I can not verify now that you are right (probably you are). If it works for you with ./ then either I can put fixed version for download for others (if there is anybody) or it can be here just as a notice for other users, if not working.
I have ./ defined in my path variable in my profile so that i don't need it.
eror when repack
tobr said:
Hi, for those interested I wrote following steps (ubuntu 10.10 32b):
(based on excellent http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack,_Edit,_and_Re-Pack_Boot_Images )
I included compiled tools mkbootfs , mkbootimg and perl scripts unpack-bootimg.pl and repack-bootimg.pl.
Repack-bootimg.pl is edited and the needed parameters for our folio are included ([email protected] [email protected] vmalloc=192M video=tegrafb console=ttyS0,115200n8 usbcore.old_scheme_first=1 tegraboot=sdmmc tegrapart=recovery:122000:a00:800,linux:a0e00:1000:800,loader:300:400:800,mbr:700:200:800,system:900:20000:800,cache:20900:80000:800,misc:a0900:400:800,userdata:a1f00:80000:800 boardtype=PR)
1) unpack attachement mytools.tgz into your home, in your home the folder ~/mytools is created:
tar -xzf mytools.tgz
2) copy existing boot.img into ~/mytools (from foliomod update.zip)
3) ./unpack-bootimg.pl boot.img
- old kernel from boot.img is extracted: boot.img-kernel.gz
- content of contained ramdisk is extracted in folder: boot-img.ramdisk
4) copy new compiled kernel (zImage) into ~/mytools (from <source>/kernel/arch/arm/boot/zImage , you have to compile yourself with the weeds2000 quide http://forum.xda-developers.com/showthread.php?p=10331797#post10331797)
5) make all desired changes into ramdisk folder
6) repack new boot.img with a new kernel and changed ramdisk
./repack-bootimg.pl zImage boot.img-ramdisk boot-new.img
7) new boot image is created as boot-new.img
8) if you want just to experiment, you can take any full foliomod dexter's update.zip (1.3d), put the new boot image inside instead original one.
It is possible to remove the other 2 images (recovery and system) if you want just to flash kernel. NOTE! But you have to remove the extrating command for recovery and system from update.zip/meta-inf/com/google/android/update-script.
p.s. Feel free to correct me, if something wrong with the steps. It's my first attempt to compile kernel
I am on FolioMod 1.3d and I use the kernel built without patches from http://tegramid.com/wiki/Main_Page(Full GPL source bundle including framework) for a day without problems. I had to do a full wipe. It's meant for testing, I don't say that kernel from source is better or worse.
Many thanks to Dexter because everything is based on his release, weeds2000 because of his kernel compile quide and tsh who placed the sources on the git and to all who try hacking our folio
Click to expand...
Click to collapse
hi
when do this in ubuntu 11.4
get eorr below
[email protected]:~/Desktop/untitled folder$ ./unpack-bootimg.pl boot.img
kernel written to boot.img-kernel.gz
ramdisk written to boot.img-ramdisk.cpio.gz
463 blocks
extracted ramdisk contents to directory boot.img-ramdisk/
[email protected]:~/Desktop/untitled folder$ ./repack-bootimg.pl zImage boot.img-ramdisk boot-new.img
gzip: folder/ramdisk-repack.cpio.gz: No such file or directory
sh: mkbootimg: not found
No such file or directory at ./repack-bootimg.pl line 21.
[email protected]:~/Desktop/untitled folder
can any one help me?
any tools for windows ?
nguyenhonganh said:
any tools for windows ?
Click to expand...
Click to collapse
Same request!
repack problem
Can somebody tell me is it possible to repack kernel and ramdisk using just hex editor? Without this scripts and unmkbootimg and mkbootimg. What does not work for me cos im using i9100 Philz root. I know how to unpack it and change init.rc and pack it back again. So can i just put my (kernel+ramdisk) ramdisk.cpio.gz file inside mmcblk0p5 in exac location. Will that work out? I dont know what this is doing:
mkbootimg --kernel zImage --ramdisk initramfs.cpio.gz --base 0x20000000
--cmdline 'no_console_suspend=1' -o new_boot.img
this address thing and cmdline but if i replace just ramdisk i dont need to set up addres again cos everything will be in same place. And one more question if something goes wrong can i boot to recovery or download mode?
New kernel copied itself to mmcblk0p5
and i have new CWM now. So it seems to me recovery is inside mmcblk0p5 as well and my phone never use mmcblk0p6
@tobr, I cannot open the archive of boot.img-kernel.gz. When I try to open it with terminal, it says: Not a valid gzip file. What to do?

[DEV][TOOL] Kernel Kitchen {X8/W8}

[size=+2]PLEASE USE THIS THREAD (LINK) FROM NOW ON. I WILL NOT MONITOR THIS THREAD ANYMORE [/size]
INTRODUCTION
So we all know dsixda's XDA ROM Kitchen
Then how about a kitchen for Kernels ??
What started out just as my personal directory where I kept all my kernel and ramdisk tinkering scripts, has now turned into a project (which is far from finished right now )
This does NOT enable you to compile the kernel binary (aka zImage).
This enables you to edit ramdisk and change bootsplash images and helps kernel developers to deploy their compiled kernel in a usable form.
FEATURES
As of now what we can do with the Kernel Kitchen is
Fully menu driven interface (like dsixda kitchen)
Extract zImage and ramdisk from boot.img file
Create boot.img from zImage and ramdisk
Extract zImage and ramdisk from any ftf file that contains kernel.sin (Xperia 2010, 2011, 2012)
Create flashable ftf from zImage and ramdisk (Xperia 2010 only)
Create compressed ramdisk binary from ramdisk folder
Extract ramdisk files from ramdisk binary
Convert png image to rle format (used in android boot splash images)
Convert rle boot splash to png file (so that you can edit it)
Proposed upcoming features
Automatic script to change boot splash in a kernel with your favourite png file
STYLE CODE :
bold are supported only in linux
italics are supported in linux and windows+cygwin
underline are supported in windows native (without cygwin)
(if more than one style is used, it supports all respective platforms)
REQUIREMENTS
This tool is primarily meant for linux users (preferably Uubuntu).
But it works perfectly well on windows+cygwin too
Some portions of the kitchen have support for native windows (without even cygwin)
Rest all requirements are mentioned in the readme
WHAT ARE ITS USES ?
1.The primary purpose (for which this project started out in the first place) is to provide a easy kernel deployment tool for wannabe kernel devs.
A lot of us can compile a kernel from source but that is just the zImage and cannot be used as such on the phone. We need to package it with a ramdisk ad deploy it thorough a proper method (flashtool for Xperia, ODIN for samsund, and fastboot for other phones)
​2.You canedit ramdisk properties (by editing default.prop)
Changing ro.secure=1 to ro.secure=0 makes your ramdisk insecure and enables easy root access ​3.The most immediate and popular use that i can see right now is changing the boot logo to your liking
the boot logo is called logo.rle or initlogo.rle and is placed in the root of ramdisk folder.
When you split kernel, you can find the rle file which you can convert into png, do necessary editing and convert back into rle and pack up the ramdisk and create a new kernel
​4.Other than that, you can change the recovery system
for eg. you can include Doom's Touch recovery system inside your favourite kernel
or you can include the xRecovery inside CM7 kernel so that you can flash amend zips.
Changing the recovery is ofcourse a little more complicated for average users, and i'll write a short tuto for that soon enough ​DOWNLOAD AND USAGE
The sources can be found on www.github.com/championswimmer/kernel-tools
For linux (and cygwin) users I recommend the install git and run this command to get a copy of my repository
Code:
git clone https://github.com/championswimmer/kernel-tools.git
Or in general, all linux and windows users can just get a zipball of my repo here
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
All usage information can be found on this elaborate readme
In short all you have to do is cd to the appropriate folder and run this
Code:
./menu
CREDITS
None of this was possible without the helps and works of DoomLord, Azuzu, bin4ry, FXP, defer, blagus, nobodyAtall, the_laser, Androxyde
These works are directly included in my project
DoomLord's kernel.sin and ftf creator (windows version)
These works are used in their modified/repackaged form
DoomLord's png and rle interconversion tool (windows version)
DoomLord's perl script to split kerel.sin
And big thanks to nobodyAtall for pointing me the appropriate linux binaries (or i would have kept pouring wine over windows exe files)
Thanks to ImageMagick developers for the awesome tool
SOURCES USED
1. to565 and from565 source code (part of Android Open Source Project)
2. mkbootimg and mkbootfs standalone sources (part of AOSP)
3. abootimg sources (by Gilles Grandou)
This will help some people to began development...nice sharing
Sent from my E15i using xda premium
milenkokg said:
This will help some people to began development...nice sharing
Sent from my E15i using xda premium
Click to expand...
Click to collapse
thanks,
and for a head-start into "how to compile a kernel"
see this
http://forum.xda-developers.com/showpost.php?p=24885347&postcount=19
thanks champswimer...
I'm waiting your rom update..
Hmmm...i may just be a big of fool enough to try this
nice...
"The guy who ported xperia s firmware to x10" is in x8 block
Amazing!
We may be seeing some new kernels around here soon!
Its developers like you that make a difference
Sent from my Xperia™ PLAY using TapatalkHD
IrishStuff09 said:
Amazing!
We may be seeing some new kernels around here soon!
Its developers like you that make a difference
Sent from my Xperia™ PLAY using TapatalkHD
Click to expand...
Click to collapse
i am certainly interested if someone donates me an old/used X8
I love developing for older models anyways (cause for top mdels therea rea already top devs and i'm not too rich to use smartphones, my x10 was my gift, not bought )
btw guys please keep a tab on my thread on x10 forum as i monitor that closely, (ofcourse i monitor the x8 and mini threads too)
this was mainly for informing you guys,
as i have mentioned, i'll soon move this into chef central as soon as the boot.img area is finished
Linux Mint 12
I have small problem.With Linux Mint 12 . I extracrt kernel.sin in input folder and i run the terminal and write were going to extract him, but they nothing found in kernel.sin.The output folder its empty
danibosev said:
I have small problem.With Linux Mint 12 . I extracrt kernel.sin in input folder and i run the terminal and write were going to extract him, but they nothing found in kernel.sin.The output folder its empty
Click to expand...
Click to collapse
could you give me a screenshot of terminal ???
btw you need to use KERNEL.FTF file, not KERNEL.SIN file
For me too same result...it was empty even I use with ftf files....
But use alternative unpack-kernelsin.pl it can decompiled well but unpack was empty folder only..
Sent from my E15i using XDA
((( RedDeviL ))) said:
For me too same result...it was empty even I use with ftf files....
But use alternative unpack-kernelsin.pl it can decompiled well but unpack was empty folder only..
Sent from my E15i using XDA
Click to expand...
Click to collapse
how about using the argument ???
and please give screenshots of the terminal
((( RedDeviL ))) said:
For me too same result...it was empty even I use with ftf files....
But use alternative unpack-kernelsin.pl it can decompiled well but unpack was empty folder only..
Sent from my E15i using XDA
Click to expand...
Click to collapse
the name of file should be kernel.ftf
abcd.ftf will not work
Sent from my X10S using xda premium
Yes, i download .ftf file in input folder but output folder again its empty ( i do it maybe 5-10 times)
is the name "kernel.ftf" ???
if it is suppose nAa-R20-U15.ftf then change it to kernel.ftf
no other name than kernel.ftf will work
and i have made some fixes, so please redownload the kitchen and try
btw are you on linux or cygwin or mac os ????
I use Linux.I rename the file to kernel.ftf an again nothing.Output it empty
do you have perl installed ???
can you copy paste me the oputput you are seeing on the console screen ???
I have perl 5 installed
Here the output :
Supported Devices:
Xperia X10 (GB update, custom kernels for unlocked bootloaders)
Xperia 2011 devices (Arc, Neo, Play, Mini, Mini Pro, Ray, Pro)
could not open boot img file: kernel.sin
mv: cannot stat `kernel.sin*': No such file or directory
mv: cannot stat `*.cpio.gz': No such file or directory
mv: cannot stat `*kernel': No such file or directory
mv: cannot stat `*header': No such file or directory
mv: cannot stat `kernel.sin-ramdisk': No such file or directory
danibosev said:
I have perl 5 installed
Here the output :
Supported Devices:
Xperia X10 (GB update, custom kernels for unlocked bootloaders)
Xperia 2011 devices (Arc, Neo, Play, Mini, Mini Pro, Ray, Pro)
could not open boot img file: kernel.sin
mv: cannot stat `kernel.sin*': No such file or directory
mv: cannot stat `*.cpio.gz': No such file or directory
mv: cannot stat `*kernel': No such file or directory
mv: cannot stat `*header': No such file or directory
mv: cannot stat `kernel.sin-ramdisk': No such file or directory
Click to expand...
Click to collapse
does your ftf file contain kernel.sin ?
Sent from my X10S using xda premium

[Q]Nozomi(Xperia S) - extracting boot.img problem

Greetings, oh mighty people on XDA!
I am trying to change the FreeXperia screen (.rle file) on the CM 9.1.0 Rom for Xperia S (Nozomi) and i have run into a brick-wall
Whenever i'm trying to extract my boot.img using Dsixda's kitchen(cygwin - i'm a windows user) i get this:
Code:
Android 'magic' header not found at start of boot.img
Checking if it exists elsewhere ...
Warning: Android header not found in boot.img (unsupported format)
Error: kernel offset (page size) is 0
Press Enter to continue
Also found out that Xperia S is not on the kitchen's supported devices list, so here is the question:
how can i unpack and pack my boot.img using windows 7 (64-bit)?
You can extract it with 7-zip, the boot.img is an ELF file. Repacking will be difficult from there without a complete POSIX toolchain.
can't extract it with 7zip, it's said that file was not supported ...
use ultra iso or winrar ... just a wild
guess
Sent from my Xperia U using Tapatalk 2

[Resolved][Q] How to modify default.prop in nAa Kernel

Hi All,
Due to specific APP requirement, I need to modify some settings in kernel.
Here are all the settings I need to modify in default.prop:
ro.secure=1
ro.debuggable=0
persist.service.adb.enable=0
Here are the methods I already try:
1. Android Kernel; Kitchen 0.3.1 (http://forum.xda-developers.com/showthread.php?t=1659584)
Fail at extract kernel.sin, cannot found RamDisk
2. dsixda's Android Kitchen 0.224 (http://forum.xda-developers.com/showthread.php?t=633246)
Fail at extract kernel.sin, cannot found RamDisk
3. kernel.sin unpacker by DooMLoRD (http://forum.xda-developers.com/showthread.php?t=1262656)
Fail at extract kernel.sin, cannot found RamDisk
4. Tools in Xperia FlashTool
Fail...
The kernel.sin was extract from 2.6.32.61-nAa-jb-06.ftf. (http://forum.xda-developers.com/showthread.php?t=2136471)
I already start studying how to compile nAa kernel...
Is there any easier way to apply this change?
Thanks!
Resolved.
It's because LZ4 compress format.
Here are the steps to Unpack nAa Kernel / Modify default.prop / Repack Kernel FTF
1. Decompress nAaKernel.ftf
You will got Kernel.sin
2. FlashTool => Tools -> Sin Editor => Select Kernel.sin => Extract data
You will got kernel.elf and kernel.partinfo
3. FlashTool => Tools -> Extrators => Elf => Select kernel.elf => Unpack
You will got kernel.elf.2 and kernel.elf.Image
kernel.elf.2 = ramdisk binary which compressed by LZ4!
kernel.elf.Image = zImage
4. Rename kernel.elf.Image to zImage
5. Rename kernel.elf.2 to ramdisk.lz4 and use LZ4 tools to decompress it
You will got a new ramdisk binary which was known as ramdisk.cpio
6. Rename ramdisk which extracted in step.5 to ramdisk.cpio
7. Copy ramdisk.cpio and zImage to ubuntu system.
8. Extract ramdisk.cpio and you will see default.prop
Make any modify you need.
9. Compress ramdisk folder to ramdisk.cpio
Here are the commands:
find . | cpio -o --format=newc > ramdisk.cpio
10. Compress ramdisk.cpio by GZip
Here is the command:
gzip ramdisk.cpio
11. Use Kernel Kitchen to create kernel.sin
Put ramdisk.cpio.gz and zImage in input folder under Kernel Kitchen.
Create kernel.sin by this tools.
12. FlashTool => Tools => Bundle Creation => select kernel.sin and loader.sin => Create your FTF
13. Flash into your device!
Although Puzzle & Dragons still cannot works on X10 mini with MiniCM10...
But I tried and learned something. :laugh:
thanks for explaining the process
it is very useful for me .
ramdisk.gpio decompress & compress
I tried to follow all steps, but isn´t work for me :'(
What I did:
1) decompress E15_2.6.32.60-nAa-05.ftf with 7z under windows: I get kernel.sin and loader.sin (OK)
2) extract data from kernel.sin with flashtool (0.9.16) under windows: I get kernel.elf and kernel.partinfo (OK)
3) extract elf from kernel.elf with flashtool (0.9.16) under windows: I get kernel.elf.2 & kernel.elf.Image (OK)
4) renamed kernel.elf.2 to ramdisk.lz4, and kernel.elf.Image to zImage; both under windows with f2 (OK)
5) decompress ramdisk.lz4 (3662KB) under windows (fastcompression . blogspot.com . es/p/lz4.html): I get ramdisk (4608KB) (it supposed to be renamed, so I expect it´s ok)
6) renamed ramdisk to ramdisk.cpio under windows with f2 (OK). Copy to ubuntu (QUESTION: zImage is used in ubuntu only in kernel kitchen???)
7) extract ramdisk.cpio (4718592- not command in the post): I used cpio -i -F ramdisk.cpio (9216 blocks); 4 new elements> default.prop init (files) android modules (directories)
8) I want to check I can extract & compress ramdisk (and make a "new" kernel), so I don´t do any modification
9) with only those 4 elements in the directory (default.prop init (files) android modules (directories)), I make ramdisk: find . | cpio -o --format=newc > ramdisk.cpio (PROBLEM: alert message "ramdisk.cpio has been increased, 4718080 new bytes has not been copied" other line "27647 blocks")
Original ramdisk.cpio was 4718582, but the new one is 14155264... 3 times more!!! I think the problemis here, but I don´t know how to resolve it
I have done the rest of the manual
10) kernel.sin created with kernel kitchen 0.2.3 under ubuntu (last kitchen version gives me an error, because in despite of choose create kernel.sin from zImage and ramdisk, it tries to do a ftf from kernel -not available- and ramdisk)
11) ftf creation under windows with X10 flashing tool 0.5.0.0 (flashtool 0.9.16 force me to write what device is for, but the cell is blocked, so I cann´t do it) OK
12) I tried to flash it, but it was aborted, so I expect ftf was incorrect
Sorry for wrote all: I thik the problem is extracting and compresing randisk.cpio, but I prefer to write everithing to be sure and be as clear as possible.
Any help will be great!

[TOOL][SHARE] Boot.img tools (unpack,repack,ramdisk)

Note: I'm just sharing the work of the XDA Member CNexus.Here's a little introduction by him :
CNexus said:
I have not seen this posted anywhere, so I thought I would post it here. This is NOT purely my work, and I do not take credit for it as such.
Included in the attached ZIP are the following files:
boot_info - prints information about the boot.img passed to it, including the base address and ramdisk address. This tool prints out everything needed to repack the boot.img correctly.
split_boot - More commonly known as split_bootimg.pl, this rips apart the boot.img to extract the ramdisk and zImage. It has been modified by me to split the boot.img into a separate folder (specified by the file name of the boot.img passed to it) and to extract the ramdisk into a sub-folder as well (extracts the cpio from the gz and then extracts the actual files from the cpio archive)
unpack_ramdisk - unpacks the given ramdisk file.
Code:
Usage: unpack_ramdisk
repack_ramdisk - repacks the ramdisk from the given directory (found online and modified slightly to take a directory)
Code:
Usage: repack_ramdisk [outputFile]
mkbootimg - mkbootimg binary that creates a boot.img file from the given ramdisk and zImage. Updated to a version compiled by me to support the --ramdiskaddr option (ramdisk address) so that even nonstandard boot.img's can be repacked correctly (Use with boot_info for best results).
umkbootimg - included for convenience. Not made by me. Original thread here.
unpack - wrapper script made by me for the umkbootimg binary^ to unpack the boot.img into a separate directory and then unpack the ramdisk into a sub-directory.
Note: These tools were made for Linux. They may also work on Cygwin, but I have not personally tested them.
ANYONE is free to use / modify / kang these files as they see fit. No need to ever ask or do anything more than download.
Enjoy.
Click to expand...
Click to collapse
Download the required files from the original thread.
Original Thread : http://forum.xda-developers.com/showthread.php?t=2319018
1+
Sent from my GT-S5360 using Tapatalk 2

Categories

Resources