PDA

View Full Version : [release] nbimg: HTC splash screen tool


pof
03-07-2008, 11:49 AM
nbimg is a command line tool which allows to convert HTC Splash Screen images from NB to BMP and create NB splash screens from BMP format. Any splash screen size is supported (yes, it works for Diamond or Athena at 640x480 resolution too).


=== nbimg v1.1
=== Convert NB <--> BMP splash screens
=== (c)2008 Pau Oliva - pof @ xda-developers

Usage: nbimg -F file.[nb|bmp]

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 0x601


Example to convert a NB to BMP:

$ ./nbimg.exe -F diamond137.nb
=== nbimg v1.1
=== Convert NB <--> BMP splash screens
=== (c)2008 Pau Oliva - pof @ xda-developers

[] File: diamond137.nb
[] Image dimensions: 480x640
[] Encoding: diamond137.nb.bmp
[] Done!


Example to convert a BMP to NB:

$ ./nbimg.exe -F diamond137.bmp
=== nbimg v1.1
=== Convert NB <--> BMP splash screens
=== (c)2008 Pau Oliva - pof @ xda-developers

[] File: diamond137.bmp
[] Encoding: diamond137.bmp.nb
[] Image dimensions: 480x640
[] Done!


Download
Windows version attached to this post.
Linux version and source code available in my blog (http://pof.eslack.org/blog/2008/07/03/nbimg-htc-splash-screen-tool/).

MarcLandis
03-07-2008, 12:07 PM
This is awesome!

Thanks.

Windoze9t8
03-07-2008, 02:56 PM
nice one...

htctouchp
03-07-2008, 03:07 PM
this is amzing tool :)

tom_codon
03-07-2008, 03:21 PM
:) well done brother

pudgedaddy
03-07-2008, 03:49 PM
OK so i took a .bmp file i created and converted it to .nb ... what exactly do i do next? can you only inject this file while a ROM is being cooked? or do i need to overwrite an existing file in the \windows directory?
I am using Kavana 6.1 ROM for the Excalibur BTW...

pof
03-07-2008, 04:03 PM
This has nothing to do with OS side. You need to create a NBH file for your device, with the NB splash screen inside, and flash it to replace the bootscreen.

pudgedaddy
03-07-2008, 04:38 PM
so how to do "inject the .nb file int the .nbh file?
i have the original .nbh file and i've created the .nb file... what's the next step exactly?

and it's an .nbh unsigned file so its not locked down

