NBIMG Customize Boot Splash for HTC Device on Linux

  1. What is Boot Splash
  2. Boot Splash is a static image appear at first time a "smart" phone booting. This is different with bootanimation, by default bootanimation appear after boot splash.

  3. Boot Splash Tools for "htc device"
  4. HTC Released a tools to produce boot splash named nbimg (AFAIK this is binary for windows machine) and a blogger POF released a code nbimg (for Linux) on his sites POF.HQ , he also released the code repository on Poliva / nbimg Github.com

  5. Build up Boot Splash tools
    • Open terminal
    • Download nbimg Tools from Poliva / nbimg Github.com and save to your /home/user/folder (or somewhere else)
    • $ cd ~
      $ git clone https://github.com/poliva/nbimg.git
      Cloning into 'nbimg'...
      remote: Counting objects: 46, done.
      remote: Compressing objects: 100% (33/33), done.
      remote: Total 46 (delta 15), reused 42 (delta 11)
      Unpacking objects: 100% (46/46), done.

      There will be a folder named nbimg
      $ cd nbimg
      $ ls
      LICENSE Makefile README.md nbimg.c

      There is one C file named nbimg.c ( This is a source code need to be compiled with gcc to be am executable binary file )... let's go and run :
      $ gcc nbimg.c -o(this is letter o not zero) nbimg
      $ ls
      LICENSE Makefile README.md nbimg nbimg.c

    • Manage nbimg tools
    • Ref to above, location of nbimg file is in /home/user/nbimg. It's no problem to keep in current folder location. However every time we are going to use the tools, we must put all stuff in this /home/user/nbimg folder. It's good idea to maintain whole system into standard state and no bothering the update of system.
      In my situation where I have a folder /home/user/bin ... in bin is in my path and I put all non standard system executable files like android tools : repo, split-bootimg.pl, unpack-bootimg.pl, mkbootfs, mkbootimg ... etc ... etc , thus for me will be better to move nbimg executable from /home/user/nbimg to /home/user/bin thus I can call and run nbimg from any where in the system
  6. Customizing a Boot Splash Image
    • Presumed location of executable nbimg in /home/user/nbimg
    • Grab a picture BMP image or make one up for the size of your screen resolution device i.e 540 x 960 ( htc sensation size ) save as *.bmp with options 24 bits
    • Put *.bmp image into /home/user/nbimg : let say file name is splash.bmp
    • Fun begin
    • $ cd /home/user/nbimg
      $ ls
      LICENSE Makefile README.md nbimg nbimg.c splash.bmp
      $ ./nbimg -F splash.bmp
      === nbimg v1.2.1
      === Convert IMG/NB <--> BMP splash screens
      === (c)2007-2012 Pau Oliva - pof @ xda-developers

      [] File: splash.bmp
      [] No padding added. Check file size.
      [] Encoding: splash.bmp.nb
      [] Image dimensions: 540x960
      [] Adding HTC splash screen signature
      [] Done!

      $ ls
      LICENSE Makefile README.md nbimg nbimg.c splash.bmp splash.bmp.nb

    • To check other many options on nbimg command, please run on terminal
    • $ ./nbimg [enter]

      === nbimg v1.2.1
      === Convert IMG/NB <--> BMP splash screens
      === (c)2007-2012 Pau Oliva - pof @ xda-developers

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

      Mandatory arguments:
      -F Filename to convert.
      If the extension is BMP it will be converted to NB/IMG.
      If the extension is NB/IMG it will be converted to BMP.
      Optional arguments:
      -w Image width in pixels. If not specified will be autodetected.
      -h Image height in pixels. If not specified will be autodetected.
      -t Manually specify the padding pattern (usually 0 or 255).
      -p Manually specify the padding size.
      -n Do not add HTC splash signature to NB file.
      -s Output smartphone format (for old WinCE devices).

      NBH arguments: (only when converting from BMP to NBH)
      -D Generate NBH with specified Model ID (mandatory)
      -S NBH SignMaxChunkSize (64 or 1024)
      -T NBH header type, this is typically 0x600 or 0x601

    • Now copy/rename file splash.bmp.nb into splash.img $ cp splash.bmp.nb splash.img
      $ ls
      LICENSE Makefile README.md nbimg nbimg.c splash.bmp splash.bmp.nb splash.img
    • splash.img is flashable image into the device
    • Finished
  7. Flashing boot splash image into device
  8. ATTENTION
    • A Device must be S-OFF to enble to be flashed safely
    • You have fastboot excutable live in your pc
    • Fastboot usb drivers properly set up in your PC
    • Boot your device into fastboot state( most device by push power and volume down buttons simultaneously )
    • Connect the device into PC via USD
    • Flash via fastboot command
    • $ fastboot flash splash1(This is name of a partition in the device) splash.img
      sending 'splash1' (1012 KB)...
      OKAY [ 0.165s]
      writing 'splash1'...
      OKAY [ 0.352s]
      finished. total time: 0.516s

      $ fastboot reboot

    • Your device should be rebooting with New Boot Splash
    • FINISHED ....

Subscribe to receive free email updates: