[Q] Unpacking CM boot image - Sony Xperia T, TL, TX, V

Hello guys, I've been struggling since two and a half hours now to unpack boot.img taken from cm10.1 zip (get.cm). I have an error about the magic header, here it is.
Code:
Android Magic not found in boot.img. Giving up.
Fyi, I need to unpack/repack the boot image to change the bootlogo and kernel.
I've tried with any tool available (dsixda kitchen, championswimmer kernel kitchen, simple mkbootimg or unmkbootimg, xperia boot tools and more), no results. Anyone please?

Try asking in the question and answer section, that may help
Sent from the luxury of my tent

That's actually a kernel.elf, not boot.img Rename it to kernel.elf, and use the kernel kitchen to extract it's contents.
..

NuriJ said:
That's actually a kernel.elf, not boot.img Rename it to kernel.elf, and use the kernel kitchen to extract it's contents.
..
Click to expand...
Click to collapse
Thank you man, you're a lifesaver. It works.

NuriJ said:
That's actually a kernel.elf, not boot.img Rename it to kernel.elf, and use the kernel kitchen to extract it's contents.
..
Click to expand...
Click to collapse
Hi.. I found this dead thread when i googled for the same thing that OP also had,, I managed to unpack the kernel's boot.img by renaming it to kernel.elf.. I have to edit init,rc file in order to get bootclasspath lines from a cm10 fxp kernel and put it in my port ROM's init.rc and replace the bootclasspath.. But i never found init.rc file anywhere, there is an init file which doesn't have a bootclasspath but only PATH.. Can u help me with this?

tOrNadO_007â„¢ said:
Hi.. I found this dead thread when i googled for the same thing that OP also had,, I managed to unpack the kernel's boot.img by renaming it to kernel.elf.. I have to edit init,rc file in order to get bootclasspath lines from a cm10 fxp kernel and put it in my port ROM's init.rc and replace the bootclasspath.. But i never found init.rc file anywhere, there is an init file which doesn't have a bootclasspath but only PATH.. Can u help me with this?
Click to expand...
Click to collapse
Are you looking in ramdisk?

NuriJ said:
Are you looking in ramdisk?
Click to expand...
Click to collapse
Yes.. I did that too.. Unfortunately all the methods didn't work.. One simple method worked though.. Change the permissions of all the unpacked files and mount the ramdisk.img and then extract it and change contents of any file of your choice and then repack it.. It works like a charm..

Related

How can I create a the META-INF files?

Hi...
I want to create my own update.zip from a original and clean RUU.exe I already know how to extract the exe file and all the other stuff that has to be done. But in the system.img arnt the necessary META-INF files.
I know its made with Android SignApk, but all Guides that I found show only how to sign one single apk. But it seems I need to sign all the stuff at once.
My question at the devs: How do you do this? And can I use my own key?
Don't know if can help you, but check dsixda's kitchen:
http://forum.xda-developers.com/showthread.php?t=633246
Cheers
8ut8f8rder said:
Hi...
I want to create my own update.zip from a original and clean RUU.exe I already know how to extract the exe file and all the other stuff that has to be done. But in the system.img arnt the necessary META-INF files.
I know its made with Android SignApk, but all Guides that I found show only how to sign one single apk. But it seems I need to sign all the stuff at once.
My question at the devs: How do you do this? And can I use my own key?
Click to expand...
Click to collapse
Dude, that's simple:
Pack all your stuff into an update.zip and then let run Signapk with the zip file as filename and it will sign it for you correctly by creating a META-INF folder and calculating all SHA1 checksums...
Thanks, finally I got a selfmade working rom. dsixda has some usefull templates for the update-script in his kitchen.
@TheSSJ
I will try that, but I guess the zip-file has to contain a proper update-script.
TheSSJ said:
Dude, that's simple:
Pack all your stuff into an update.zip and then let run Signapk with the zip file as filename and it will sign it for you correctly by creating a META-INF folder and calculating all SHA1 checksums...
Click to expand...
Click to collapse
Can you detail it sir? im kinda new here Thanks in advance

[Q]I9001 Battery mod