pof
03-07-2008, 04:48 PM
Use any tool available to create NBHs, for example HTC Rom Tool (http://forum.xda-developers.com/showthread.php?t=311909). To flash your custom NBH file you'll need USPL or HardSPL installed on your device. Also for Excalibur specific instructions look here ("http://forum.xda-developers.com/showpost.php?p=2366103&postcount=13), because you'll need to add the smartphone signature manually.

pudgedaddy
03-07-2008, 05:02 PM
i tried using the htc rom tool but when it loads, it fails to update the devices list. says internet connection probs... im on the net to its not my internet connection. oh well. guess i will wait a little longer..... im really a noob when it comes to this part of modding. All i want to do is to replace the first splash screen that comes up ( the HTC one ) and the second splash screen ( the windows mobile one) with the two i created.

pudgedaddy
03-07-2008, 07:21 PM
ok i finally created an .nbh file from the .nb file i used to get the mainsplash.nb file. But when i do the flash all i get is a green gradient filled mainsplash screen and not the image that i converted. Was there something i did wrong? bear in mind i have the HTC Excalibur Smartphone

Basically since all i wanted to do was to flash the main splash screen i created a .txt file with this info:

EXCA10000
1111111
1.11.0.0
USA
600,02_MainSplash.nb

i made sure i named the created .nb file to "02_MainSplash.nb" and dropped it into the directory where the .txt file was located. I got the output .nbh file and compared it with my original .nb file and it was 1kb larger than the .nb.....

When i created the .nb file i used the code you posted on another thread and it looked like this: nbimg.exe -F MainSplash.bmp -w 320 -h 240 -n .... the name of the file was MainSplash.bmp any suggestions? i had heard you talk about adding the "this is smartphone signature" manually. Could this be the problem? If that's the case, i suck as hexediting, so maybe you can hexedit it 4 me?

also note that i got a flash wtire error too when running the RUU

sean222
03-07-2008, 08:41 PM
When I first saw this thread I was like "yay! a new EASY way to flash a just the boot image!" But I was wrong, just gets you one step closer :( Still thanks for the tool tho...what would be nice is a tool that you just insert the BMP or image, then it generates a flashable .nbh like the one I attatched (but that's asking too much) :D. The .nbh below is only 500kb and it flashes to my Vogue and ONLY replace the first boot screen (then hard-resets the phone). How did that person make that!?

pudgedaddy
03-07-2008, 09:02 PM
So here's the deal on my ventures.

I've found out that although the excalibur is a 320 X 240 sozed screen the actual .bmp and .nbh files are 240 X 320 ... I verified this by extracting the .nb and .bmp files from the HTC ROGERS and TMO .nbh files the images looked fuzzy, but they work when they are injected into my phone. So here's what i did. I created a .bmp image from scratch using 320 X 240 attributes. the name of the file was 00_MainSplash.bmp. I then used pof's nbimg.exe file and typed in cmd window: nbimg.exe -F 00_MainSplash.bmp -w 320 -h 240 -n
. then it gave me 00_MainSplash.bmp.nb which i renamed and took off the extra .bmp in the middle. Then i did this .nb file in reverse by typing nbimg.exe -F 00_MainSplash.nb to see what the output .bmp file would look like. When i looked at the output .bmp file it was all distorted in the same way the official carrier .bmp files looked like. So i figure ok, i got it correct now. Here's where the issue occurs. I use the nbhgen.exe file and type nbhgen dash.txt (the .txt file is called dash.txt)

The text reads:
EXCA10000
1111111
1.11.0.0
USA
600,00_MainSplash.nb

so i execute it and it gives me the RUU_signed.nbh file . The file size is around 151kb I then use the RUU updater and execute that (after i run the USPL CID Bypass) Then after the updater states it's successful the phone reboots and gives me a green gradient screen as the first splash screen and not the file i created. I figured i must be going something wrong (obviously)
if i try and re-extract the .nb files out of my new .nbh file using NBHExtract.exe the only file that turns out is: 00_MainSplash.nb ... now when i ran that same utility on the Tmobile, Rogers and HTC official. nbh files the output files were 2: one was: 00_MainSplash.nb & 00_MainSplash.bmp,,, so it seems like the .nbh files should contain a .nb and a .bmp file somehow.

So i went back to my dash.txt file and changed it to read:

EXCA10000
1111111
1.11.0.0
USA
600,00_MainSplash.nb
600,00_MainSplash.bmp

i also tried:

EXCA10000
1111111
1.11.0.0
USA
600,00_MainSplash.nb
601,00_MainSplash.bmp

and tried using that output file with the RUU updater. Either way it gave me a flash error and kept that same green gradient screen upon first boot.
So if anyone can tell me where i fouled up i'd be indebted to you.

edit: ok a retract what i said about the nbhextract.exe not outputing 2 files when i extract the .nb file i created. So there must be something else im not doing right..... pof had mentioned something in another thread about using a hex editor to sighn the .nb file for smartphones. but i have no idea how to do that.

Edit2: I think one of two things are going on. 1. The .nb or .nbh file must be signed for smartphones like pof mentioned.... or 2. the nbhgen.exe is somehow malforming the format of the image ( such as converting it from 320x240 to 240x320 ) or the certificate doesnt work with the excalibur that nbhgen uses

pof
03-07-2008, 09:48 PM
Wait a while and I will make it smartphone friendly :) and with option to directly generate NBH for you. I'll update the first post when its done.

pudgedaddy
03-07-2008, 10:30 PM
Wait a while and I will make it smartphone friendly :) and with option to directly generate NBH for you. I'll update the first post when its done.

friggin sweet! thanks a lot! i'll make sure to "spread the wealth" if i can get it workin on my phone.

pudgedaddy
05-07-2008, 10:55 PM
Wait a while and I will make it smartphone friendly :) and with option to directly generate NBH for you. I'll update the first post when its done.

any timeline on when you expect this development to be completed?

pof
07-07-2008, 06:32 PM
Check the first post, I updated it.

Nosferatos
11-07-2008, 03:09 PM
pof, please, check this thread http://forum.xda-developers.com/showthread.php?t=404449&highlight=splash, for my problem

