[GUIDE]How to make a rooted flashable rom from ftf file[FOR ALL XPERIA PHONES] - Sony Xperia S, Acro S, Ion

Hi friends,
This Guide might be Helpful for all Xperia device Users/Developers
1.First you need to download these 4 files
a)FTF extractor
b)META-INF folder and ROOTING files
c)7zip
d)Notepad++(Optional)
2.Extract ftf extractor anywhere you like
3.Open the *FTF file with 7Zip
You'll see these files and folders
Code:
META-INF
adsp.sin
amss.sin
amss_fs_urushi.sin
apps_log.sin
cache.sin
fota0.sin
fota1.sin
kernel.sin
loader.sin
system.sin
userdata.sin
4.Extract system.sin to the folder where you extraxt ftf-extractor.
5.Press SHIFT+RIGHT CLICK on the empty space of the folder.You'll see a dialog like this
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
6.select OPEN COMMAND WINDOW HERE
7.Type
Code:
aIUP.exe system.sin 4096 system
8.If this not work for you use 2048 or 8192 instead of 4096:good:
9.You'll see
Code:
C:\ftf_extractor>aIUP.exe system.sin 4096 system
UnPacking system.sin to system ...
done.
C:\ftf_extractor>
Congratulation now you have extracted System from the ftf file
10.Now open the downloaded META-INF AND ROOT.zip
then,go to system and cut
Code:
app
xbin
bin
and pasteit in your extracted system folder (In step 9)
***Now your rom is rooted*****
OR
You can use Kitchen to ROOT YOUR ROM
11.Then Move your Rooted system folder to the META-INF ZIP
***Now you have made a flashable zip file****
13.(Optional)go to META-INF/com/google/android/updater-script and edit it with Notepad++
:fingers-crossed::fingers-crossed::fingers-crossed::fingers-crossed:Thats all:victory::victory::victory::victory::victory:
Lastly, Hit THANKS if you like it... and rate this thread 5-STAR
Knight47

Big thanks, very big thx
Very good method but (?) how do I flash a zip if i dont have cmw (recovery will not work without root and root wont work without recovery ) installed? how would i put that back in to phone (locked boot loader )
Thanks :good:
Command on Adb refuse- to not permitted

marcoplo said:
Big thanks, very big thx
Very good method but (?) how do I flash a zip if i dont have cmw (recovery will not work without root and root wont work without recovery ) installed? how would i put that back in to phone (locked boot loader )
Thanks :good:
Command on Adb refuse- to not permitted
Click to expand...
Click to collapse
Actually i think this guide is for those who want to make their rom. So these roms are only for rooted user.
Like CM7 for rooted devices, this guide is teaching how to make rooted cm7.
---------------------------------------------
If there's a method to make rooted ftf, then rooting problem solved.

zhuhang said:
Actually i think this guide is for those who want to make their rom. So these roms are only for rooted user.
Like CM7 for rooted devices, this guide is teaching how to make rooted cm7.
---------------------------------------------
If there's a method to make rooted ftf, then rooting problem solved.
Click to expand...
Click to collapse
so sorry my misreading so cancel that, it was late

Step 9, extracting the system.sin with aIUP.exe ist working fine BUT where can I find the extracted files? There is no new folder or files created.

skycamefalling said:
Step 9, extracting the system.sin with aIUP.exe ist working fine BUT where can I find the extracted files? There is no new folder or files created.
Click to expand...
Click to collapse
Is it extracting exactly? When I try it with any page size (512, 1024, 2048, 4096, 8192, 16384, 32768 etc) it types "error page size"

papacarla said:
Is it extracting exactly? When I try it with any page size (512, 1024, 2048, 4096, 8192, 16384, 32768 etc) it types "error page size"
Click to expand...
Click to collapse
It's extracting with 4096 and runs fine. After that the software shows "done" just like in the screenshot.
But then I cannot find the folder where the files are being extracted. I've searched the whole HDD but to no avail.

skycamefalling said:
It's extracting with 4096 and runs fine. After that the software shows "done" just like in the screenshot.
But then I cannot find the folder where the files are being extracted. I've searched the whole HDD but to no avail.
Click to expand...
Click to collapse
could you check again what does the software shows before done?
My one shows "done" too, but it shows "error page size" before "done"