Hello everyone,
Can someone please inform and post a thread link of a battery mod that works on the i9001? By battery mod I mean small zip file that is installed from recovery and changes the stock battery meter
You can make it yourselt.
1. Use Root Explorer to get your framework-res.apk file
2. Go to http://uot.dakra.lt/ to customize it yourselt.
3. Go to http://forum.xda-developers.com/showthread.php?t=1253707 to download the Root-i9001-Signed.zip
4. Put the modified framework-res.apk in the above zip file and delete the unneeded files.
5. Update the updater-script file, resign the zip file.
6. Flash the zip file in recovery.
Do you like this one?
quest221 said:
You can make it yourselt.
1. Use Root Explorer to get your framework-res.apk file
2. Go to http://uot.dakra.lt/ to customize it yourselt.
3. Go to http://forum.xda-developers.com/showthread.php?t=1253707 to download the Root-i9001-Signed.zip
4. Put the modified framework-res.apk in the above zip file and delete the unneeded files.
5. Update the updater-script file, resign the zip file.
6. Flash the zip file in recovery.
Do you like this one?
Click to expand...
Click to collapse
If you use manveru0's kernal and recovery you can now flash the update files as they come from the kitchen
quest221 said:
You can make it yourselt.
1. Use Root Explorer to get your framework-res.apk file
2. Go to http://uot.dakra.lt/ to customize it yourselt.
3. Go to http://forum.xda-developers.com/showthread.php?t=1253707 to download the Root-i9001-Signed.zip
4. Put the modified framework-res.apk in the above zip file and delete the unneeded files.
5. Update the updater-script file, resign the zip file.
6. Flash the zip file in recovery.
Do you like this one?
Click to expand...
Click to collapse
Hmm... yes, nice, but I'm not in to designing things. I was looking for something that has been already created
what's the version of your Rom?
quest221 said:
what's the version of your Rom?
Click to expand...
Click to collapse
Firmware version : 2.3.4
baseband version I9001XXKP4
Kernel Version : [email protected] #7
Build Number : GINGERBREAD.XXKP4
I use Go launcher (from my opinion it's the best), if you think otherwise please post the better launcher, I am opened to experiment others.
Many thanks,
Ciprian
I don't have a I9001XXKP4 Rom in my hard drive. If you can send your your framework-res.apk, I can make one for you.
quest221 said:
I don't have a I9001XXKP4 Rom in my hard drive. If you can send your your framework-res.apk, I can make one for you.
Click to expand...
Click to collapse
I would like something like http://img225.imageshack.us/img225/9943/smoothbatt.png if it is possible.
I have attached framework-res.apk
opps a
hey guys!
just used this. twice great kitchen, really revamped some of the more boring icons on stock roms. thanks for the tip!!
1framework-res_I9001XXKP4_signed.zip is the file that I updated the updater-script so you can flash it in the in-build recovery.
1framework-res_I9001XXKP4_original_signed.zip is your original file. If there are any issues, you can flash it back in the in-build recovery.
How to:
Copy the zip file to the internal SD card, not the external one, go to recovery, flash it.
quest221 said:
1framework-res_I9001XXKP4_signed.zip is the file that I updated the updater-script so you can flash it in the in-build recovery.
1framework-res_I9001XXKP4_original_signed.zip is your original file. If there are any issues, you can flash it back in the in-build recovery.
How to:
Copy the zip file to the internal SD card, not the external one, go to recovery, flash it.
Click to expand...
Click to collapse
Thanks, exactly what I needed. I flashed it and all is ok
quest221 said:
1framework-res_I9001XXKP4_signed.zip is the file that I updated the updater-script so you can flash it in the in-build recovery.
1framework-res_I9001XXKP4_original_signed.zip is your original file. If there are any issues, you can flash it back in the in-build recovery.
How to:
Copy the zip file to the internal SD card, not the external one, go to recovery, flash it.
Click to expand...
Click to collapse
can i use it on 2.3.6 rom?
nope because you will end up in a bootloop by flashing this
its only for XXKP4
urm, Ive tried to do as you told in post number 2(by cooking it according to my own preference)
but my problem starts from step number 5
5. Update the updater-script file, resign the zip file.
Click to expand...
Click to collapse
I already received the cooked file
but I dont know how to change the update script and end up failing to update using the zip file.
can you please help me?
or link me to a place that really can help me to learn better on changing the update script.
try this one, I updated the updater-script, you can compare it with the one from kitchen.
PS: Forgot to update the update-binary file, now try the new one. It should work.
Thanks!!!! But I got an error that states
E:error in /tmp/sideload/package.zip
(status 2)
I wonder whats wrong.
looked in a thread
http://forum.xda-developers.com/showthread.php?t=1194245&page=3
and from what I understand it seems to be a problem with the update binary. But Im just an end user and this is too much for me.
anyway maybe Ill try to flash the cranium ROM and try to cook again a new one and use your update script.
cheers!!
Hi,
Is there any posibility to change framework-res.apk file without CWM? I don't want to instal CWM becouse of it has a problem with front side cam and I need this cam. It's can't be overwritten when the phone works. Maybe some adb and push command is possible.
Could you help me by describing the whole procedure? Sorry for my English.
@quest221
Can you maybe make one for Android 2.3.5 like the screenshot @ page 1?
I have baseband I9001XXKPF, Build XXKPG
I update the zip file with the new update-binary file.
Is there any posibility to change framework-res.apk file without CWM?
Click to expand...
Click to collapse
Yes, I just use the recovery from Samsung, not the third-party.
Check the post #2, that's the steps. Also replace the update-binary file with the one in my zip file.
Can you maybe make one for Android 2.3.5 like the screenshot @ page 1?
Click to expand...
Click to collapse
Upload your framework-res.apk file.

Not available

not available
Make sure you use Notepad++ to edit the updaterscript. If you have problems. Take an updater-script from a working rom and see if it flashes successfully.
---------- Post added at 09:34 AM ---------- Previous post was at 09:33 AM ----------
Copy the entire META-INF folder from any rom and paste it in your rom's zip.
EG- If your rom is based on cm7, copy cm7's meta-inf
I copied META-INF from Adrenaline ROM
And it didn't work
assert failed:raw_boot_img
Could it be a kernel problem (boot.img)
Sent from my GT-S5830 using xda premium
Which boot.img are you using?
You need to use a boot.img from a custom kernel, stock boot.img wont work.
Mate Upload Your Rom and PM it to me and i'll look at what is wrong if u like.
Are you sure you never used any of the Dsixda kitchen tools?
Because they are not compatible with the Ace.
Plus, I hope you never converted it into update-script.
Is your rom CM7 based, or stock based?
Im using stock boot.img
I thought it would work... I don't like custom kernels like nims or CF-Root.
As soon as I get home I'll send you ROM.
It was originally update-script and changed with dsixda kitchen to updater-script.
Stock based
Sent from my GT-S5830L using xda premium
Tovagulet said:
Im using stock boot.img
I thought it would work... I don't like custom kernels like nims or CF-Root.
As soon as I get home I'll send you ROM.
It was originally update-script and changed with dsixda kitchen to updater-script.
Stock based
Sent from my GT-S5830L using xda premium
Click to expand...
Click to collapse
So that's the problem.
Dsixda scripts are not compatible with the Ace.
did the stock rom u are basing this rom on have a Meta-Inf. or was it from a system.img
Tovagulet said:
Im using stock boot.img
I thought it would work... I don't like custom kernels like nims or CF-Root.
As soon as I get home I'll send you ROM.
It was originally update-script and changed with dsixda kitchen to updater-script.
Stock based
Sent from my GT-S5830L using xda premium
Click to expand...
Click to collapse
After creating zip usi.g dsixda kitchen. Extract zip and copy meta-inf folder from.other rom and replace. Stock kernel wont work. Extract the zip of any custom kernel, copy system folder and boot.img and paste in the root directory of extracted files of rom. Zip back everything. It will work.
tj_droid said:
After creating zip usi.g dsixda kitchen. Extract zip and copy meta-inf folder from.other rom and replace. Stock kernel wont work. Extract the zip of any custom kernel, copy system folder and boot.img and paste in the root directory of extracted files of rom. Zip back everything. It will work.
Click to expand...
Click to collapse
Yes exactly.
Do right as he said and your rom will boot.
Cheers.
tj_droid said:
After creating zip usi.g dsixda kitchen. Extract zip and copy meta-inf folder from.other rom and replace. Stock kernel wont work. Extract the zip of any custom kernel, copy system folder and boot.img and paste in the root directory of extracted files of rom. Zip back everything. It will work.
Click to expand...
Click to collapse
So I just replace boot.img with a custom kernel and start building from that?
or after creating the .zip I also have to copy the META-INF from another ROM?
Tovagulet said:
So I just replace boot.img with a custom kernel and start building from that?
or after creating the .zip I also have to copy the META-INF from another ROM?
Click to expand...
Click to collapse
Just replace META-INF in your rom with META-INF from Blackhawk(if stock rom) and make necessary edits.Your rom will work perfectly.I personally haven't had any problem by using stock kernel.
POTATO!!!!
Tovagulet said:
So I just replace boot.img with a custom kernel and start building from that?
or after creating the .zip I also have to copy the META-INF from another ROM?
Click to expand...
Click to collapse
Ok. Read carefully.
After creating the zip via dsixda kitchen. Close it and dont touch it at all. The follow the steps from my last comment.
Buddy.
Just upload your meta-inf..
and i'll look into it.
Got this problem before , it's because the assert command in updater-scripts do not support boot.imgs larger than 4MB .
Just remove the assert() and replace the commands in the proper format (replace commas at the end of command with semi-colons) as well as grab a proper update-binary , your boot.img should work .
Sent from Ursa's claws.
CallMeVentus said:
Got this problem before , it's because the assert command in updater-scripts do not support boot.imgs larger than 4MB .
Just remove the assert() and replace the commands in the proper format (replace commas at the end of command with semi-colons) as well as grab a proper update-binary , your boot.img should work .
Sent from Ursa's claws.
Click to expand...
Click to collapse
I'm working on a Samsung Galaxy GT-B5510, having the same problem trying to install custom ROMs and kernels. All failing with the same error you describe here. However, when I edit the script and rerun it, it does not throw an error but it looks like the kernel is not replaced. The only thing I didn't do was change the update-binary. What do you mean by a "proper" one?
Thanks.
MrRimmer said:
I'm working on a Samsung Galaxy GT-B5510, having the same problem trying to install custom ROMs and kernels. All failing with the same error you describe here. However, when I edit the script and rerun it, it does not throw an error but it looks like the kernel is not replaced. The only thing I didn't do was change the update-binary. What do you mean by a "proper" one?
Thanks.
Click to expand...
Click to collapse
The ones inside the custom ROMs where flashing a custom kernel has been a success in
I give up writing anymore signatures.

Tweaking rom - begginer question ;)