farukb
11-07-2008, 03:37 PM
mucas gracias...or something like that:D

how do great roms always have bad(dumb) splashes...well not any more

thanks for the update

canardwc
18-07-2008, 07:16 PM
Hi All,

What is the HTC Thouch Diamond MODEL ID ? Where can I found it?

Regards,

Sebastien

WIzard200x
18-07-2008, 07:29 PM
Thanks Pof... :)

This little tool comes in way handy.

Look forward to trying this.

Great Work, Again :D

pudgedaddy
20-07-2008, 07:54 AM
This still doesn't seem to work for smartphones ( or at least mine ). I have an HTC Excalibur 620 running on Kavana Wm 6.1 ROM. I have tried using your .nbh generator function but it doesnt work. to give you some examples of what i've tried here they are:
I first created a .bmp image with 320 X 240 dimensions
i named it MainSplash.bmp
then in cmd window, i typed c: nbimg -F MainSplash.bmp -w 320 -h 240 -n -s -t 0 -p 0 -D EXCA10000 -S 1024 -T 0X600
i've also tried : c: nbimg -F MainSplash.bmp -w 320 -h 240 -s -t 0 -p 0 -D EXCA10000 -S 1024 -T 0X600
and i've tried:
c: nbimg -F MainSplash.bmp -w 320 -h 240 -n -s -D EXCA10000 -S 1024 -T 0X600


Each one of these has generated either error 228: invalid file size or, error 226 flash write error. I've also tried just only creating the .nb file and using bot's .nbh generator. i've also tried dark simpson's ROM builder with the same results. B-4 ver 1.1 oh this software, i was at least getting some sort of change with my screen ( although it was a green screen and not what i created ) at least it wasn't giving me any errors. If someone can help me with what i might be doing wrong, i'd appreciate it.

BTW... i am running the spl CID bypass b-4 running the RUU

pof
22-07-2008, 06:05 AM
I first created a .bmp image with 320 X 240 dimensions i named it MainSplash.bmp

The resulting NB file size must be equal to the original NB splash screen file size, in case of Excalibur, NB file for splashscreen is 262144, so you need to calculate the padding.

Try this:

nbimg -p 108514 -n -s -w 320 -h 240 -F MainSplash.bmp -T 0x600 -S 1024 -D EXCA10000

mahsidi
25-07-2008, 05:18 PM
Hi how do i set up my splash screen i have made a .nbh file of just the splash screen using NBHUtil. what do i do next

pof
29-07-2008, 12:10 PM
what do i do next

Flash it? :)

mugglesquop
30-07-2008, 01:30 PM
hey,

whenever i try and run the nbimg.exe (either version), the DOS box appears, then closes quickly.

Any reason for this?

(trying to run off the desktop with Windows XP Pro)

cheers,

pof
31-07-2008, 11:01 AM
@mugglesquop: Yes, it's a command line app. You need to run it from a cmd prompt.

donjuantip
31-07-2008, 09:33 PM
why isn't the file, ms_splash.png, being loaded on bootup for me???

i still see the plain old windows mobile screen instead of the windows mobile 6.1 screen? is it built into the rom somewhere or the registry? how can i point to \windows\ms_splash.png??

pudgedaddy
01-08-2008, 06:37 AM
The resulting NB file size must be equal to the original NB splash screen file size, in case of Excalibur, NB file for splashscreen is 262144, so you need to calculate the padding.

Try this:

nbimg -p 108514 -n -s -w 320 -h 240 -F MainSplash.bmp -T 0x600 -S 1024 -D EXCA10000


Well i tried this code . and although i didnt get a flash error when running the RUU, the splash screen didnt change from the previous one. Basically, nothing changed after running the .nbh via RUU. IF you want to see the actual file i'm trying to use i will upload it if you want to see it.

pof
01-08-2008, 02:44 PM
@donjuantip: this tool is for the HTC Splash screen that appears when you boot the device, and WinCE has not booted yet. Has nothing to do with the windows mobile splash screen, sorry.

@pudgedaddy: Feel free to send me the NBH so I can see what is wrong.

ov2rey
01-08-2008, 03:34 PM
sorry do this software change the start up screen????

i mean as change the starting up pda image?

donjuantip
01-08-2008, 03:45 PM
sorry back.

