how to change sony boot image? - Sony Ericsson Xperia Neo, Pro

any way to set own .jpeg or .png picture?
or change it in kernel?

Do u think this is the right place to ask questions...that too with a new thread? The boot image lies inside the kernel...and decompiling a kernel is a dev's expertise.
Sent from my Xperia neo V using XDA

get the boot.img, exract it, you'll get ramdisk. extract it too, you'll get logo.rle
convert it to png
make your changes
convert it back to rle
then place it back in ramdisk
repack boot.img
AND ITS HARD TO DO THIS ON WINDOWS, YOU NEED LINUX FOR THIS

Aarush said:
get the boot.img, exract it, you'll get ramdisk. extract it too, you'll get logo.rle
convert it to png
make your changes
convert it back to rle
then place it back in ramdisk
repack boot.img
AND ITS HARD TO DO THIS ON WINDOWS, YOU NEED LINUX FOR THIS
Click to expand...
Click to collapse
Thank you for the detailed instructions!

I try to unpack it with Cygwin but give me error
Code:
./extractboot: ./split_bootimg.pl: /usr/bin/perl: bad interpreter: Permission de nied
./extractboot: line 17: cpio: command not found
gzip: ../../boot.img-ramdisk.gz: No such file or directory

Because you need to install cpio
, xz for some too. The is a win exe for unpacking kernels around here some where
Sent from my Xperia Neo V using XDA

i have instal cpio and get this
Code:
$ ./extractboot boot.img
./extractboot: ./split_bootimg.pl: /usr/bin/perl: bad interpreter: Permission de nied
gzip: ../../boot.img-ramdisk.gz: No such file or directory
cpio: premature end of archive

The clue there is permission denied
.. .
Sent from my Xperia Neo V using XDA

mpiekp said:
The clue there is permission denied
.. .
Sent from my Xperia Neo V using XDA
Click to expand...
Click to collapse
so where ist the problem? what i got to do?

Learn about Unix file permissions. Also read the Sony kernel dev blog or your repackaged kernel won't boot
Sent from my Xperia Neo V using XDA

Related

who can help me repack a boot.img

i have read the article http://forum.xda-developers.com/showthread.php?t=915808
i am a windows user,and i have install cgwin and perl
but i can not use unpack.boot.pl and repack.boot.pl(actually i donot know how to use it )
i unpack the boot.img by split_bootimg.pl by DOS
if anyboy can tell me how to use unpack-bootimg.pl and repack-bootimg.pl?
or help me repack the boot.img.the edited file of the boot.img i have upload to
http://cid-34cb0dc592eb3181.office.live.com/browse.aspx/.Public?uc=1
thanks
any body there?
Use dsixda android kitchen.
I run linux, but you have a perl script, so you need to run it through perl before it can work. So something like...
Code:
perl unpack.boot.pl [then the inputs for unpack.boot.pl]
I use cramfs tools so mine looks like
Code:
cramfsck -x bootextractedDIR boot.img
You can also get the dsixda android kitchen and dig through the files, since it does it too. The kitch is just a really complated cmd script, so somewhere in there you can find the command for how it extracts the boot.img
equalsP said:
I run linux, but you have a perl script, so you need to run it through perl before it can work. So something like...
Code:
perl unpack.boot.pl [then the inputs for unpack.boot.pl]
I use cramfs tools so mine looks like
Code:
cramfsck -x bootextractedDIR boot.img
You can also get the dsixda android kitchen and dig through the files, since it does it too. The kitch is just a really complated cmd script, so somewhere in there you can find the command for how it extracts the boot.img
Click to expand...
Click to collapse
But it can't pack it after unpacking: (
Need it to add kernel to bootimage. Can someone help ?
Sent from my HTC HD2 using XDA Premium App
Hello I've found this...
http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack,_Edit,_and_Re-Pack_Boot_Images
I could unpack the files. but mkbootfs and mkbootimg doesn't work for me. When I downloaded ROM kitchen, there files were present as mkbootfs.c and mkbootimg.c .Not sure how to make them executable
Tried compiling with gcc and also tried changing permissions using chmod. If you find anythng, please PM me...
Edit : Forgot to mention I run linux.
Okay now sorted it. Use repack_bootimg.pl tool .Download ROM kitchen and search for mkbootimg and mkbootfs tools. Copy and paste them to your working directory. Also copy all header files from dsidia ROM kitchen. Download Repack tool from web.
Use this command
perl repack-bootimg.pl <kernel> ramdisk directory.img
very happy to hear this.i will switch to my ubuntu and try again
Not work here. I have image boot from rk2918 device and pearl scripts not work for unpack.
How I can unpack?

[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

Bring kernel and ramdisk togehter...

Hi guys,
i tried to make my kernel for the xperia s since i have it
but every time i got early bootlooops (before kernel logo)
i tested to extract the stock kernel and repack it but bootloop...
Unpacked the elf file with flashtool
and repacked it with this command:
python mkelf.py -o kernel.elf [email protected] [email protected],ramdisk [email protected],rpm
Click to expand...
Click to collapse
in the folder i tried to repack are these files:
mkelf.py, zImage, ramdisk.img, RPM.bin
can some one tell me that went wrong?
Hi mericon, nice to see you in the S section
Have a read through http://forum.xda-developers.com/showthread.php?t=1729280 i was having the same problems, which turned out to be the way some of us were unpacking the kernel.sin
Championswimmer has a nice little script on his github which works too (also in that thread)
that could be the problem but found an other thing that could it be too
on ics i have change this:
python mkelf.py -o kernel.elf [email protected] [email protected]200000,ramdisk [email protected],rpm
to this:
python mkelf.py -o kernel.elf [email protected] [email protected]300000,ramdisk [email protected],rpm
and finaly it works now i can create my kernel and it boots so hopefuly we have the next nice ICS based kernel in a few days
btw thanks for your help

[Q] Ned help to modify AOKP boot.img

Hi,
I got the AOKP ROM for Sony xperia U from XDA forums.
I want to modify the boot.img, please let me know the correct tool/script to unpack/repack and modify.
I already tried using following:
1) unpacking & packing scripts from github's Bootimg-scripts (unpack-bootimg.pl & repack-bootimg.pl)
- unpacking and packing the boot.img without any modifications, this creates a boot.img which doesn't boot
2) split_bootimg.pl
- Gives error message "Bad Magic"
Thanks!
Dev
Hv u sign that?
Java -jar signapk.jar testkey.x509.pem testkey.pk8 [update.zip] [update-signed.zip]
Sent from my ST25i using Tapatalk 2
devdx said:
Hv u sign that?
Java -jar signapk.jar testkey.x509.pem testkey.pk8 [update.zip] [update-signed.zip]
Sent from my ST25i using Tapatalk 2
Click to expand...
Click to collapse
Hi,
The boot.img looked to be signed. I don't know how to unsign it. Where can I find the keys mentioned above (testkey.x509.pem, testkey.pk8)
Can you let me know how to modify the boot.img if it is signed ?
Thanks!
Regards,
Dev

[Q] Can't boot compiled stock kernel

