Hack Your Own Nokia Theme

Thanks to Adam Freeman to point out in a comment that it's possible to create themes for Nokia phones with Nokia Theme Studio. But if you just want a quick and primitive Series 40 theme (a wallpaper, a screensaver animation, one highlight color, plus a midi ringtone) there's an even easier way: [Note: I am again using the Linux commandline and the Windows GUI in parallel here, don't let that confuse you.]

  1. Use PC Suite to view your phone's file system in the Windows Explorer ("My Computer"). Go to the Gallery > Themes directory. Nokia themes are stored as \*.nth files.

  2. Copy any Nth file to your harddrive as a template. Open it with a decompression tool (WinZip, GnuZip) — Nth is actually just a renamed Zip file, as the Linux file command reveals:
    > file YellowLace.nth 
    YellowLace.nth: Zip archive data, at least v2.0 to extract

  3. OK, you unzipped it and get four files. The theme's contents are in common formats (gif, jpg, midi and xml) and just ask for you hacking them.

    $ unzip YellowLace.nth 
    Archive:  YellowLace.nth
      inflating: theme_descriptor.xml    
      inflating: Worldly.MID             
      inflating: YellowLace.gif          
      inflating: YellowLace.jpg 

    The gif file is a graphic animation the size of an S40 screen which is used as the screensaver. The jpg file is a static wallpaper image of the same size for the background. The .MID file is a (seemingly normal) midi music file. More about the midi file later.

  4. The theme_descriptor.xml is a very short xml file that can be opened and edited in a plain text editor. You don't need to know much to be able to read XML: It's just key-value pairs.
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE theme PUBLIC "-//NOKIA//DTD THEME 1.0//EN" "theme.dtd">
    <theme name="Yellow Lace" version="1.0">
      <wallpaper   src="YellowLace.jpg"/>
      <screensaver src="YellowLace.gif"/>
      <ringtone    src="Worldly.MID"/>
      <colorscheme color="gray"/>

OK, now that we know the format, the hacking part is easy.

  1. Replace the midi, jpg and gif files by a midi song, a wallpaper and an animation of your own choice.
    • Make sure the size of the gif and jpg graphics fit your phone's screen (128x128). Compress the graphics, the less diskspace the files take, the better.
    • Reduce the jpg's contrast and increase it's brightness. Choose an image with few colors and not to many fuzzy details. Otherwise the wallpaper will look like something that rhymes with French pancakes.
    • Create a sequence of square gif files (image01.gif, image02.gif...) and turn them into a gif animation loop; in Linux, you'd e.g. use Image Magick for that:
      $ convert -scale 128x128 image\*.gif
      $ convert -delay 200 -loop 10 image\*.gif animation.gif
    • There are countless archives where you can download any midi song for free. Here's the catch: They are all plain run-of-the-mill MIDI -- but Nokia phones use SP MIDI. The SP MIDI format includes a header with priority information for sound channels, so a limited low-end device can skip playing low-priority channels. I used trial versions of two Windows tools, PsmPlayer to crop the long midi file and save it as SP MIDI, and MMSguru's MIDIscale to assign priorities. You can skip the priorities if your midi only has 4 channels or so. You can skip cropping if your midi file is short and starts with the main motive right away.
  2. Then, open the xml file in a plain text editor and replace the file name values by your files' names. Set the theme name to your theme's name. I don't know what colors exactly you can enter in the colorscheme field, but it takes plain words like orange and blue, just don't be too creative.
  3. Zip the four files into an archive. Make sure they are not in a folder in the archive. Rename the zip file 's suffix to nth.
  4. Copy you theme into the mounted phones Gallery > Themes folder...

That's it. :-) So just for example... \*digging around on my harddrive for images and midis\*... try this ... say... Nokia S40 "Tori Amos" theme. The Tori-in-a-crate sequence from the Little Earthqukaes cover art is too tempting for a 128x128 screensaver. The music is Winter: Perfect ringtone, since it uses only two channels, has no fancy instruments that the phone could distort, no percussion, just a straight but intelligent tune. If you have a S40 Nokia, try it and tell me whether it works for you. If you don't have a Nokia -- tsk, who cares? Download it, unzip it and listen to the midi while watching the animation in a webbrowser. ;-D

Soooo, what's next? I have 3 more midis for themes, Babylon 5, Firefly, Doctor Who, and one more tune I cannot put a name on. (Then there's also MacGyver, Knight Rider, Mission Impossible... But everybody has those midis already.) If you want one, this is your chance to vote, otherwise I pick one.


Kniht Rider please. Geertjan will be happy ;)

Posted by Lukas on June 29, 2006 at 09:33 AM CEST #

Doctor Who would be smashing.

Posted by guest on July 09, 2006 at 09:07 PM CEST #

Okay! Watch this blog this weekend. But I get to choose which Doctor Who. :-D

Posted by Seapegasus on July 13, 2006 at 06:01 PM CEST #

great info buddy...i was looking for a hack for theme studio and this is way better..thanks a bunch

Posted by turbo on July 15, 2006 at 06:10 PM CEST #

Post a Comment:
Comments are closed for this entry.

NetBeans IDE, Java SE and ME, 3D Games, Linux, Mac, Cocoa, Prague, Linguistics.


« July 2016

No bookmarks in folder