pudgedaddy
02-08-2008, 05:24 PM
@donjuantip: this tool is for the HTC Splash screen that appears when you boot the device, and WinCE has not booted yet. Has nothing to do with the windows mobile splash screen, sorry.

@pudgedaddy: Feel free to send me the NBH so I can see what is wrong.

@ pof. PM sent with .nbh link

pof
02-08-2008, 08:08 PM
@ pof. PM sent with .nbh link

You forgot the -T 0x600 in the command I told you before. Just in case you didn't, the "x" must be lowercase.

pudgedaddy
02-08-2008, 10:06 PM
You forgot the -T 0x600 in the command I told you before. Just in case you didn't, the "x" must be lowercase.

yup it was the upper X instead of the lower x that was the issue. This worked perfectly.... I'm going to write out an instruction manual out on the excalibur forum using your program (if you dont mind) and our RUU and CID bypass procedure..... if that's ok...

pudgedaddy
02-08-2008, 10:35 PM
BTW.... is there a way to also change the second splcashscreen that comes up on the excalubir? basically what excalibur users see is first the splash screen that is usually your mobile operator's splash screen. then after that one the second is the splash screen with the windows mobile logo and background, then the phone shows the home screen. I tried doing this with the same command line, but with 0x601 and that just replaced the first screen and then i tried it with 0x700 and i got a flash error. so basically if you can tell me if that can be changed , or how then i'd appreciate it.

pof
03-08-2008, 04:46 AM
the second is the splash screen with the windows mobile logo and background

Excalibur only has one Splash Screen in ROM, that is the 0x600 part of the NBH. The second splash screen you see (windows mobile logo) is part of the OS ROM, so you have to cook the OS ROM to change that, most probably it's called welcomehead*.png file in \windows\ folder.

pudgedaddy
03-08-2008, 09:04 PM
Excalibur only has one Splash Screen in ROM, that is the 0x600 part of the NBH. The second splash screen you see (windows mobile logo) is part of the OS ROM, so you have to cook the OS ROM to change that, most probably it's called welcomehead*.png file in \windows\ folder.

weird.... i don't have that file and i've checked EVERY SINGLE IMAGE FILE i could find in the /windows root directory and none of them are the 2nd boot screen that i see.
this is the second boot image i see:

http://i36.photobucket.com/albums/e21/pudgedaddy/WM6_Logo.png

i have basically made a reg hack to include another boot screen, but it ends up giving me 3 boot screens. 1, first boot screen from your nbimg proggy, 2 the windows boot screen (shown above) 3, my other custom boot screen (using reg hacks) ... so i really don't know where this image would be located, but i figured since this was a cooked (kavana 6.1) ROM, that the OS boot image could have been omitted and instead a second flash .nbh image was used to emulate the 2nd ( OS BOOT) image.

Liferepeat
03-08-2008, 11:53 PM
Prof

You have already proved your talent. So let's cut the crap and concentrate on bricking and unlocking the thing as well as find how to operate the iGO on it.
Cheers genious.;)

pof
04-08-2008, 12:35 PM
@pudgedaddy: This is for sure inside the OS rom, not a NB splash screen.
@Liferepeat: wtf?

pudgedaddy
05-08-2008, 05:48 PM
@pudgedaddy: This is for sure inside the OS rom, not a NB splash screen.
@Liferepeat: wtf?

you have any idea how i might change that screen then?

pof
06-08-2008, 10:36 AM
you have any idea how i might change that screen then?

Look in \windows\ for a Hidden file named "welcomehead.96.png". To change it on a running ROM you need a decent file browser like total commander, won't work with the default windows file explorer. Format is PNG and size cant exceed about 100Kb.

mbarvian
09-08-2008, 08:30 PM
what do we put in for device_id for kaiser?

mbarvian
09-08-2008, 09:44 PM
after doing this:

nbimg.exe -F splash.bmp

nbimg.exe stops responding

what now?

natong
18-08-2008, 12:56 PM
how to calculate padding size ?

mccune
12-09-2008, 03:22 PM
after doing this:

nbimg.exe -F splash.bmp

nbimg.exe stops responding

what now?

I had the same problem when I wanted to convert a BMP other then 24 bits. Might be your problem as well :)

----

I'm having a problem with my splash screen. It's completly white.
Used the tool from the first post to convert from BMP to NB.
After this I've used NBHUTIL to convert from NB to NBH.