papacarla said:
could you check again what does the software shows before done?
My one shows "done" too, but it shows "error page size" before "done"
Click to expand...
Click to collapse
Me TOO.
Microsoft Windows [版本 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
D:\ftf_extractor>aIUP.exe system.sin 4096 system
UnPacking system.sin to system ...
Error: Page size parameter is wrong.
done.
D:\ftf_extractor>aIUP.exe system.sin 2048 system
UnPacking system.sin to system ...
Error: Page size parameter is wrong.
done.
D:\ftf_extractor>aIUP.exe system.sin 8192 system
UnPacking system.sin to system ...
Error: Page size parameter is wrong.
done.
D:\ftf_extractor>aIUP.exe system.sin 4096 system
UnPacking system.sin to system ...
Error: Page size parameter is wrong.
done.
D:\ftf_extractor>

ri7672 said:
Me TOO.
Click to expand...
Click to collapse
Same command execution. I've send same log to topic starter and here is his answer:
Knight47 said:
papacarla said:
Knight47 said:
papacarla said:
Hi, thank you for your guide.
I have some problem with ftf extractor
when I'm executing the step 7 of the guide I'm getting next:
HTML:
C:\FTF_ROM_root\ftf_extractor>aIUP.exe sy
stem.sin 4096 system
UnPacking system.sin to system ...
Error: Page size parameter is wrong.
done.
C:\FTF_ROM_root\ftf_extractor>aIUP.exe sy
stem.sin 2048 system
UnPacking system.sin to system ...
Error: Page size parameter is wrong.
done.
C:\FTF_ROM_root\ftf_extractor>aIUP.exe sy
stem.sin 8192 system
UnPacking system.sin to system ...
Error: Page size parameter is wrong.
done.
C:\FTF_ROM_root\ftf_extractor>
So, How you could see I tried to change the page size but there is error anyway.
What I'm doing wrong?
Thank you
Click to expand...
Click to collapse
Use 2048 or 8192 instead odds 4096
Sent from my ST18i using Tapatalk 2
Click to expand...
Click to collapse
I'd did it already. you can see it on html code window
Click to expand...
Click to collapse
Then try 16384 ,(16384x2) ,(16384x4)
definitely There should be a compression value
for Xperia ray ,neo,neo v, arc,arc s - 4096
Xperia mini,mini-pro,live etc-2048
Take care,
Knight47
Click to expand...
Click to collapse
So, I tried until 524288 of page size :cyclops:. It does not work anyway.

This method only work for pre 2012 phones which use yaffs2
2012 phones use ext4. This method won't work anymore

Yeah the sin file EXT4, i just use the SIN viewer to find it out.
Just got my XAS yesterday.
Took me sometime to get this extracted, lol.
Anyways, Here:
(1)
My FTF test is the APAC LT26w_6.1.A.1.58
Using winrar on extracting the system.sin in the FTF
(does not really matter if you use 7zip or winzip, the FT is version 2.0, host to extract is DOS)
(2)
Use sin2raw.exe with 1gig argument since the ext4 and sin is 500mb plus (thats enough for me)
Code:
sin2raw system.sin system.ext4 1G
(3)
once you have your system.ext4, use the ext2explore.exe to save the files outside
This image shows only that it is EXT4, i did not use this tool to dump

nice guide. i was able to root and personalize my own stock rom. thanks.

This extraction method will not work on Xperias using ext4 (S, acro S, ion ... )
Since Xperia acro S is ext4, not yaffs, ur method will never work.
Use flashtool > sin editor > dump data (get a ext4 file)
Use ext2read to extract the system.ext4 file.
http://sourceforge.net/projects/ext2read/
I've posted this on XS thread.

Where's the META-INF zip mention in step 11?

zhuhang said:
This extraction method will not work on Xperias using ext4 (S, acro S, ion ... )
Since Xperia acro S is ext4, not yaffs, ur method will never work.
Use flashtool > sin editor > dump data (get a ext4 file)
Use ext2read to extract the system.ext4 file.
http://sourceforge.net/projects/ext2read/
I've posted this on XS thread.
Click to expand...
Click to collapse
Can you give me the full guide? Which files/folders that we should extract from system.ext4, how can we turn those files/folders into flashable ROM, I want this to try rooting the 2.55 firmware
Thanks in advance.

Thread temporary closed.

Related

[HOW TO][Windows]Extract Deodex Sign and Zipalign an official ROM

Hi,
Just want to share tools I found in order to :
- Extract SGS2 stock firmwares :
* Use sgs2toext4.jar Application from drphrozen to convert .img files to ext4.img
* Then MOUNT ans EXTRACT ext4.img with Diskinternals Linux Reader : Here
- Deodex, sign and zippalign :
with this deodex kit : _Kit_Deodexage.zip
- Create your CWM customROM (wype script)
using a Skeleton ROM : Custom_ROM GS2 by SicOpaT.zip
Click to expand...
Click to collapse
Nothing from me, just reporting for you
Links at the end of post (or in changeLog)
EDIT 16/08 :
1/ update of Kit_deodexage with last versions of smali/baksmali v1.2.7 to avoid LAG bug of browser
2/ add of Custom_ROM GS2 by SicOpaT_v2.zip with a new CWM script NON WIPE
To customise the CWM script, go to Custom_ROM GS2 by SicOpaT.zip\META-INF\com\google\android and edit updater-script with notepad ++
Step by step guide ​:
Preparation :
1/ Extract Custom_ROM GS2 by SicOpaT.zip in order to have a folder with the same name (your future customROM)
2/ Extract sgs2toext4.zip to sgs2toext4.jar and put it in C:\
3/ Extract _Kit_Deodexage.zip to a folder of the same name
4/ install Diskinternals Linux Reader : Here
5/ Install Java SE Development Kit (JDK) if not already installed : Here
Click to expand...
Click to collapse
Extracting the stock ROM :
1/ open your stock__firmware.tar with 7-zip or winRAR
2/ extract in C:\ :
factoryfs.img,
cache.img (if you have 3 tar files in your firmware, extract cache.img from CSC.tar)
modem.bin
zImage : your kernel
Click to expand...
Click to collapse
* Extracting KERNEL and PHONE part :
3/ put zImage and modem.bin in the root folder of : Custom_ROM GS2 by SicOpaT (next to META_INF)
Click to expand...
Click to collapse
* Extracting Factoryfs.img :
4/ Double click sgs2toext4.jar, a windows is opening :
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
5/ drag factoryfs.img in the sgs2converter.jar windows
factoryfs.ext4.img is created
6/ Open Diskinternals Linux Reader
Code:
> Drives > Mount Image > browse to your factoryfs.ext4.img > Mount
Then a new drive appears in the Diskinternals window, called Linux native Volume > double click on it
7/ Select all and press Save > Next > Browse to Custom_ROM GS2 by SicOpaT/System/ check for Save directory structure and then press Next > Next > Finish
8/ In Diskinternals click Back and then right click to your Linux volume and select unmount
Click to expand...
Click to collapse
* Extracting cache.img :
9/ Double click sgs2toext4.jar
10/ drag cache.img in the sgs2converter.jar windows
cache.ext4.img is created
11/ Mount cache.ext4.img in diskinternals
12/ In your linux drive goto \recovery and save sec_csc.zip
Don't save it in your Custom_ROM GS2 by SicOpaT folder
13/ Extract sec_csc.zip (same structure as an update.zip)
14/ Copy everything in /system exept /app to Custom_ROM GS2 by SicOpaT/system
like here :
Now you can unmount and close diskinternal, we have done with extracting the ROM
Click to expand...
Click to collapse
Now time to Deodex, sign and zipalign : with the _Kit_Deodexage script
1/ in Custom_ROM GS2 by SicOpaT/system/ MOVE everything in the app folder to _Kit_Deodexage/app
3/ in Custom_ROM GS2 by SicOpaT/system/ MOVE everything in the framework folder to _Kit_Deodexage/framework
4/ Press : Deodex_Gingerbread.cmd and it will
- deodex
- sign
- zipalign
4 bis/ edit after beginning of deodexing process the NePasSigner.txt and add samsung apps
5/ 2 folders are created : Deodex_framework and Deodex_app
6/ verify that the /app and /framework folders are empty
6/ Move everything from /Deodex_framework exept java.awt.jar to Custom_ROM GS2 by SicOpaT/system/framework
7/ Move everything from Deodex_app to Custom_ROM GS2 by SicOpaT/system/app
Click to expand...
Click to collapse
Buid your CWM update.zip :
With WinRAR : CTRL A in your custonROM root folder and Right Click > Add to Archive > ZIP and None or Normal compression
Click to expand...
Click to collapse
That's all ! You have a stock customROM fully deodexed, signed and zipaligned
PS : You should change the Kernel for the CF-Root Kernel (CWM Manager ...) changing the zImage with the zImage from ChainFire CF-Root
PS 2 : You can add some apps (like Titanium backup) in the /data/app folder of your customROM
EDIT 1 : The deodexed browser.apk obtained will be bugy : Lag scrolling
Since pulser_g2 found the FIX, DEVs used an old deodexed browser.apk (from KE2 ROM for example).
So pulser_g2 foung the FIX, in order to avoid this Lag trouble using the last deodexed browser.apk (KF2 for example). You can see the How To FIX yourself the laggy browser.apk following advices from pulser_g2 in the changeLog of 07/03/2011.
EDIT 2 : just added a zip of an META_INF folder witch can be used for update over a previous deodexed customROM with same signature (a previous ROM built with the same script).
With this META_INF, you will not loose any data/cache
Credits :
Thanks to drphrozen for sgs2toext4.jar and sgs2converter.jar tools
Thanks to xeudoxus for his custom java.awt.jar (deodexing some apks without errors)
Thanks to Okarin for his Deodex script
Thanks to Pulser-g2 for the laggy Browser Fix
Thanks to omrij for showing us an alternative to _Kit_Deodexage : AutoDeoTool (see below)
Click to expand...
Click to collapse
ChangeLog of the HOW TO :
07/04/2011 :
* Switch bugy sgs2converter.jar to new sgs2toext4.jar from drphrozen
* Re-Add the Convert_sgs2img.exe tool to extract .img to .ext4.img (end of post)
CMD command :
Code:
Convert_sgs2img.exe factoryfs.img factoryfs_ext4.img
07/02/2011 :
Modification of _Kit_deodexage.zip in order to add the custom java.awt.jar from xeudoxus
07/01/2011 :
Add the new version of drphrozen sgs2converter.jar, available HERE
Now you just need to double click on the sgs2converter.jar, without opening any CMD promt command.
You drag and drop your stock .img file and the tool will convert it in <inputname>.ext4.img in the same folder
06/30/2011 :
How to manually deodex Email.apk and MobilePrint.apk : (working for others APKs)
Code:
[QUOTE][B]1/[/B] In the same folder, you put :
[QUOTE]*Email.apk
*Email.odex
*MobilePrint.apk
*Mobileprint.odex
AND
all the content of the initial ODEXED framework folder (with all JAR files)
PLUS custom [B]java.awt.jar[/B]
AND
*smali.jar ---> found in _Kit_Deodexage/_binaires/
*baksmali.jar ---> found in _Kit_Deodexage/_binaires/[/QUOTE]
[B]2/[/B] Then open a [B]CMD promt[/B] in the target folder
[B]3/[/B] Then type :
[CODE]java -Xmx1024m -jar baksmali.jar -c :am.jar:android.policy.jar:android.test.runner.jar:bmgr.jar:bouncycastle.jar:com.android.location.provider.jar:com.google.android.maps.jar:com.samsung.device.jar:com.yamaha.android.media.jar:core.jar:core-junit.jar:ext.jar:framework.jar:ime.jar:input.jar:java.awt.jar:javax.obex.jar:libvtmanagerjar.jar:monkey.jar:pm.jar:sec_feature.jar:seccamera.jar:sechardware.jar:secmediarecorder.jar:services.jar:sqlite-jdbc.jar:svc.jar:twframework.jar -x Email.odex
You have a new OUT folder created
4/ Then type :
Code:
java -Xmx1024m -jar smali.jar out -o classes.dex
A classes.dex file is created
5/ Open (without extracting) Email.apk with 7-zip
Push classes.dex in Email.apk with 7-zip
6/ Put the new deodexed Email.apk in app folder, in _Kit_Deodexage
Press Deodex_Gingerbread.cmd
You now have a fully deodexed signed zipalligned Email.apk
Now Mobileprint.apk :
7/ DELETE classes.dex ans Out folder created before
8/ Same procedure, in CMD pompt, type :
Code:
java -Xmx1024m -jar baksmali.jar -c :am.jar:android.policy.jar:android.test.runner.jar:bmgr.jar:bouncycastle.jar:com.android.location.provider.jar:com.google.android.maps.jar:com.samsung.device.jar:com.yamaha.android.media.jar:core.jar:core-junit.jar:ext.jar:framework.jar:ime.jar:input.jar:java.awt.jar:javax.obex.jar:libvtmanagerjar.jar:monkey.jar:pm.jar:sec_feature.jar:seccamera.jar:sechardware.jar:secmediarecorder.jar:services.jar:sqlite-jdbc.jar:svc.jar:twframework.jar -x MobilePrint.odex
You have a new OUT folder created
9/ Then type :
Code:
java -Xmx1024m -jar smali.jar out -o classes.dex
A classes.dex file is created
10/ Open (without extracting) MobilePrint.apk with 7-zip
Push classes.dex in MobilePrint.apk with 7-zip
11/ Put the new deodexed MobilePrint.apk in app folder, in _Kit_Deodexage
Press Deodex_Gingerbread.cmd
You now have a fully deodexed signed zipalligned MobilePrint.apk[/CODE]
Important !! You should NOT have error while deodexing
Click to expand...
Click to collapse
06/27/11 :
added : old version of sgs2converter.jar from drphrozen get it HERE
How To :
Extract sgs2converter.zip to sgs2converter.jar
Put in the same folder : Stock .IMG file, sgs2converter.jar
Open CMD Promt in the folder
run command :
Code:
java -jar sgs2converter.jar factoryfs.img factoryfs.ext4.img
factoryfs.ext4.img is created in same folder. You can pen it with Diskinternals Linux Reader
*AutoDeoTool an alternative to the "kit_deodexage" from HERE thanks to omrij
[/QUOTE]
BONUS :
To personalise your customROM, you can change the name of the ROM shown in Parameters > Version number :
with Notepad++, open the file "\Custom_ROM GS2 by sicOpaT\system\build.prop" and look for the line beginning with : "ro.build.display.id=" (often the 4th). Example : ro.build.display.id=GINGERBREAD.XXKF2
Replace everything after the "=" with what you want. Example : ro.build.display.id=SicOpaT's ROM KF2
Then save the file
Thanks for the infor .. but what does the " - CWM GS2 Skeleton ROM (wype script) : Custom_ROM GS2 by SicOpaT.zip" do ??
anyway of getting a step by step guide.
Thanks
I've used Ubuntu until now... Testing this one
xinfinityoO said:
Thanks for the infor .. but what does the " - CWM GS2 Skeleton ROM (wype script) : Custom_ROM GS2 by SicOpaT.zip" do ??
anyway of getting a step by step guide.
Thanks
Click to expand...
Click to collapse
This is the begining oh a CWM update.zip with the structure folders and I just added : busybox, superuser an su.
I am going to add a step by step guide
nice thanks
Email.apk and MobilePrint.apk are leftover. Trying to do them manually but can't find superclass Ljava/awt/componet;
Mackzen said:
nice thanks
Email.apk and MobilePrint.apk are leftover. Trying to do them manually but can't find superclass Ljava/awt/componet;
Click to expand...
Click to collapse
got the same problem, i took deodexed ones from other deodexedROM
Couldn't flash using cwm (maybe battery low, don't know)
better luck tomorrow I guess
How does the script take care of the Linux file permissions in Windows?
Thanks for the info.
That was some info which i was looking for the last few weeks, but mostly ended in apps that didn't work for everything.
Gonna give it a shot tomorrow.
Thnx for the info.
very well defined and this will sure help some newcomers to build thier own custom roms. you deserve a star from me !!
Thanks for this Guide!
1.) The last step would be to put the new CustomRom Folder to a Zip and flash via CWM?
...or is it a problem with signing then?
EDIT: you have to put the files back into the original ZIP!
2.) why do we have to put cache.img and modem.bin to the customrom root folder?
Thanks
Flashed via cwm 4.0.2 -> Bootloop :/
No modifications done at the moment
walda said:
Thanks for this Guide!
1.) The last step would be to put the new CustomRom Folder to a Zip and flash via CWM?
...or is it a problem with signing then?
EDIT: you have to put the files back into the original ZIP!
Click to expand...
Click to collapse
Yes you have to create an update.zip archive with all in your CustomROM root folder
walda said:
2.) why do we have to put cache.img and modem.bin to the customrom root folder?
Thanks
Click to expand...
Click to collapse
No you have to put :
- zImage (your kernel)
- modem.bin (phone part in ODIN)
Mackzen said:
Couldn't flash using cwm (maybe battery low, don't know)
better luck tomorrow I guess
Click to expand...
Click to collapse
walda said:
Flashed via cwm 4.0.2 -> Bootloop :/
No modifications done at the moment
Click to expand...
Click to collapse
I have forgotten wype.sh in the /system folder of the skeleton customROM.
The wype.sh will wype everything in the /data folder in order to prevent bootloops
I reuploaded the CustomROM GS2 with the wipe.sh
Thanks! Works now
walda said:
Thanks! Works now
Click to expand...
Click to collapse
You're welkome
Sorry for the forgotten wype.sh
thanks for this!
i am running per instructions, trying to deodex KF2 rom. but i face problem at the deodex/sign/zipalign. after running the script file, there are still a lot of files in the "app" and "frameworks" directory. what am i doing wrong?
edit: 2nd round works, no idea why?? but left email and mobileprint, and as per you suggestion get it from another deodex rom.
This is EXACTLY the thing i was looking for since getting my SGS2 this week.
Wanted this since the Hebrew/RTL routine fixing i did on other devices needed deodexed ROMs to work (modifies framework.jar/libwebcore.so).
I'll give it a shot today or tomorrow and report back.
Either way, THANK YOU very much for the effort!
I know this is a stupid question, but where can i find my factoryfs_out.img iv done the cmd bit but cannot find the factoryfs_out.img to mount??

