Getting image out of splash.img - HTC Inspire 4G

OK. This is a bit embarrassing. I created a splash screen 2 years ago from scratch. But, I didn't keep the original image I used to make it. I have the splash.img. I want to extract the original image from it. Can someone share the method of doing this? Thank you.

First youll have to re add the extention .nb at the end of the file. For example splash.img is kade to splash.img.nb then you Just reverse the command you used to convert to to a splash image
So instead of nbimg -F splash.bmp etc
You'll use nbimg -f splash.img.nb etc

marsdta said:
First youll have to re add the extention .nb at the end of the file. For example splash.img is kade to splash.img.nb then you Just reverse the command you used to convert to to a splash image
So instead of nbimg -F splash.bmp etc
You'll use nbimg -f splash.nb etc
Click to expand...
Click to collapse
Thanks! I tried that before, but I didn't know I had to add .nb extension to it first. I appreciate your help.

Related

How to edit and make .nbf file for extended ROM

Hi everybody
I want to edit ms.nbf, add/remove program in ExROM file, how can i do that?
And I want to create the ms.nbf from the Extended Rom folder ( that i copy from PPC). How can i do that?
Thanks so much!!!
http://wiki.xda-developers.com/index.php?pagename=ER2003Edit
http://wiki.xda-developers.com/index.php?pagename=BackupExistingRom
no real need to backup an extented rom though if one
can edit it one can just unhide it and copy out the cabs and txt file
Rudegar said:
http://wiki.xda-developers.com/index.php?pagename=ER2003Edit
http://wiki.xda-developers.com/index.php?pagename=BackupExistingRom
no real need to backup an extented rom though if one
can edit it one can just unhide it and copy out the cabs and txt file
Click to expand...
Click to collapse
ER2003Edit will not work on Magician EXTROM
You have to extract the FAT image using magician_ext_rom_tool [http://forum.xda-developers.com/attachment.php?attachmentid=24969&d=1130526115], modify it, and reencode it using magician_ext_rom_tool.
sounds like alot less hassel to just unhide and unlock it
and mess around that way then
Backup ROM need whole SD, and "size of the backup file nb1" = "size of SD"
I use 256MB -> it 's too large. And I not really like that.
Now I want to keep 1 ROM that i like most (include nk.nbf, Radio.nbf, ms.nbf).
Now I have 2 file radio.nbf and nk.nbf and I want create 1 file ms.nbf for myself that i like most.
I just got "Extended ROM" folder (By HR, and SR 3s before PPC auto config)
I dont know how to convert that folder to .nbf file?
How can i use "magician_ext_rom_tool" ? What is the header file?
Nobody help me?
hensiferum said:
Nobody help me?
Click to expand...
Click to collapse
The search function is made for that! Lazy!
Encode: -e -n <nbf filename> [-f <fat16 filename>] [-h <header filename>]
Decode: -d -f <fat16 filename> -h <header filename> [-n <nbf filename>]
I dont know what is header?
b0ris747, can you explain me?
The header file will be created on decode process
C:\ROMs>magician_ext_rom_tool.exe -d -n ms_.nbf
[msg] usage() - Generating FAT16 filename from NBF filename.
[msg] usage() - Generating Header filename from NBF filename.
It will contain device specific options to recreate the header contained in the nbf (which make it uploadable and recognizable on your device).
After modifying the FAT image, you'll have to encode header and FAT image to create a new NBF
C:\ROMs>magician_ext_rom_tool.exe -e -f ms_.fat -h ms_.hdr -n ms2.nbf
Will create a ms2.nbf (rename it to ms_.nbf and upload it.)
EDIT: wiki page created: http://wiki.xda-developers.com/index.php?pagename=MagicianExtrom
Oh, thank you.
When using it before, i have a mistake with encode and decode, so it not work...
Thank you very much
Can somebody explain to me how i can cook an external rom file? I would like to include the installation of tomtom with it so it is automatically installed (since battery runs empty occasionally). Any help maybe?

[TUT] Change the leo splash screen (first screen after boot)

You just run in dos mode the nbimg 1.1 tool of pof from here
http://forum.xda-developers.com/showthread.php?t=405118
and you put the following parameters:
nbimg -p 18400 -w 480 -h 800 -F nameofphoto.bmp -T 0x601 -S 64 -D PB8110000
Flash the nbh file that is created ( i attach a sample in zip file ready for flashing) and you done it.You only flash the boot image, i mean the one that has the number of radio and rom at the bottom, and nothing else, radio and rom remain unchanged.Follow exactly the commands (capitals or not capital letters).
There is another image that appears just before the image that has the number of rom and radio.This can be changed if you replace the 601 with 600 in the parameters described above (tip goes to Chri55tof in post 2).
So you just need 2 bmp photos 480x800 24bit and the pof nbimg1.1 tool with the parameters i described above, piece of cake.
If you dont like it returm to the stock splash attached below.
Enjoy
Downloaded the file (from link you provided), made a 24bit .bmp file I wanted to use ... followed the command line, flashed to my HD2 and it works !!
Great job !
K.
EDIT :
By the way, flashing .nbh file done that way will replace 2nd splash screen. How to replace first screen ? (the one with white background and green htc trademark) ???
EDIT2 :
Just found it !
0x600 is changing 1st splash screen
0x601 is changing second (not like you stated in topic of this thread !)
What you mean ?
The second screen is the animation which is an animated gif file.
-T is the header type.
I attach the kind of settings:
Mandatory arguments:
-F <filename> Filename to convert.
If the extension is BMP it will be converted to NB.
If the extension is NB it will be converted to BMP.
Optional arguments:
-w <width> Image width in pixels. If not specified will be autodetected.
-h <height> Image height in pixels. If not specified will be autodetected.
-t <pattern> Manually specify the padding pattern (usually 0 or 255).
-p <size> Manually specify the padding size.
-n Do not add HTC splash signature to NB file.
-s Output smartphone format.
NBH arguments: (only when converting from BMP to NBH)
-D <model_id> Generate NBH with specified Model ID (mandatory)
-S <chunksize> NBH SignMaxChunkSize (64 or 1024)
-T <type> NBH header type, this is typically 0x600 or 0x601Example to convert a NB to BMP:
I mean `the very first screen`
This is the one with white BG and green `htc` trademark (the one before `reds` coming out)
0x600 is responsible to change this
0x600 next splash screen
Hi,
Q: So the second one is the animated one?? I'm talking about that one with 'quietly brilliant' ? It comes with the sound - how to change this sound?
pepesz said:
Hi,
Q: So the second one is the animated one?? I'm talking about that one with 'quietly brilliant' ? It comes with the sound - how to change this sound?
Click to expand...
Click to collapse
The sound is the HTC-QuietlyBrilliantBoot.wav in windows folder and the original animated gif (LEO_animated.gif) also in windows folder is attached
Read here
http://forum.xda-developers.com/showthread.php?t=625911
Thanks a lot
0x600 changes Carrier Bitmap (1)
0x601 changes Welcomehead (2)
Animation (3)
chri55tof said:
0x600 changes Carrier Bitmap (1)
0x601 changes Welcomehead (2)
Animation (3)
Click to expand...
Click to collapse
You dont have to do the procedure for changing the welcomehead,bmp because you just replace directly in windows file or cook the bmp file.
The 1st screen with the red letters at the bottom with radio and rom numbers needs to be flashed as is the only way to replace it.
My little contribution ^^
Enjoy !
NIKOSXRI said:
You just run in dos mode the nbimg 1.1 tool of pof from here
http://forum.xda-developers.com/showthread.php?t=405118
and you put the following parameters:
nbimg -p 18400 -w 480 -h 800 -F nameofphoto.bmp -T 0x601 -S 64 -D PB8110000
Flash the nbh file that is created ( i attach a sample in zip file ready for flashing) and you done it.You only flash the boot image, i mean the one that has the number of radio and rom at the bottom, and nothing else, radio and rom remain unchanged.Follow exactly the commands (capitals or not capital letters).
So you just need a bmp photo 480x800 24bit and the pof nbimg1.1 tool with the parameters i described above, piece of cake.
If you dont like it returm to the stock splash attached below.
Enjoy
Click to expand...
Click to collapse
Once I enter the command lines, it says "could not open "picture name".bmp? Am I missing something?
daleandla said:
Once I enter the command lines, it says "could not open "picture name".bmp? Am I missing something?
Click to expand...
Click to collapse
Check again and follow the command line exactly
My Contribution
NIKOSXRI said:
Check again and follow the command line exactly
Click to expand...
Click to collapse
Boom baby. Got it. Here's my contribution...
How do change from second splash screen. (Not the first screen or bios animation)
technomania34 said:
How do change from second splash screen. (Not the first screen or bios animation)
Click to expand...
Click to collapse
You change the welcomehead.png in Operator Pkg, 480x800 24 bits per pixel.
I attach a sample picture which you may use.
is there anyone that has the original 2nd splash bmp file or as a nbh file?
Found it
NIKOSXRI said:
You change the welcomehead.png in Operator Pkg, 480x800 24 bits per pixel.
I attach a sample picture which you may use.
Click to expand...
Click to collapse
Thanks mate
why isn't this or a link to this thread (or similar) in the sticky/wiki at the top?
A word of warning. when you create and flash a splashscreen using the 0x601 memory location, it is not removed when you flash a stock rom. (Tested with several stock roms)
Stock splashscreens are flashed to the 0x600 memory location, and shows for 14 seconds. 7 Seconds when teh phone boots, and 7 seconds when the RGD info shows.
When you have a second splash in place, it shows the first splash for 7 seconds, then the second splash when the RGD info shows for 7 seconds.
The implications of this are that if you need to send back your phone, and you flash a stock rom, your custom second splash will still show.
To remove it (well, make it look like it was gone) I had to make a duplicate of the stock splash and flash it to the 0x601 location, so that it looks like one long splash. (As i found out when i had to return mine to o2.)
More reading
[1st boot & 2nd splash ]
4 HD2 Leo :: choose your BMP shot for it
HERE

edit boot.img-ramdisk

heres where im at now. im trying to edit the init.rc
i have extracted the boot.img using unpack-bootimg.pl and have got the follwing
empty folder called ramdisk
boot.img-ramdisk.cpio.gz
boot.img-ramdisk.gz
boot.img-kernell.gz
i am now stuck extracting the ramdisk to edit init.rc
i also get error gunzip is not a recognied command
any help??
add.thebad said:
i am trying to edit the init.rc but have problems extracting boot.img-ramdisk.gz
i have made a rom dump
then extracted boot.img
got boot.img-ramdisk.gz so extracted that
and now i have a file called boot.img-ramdisk nothing else
so how can i edit ramdisk?
thanks in advance. any help welcome
Click to expand...
Click to collapse
add.thebad,
Been a while since I've done this, lol, but these are the instructions I followed:
http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack%2C_Edit%2C_and_Re-Pack_Boot_Images
There's links to the Perl scripts in that page too.
Hope this helps.
Cheers!
thanks but the link to the scripts is broke. dont suppose you know where to get another
add.thebad said:
thanks but the link to the scripts is broke. dont suppose you know where to get another
Click to expand...
Click to collapse
Adam (that's right, right? ),
I found an XDA version of the "How To" link I posted above: http://forum.xda-developers.com/showthread.php?t=443994 and the files are at the bottom of the first post and they are still available.
By the way, I used these instructions (along with lots of help from Amon_RA himself) for unpacking and repacking Amon_RA's custom recovery .img file (I built a version that doesn't require the use of a trackball for the Eris).
I think after you unpack the ramdisk, you'll just replace / update your init.rc file and then repack everything before doing the mkbootfs on your ramdisk directory (followed by your particular mkbootimg command).
Good luck!
Cheers!
thanks for you help i have the scripts now and i can get it to extract however i get the error "gunzip is not recognised" and the files it does extract are emply
add.thebad said:
thanks for you help i have the scripts now and i can get it to extract however i get the error "gunzip is not recognised" and the files it does extract are emply
Click to expand...
Click to collapse
Are you on a Linux system?
The gzip / gunzip utilities should be on your system and/or referenced in you PATH environment variable.
Do a find / -name 'gzip' 2> /dev/null or find / -name gunzip 2> /dev/null or whereis gunzip or which gunzip (one of these should reveal the utility's location).
The unpack-bootimg.pl does use the gunzip command to extract the files, so you will need this utility.
Cheers!
after a bit of reading i think the way i have got my boot.img is wrong could this be why the folder is empty?
add.thebad said:
after a bit of reading i think the way i have got my boot.img is wrong could this be why the folder is empty?
Click to expand...
Click to collapse
Not sure... Like I said, I started with a known, good recovery.img file... I never have (yet) played with a boot.img file...
scary alien said:
Not sure... Like I said, I started with a known, good recovery.img file... I never have (yet) played with a boot.img file...
Click to expand...
Click to collapse
i managed to extract a boot.img from an official system image and tried that and got the same result. could i have anything to do with gunzip not being recognised
add.thebad said:
i managed to extract a boot.img from an official system image and tried that and got the same result. could i have anything to do with gunzip not being recognised
Click to expand...
Click to collapse
lol...I think we cross-posted a little bit ago...see above ^^^ for my post about your gunzip utility.
scary alien said:
lol...I think we cross-posted a little bit ago...see above ^^^ for my post about your gunzip utility.
Click to expand...
Click to collapse
haha so we did.
no im on windows and cant get gunzip to work. think i have gzip working tho
any ideas?
add.thebad said:
haha so we did.
no im on windows and cant get gunzip to work. think i have gzip working tho
any ideas?
Click to expand...
Click to collapse
Yeah, you'll have to grab some Windows versions of the Unix commands.
I can't remember where I got mine, but a quick search yielded this as a possible starting place:
http://www.cyberciti.biz/faq/unix-command-line-utilities-for-windows/
There's a couple of links to sets of tools. After you download and install these, make sure you point / change your Windows PATH to point to the utilities or just do all of your work in the same directory.
You really just need the utilities that are referenced in the Perl script... Not sure I'd bother with the whole Cygwin thing (your call, of course).
Cheers!
scary alien said:
Yeah, you'll have to grab some Windows versions of the Unix commands.
I can't remember where I got mine, but a quick search yielded this as a possible starting place:
http://www.cyberciti.biz/faq/unix-command-line-utilities-for-windows/
There's a couple of links to sets of tools. After you download and install these, make sure you point / change your Windows PATH to point to the utilities or just do all of your work in the same directory.
You really just need the utilities that are referenced in the Perl script... Not sure I'd bother with the whole Cygwin thing (your call, of course).
Cheers!
Click to expand...
Click to collapse
Ok will try that. I allready have cygwin to try get the commands i will try ur link tho. Think im getting a bit outa my depth but ive learnt so much so far i dont want to give up so thanks for your help
heres where im at now. im trying to edit the init.rc
i have extracted the boot.img using unpack-bootimg.pl and have got the follwing
empty folder called ramdisk
boot.img-ramdisk.cpio.gz
boot.img-ramdisk.gz
boot.img-kernell.gz
i am now stuck extracting the ramdisk to edit init.rc
i also get error gunzip is not a recognied command
any help??
add.thebad said:
heres where im at now. im trying to edit the init.rc
i have extracted the boot.img using unpack-bootimg.pl and have got the follwing
empty folder called ramdisk
boot.img-ramdisk.cpio.gz
boot.img-ramdisk.gz
boot.img-kernell.gz
i am now stuck extracting the ramdisk to edit init.rc
i also get error gunzip is not a recognied command
any help??
Click to expand...
Click to collapse
Well, I spent some time tonight trying to do this under Windows myself, but I used the split_bootimg.pl Perl script instead to create the *.img-kernel and *.img-ramdisk.gz files (with mixed success). lol, I had a hard time re-finding some good Unix commands that would run under Windows (I've got some good ones on my work PC, but that doesn't help me now).
Here's the relevant section in the original HOWTO link I sent you:
% ./split_bootimg.pl boot.img
Page size: 2048 (0x00000800)
Kernel size: 1388548 (0x00153004)
Ramdisk size: 141518 (0x000228ce)
Second size: 0 (0x00000000)
Board name:
Command line: no_console_suspend=1
Writing boot.img-kernel ... complete.
Writing boot.img-ramdisk.gz ... complete.
Now, extracting the ramdisk under Windows is a little trickier and I couldn't get the whole way there because I couldn't find the cpio command for Windows (you might have it already if you are using Cygwin). Anyway, the documentation explains that you would create a temporary "ramdisk" directory, change to it, use the gzip utility to uncompress and feed the output to the cpio command to actually extract the files and directories:
Extract the ramdisk.
% mkdir ramdisk
% cd ramdisk
% gzip -dc ../boot.img-ramdisk.gz | cpio -i
% cd ..
That should work for you (if you have appropriate utilities) and should give you the various files that comprise the ramdisk for you to modify (i.e., the init.rc).
After modifying them, you would use the mkbootfs utility (not sure if this is actually available in Windows) to re-pack the ramdisk and then use the mkbootimg command to re-pack your boot image.
It might be easier to get a Linux distro installed that you can launch from Windows just to do this.
Good luck!
scary alien said:
It might be easier to get a Linux distro installed that you can launch from Windows just to do this.
Good luck!
Click to expand...
Click to collapse
ahaa managed to get everything extracted and edit the init.rc so thank you for all your help
one the linux side of things i have ubuntu dual boot and use it from time to time im just not familiar with the commands on it so prefer windows. might try it more oftern since it can be a pain finding all the tools for windows
ne way all i need to do now is repackage it which is proving to be a bit of a problem atm.
a sleep less night and ill c how i get on lol
cheers for the help
add.thebad said:
ahaa managed to get everything extracted and edit the init.rc so thank you for all your help
one the linux side of things i have ubuntu dual boot and use it from time to time im just not familiar with the commands on it so prefer windows. might try it more oftern since it can be a pain finding all the tools for windows
ne way all i need to do now is repackage it which is proving to be a bit of a problem atm.
a sleep less night and ill c how i get on lol
cheers for the help
Click to expand...
Click to collapse
Adam,
Glad you are making progress .
Here's the last few bits that I used to re-pack my ramdisk and to rebuild the bootable recovery .img file (i.e., ramdisk + kernel):
# pack-up the ramdisk directory's files to build the new ramdisk .zip
#
mkbootfs ./ramdisk | gzip > ramdisk-new.gz
# now, repack the kernel and ramdisk to make the new recovery image
#
mkbootimg --cmdline 'no_console_suspend=1 console=null' --kernel recovery-RA-eris-v1.6.2.img-kernel --ramdisk ramdisk-new.gz --base 0x11200000 -o new-recovery.img
This is very similar to the instructions in the HOWTO thread.
Also, note the --base parameter in the mkbootimg line, this is unique/specific to each phone/bootable image since it appears to be the boot/load address, so you'll have to know or find-out what this particular value is for your situation.
Good luck and let me know how it goes.
Cheers to you, too!
scary alien said:
Adam,
Glad you are making progress .
Here's the last few bits that I used to re-pack my ramdisk and to rebuild the bootable recovery .img file (i.e., ramdisk + kernel):
# pack-up the ramdisk directory's files to build the new ramdisk .zip
#
mkbootfs ./ramdisk | gzip > ramdisk-new.gz
# now, repack the kernel and ramdisk to make the new recovery image
#
mkbootimg --cmdline 'no_console_suspend=1 console=null' --kernel recovery-RA-eris-v1.6.2.img-kernel --ramdisk ramdisk-new.gz --base 0x11200000 -o new-recovery.img
This is very similar to the instructions in the HOWTO thread.
Also, note the --base parameter in the mkbootimg line, this is unique/specific to each phone/bootable image since it appears to be the boot/load address, so you'll have to know or find-out what this particular value is for your situation.
Good luck and let me know how it goes.
Cheers to you, too!
Click to expand...
Click to collapse
ok gave up in windows cannot find a command or perl script for mkbootfs so now in ubuntu giving it a try
i can do that first bit fine. does it need to be re cpio?
on the next commannd i type
Code:
mkbootimg --cmdline 'no_console_suspend=1 console=null' --boot.img-kernel.gz --boot.img-ramdisk.gz ----base 0x10000000 -o new-boot.img
and get this
Code:
[email protected]:~/Desktop$ mkbootimg --cmdline 'no_console_suspend=1 console=null' --boot.img-kernel.gz --boot.img-ramdisk.gz ----base 0x10000000 -o new-boot.img
usage: mkbootimg
--kernel <filename>
--ramdisk <filename>
[ --second <2ndbootloader-filename> ]
[ --cmdline <kernel-commandline> ]
[ --board <boardname> ]
[ --base <address> ]
-o|--output <filename>
but nothing is outputted on my desktop
add.thebad said:
ok gave up in windows cannot find a command or perl script for mkbootfs so now in ubuntu giving it a try
Click to expand...
Click to collapse
I believe that the mkbootfs utility is available / created as a result of building / compiling the Android open source.
Like I mentioned before, its been a while since I did all this myself, but I had to download and do the base "make" for the Android open source since I was actually changing and recompiling the custom recovery.
So, you'll need to check-out / download the desired AOSP branch / version from the proper location (which eludes me at the moment). Then, I believe doing the base / generic "make" for the AOSP will create or reveal the mkbootfs utility.
One of the threads in the following forum should have a better, starter explanation for doing the above that I could post here:
http://forum.xda-developers.com/forumdisplay.php?f=613
I'd dig into this more with you tonight, but I gotta do my taxes and then go into work for a few hours tonight (ugh on both counts, lol!).
Good luck!

Fixed SBF?

i understand that to create a fixed SBF i need to remove CG31 and CG39 and repack. the question is, how can i get a nandroid of the system SBF without flashing the full SBF?
so is there a way of converting the CG39 into a nandroid img? or is there any other way to do it?
i know there are nandroid backups of different SBFs but i have localised SBF that i want to use and i dont want to lose downgrade-ability. what to do?
You can get the CG39.smg file and copy it to a linux box.
Then you create a folder inside the /mnt folder
Code:
mkdir /mnt/GC39
.
Then you can mount the CG39.smg as a loopback device:
Code:
mount -o loop /location/to/your/cgfile/CG39.smg /mnt/CG39/
Then you can go into /mnt/CG39 folder and copy the contents to anywhere.
After you'll need to repack it on a system.img file in order to make a nandroid restore.
i will try that, thanks!
i've done the above, and used "cat" command to create the .img file, strangely the smg file and the cat output .img are exactly the same size in bytes.
is it safe to nandroid restore the .img file?
can anyone tell?
im going to see if using dd command makes a difference.
Edit:
using dd command i got also the same size in bytes as the original smg file. this either means that i wont be able to downgrade or CG39 file doesnt include anything to block downgrading.
nolimitzz said:
i've done the above, and used "cat" command to create the .img file, strangely the smg file and the cat output .img are exactly the same size in bytes.
dd command i got also the same size
Click to expand...
Click to collapse
seriously? how could you expect otherwise?
you practically did the most complicate way of copying a file.
would you expect the file to change by doing that?
you need to do use makeyaffs2image

Make custom bootscreen or bootlogo “ image to rle”

To make logo.rle, easier way you can use Photoshop. Create a new file or new pictures as you want, setting the image mode to RGB, to make sure X10 image you created in the size width 480 x height 854, then save it in PNG format.
Then to change the format PNG to logo.rle, you can use a tool that was created by dooMLord "Boot screen logo creation package". I'm just more to clarify, especially for the new in this. Please download and see here:
http://forum.xda-developers.com/showthread.php?t=1140406
Prepare an image that has been created earlier.
Extract "boot_screen_logo_creation_package.rar" in a folder.
To further facilitate the work, copy the command prompt in the input to the windows/system32 folder boot screen logo creation package, put together all in one folder. Put your picture also earlier in the boot screen logo folder creation package that's already in the extract.
Change the name of your image becomes logo.png
Then click the command prompt.
Typing the following command:
convert_image_to_rle.bat <path_to_image_file>
Replace <path_to_image_file> the image file name that you create.
Example: convert_image_to_rle.bat logo.png
It will be two image files: logo.png.raw and logo.png.rle
Now you should have your own logo.rle.
Change the name logo.png.rle be logo.rle
This image is ready you are using, and can be inserted into your ramdisk.
To enter the drawing logo.rle you have made this into a ramdisk
Have a look at this post:
http://forum.xda-developers.com/showthread.php?t=1683832
Hope this helps.
Thanks to: Xda-developers
dooMLord : for boot_screen_logo_creation_package
And you all ..

Categories

Resources