One thing that happend was when I wanted to cook the NB file into my persnal ROM I got the message "File is larger than default, do you want to continue?". I chose "Yes". Thought it might be bigger because I used a different BMP.

Of course I flashed my device and now I can't get rid of the white screen.

This is what I've tried to fix it:
- hard reset
- flashed with users boot splash from this topic.
- flashed completly different ROM
- HardSPL again
- flashed with new ROM again.

Hope somebody can help me out here...

Small update:
My device: Touch Diamond (MDA Compact IV)
In another thread somebody told me to use the SplashTool. This seems to be for qVGA devices but I tried it anyway.
No positive result so far.

mccune
13-09-2008, 01:46 PM
Update after one day.

I did discover what I must have done wrong.

For the splash screen I used a BMP file with dimensions 640x640 instead of 480x640.

The HTC ROM Tool gave the following message when I selected the NB file:
"Size of this file is greater than default. Do you want to assign this file?".

Since I thougt it was Ok I selected Yes.

I've tried multiple solutions but I just can't seem to get rid of this white splash screen :(
Also tried extracting an original splash screen and rebuild it to flash my device. No changes so far.

There are multiple topics about splash screens, so I was wondering where this problem should be placed?

So far I found the following topics:

Change Splash Screen (Diamond section) (http://forum.xda-developers.com/showthread.php?t=404449)

htc rom tool: new software to deal with ROMs (NEW RELEASE 1.1.0) (http://forum.xda-developers.com/showthread.php?t=311909)

I guess I will continue in the HTC Rom Tool thread since this is probably where I screwed up big time.

Moved this problem to THIS (http://forum.xda-developers.com/showthread.php?p=2635380#post2635380) thread.

UPDATE: Problem solved!! Downloaded the latest HTC ROM Tool and rebuild my ROM using the original Splash screen. I'm one happy camper now :D

ilkhan
18-09-2008, 02:53 AM
will this work for the CDMA diamonds?
What would the -D -S and -T arguments if so to go direct to .nbh?

bennec83
19-09-2008, 01:59 PM
When i run the exe nothing happens, a small windows flashes up and disappears instantly.

I have my bmp created but this doesnt seem to work for me

please can someone tell me how to use this?

freddy_krueger
24-09-2008, 11:43 PM
When i run the exe nothing happens, a small windows flashes up and disappears instantly.

I have my bmp created but this doesnt seem to work for me

please can someone tell me how to use this?

For me , same problem , i'm under vista 64sp1 and when i launch your program, it open window and close it immediately :o

I'm so sick , this app appeared too great

tussi4711
03-10-2008, 07:58 AM
hi all,

interesting thread. As interesting, that I had to play a bit, because the magenta splash screen makes me sick. Oh, got my raphael today, flashed it with German HTC rom and still kept the t-mobile splash.

I took the org HTC logo found in the HTC rom, made a 480x640 image, converted it and let it run onto my new toy. Nothing went wrong and magenta is history. ;-)

might be someone of you will check the file, just to be sure, that there is nothing wrong.

many thanks to all.

cheers

tussi4711

jlito
16-10-2008, 07:33 PM
First of all, thanks pof for this great tool, it really makes things easier...

Unfortunatelly I'm having some difficulties in getting this done. When I create the nbh file it keeps prompting that the file is too big and it turns out to be useless when I try to flash it.
Please, can you help me get this done with the right parameters ?

by the way, my phone is an elfin.

thank you.
-----------------------

nevermind, I ended up figuring out how to make it work....

the_maker
23-10-2008, 02:37 AM
Hi Pof, i have a tiny question, i hope u can help. First i don't remember if on the first boot screen where it shows the R; G & D numbers, there is also an red H (just H). i had a problem of some sort, and now i have very low speaker quality, i don't know why :( and since then, i noticed the red H..

Can u help me? Thanks..

Thimo83
25-11-2008, 10:03 PM
Im trying to maken my own splashscreen for my Elfin.

I used nbimg to convert a .bmp to .nbh

I tried the following command:

nbimg -F EARTH2.bmp -D T-MOB003

But when i try to flash the .nbh file with RUU, it is giving ERROR 228 (Invalid File Size).

The original splashscreen filesize is 192kb and the nbimg output .nbh file is 256kb.

My question is, how to change the filesize to 192kb?

Thanks in advance.