[HOW TO] Change/Modify Secondary Splash Screen Initrd/logo.rle

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
I cant bellieve how hard it was to find any info on this topic
I was working on my rom and wanted to change the secondary splash screen image.
I searched around, asked devs and had no success finding a step by step tutorial on how to do this.
Finally after much research I did it! so here i bring you my experience.​
Click to expand...
Click to collapse
Boot order
​
1. To modify/change the first boot image go here:
http://forum.xda-developers.com/showthread.php?t=895089
2. To modify/change the bootanimation go here for some examples:
http://forum.xda-developers.com/showthread.php?t=1129705
Click to expand...
Click to collapse
First we need to establish where this splash image is located,
the image file is called logo.rle and is located here:
(i used 7-zip to view but don't use it to modify)
This is the file we need to change/modify, you can extract it with 7-zip.
Now we need to be able to convert this logo.rle to .png and back to a logo.rle
​
To do this go here:http://forum.xda-developers.com/showthread.php?t=1140406​
Code:
1.run command promt
a.browse to folder with those bat files
-type:cd \users\you\desktop(if located on desktop)
-copy logo.rle to this folder
b.to conver rle to png type: Convert_rle_to_image.bat logo.rle
c.to convert back to rle type: Convert_image_to_rle.bat logo.png
Click to expand...
Click to collapse
If you have your logo.rle ready now we need to replace the one that came in your initrd.gz
this is harder than i thought, because initrd.gz is a image file it cant be modified with 7-zip
first you will need to be running linux (im running ubuntu on a virtual machine)
once you get linux create a new folder on the desktop called "temp" copy
the initrd.gz to this folder, open applications/accesories/terminal
and browse to the temp folder with the initrd.gz file(mine is "cd /home/isidro/Desktop/temp)
now type
Code:
gunzip -c ./initrd.gz | cpio -i
now in the temp directory you have unpacked initrd.gz. Replace logo.rle then when you're done still in the temp directory type:
Code:
find ./ | cpio -H newc -o | gzip > ./initrd.gz
this will replace the initrd.gz with the modified logo.rle
​
Click to expand...
Click to collapse
Now just Copy/Replace the modified initrd.gz to your Rom's boot folder and Test!
This worked for me on the HD2 but I would assume it works on any android Rom. Keep in mind this is the best way I could do it, if you know of a better way please share.​
nice compilation...thanks bro
nice work bro
really
but I hope there i some easier way to do it
cuz this involves linux and virtual machines and I dont think many of us have this
Been looking for this for a while now, thank you very much !
very clear! i search for this a long time
THX bro
nice to see some dev sharing their knowledge ...thanks bro
If anybody cant get this to work at all!!!
send me your initrd.gz and your new image and ill give it a go.
thanks for taking so much time for making this excellent article. thanks added.
Excellent tutorial!! Very time consuming process for changing just one image but definitely easy when given step by step instructions.
Thank you for all your hard work and effort!
Ok, please tell me what am I doing wrong- I want to replace the logo.rle from one initrd.gz to another initrd.gz
I extract both with gunzip -c ./initrd.gz | cpio -i into their own separate folders
I copy the logo.rle I want over the logo.rle I want to replace
I do find ./ | cpio -H newc -o | gzip > ./initrd.gz after ensuring the old initrd is not there in the folder
I flash it on my phone, and it wont boot - if I flash same the initrd.gz without replacing the logo.rle, all is fine. I have tried this so many times
works perfect
10x
works nice. thanks.
you know what's nicer?
removing the logo.rle completely.
and what's even nicer than that?
finding the way to do it to clk boot.img
(how to patch it's initrd.gz or kernel)
then what you get is the First Boot Screen (HSPL) and then boot animation directly.
I can find a way to unpack the boot.img and repack it successfully.
If you find this out, that would be great.
Should be possible to do on linux, but I get a corrupted boot.img every time i try.
Is there any way of changing this after the ROM is installed? Unfortunately the ROM I use requires that you flash a kernel .zip after installing it, which then resets the second splash screen.
ellisbodds said:
Is there any way of changing this after the ROM is installed? Unfortunately the ROM I use requires that you flash a kernel .zip after installing it, which then resets the second splash screen.
Click to expand...
Click to collapse
open the update_kernel.zip with 7zip
replace the initrd.gz with the one with the new image, now just flash
the kernel and that's it
There is guide for change it use Window OS:
http://forum.xda-developers.com/showthread.php?t=1140406
isidromxz said:
open the update_kernel.zip with 7zip
replace the initrd.gz with the one with the new image, now just flash
the kernel and that's it
Click to expand...
Click to collapse
Unfortunately though, that doesn't seem to work. It's got a boot.img, so I had to extract that first in Linux, then I replaced logo.rle and recompiled boot.img. I then replaced the old boot.img in the kernel zip file and attempted to flash it, and I can't remember what happened. Either I got a message about update-script being deprecated and was told that installation was aborted, it flashed fine but didn't work, or it stopped my phone working.
tl;dr: I've spent far too long trying to figure out that one little image and in the end decided to just change the first splash screen to match the second one that flashes with the kernel.
Sent from my HTC HD2
I've follow all your staff and when I repack the initrd.gz with ubuntu I get this message error ( in french the message error so I try to translate) : cpio : the file ./initrd.gz is bigger, 163840 new bytes does not have been copied
That is the problem
BoBaN75 said:
I've follow all your staff and when I repack the initrd.gz with ubuntu I get this message error ( in french the message error so I try to translate) : cpio : the file ./initrd.gz is bigger, 163840 new bytes does not have been copied
That is the problem
Click to expand...
Click to collapse
Yeah I know it says it's not copied but it is just test the initrd after that
I found a guide to do it on window.
I will check and post here if I can find it on my Laptop
Sent from my GT-I9100 using xda premium
I Have tried it and it didn't work. When I tried to flash my phone via clk via rebuild rom installion aborted. Can explain how to put back the moded file on the phone
Sent from my HTC HD2 using xda premium

boot.img-ramdisk.gz: not in gzip format

Hello, I'm trying to modified the kernel of my phone, but I have one problem, when I try to decompile boot.img-ramdisk.gz (with ubuntu) it appear a message that put boot.img-ramdisk.gz: not in gzip format and I cant.
Regards
pepe471 said:
Hello, I'm trying to modified the kernel of my phone, but I have one problem, when I try to decompile boot.img-ramdisk.gz (with ubuntu) it appear a message that put boot.img-ramdisk.gz: not in gzip format and I cant.
Regards
Click to expand...
Click to collapse
what do you want to do ? did you compile the kernel and now maybe you want to prepare boot.img ? or what
anyway there is a .perl script to split boot.img in zImage (kernel compiled) and ramdisk also this will extract ramdisk in "out" folder so work with this folder to change things to ramdisk
search for split_bootimg.pl and you get the answer !
I think here you have a complete reference http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack%2C_Edit%2C_and_Re-Pack_Boot_Images
ruscan.calin said:
what do you want to do ? did you compile the kernel and now maybe you want to prepare boot.img ? or what
anyway there is a .perl script to split boot.img in zImage (kernel compiled) and ramdisk also this will extract ramdisk in "out" folder so work with this folder to change things to ramdisk
search for split_bootimg.pl and you get the answer !
I think here you have a complete reference http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack%2C_Edit%2C_and_Re-Pack_Boot_Images
Click to expand...
Click to collapse
I want to chage the boot logo and the g-sensor configuration.
I extract the boot.img-kernel and the boot.img-ramdisk.gz with split_bootimg.pl, but then I can't extract the files of boot.img-ramdisk.gz
Thank you
ruscan.calin said:
what do you want to do ? did you compile the kernel and now maybe you want to prepare boot.img ? or what
anyway there is a .perl script to split boot.img in zImage (kernel compiled) and ramdisk also this will extract ramdisk in "out" folder so work with this folder to change things to ramdisk
search for split_bootimg.pl and you get the answer !
I think here you have a complete reference http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack%2C_Edit%2C_and_Re-Pack_Boot_Images
Click to expand...
Click to collapse
Arrogant answer without any help. If you would care to read what people write you would have noticed that he wanted to unpack the boot.img-ramdisk.gz.
I'm trying the same with a ramdisk here but get the same error. And yeah, i did read the tutorial you've link + http://forum.xda-developers.com/showthread.php?t=1477845.
And both say nothing about how to handle the errors we got.
After some googling, and trying out two approaches, i finally found the solution.
The third one i came across worked, at least for me:
http://forum.xda-developers.com/showpost.php?p=31954123&postcount=913
The "boot.img-ramdisk.gz" was compressed in lzma format. So the correct command would be:
lzma -dc ../boot.img-ramdisk.gz | cpio -i
Ramdisk unpacked. Enjoy.
Kaskade said:
Arrogant answer without any help. If you would care to read what people write you would have noticed that he wanted to unpack the boot.img-ramdisk.gz.
I'm trying the same with a ramdisk here but get the same error. And yeah, i did read the tutorial you've link + http://forum.xda-developers.com/showthread.php?t=1477845.
And both say nothing about how to handle the errors we got.
After some googling, and trying out two approaches, i finally found the solution.
The third one i came across worked, at least for me:
http://forum.xda-developers.com/showpost.php?p=31954123&postcount=913
The "boot.img-ramdisk.gz" was compressed in lzma format. So the correct command would be:
lzma -dc ../boot.img-ramdisk.gz | cpio -i
Ramdisk unpacked. Enjoy.
Click to expand...
Click to collapse
or if you are in linux.. since you are making kernel.. you will be..
anyway.. if you are getting this error.. just rename the file with .lzma extension..
then use archive manager or Xarchiver application in linux and extract it.. then extract the file obtained again... you will get all the files and folders inside ramdisk.. no need of any kitchen/anything.. as linux can handle lzma natively
Kaskade said:
Arrogant answer without any help. If you would care to read what people write you would have noticed that he wanted to unpack the boot.img-ramdisk.gz.
I'm trying the same with a ramdisk here but get the same error. And yeah, i did read the tutorial you've link + http://forum.xda-developers.com/showthread.php?t=1477845.
And both say nothing about how to handle the errors we got.
After some googling, and trying out two approaches, i finally found the solution.
The third one i came across worked, at least for me:
http://forum.xda-developers.com/showpost.php?p=31954123&postcount=913
The "boot.img-ramdisk.gz" was compressed in lzma format. So the correct command would be:
lzma -dc ../boot.img-ramdisk.gz | cpio -i
Ramdisk unpacked. Enjoy.
Click to expand...
Click to collapse
Hi,
I am on Linux.
I have installed lzma on the home dir.
I don't know why I am getting Decode error.
[email protected]:~/VIJAY/andriod/work3$ ls -lrt
total 239840
[SIZE="2][COLOR="DarkGreen"]drwxr-xr-x 3 vramaraj sw-team 4096 Oct 9 2011 data/
-rw-r--r-- 1 vramaraj sw-team 70 May 16 2012 installbusybox
drwxr-xr-x 4 vramaraj sw-team 4096 Oct 6 19:03 sdcard/
drwxr-xr-x 16 vramaraj sw-team 4096 Nov 28 22:14 system/
-rw-r--r-- 1 vramaraj sw-team 4073472 Dec 2 22:27 boot.img
-rw-r--r-- 1 vramaraj sw-team 302938 Dec 3 21:14 logo.bin
-rw-r--r-- 1 vramaraj sw-team 236601691 Jan 31 22:18 YONIP_MP_A919_v1.zip
-rwxr-xr-x 1 vramaraj sw-team 6773 Jan 31 22:18 split_bootimg.pl*
drwxr-xr-x 3 vramaraj sw-team 4096 Jan 31 22:19 META-INF/
-rw-r--r-- 1 vramaraj sw-team 3477896 Jan 31 22:50 boot.img-kernel
-rw-r--r-- 1 vramaraj sw-team 591679 Jan 31 22:50 boot.img-ramdisk.gz
-rwxrwxrwx 1 vramaraj sw-team 229 Jan 31 22:55 extractboot*
drwxr-xr-x 3 vramaraj sw-team 4096 Jan 31 22:55 out/
drwxr-xr-x 2 vramaraj sw-team 4096 Jan 31 23:32 ramdisk/[/COLOR][/SIZE]
[email protected]:~/VIJAY/andriod/work3$
[email protected]:~/VIJAY/andriod/work3/out/ramdisk$ ~/lzma -dc ../../boot.img-ramdisk.gz | cpio -i
/users/home40/vramaraj/lzma: Decoder error
cpio: premature end of archive
[email protected]:~/VIJAY/andriod/work3/out/ramdisk$
Deadly said:
or if you are in linux.. since you are making kernel.. you will be..
anyway.. if you are getting this error.. just rename the file with .lzma extension..
then use archive manager or Xarchiver application in linux and extract it.. then extract the file obtained again... you will get all the files and folders inside ramdisk.. no need of any kitchen/anything.. as linux can handle lzma natively
Click to expand...
Click to collapse
Interesting!
I have a similar problem where gzip complained that my boot.img-ramdisk.gz is not in gzip format.
At the advice of this thread [and some others] I ran:
lzma -t boot.img-ramdisk.gz
xz -t boot.img-ramdisk.gz
Neither one worked, so at the advice of your post I copied the file to both a ".lzma" and a ".xz" extension.
Again, neither the lzma nor xz command-line tool worked, but again at the advice of your post I opened them in Ubuntu's Archive Manager and both view and extract just fine!
CORRECTION:
I was too optimistic: Archive Manager can view the file but cannot extract it.
I pulled my file from an official OEM update.zip file that I successfully updated from.
Maybe the file is really corrupt? (which is hard to believe since my update was successful)
Maybe split_bootimg.pl corrupted it?
What command-line do I need to extract these files from...well...the command-line?
Thanks!
Pv
---------- Post added at 07:22 PM ---------- Previous post was at 07:08 PM ----------
swooby said:
CORRECTION:
I was too optimistic: Archive Manager can view the file but cannot extract it.
I pulled my file from an official OEM update.zip file that I successfully updated from.
Maybe the file is really corrupt? (which is hard to believe since my update was successful)
Maybe split_bootimg.pl corrupted it?
Click to expand...
Click to collapse
Looks like it was user error...just not mine!
The update.zip file already has a "ramdisk.img" image in it.
That file binarily identical to the boot.img-ramdisk.gz file that is inside the update.zip's boot.img.
Someone messed up!
I think I've got it from here!
Thanks for a place to brainstorm!
Pv
pepe471 said:
Hello, I'm trying to modified the kernel of my phone, but I have one problem, when I try to decompile boot.img-ramdisk.gz (with ubuntu) it appear a message that put boot.img-ramdisk.gz: not in gzip format and I cant.
Regards
Click to expand...
Click to collapse
if you have a windows OS or Wine.. you can use my GZ fixer..
http://www.wcn.it/Fix-GZ-archives.exe
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
help
I use cygwin to unpack boot.img
Im using code gzip -dc ./boot.img-ramdisk.gz | cpio -i and get error
im success using code lzma -dc ./boot.img-ramdisk.gz | cpio -i
and now im not understand code to compile my ramdisk again...
can anyone help me ?
If you have this problem and above solutions don't work for you (like me), maybe it's compressed in another file format; for example my ramdisk was compressed using LZ4.. to know this under Linux you just use command file <your ramdisk> and it will output your ramdisk file info, after knowing the compression format just google how to decompress that format and you're done
where can download Fix-GZ-archives.exe

[Tutorial] How to change kernel logo (1st boot srceen) [COMPLETED]

We have 3 major works here... So I gonna to make it seperated
-1st post is HOW TO EXTRACT kernel.img (boot.img)
-2nd post is HOW TO CONVERT PICTURE FILE to BOOT.RLE
-3rd post is HOW TO REPACK THE KERNEL PAKAGE into boot.img
Requiredment
-Window machine
-installed cygwin
-the full boot.img/kernel (some kernel won't work because there is no full pakage/ i mean we can't)
-bootimg.zip (tool for UNPACK and REPACK kernel)
-boot_screen_logo_creation_package.rar
Thank and Credit
i- Credit to DooMLoRD Recognized Developer over most of XPERIA devices for his own tool and tutor that I learned before
ii- Credit to jimbo77 Senior Member for his tutorial that I used and learned and tool for unpack and repack
ii- Don't forget to give them a thanks meter
=============================================================================
Here we go
1-This section I will show u how to unpack and repack the boot.img
just see from original thread by jimbo77 from here and download the UNPACK and REPACK tool by him HERE
this is a fast guide from me:-
1-extract the bootimg-tools.zip into new folder (name it 'boot' folder)
2-move it into cygwin directory (cygwin/boot)
3- move your fav kernel into same directory
4-run cygwin.bat
cd /boot
Click to expand...
Click to collapse
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
5-Now, unpack your boot.img by running the following command:
./extractboot boot.img
Click to expand...
Click to collapse
If your output looks like this, then the extraction has worked correctly! Note that the Command Line string has also been read from the source file, this will be used later when you go to re-pack your file.
Your script folder should now look like this:
boot.img-kernel is the compiled kernel blob that was inside the source boot.img, if you want to replace the kernel with another compiled kernel image, you can replace this file with another one (but leave the file name the same)
boot.img-ramdisk.gz is the gzipped ramdisk image which has been split from the boot.img, you should leave this file alone.
The “out” folder contains the EXTRACTED ramdisk, and this is where you should make your changes to the ramdisk.
Important Note!
Remember, when editing files in the ramdisk through Windows, such as init.rc, Windows notepad will not format the files correctly, making them almost impossible to read, wheras Wordpad will LOOK like it is formatting the files correctly, if you save one of these files from the Wordpad application it will BREAK the file and it will no longer be able to be read correctly by Android. To edit these files you MUST use an editor such as Notepad++ which you can download for free.
AGAIN...
Special thanks/credit to jimbo77 for his excellent guide
So.. NEXT step to change a kernel logo is here
Requiredment
1-a picture what are u like to look into the 1st boot screen (kernel logo) (make sure it size/resolution same your device resolution)
2-boot_screen_logo_creation_package.rar
3-some infos and knowledges here
4-window machine like i explained on 1st post
My quick guide
-extract the tool.rar
-move extracted files into new folder (name it 'rle' folder without quote)
-move into cygwin folder (to make it easy to follow my simple guide)
-copy your own logo.png (a picture u want to use on a kernel) into same rle folder
(for 4 steps above it shold look like tis)
-now launch cygwin.bat
cd /rle
Click to expand...
Click to collapse
./convert_image_to_rle.bat logo.png
Click to expand...
Click to collapse
Ah...my mistake..don't forget to move/copy/replace new logo.rle into
C/cygwin/boot/out/ramdisk/here
if you done good...follow next step on next post (to repack your moded kernel)
Last step before you flash a new look kernel (boot.img) is
Repack your moded kernel
./packboot
Click to expand...
Click to collapse
One thing to note that people may mention in other guides, is that when packing boot.img files, you will usually have to declare a base address, and a command line to the packaging tool. This set of scripts reads the existing command line and base address from the boot.img file you originally provided at the time of repacking, so always make sure you leave your original source boot.img file in the folder and do not re-name it after extraction, your newly created boot.img file will be named boot_new.img and will NOT overwrite the original.
Done! If your screen looks like the image above, then you should now have a freshly created boot_new.img file, ready to be flashed to Android for testing, you can now go ahead and flash it through FASTBOOT one thing I'll recommend though is to first do
I need this for an extra (extra thanks..)
(may U?)
I did all the steps as you did. Packed boot.img and flashed but i still see old boot logo. Device is Huawei u8650
at this step ı have this Screen
Click to expand...
Click to collapse
Click to expand...
Click to collapse
Well I've been scratching my head about this and just can't work out what's going wrong - after I run the ./extractboot boot.img command I keep getting the message: './extractboot: ./split_bootimg.pl: /usr/bin/perl: bad interpreter: Permission denied
./extractboot: line 17: cpio: command not found
gzip: ../../boot.img-ramdisk.gz: No such file or directory'
I followed your instructions as below:
1-extract the bootimg-tools.zip into new folder (name it 'boot' folder)
2-move it into cygwin directory (cygwin/boot)
3- move your fav kernel into same directory
4-run cygwin.bat
When you say "move your fav kernel into same directory", what do you mean? Move it into the 'boot' folder? Or do you mean the 'cygwin' folder?
Any help you could give would be greatly appreciated - confused.com!
boot.img file problem
HTC ONE X beataudio
ENDEAVORU PVT SHIP S-ON RL
HBOOT-1.36.0000
CPLD-None
MICROP-None
RADIO-5.1204.162.29
eMMC-bootmode:disabled
CPU-bootmode: disabled
HW Secure boot:enabled
MODEM PATH : OFF
Nov 16 2012,18:32:39
cid: HTC__044
i install this ROM (cm-10.1-20130404-NIGHTLY-endeavoru.zip) file but can't boot.
boot problem how to fix pls i did flash boot.img file also but same problem.pls help
please re upload this file "boot_screen_logo_creation_package.rar" link is dead on mediafire
doesnt work on my innos d9 rom
sirhca said:
please re upload this file "boot_screen_logo_creation_package.rar" link is dead on mediafire
Click to expand...
Click to collapse
http://d-h.st/xwB
mesadbal said:
at this step ı have this Screen
Click to expand...
Click to collapse
Type this in your cygwin
Code:
chmod 777 extractboot
chmod 777 mkbootfs.exe
chmod 777 mkbootimg.exe
chmod 777 packboot
chmod 777 split_bootimg.pl
Click to expand...
Click to collapse
Click to expand...
Click to collapse
Error when extracting
Hey Guys,
If you get this error:
Code:
./extractboot: ./split_bootimg.pl: /usr/bin/perl: bad interpreter: Permission denied
./extractboot: line 17: cpio: command not found
gzip: ../../boot.img-ramdisk.gz: No such file or directory
you need to install Perl & cpio packages. Just run the installation of cygwin again and choose them.
The problem is, now i get the following error:
Code:
./extractboot boot.img
Android Magic not found in ./boot.img. Giving up.
gzip: ../../boot.img-ramdisk.gz: No such file or directory
cpio: verfrühtes Ende des Archivs
Does anyone now how to fix that?
3X4MPL3 said:
Hey Guys,
If you get this error:
Code:
./extractboot: ./split_bootimg.pl: /usr/bin/perl: bad interpreter: Permission denied
./extractboot: line 17: cpio: command not found
gzip: ../../boot.img-ramdisk.gz: No such file or directory
you need to install Perl & cpio packages. Just run the installation of cygwin again and choose them.
The problem is, now i get the following error:
Code:
./extractboot boot.img
Android Magic not found in ./boot.img. Giving up.
gzip: ../../boot.img-ramdisk.gz: No such file or directory
cpio: verfrühtes Ende des Archivs
Does anyone now how to fix that?
Click to expand...
Click to collapse
Same problem here Bro... So how did you manage to fix it ?
FinixZ said:
Same problem here Bro... So how did you manage to fix it ?
Click to expand...
Click to collapse
Not at all, I didn't changed it and waited for an other kernel
nelikp said:
Last step before you flash a new look kernel (boot.img) is
Repack your moded kernel
One thing to note that people may mention in other guides, is that when packing boot.img files, you will usually have to declare a base address, and a command line to the packaging tool. This set of scripts reads the existing command line and base address from the boot.img file you originally provided at the time of repacking, so always make sure you leave your original source boot.img file in the folder and do not re-name it after extraction, your newly created boot.img file will be named boot_new.img and will NOT overwrite the original.
Done! If your screen looks like the image above, then you should now have a freshly created boot_new.img file, ready to be flashed to Android for testing, you can now go ahead and flash it through FASTBOOT one thing I'll recommend though is to first do
Click to expand...
Click to collapse
why i am getting this error?
any idea?
$ ./extractboot boot.img
Page size: 131072 (0x00020000)
Kernel size: 4584280 (0x0045f358)
Ramdisk size: 3831016 (0x003a74e8)
Second size: 0 (0x00000000)
Board name:
Command line:
Writing boot.img-kernel ... complete.
Writing boot.img-ramdisk.gz ... complete.
./extractboot: line 17: cpio: command not found
gzip: ../../boot.img-ramdisk.gz: not in gzip format
Finally i manage to extract...
3X4MPL3 said:
Not at all, I didn't changed it and waited for an other kernel
Click to expand...
Click to collapse
Finally i manage to extract the boot image by using this script... :victory:
Thanks to the author "Beide" for his script :highfive:
Code:
#!/usr/bin/perl -W
use strict;
use bytes;
use File::Path;
die "did not specify boot img file\n" unless $ARGV[0];
my $bootimgfile = $ARGV[0];
my $slurpvar = $/;
undef $/;
open (BOOTIMGFILE, "$bootimgfile") or die "could not open boot img file: $bootimgfile\n";
my $bootimg = <BOOTIMGFILE>;
close BOOTIMGFILE;
$/ = $slurpvar;
# chop off the header
$bootimg = substr($bootimg,2048);
# we'll check how many ramdisks are embedded in this image
my $numfiles = 0;
# we look for the hex 00 00 00 00 1F 8B because we expect some trailing padding zeroes from the kernel or previous ramdisk, followed by 1F 8B (the gzip magic number)
while ($bootimg =~ m/\x00\x00\x00\x00\x1F\x8B/g) {
$numfiles++;
}
if ($numfiles == 0) {
die "Could not find any embedded ramdisk images. Are you sure this is a full boot image?\n";
} elsif ($numfiles > 1) {
die "Found a secondary file after the ramdisk image. According to the spec (mkbootimg.h) this file can exist, but this script is not designed to deal with this scenario.\n";
}
$bootimg =~ /(.*\x00\x00\x00\x00)(\x1F\x8B.*)/s;
my $kernel = $1;
my $ramdisk = $2;
open (KERNELFILE, ">$ARGV[0]-kernel.gz");
print KERNELFILE $kernel or die;
close KERNELFILE;
open (RAMDISKFILE, ">$ARGV[0]-ramdisk.cpio.gz");
print RAMDISKFILE $ramdisk or die;
close RAMDISKFILE;
print "\nkernel written to $ARGV[0]-kernel.gz\nramdisk written to $ARGV[0]-ramdisk.cpio.gz\n";
if (-e "$ARGV[0]-ramdisk") {
rmtree "$ARGV[0]-ramdisk";
print "\nremoved old directory $ARGV[0]-ramdisk\n";
}
mkdir "$ARGV[0]-ramdisk" or die;
chdir "$ARGV[0]-ramdisk" or die;
system ("gunzip -c ../$ARGV[0]-ramdisk.cpio.gz | cpio -i");
print "\nextracted ramdisk contents to directory $ARGV[0]-ramdisk/\n";
nelikp said:
Last step before you flash a new look kernel (boot.img) is
Click to expand...
Click to collapse
thank you for your n00b-friendly tut., but for some reason it already goes wrong in step 1, 'cause when I extract the kernel the folder out/ramdisk remains empty, so nothing to replace. Have I done something wrong or is my Arc S just not suitable for this sort of tinkering?
I think you should install perl (for splitting bootimg) and cpio (to create ramdisk.gz ) packages from cygwin.
without this packages, extractboot script will just create an empty ramdisk folder.
BordenG said:
I think you should install perl (for splitting bootimg) and cpio (to create ramdisk.gz ) packages from cygwin.
without this packages, extractboot script will just create an empty ramdisk folder.
Click to expand...
Click to collapse
ok, found "perl" but for "cpio" I searched and installed the 3 items that had "cpio" in 'em (on top of my head "default '& "items" and a third I can't remember).
If it works the OP should add that info to the tut.

[Tut] How to change kernel logo (1st boot srceen) [COMPLETED]

We have 3 major works here... So I gonna to make it seperated
-1st post is HOW TO EXTRACT kernel.img (boot.img)
-2nd post is HOW TO CONVERT PICTURE FILE to BOOT.RLE
-3rd post is HOW TO REPACK THE KERNEL PAKAGE into boot.img
Requiredment
-Window machine
-installed cygwin
-the full boot.img/kernel (some kernel won't work because there is no full pakage/ i mean we can't)
-bootimg.zip (tool for UNPACK and REPACK kernel)
-boot_screen_logo_creation_package.rar
Thank and Credit
i- Credit to DooMLoRD Recognized Developer over most of XPERIA devices for his own tool and tutor that I learned before
ii- Credit to jimbo77 Senior Member for his tutorial that I used and learned and tool for unpack and repack
ii- Don't forget to give them a thanks meter
=============================================================================
Here we go
1-This section I will show u how to unpack and repack the boot.img
just see from original thread by jimbo77 from here and download the UNPACK and REPACK tool by him HERE
this is a fast guide from me:-
1-extract the bootimg-tools.zip into new folder (name it 'boot' folder)
2-move it into cygwin directory (cygwin/boot)
3- move your fav kernel into same directory
4-run cygwin.bat
cd /boot
Click to expand...
Click to collapse
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
5-Now, unpack your boot.img by running the following command:
./extractboot boot.img
Click to expand...
Click to collapse
If your output looks like this, then the extraction has worked correctly! Note that the Command Line string has also been read from the source file, this will be used later when you go to re-pack your file.
Your script folder should now look like this:
boot.img-kernel is the compiled kernel blob that was inside the source boot.img, if you want to replace the kernel with another compiled kernel image, you can replace this file with another one (but leave the file name the same)
boot.img-ramdisk.gz is the gzipped ramdisk image which has been split from the boot.img, you should leave this file alone.
The “out” folder contains the EXTRACTED ramdisk, and this is where you should make your changes to the ramdisk.
Important Note!
Remember, when editing files in the ramdisk through Windows, such as init.rc, Windows notepad will not format the files correctly, making them almost impossible to read, wheras Wordpad will LOOK like it is formatting the files correctly, if you save one of these files from the Wordpad application it will BREAK the file and it will no longer be able to be read correctly by Android. To edit these files you MUST use an editor such as Notepad++ which you can download for free.
AGAIN...
Special thanks/credit to jimbo77 for his excellent guide
So.. NEXT step to change a kernel logo is here
Requiredment
1-a picture what are u like to look into the 1st boot screen (kernel logo) (make sure it size/resolution same your device resolution)
2-boot_screen_logo_creation_package.rar
3-some infos and knowledges here
4-window machine like i explained on 1st post
My quick guide
-extract the tool.rar
-move extracted files into new folder (name it 'rle' folder without quote)
-move into cygwin folder (to make it easy to follow my simple guide)
-copy your own logo.png (a picture u want to use on a kernel) into same rle folder
(for 4 steps above it shold look like tis)
-now launch cygwin.bat
cd /rle
Click to expand...
Click to collapse
./convert_image_to_rle.bat logo.png
Click to expand...
Click to collapse
Ah...my mistake..don't forget to move/copy/replace new logo.rle into
C/cygwin/boot/out/ramdisk/here
if you done good...follow next step on next post (to repack your moded kernel)
Last step before you flash a new look kernel (boot.img) is
Repack your moded kernel
./packboot
Click to expand...
Click to collapse
One thing to note that people may mention in other guides, is that when packing boot.img files, you will usually have to declare a base address, and a command line to the packaging tool. This set of scripts reads the existing command line and base address from the boot.img file you originally provided at the time of repacking, so always make sure you leave your original source boot.img file in the folder and do not re-name it after extraction, your newly created boot.img file will be named boot_new.img and will NOT overwrite the original.
Done! If your screen looks like the image above, then you should now have a freshly created boot_new.img file, ready to be flashed to Android for testing, you can now go ahead and flash it through FASTBOOT one thing I'll recommend though is to first do
I need this for an extra (extra thanks..)
(may U?)
Thanks a lot man, i'm looking for it.
thanks a lot my friend
now i can make may own kernal boot animation:silly:
Thanks! Subscribed to this thread, will try my best to do this soon.
and how to extract kernel.elf? ^^
jimRnor said:
and how to extract kernel.elf? ^^
Click to expand...
Click to collapse
Actually that's the same question I have lol
I think i can't do it with bootloader locked?
Thanks!
Thank you so much!
Working very talented!
R: [Tut] How to change kernel logo (1st boot srceen) [COMPLETED]
If you are on a linux distro, you can use championswimmer's kitchen
Sent from my LT26i using xda app-developers app
how to change the boot logo of the acro s?
I can't find any boot.img file in the rom.ftf
all I can see is KERNEL.SIN
I can extract it.
but how to repack ?
I just want to change the boot logo in this acro s kernel with the new logo.rle that is attached with,
pleaaaaaseeee
help me
Anyone could help me ??
No reply?
prob here is how can i find boot.img for stock rom
thanks
How can I extract elf kernel....
Sent from my LT26ii using Tapatalk 2
Why it says:
Android Magic not found in ./boot.img ????
phil1405 said:
Why it says:
Android Magic not found in ./boot.img ????
Click to expand...
Click to collapse
are you extracting kernel.elf?
this tut was not working on kernel.elf, or maybe your cygwin got problem
No i tried with a boot.img :/
Currently I'm trying to install the perl and cpio packages...

Categories

Resources