[Q] Ned help to modify AOKP boot.img - Sony Xperia P, U, Sola, Go

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

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

how to change sony boot image?

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

[Dev][CM7.2] Help

Hi all!
I was bored to wait for ICS update. So, I decided to try compilinig CM7.2.
N.B: It's the first rom i compile from source! I'm doing it just for fun and learn how to compile a rom
What I've done:
-Compiled generic CM (with the instruction "lunch full-eng");
-Packed it with Supercharged Kernel;
Now i need some help to create the META-INF folder.
I noticed that with the compiled generic rom came also a folder called "utility" in which I found the update-binary.
P.s.: I hope also this thread will be helpfull for some other new devs
Please help him, I really like to see a cyano7 on U, please... Vai Vaste!!
Vaste92 said:
Hi all!
I was bored to wait for ICS update. So, I decided to try compilinig CM7.2.
N.B: It's the first rom i compile from source! I'm doing it just for fun and learn how to compile a rom
What I've done:
-Compiled generic CM (with the instruction "lunch full-eng");
-Packed it with Supercharged Kernel;
Now i need some help to create the META-INF folder.
I noticed that with the compiled generic rom came also a folder called "utility" in which I found the update-binary.
P.s.: I hope also this thread will be helpfull for some other new devs
Click to expand...
Click to collapse
Could u gimme put up ur github sources fr use?
y dont u just make ota package directly?
bharat_goku said:
Could u gimme put up ur github sources fr use?
y dont u just make ota package directly?
Click to expand...
Click to collapse
Uhm. Now i'll try to upload on github!
With make otapackage it gave me error!
Whoaaa!!!! Superb.!!! man! Anyone help him!!!
Krappabel! KeiranFTW! Brains! Come here xD
Sent from my ST25i using xda app-developers app
Vaste92 said:
Uhm. Now i'll try to upload on github!
With make otapackage it gave me error!
Click to expand...
Click to collapse
whats the error? could gimme a log ?
bharat_goku said:
whats the error? could gimme a log ?
Click to expand...
Click to collapse
Here's the log:
Code:
grep: build/target/board/generic/recovery.fstab: File o directory non esistente
find: "out/target/common/docs/gen": File o directory non esistente
find: "out/target/common/docs/gen": File o directory non esistente
find: "out/target/common/docs/gen": File o directory non esistente
find: "out/target/common/docs/gen": File o directory non esistente
find: "out/target/common/docs/gen": File o directory non esistente
make: *** Nessuna regola per generare l'obiettivo "otapackage". Arresto.
to translate: File o directory non esistente--> File or directory does not exist
Nessuna regola per generare l'obiettivo "otapackage". --> No rule to generate the objective "otapackage."
Vaste92 said:
Here's the log:
Code:
grep: build/target/board/generic/recovery.fstab: File o directory non esistente
find: "out/target/common/docs/gen": File o directory non esistente
find: "out/target/common/docs/gen": File o directory non esistente
find: "out/target/common/docs/gen": File o directory non esistente
find: "out/target/common/docs/gen": File o directory non esistente
find: "out/target/common/docs/gen": File o directory non esistente
make: *** Nessuna regola per generare l'obiettivo "otapackage". Arresto.
to translate: File o directory non esistente--> File or directory does not exist
Nessuna regola per generare l'obiettivo "otapackage". --> No rule to generate the objective "otapackage."
Click to expand...
Click to collapse
ok i dont understand **** outta this,send me ur git repo sometime i'll look into it as i get time..
Vaste92 said:
Hi all!
I was bored to wait for ICS update. So, I decided to try compilinig CM7.2.
N.B: It's the first rom i compile from source! I'm doing it just for fun and learn how to compile a rom
What I've done:
-Compiled generic CM (with the instruction "lunch full-eng");
-Packed it with Supercharged Kernel;
Now i need some help to create the META-INF folder.
I noticed that with the compiled generic rom came also a folder called "utility" in which I found the update-binary.
P.s.: I hope also this thread will be helpfull for some other new devs
Click to expand...
Click to collapse
So you didn't make configuration for the phone, just build the generic CM?
bharat_goku said:
ok i dont understand **** outta this,send me ur git repo sometime i'll look into it as i get time..
Click to expand...
Click to collapse
I didn't menaged to sync all the work with git.
By the way, I managed to install the .zip file. But, obviusly, the device do not boot.
For all who wan't to see my work I've uploaded the .zip file in Google drive, so just PM me and I'll send the link
Vaste92 said:
I didn't menaged to sync all the work with git.
By the way, I managed to install the .zip file. But, obviusly, the device do not boot.
For all who wan't to see my work I've uploaded the .zip file in Google drive, so just PM me and I'll send the link
Click to expand...
Click to collapse
Vaste, let me understand, you took zImage and system, you merged them in a zip and you flashed it??? Of course so it doesn't boot.
But have you got the META-INF folder or have you only got update binary??
If you havn't got META-INF you can download this.
Now we need a Dev or a Cook that take a look of system and zImage and let we now if they're OK; then he has to take updater script and with Notepad++ write the Updater script...
I don't think that it's so hard... Please.
I'm trying to make an Updater script but I never made one, so.....
And anyway I can't now if there is some thing wrong in the rom....
Vitophone said:
Vaste, let me understand, you took zImage and system, you merged them in a zip and you flashed it??? Of course so it doesn't boot.
But have you got the META-INF folder or have you only got update binary??
If you havn't got META-INF you can download this.
Now we need a Dev or a Cook that take a look of system and zImage and let we now if they're OK; then he has to take updater script and with Notepad++ write the Updater script...
I don't think that it's so hard... Please.
I'm trying to make an Updater script but I never made one, so.....
And anyway I can't now if there is some thing wrong in the rom....
Click to expand...
Click to collapse
You can use Rom kitchen (dxin somthng)
Sent from my ST25i using xda premium
For What???
Vaste Alredy made the updater script so now the rom can be installed but it doesn't boot.
I think that the problem is in to system folder, I took a look to the rom and META-INF is OK, kernel's OK to I think (he took Xperia supercharged and with Championswinner kernel kitchen he made from elf a boot.img and then he renamed it to zImage), so the problem is in system folder...
Please, jitin02 take a look, I can give you the link of the zip if vaste is offline...
If you have zImage from supercharged kernel share it!
Inviato dall'unica vera custom rom per xperia U,la supercharged!
Vitophone said:
For What???
Vaste Alredy made the updater script so now the rom can be installed but it doesn't boot.
I think that the problem is in to system folder, I took a look to the rom and META-INF is OK, kernel's OK to I think (he took Xperia supercharged and with Championswinner kernel kitchen he made from elf a boot.img and then he renamed it to zImage), so the problem is in system folder...
Please, jitin02 take a look, I can give you the link of the zip if vaste is offline...
Click to expand...
Click to collapse
I think your missing a major point here,
Its not a CM based kernel :\
Anyway pm me the link..
I will pm you the link so Gek can get the kernel and you can help us, really
Thankyou
Sent from my ST25i using xda app-developers app
Vitophone said:
For What???
Vaste Alredy made the updater script so now the rom can be installed but it doesn't boot.
I think that the problem is in to system folder, I took a look to the rom and META-INF is OK, kernel's OK to I think (he took Xperia supercharged and with Championswinner kernel kitchen he made from elf a boot.img and then he renamed it to zImage), so the problem is in system folder...
Please, jitin02 take a look, I can give you the link of the zip if vaste is offline...
Click to expand...
Click to collapse
Yes, you are right, the problem is in "the system folder". He built the generic CM, not a configured for this phone. It never will boot so.
Sent from my ST25i using xda premium
Vitophone said:
I will pm you the link so Gek can get the kernel and you can help us, really
Thankyou
Sent from my ST25i using xda app-developers app
Click to expand...
Click to collapse
Please share link?
GEKTHEBOSS said:
If you have zImage from supercharged kernel share it!
Inviato dall'unica vera custom rom per xperia U,la supercharged!
Click to expand...
Click to collapse
please share also to me.
thx

[Q] how to decompile jar files

hiii i m new to developing .....
sorry for the noob question
can any one please tell me how to decompile and compile jar files using cmd or other......
there is an app called java decompiler
the software is for Linux and windows both.
Sent from my GT-S5670 using xda premium
.jar files are only archives of .class files with some manifests and metadata…
You can open them with tools like Winrar, 7zip, etc.
For decompiling .class files (source files) use “Jad”…

Categories

Resources