Hi!
Since xda-univeristy arised i thought it would be nice to learn something about green droid
I am going to learn about tweaking and theming:and here comes dozens of my questions:
1. I have downloaded Official ics repack by N00BY0815
2. I extracted it and i have:
2 folders ( META-INF and System)
2 files boot.ing and system.img
How can i extract this system.img ?
I tried to use 7zip but it says that" it cannot open it as archive"
Thanks in advance and please for leniency
it can be opened with Diskinternals Linux Reader. if not. use "sgs2toext4.jar" to convert it to .img.ext4 and then open it
Nihiliu said:
Hi!
Since xda-univeristy arised i thought it would be nice to learn something about green droid
I am going to learn about tweaking and theming:and here comes dozens of my questions:
1. I have downloaded Official ics repack by N00BY0815
2. I extracted it and i have:
2 folders ( META-INF and System)
2 files boot.ing and system.img
How can i extract this system.img ?
I tried to use 7zip but it says that" it cannot open it as archive"
Thanks in advance and please for leniency
Click to expand...
Click to collapse
Everything for theming is in the System folder. All the APK's(Applications) Boot.img is probably the recovery image it installs. But to theme you would need to decompile the apks in the system folder
Everythink was in system folder in gingerbread, in this system folder i have only app folder with su.apk and bin folder with su file.
So files i need are in system.img
@broodplank1337 thanks for help, program works well, now i can begin
But first only one question, now i can extract files, but can i pack them using same tool ?
Nihiliu said:
Everythink was in system folder in gingerbread, in this system folder i have only app folder with su.apk and bin folder with su file.
So files i need are in system.img
@broodplank1337 thanks for help, program works well, now i can begin
But first only one question, now i can extract files, but can i pack them using same tool ?
Click to expand...
Click to collapse
I don't know much about S2 but can't you just use 7zip to make it an archive and flash it through rrecovery?
"Anger and intolerance are the enemies of correct understanding." -Mahatma Gandhi
Nihiliu said:
How can i extract this system.img ?
Click to expand...
Click to collapse
Hi. You can use dsixda's Android Kitchen for that.
Nihiliu said:
Everythink was in system folder in gingerbread, in this system folder i have only app folder with su.apk and bin folder with su file.
So files i need are in system.img
@broodplank1337 thanks for help, program works well, now i can begin
But first only one question, now i can extract files, but can i pack them using same tool ?
Click to expand...
Click to collapse
You can pack them with the android kitchen, install the zip, then you do this in terminal emulator to make the system.img file:
Code:
su
cat proc/mounts
now look up the system partition, in my case it's mmcblk0p14
Code:
dd if=/dev/block/mmcblk0p14 of=/sdcard/system.img BS=4096
This will dump the system partition to system.img (for example when making an odin image)

edit framwork res apk how to?

if i turn my apk file to zip file and i extract all what in and i editing a xml file into, when i wiil flash the file its will work?
i haven`t any experience with it ,but you need a tool like APK-Tool to decompile and after your adaption you have to compile it new ...
MAybe this link can help you ...hope it does ...
http://forum.xda-developers.com/showthread.php?p=43348990#post43348990
JBPORTAL said:
if i turn my apk file to zip file and i extract all what in and i editing a xml file into, when i wiil flash the file its will work?
Click to expand...
Click to collapse

Categories

Resources