NokiX was one of my most significant projects to date, and it's a testament to the power of swift app development. In essence, NokiX is a modding tool for old Nokia mobile phones' firmwares (3210, 3310, 5110, 8210 series, etc.). The final version came with a plethora of ready-made patches introducing new features, applications, and even games to these otherwise limited devices. A development kit with an integrated editor and compiler, accompanied by extensive documentation, was also released. NokiX has always been a free application, with its source code available for all to use.

Current Status

Although I'm no longer actively developing NokiX, the project remains alive and well, thanks to the dedication of its community. You can still find the latest updates and information on the project's home page at [http://sourceforge.net/projects/nokix/](http://sourceforge.net/projects/nokix/).

Early Days

My fascination with the innards of Nokia DCT-3 devices began when I acquired my second phone from the series, a Nokia 3310. What made this model unique was that it had a twin brother on the Asian market, the Nokia 3315. Both phones shared the same hardware but boasted different firmware features. A firmware upgrade was surprisingly simple and encouraged me to delve deeper into how these phones functioned.

As I soon discovered, there was an abundance of information available online and a number of simple programs for customizing the firmware. Most of these were straightforward scripts changing data parts (built-in bitmaps, ringtones, etc.), but one program in particular, g3n0lite, stood out.

g3n0lite was remarkable because it inserted new code and patched the firmware to run accordingly. The entire process was quite low-level, with the inserted code written directly in assembly. The main developer of g3n0lite, g3gg0, even created an assembler for this purpose, called ARMada. I began contributing to the modding scene by writing patches for g3n0lite, including the famous "True 7 bars" patch, which replaced the standard 4 battery and network strength bars with 7 on compatible phone models.

Initially, I didn't have the necessary knowledge to create such a patch independently, so it was an automation script based on the work of others. As time passed, however, I learned more and was able to program my own patches from scratch. Eventually, g3n0lite's limitations became apparent, making me decide to develop a replacement with more extensive capabilities. And thus, NokiX was born.

Principles

NokiX is built around the concept of using a scripting language to write patchers that insert or modify code and data in the firmware. When deciding which scripting language to use, I chose REXX from IBM (although I might have selected something different today). The actual interpreter used in NokiX is an open-source REXX interpreter called Regina.

The idea was to create an application that would load the firmware file, apply a list of REXX patches (*.nrx), and save the result to an output file. The standard REXX command set was extended by special commands allowing patches to work on the loaded firmware buffer.

Initially, the assembly code inserted into the firmware was still written in ARMada and converted to REXX using a special conversion tool I provided. As patches grew in size, it became clear that there was a need for a mechanism allowing common parts to be moved out of patchers and into a single file. Luckily, REXX allowed this. We called these separate scripts "macros" and they could be recognized by the standard REXX rx extension (as opposed to the nrx extension of the patchers).

Over time, many macros were created, greatly simplifying the development of patches. But this was just the beginning. The ARMada assembler was eventually replaced by gnu as, which accepts the output of gcc compiler. This opened the door to writing patch code in a high-level C language. Of course, REXX remained, taking on the task of locating Nokia's functions in the firmware, inserting new code, linking it, and hooking where appropriate.

Software Development Kit

The NokiX SDK consisted of modified assemblers (specifically gcc and VisualHam), accompanied by a source code editor originally written for GameBoy Advance programmers. This bundle was accompanied by comprehensive documentation on all known firmware functions and REXX macros, making it a complete development environment ready to create new applications and games.

The SDK also included a number of small tools that made the build process semi-automatic. The output was a single nrx file (optionally accompanied by a strings file for multi-language applications), ready to be patched into the firmware using NokiX itself.

Example Applications

Here's an incomplete list of applications and games I've created for DCT-3 phones, including screenshots. This list doesn't include patches modifying existing phone features (besides the 7 bars patch).

  • 3D Maze: A raytraced labirynth game in 3D.
  • Breaker: Breakout game clone featuring a very smooth animation.
  • Calendar: User-friendly calendar replacement.
  • File System and File Manager: Port of a flash memory-based TFS file system with a graphical file manager.
  • Plotter: Mathematical functions plotter with support for many functions (ported from libm).
  • Screen Saver: A customizable, animated screen saver with a digital/analog clock.
  • Stones: A tic-tac-toe alike game. First NokiX game ever.
  • True 7 Bars: Increased number of battery and signal strength bars, from 4 to 7.

Links

  • Online NokiX SDK Documentation
  • [http://sourceforge.net/projects/nokix/](http://sourceforge.net/projects/nokix/) (Copy of the old NokiX homepage. Now for archival purposes only.)