Hi
My main goal is to disable the lcd connectivity check while the phone is booting. I have searched the net and decided to comile a kernel and disable the check. Because this is my first attempt of kernel compiling I am first trying to just compile the stock rom. I have seccessfully compiled one using these threads:
[GUIDE]Newbie's Guide to Kernel Compiling -- http://forum.xda-developers.com/showthread.php?t=2576721
[TUT]Compile a kernel from Sony source -- http://forum.xda-developers.com/showthread.php?t=2285731
After compile I have a zImage file. I need a ramdisk so I unpack the kernel.sin inside the stock .ftf file using @DooMLoRD's tools found in his github repository. So there are two files a zImage and a kernel.sin-ramdisk.cpio.gz. Then I execute this command:
Code:
mkbootimg --kernel zImage --ramdisk kernel.sin-ramdisk.cpio.gz --base 0x00200000 -o boot.img
Note: If I don't put the --base 0x00200000 tag I get wrong range error in fastboot! If it's wrong I am happy to know how I should handle it!
After that I run this command in terminal:
Code:
fastboot boot boot.img
but nothing happens. Not even a small viberation. I have read about some filler stuff to be added to the ramdisk but there is no clear explanation on how to do it exactly.
(Please help me as I am stuck for 2 days!)
thanks in advanced!
Use an alternative ramdisk like that of my kernel (or doomkernel) instead of stock ramdisk
Alternatively un pack the ramdisk and add any file ~700KB-1MB and repack it.
extract the ramdisk files
add filler
use
In that folder
Code:
find . | cpio --quiet -o -H newc | gzip > ../ramdisk.img
You will get the ramdisk.img out side the folder .
Code:
mkbootimg --kernel zImage --ramdisk ramdisk.img --base 0x00200000 -o boot.img
karandpr said:
Use an alternative ramdisk like that of my kernel (or doomkernel) instead of stock ramdisk
Alternatively un pack the ramdisk and add any file ~700KB-1MB and repack it.
extract the ramdisk files
add filler
use
In that folder
Code:
find . | cpio --quiet -o -H newc | gzip > ../ramdisk.img
You will get the ramdisk.img out side the folder .
Code:
mkbootimg --kernel zImage --ramdisk ramdisk.img --base 0x00200000 -o boot.img
Click to expand...
Click to collapse
Thanks. I have a question. Is the filler thing only for stock ramdisks or should it be done for yours too?
I added a file as you said to stock ramdisk and builded the ramdisk.img with the comand you said.
I have two files:
ramdisk.img --> 981.6KB
zImage --> 3.8MB
then I run the mkbootimg command and after that I fastboot boot but nothing happens!
mike-wright said:
I added a file as you said to stock ramdisk and builded the ramdisk.img with the comand you said.
I have two files:
ramdisk.img --> 981.6KB
zImage --> 3.8MB
then I run the mkbootimg command and after that I fastboot boot but nothing happens!
Click to expand...
Click to collapse
mike-wright said:
Thanks. I have a question. Is the filler thing only for stock ramdisks or should it be done for yours too?
Click to expand...
Click to collapse
Filler is only for stock Ramdisk.
the files are alright.
What phone are you using ?
Best solution is to use a kitchen like
http://forum.xda-developers.com/showthread.php?t=1659584
Use ramdisk of Lupus or Doom kernel...If you are using mdpi then you can use my ramdisk.
karandpr said:
Filler is only for stock Ramdisk.
the files are alright.
What phone are you using ?
Best solution is to use a kitchen like
http://forum.xda-developers.com/showthread.php?t=1659584
Use ramdisk of Lupus or Doom kernel...If you are using mdpi then you can use my ramdisk.
Click to expand...
Click to collapse
Thank you for reply. I am using xperia mini st15i. I figured it out. It was my zImage. I changed my OS to ubuntu 14.04 32 bit and compiled with @DooMLoRD's arm-eabi-4.4.3 (before I was using a ubuntu 14.04 64 bit mac version with arm-linux-eabi-4.7 toolchain) and used your (@karandpr --> Doopler) ramdisk and now my kernel boots!!!
I have another question though. Now I change one function (named check_panel_ids) in mddi_sony_s6d05a1_hvga.c in kernel drivers and it compiles well but after boot the wifi is off!!! can you help me with this problem? I don't know why!!! Why should lcd drivers change wifi compatibility???
What has happend is the wifi switch is off and grayed out. Sometimes it's ordinary but when you turn it on it just grays out! The hotspot has the same issue
I have tried to install the modules but I dont have them (I found one but it didn't work) and I dont know how to install them.
What can I do to fix this issue?
mike-wright said:
Thank you for reply. I am using xperia mini st15i. I figured it out. It was my zImage. I changed my OS to ubuntu 14.04 32 bit and compiled with @DooMLoRD's arm-eabi-4.4.3 (before I was using a ubuntu 14.04 64 bit mac version with arm-linux-eabi-4.7 toolchain) and used your (@karandpr --> Doopler) ramdisk and now my kernel boots!!!
I have another question though. Now I change one function (named check_panel_ids) in mddi_sony_s6d05a1_hvga.c in kernel drivers and it compiles well but after boot the wifi is off!!! can you help me with this problem? I don't know why!!! Why should lcd drivers change wifi compatibility???
Click to expand...
Click to collapse
mike-wright said:
What has happend is the wifi switch is off and grayed out. Sometimes it's ordinary but when you turn it on it just grays out! The hotspot has the same issue
I have tried to install the modules but I dont have them (I found one but it didn't work) and I dont know how to install them.
What can I do to fix this issue?
Click to expand...
Click to collapse
You might need to recompile the WiFi drivers.
use
Bash:
lsmod
to check if the WiFi modules are properly loaded

Categories

Resources