[release] nbimg: HTC splash screen tool

Search This thread

pof

Retired Moderator
Mar 18, 2005
3,571
72
42
Barcelona
pof.eslack.org
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).

Code:
=== 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:
Code:
$ ./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:
Code:
$ ./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.
 

Attachments

  • nbimg-1.0.zip
    9.6 KB · Views: 10,959
  • nbimg-1.1win32.zip
    10.7 KB · Views: 37,309
Last edited:

pudgedaddy

Retired Moderator
Nov 6, 2006
923
5
Broken Arrow, OK
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...
 

pudgedaddy

Retired Moderator
Nov 6, 2006
923
5
Broken Arrow, OK
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

Retired Moderator
Mar 18, 2005
3,571
72
42
Barcelona
pof.eslack.org
Use any tool available to create NBHs, for example HTC Rom Tool. To flash your custom NBH file you'll need USPL or HardSPL installed on your device. Also for Excalibur specific instructions look [url="http://forum.xda-developers.com/showpost.php?p=2366103&postcount=13]here[/url], because you'll need to add the smartphone signature manually.
 

pudgedaddy

Retired Moderator
Nov 6, 2006
923
5
Broken Arrow, OK
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

Retired Moderator
Nov 6, 2006
923
5
Broken Arrow, OK
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
 
Last edited:

sean222

Senior Member
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!?
 

Attachments

  • Vogue_Stock_bootsplash.zip
    582.7 KB · Views: 613

pudgedaddy

Retired Moderator
Nov 6, 2006
923
5
Broken Arrow, OK
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
 
Last edited:

pof

Retired Moderator
Mar 18, 2005
3,571
72
42
Barcelona
pof.eslack.org
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.
 

farukb

Senior Member
Jul 26, 2007
1,096
155
Sarajevo
mucas gracias...or something like that:D

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

thanks for the update
 

Top Liked Posts

  • There are no posts matching your filters.
  • 27
    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).

    Code:
    === 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:
    Code:
    $ ./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:
    Code:
    $ ./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.
    2
    @Sneakyghost: the '-s' flag is only for use in old non-touchscreen phones (example: htc vox, htc wings...). Now we call everything a "smartphone", but HTC made a difference between "smartphones" and "PocketPC phones" a few years ago when I wrote this tool :) In modern phones, like HTC Leo, you should not use the '-s' flag.
    1
    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.
    1
    I am also trying to get something simular done, but I am looking for the application to make the .nbh file. I did get a copy of htcrt.exe but it doesnt have the LEO inside, when I try to update it says I have an internet connection issue (I dont, I am posting now then ;)

    I only got my HD2 2 days ago and this is all new to me. I have managed to flash custom radio's and ROMS's but now I want to make my own boot screen and flash that.

    Please help.

    Here are the LEO XML Details for NBHUtil XML.

    <device name="Leo" chunksize="64">
    <ModelID>PB8110000</ModelID>
    <CID>HTC__E11</CID>
    <Ver>1.43.leo</Ver>
    <Lang>WWE</Lang>
    <Item value="0x200">SPL</Item>
    <Item value="0x301">Radio</Item>
    <Item value="0x400">OS</Item>
    <Item value="0x500">Diag</Item>
    <Item value="0x600">Splash</Item>
    </device>

    If you are using HTCRT.exe then you should search for same parameters in ini format. :)
    1
    Mac version

    Here's a compiled version of nbimg for OS X. I compiled this on an Intel-mac running Leopard (10.5). I can't guarantee it will work anywhere else, but I think it should.

    Of course if you don't trust my compile, people can compile for Mac using the following command after downloading the Linux source code:

    gcc -o nbimg nbimg.c