NokiX

Name

NokiX

License

BSD-2

Homepage

http://sourceforge.net/projects/nokix/

About

NokiX is one of my biggest projects so far. Shortly, it is a modding tool for old Nokia mobile phones firmwares (3210, 3310, 5110, 8210 series, etc.). Final version came with a lot of ready patches introducing new features, applications and even games to these otherwise limited devices. A development kit with integrated editor and compiler and an extensive documentation was also released. NokiX was always a free application, the source code is available for free.

Current status

NokiX isn't actively developed by me anymore. After a number of server changes, its home is located at:

http://sourceforge.net/projects/nokix/

Although I remain in the group of developers, the project is being maintained mainly by some of the most active former NokiX users.

Early days

I got interested in the innards of the Nokia DCT-3 devices after I got my second phone from the series, a Nokia 3310. One special thing about this model is that it had a twin brother on the Asian market, a Nokia 3315. Both phones were using the same hardware but 3315's firmware had some additional functionalities. A firmware upgrade was rather simple and encouraged me to learn more about the way these phones work.

As it turned out, there was a vast amount of information on the web and a number of simple programs for customization of the firmware. Most of them were rather simple programs changing the data parts (built-in bitmaps, ringtones, etc.) but one of them, g3n0lite, really stood out.

g3n0lite was special in that it inserted a new code and patched the firmware to run when appropriate. The whole thing was very low-level of course, the inserted code was written directly in assembly. Main developer of g3n0lite, g3gg0, has even coded an assembler for this purpose, called ARMada.

I started my own contribution to the modding scene by writing patches for g3n0lite. One of the most known being the "True 7 bars" patch which replaced the standard 4 battery and network strength bars with 7 on a number of compatible phone models. In these early days, I didn't knew enough to come up with required modification to make such a patch on my own so it was rather an automation script based on work of the others. Later, as time went on, I learned a lot more and was able to program my own patches from scratch.

Soon enough, g3n0lite started to constrain me. Writing larger patches was rather difficult and time consuming. This discontent grew in me up to the point when I decided to write a replacement for g3n0lite with much more extended capabilities. And so, NokiX was born.

Principles

NokiX

The main principle NokiX is based on is the use of a scripting language to write patchers that insert/modify code and data in the firmware. Back then when I was deciding which one to go with, the best choice seemed the REXX from IBM (today I might have chosen something different). The actual interpreter used in NokiX is an open-source REXX interpreter called Regina.

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

First patches were just a rewrite of the original ones for g3n0lite, both mine and created by other members of the community. Initially, the assembly code the patchers inserted into the firmware were still written in ARMada and converted to REXX using special conversion tool I provided.

As the patches grew in size it was soon clear that there is need for some mechanism allowing to move common parts out of the patchers into a single file. Luckily, REXX allowed this. We called these separate scripts macros and they could be recognized by a standard REXX rx extension (as opposite to the nrx extension of the patchers).

Over the time quite a lot macros were created that greatly simplified development of patches. But this was just a first step. The ARMada assembler was replaced by gnu as which, as some may know, accepts the output of gcc compiler. This opened the way to finally write the patches code in a high-level C language. Of course the REXX was still there, taking the job of locating Nokia's functions in the firmware, inserting the new code, linking it and hooking where appropiate.

Software Development Kit

A bundle of as, specifically modified gcc and VisualHam, a source code editor originally written for GameBoy Advance programmers, formed the NokiX SDK. Accompanied by a proper documentation of almost all known firmware functions and REXX macros, it is a complete development environment ready to create new applications and games.

VisualHAM

The SDK was accompanied by 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 is an incomplete list of applications and games I've created for DCT-3 phones, including screenshots. This list does not include patches modifying existing phone features (besides the 7 bars patch).

3D Maze

A raytraced labirynth game in 3D.

3DMaze-1 3DMaze-2 3DMaze-3

Breaker

Breakout game clone featuring a very smooth animation.

Breaker-1 Breaker-2 Breaker-3

Calendar

User friendly calendar replacement.

Calendar

File System and File Manager

Port of a flash memory based TFS file system with a graphical file manager.

FileManager-1 FileManager-2

Plotter

Mathematical functions plotter with support for many functions (ported from libm).

Plotter-1 Plotter-2

Screen Saver

A customizable, animated screen saver with a digital/analog clock.

ScreenSaver-1 ScreenSaver-2 ScreenSaver-3

Stones

A tic-tac-toe alike game. First NokiX game ever.

Stones-1 Stones-2 Stones-3

True 7 Bars

Increased number of battery and signal strength bars, from 4 to 7.

True7Bars

Links

http://nokix.sourceforge.net/help/SDK/index.html

Online NokiX SDK Documentation

http://nokix.sourceforge.net

Copy of the old NokiX homepage. Now for archival purposes only.