ULTIMATE TUTORIAL FOR CREATING NOKIA CUSTOM FIRM WARE

The Ultimate tutorial, Look no further:

this tutorial will allow you to customise your own cfw or anyone else's cfw as you please,

Tools needed:
1.Nokia Cooker or any other firmware editor
2.Sis Contents

THIS IS A VERY IMPORTANT ANNOUNCEMENT

We need only three files (actually only two) to make cfw work!
They are:
1.CORE
2.ROFS2
3.ROFS3

The third file - rofs3 also you can ignore if you have added all the files to rofs2 but once I have observed first boot problem, else if you have not missed a single file and all is perfect, then CORE and ROFS2 should be enough for a successful flash I think, I maybe wrong, but i got successful flash

No need of Uda,
No need of rofs3
No need of RM596_APE_ONLY_ENO_11w15_v0.148.fpsx

You will not notice any much difference if you flash without these extra files
You will get more or less same result if your cfw is perfect
Only difference you will feel is first boot will take a few seconds longer!

But I recommend you to flash with four files:
1.CORE
2.ROFS2
3.ROFS3
4.UDA

5.16G MMC file also you can flash but remember it will erase your E drive if you click on refurbish
So you must select software update in case you want to retain your data

Why do I recommend these four files for all,
Because when you leave out either UDA or ROFS3, then sometimes you may end up with a buggy phone,
Some have reported such issued like very long booting times and menu not working and so on...
But hey, you can get it to work if you try...thats the truth


Modding UDA:

Before we start I hope everyone has downloaded the firmware of his choice from navifirm,
If not see here for more steps,
It has all the steps for a perfect flash and permanent hack

Firstly we shall begin with the UDA,
The Uda is a content file, all its content goes to the C Drive of the phone,
If you know little you will also know that the C drive is formatted and data is restored from Z(rom) drive every time we do a factory reset,

Now the first mod is, how to achieve 240+ free mb in UDA (for N8) total available space is 256 in N8
If you have C7 or any other S^3 mobile you will get more space like if C is 512mb then 500 mb+ will be free.

There is two ways to achieve this,
One is to flash without the UDA,

And other way is to delete all files..from UDA
Note you can also mod the uda but mind you, all mods will go after hard reset because it restores data from Z whose files are from core(rofs1),rofs2 &rofs3.
So thats why it is necessary to mod the rofs files

How to achieve this is very easy, open Uda In nokia Cooker and select all files and folders,
You will see six folders, after selecting all the files and folders click on delete
You are done

Same way we can add files also,
Just drag and drop into the nokia cooker window to add your files into their respective folders, and save it.

[New] Further notes:
Modding the UDA is greatly useful if you want to add apps which can be installed in C only,
But they will remain only untill you hard reset it..
So you can add your apps like QT and Quick Office, Opera Mobile etc etc which will need frequent updating to your UDA

You can remove UDA if you want:
In my opinion, this UDA modding is completely useless in case you dont have any apps to be pre installed in C
I would say to remove UDA from your cfw,
This will help you to reduce the number of files in your cfw to three

[New] Modding the 16G Mass memory file:
Why do we need this useless talk you might say?
This file is useful for including games and other apps which occupy lots of space and are to be installed in mass memory,
More information and steps are included in the last post in backups!
Mind you,
You will need to add the corresponding exe files to sys/bin folder in the C drive too (aka UDA) and other files which get copied in private or other folders in C too, if you want the apps and games to work from E just after flash!

Also you have to remember it will erase your E drive if you click on refurbish
So you must select software update in case you want to retain your data



Next is CORE and Rofs2/Rofs3 editing:

First we some important knowledge on CORE and rofs

Max size limit for Core is 160 mb approx (maybe little less like 159.something or so after rofs1 expansion is carried out in NFEcore2)
and
Max size limit for rofs2 and rofs3 after editing,
59.25 MB for ROFS2 and 15MB for ROFS3

As quoted in this post and here it is confirmed
Its also been quoted in many other places, I could find this one only

Core files also contain the rofs1 files

What is core?
core consists of uboot.img, rom and rofs1 ....what are the other two? See here for more
The core files of S^3 are usually 125mb approx,
And usually about 90 mb will be rofs1 (it has same folders like sys, private, resource etc...)
Rest will be uboot and other information which we cannot edit,
Its somewhat hard coded,
You will get a better idea when you try to open it in NFEcore2, youd find that only 90 mb is rofs1, rest of the 35 mb is not editable...

Get NFEcore2 by Doctorly's

This tool as described in the thread can be used to edit CORE/ROFS2/ROFS3.

So as I was saying, the core file(rofs1 files) will be same for all the product codes (most of them if not all) of the same software version..
Say I downloaded two product codes of PR2.0 N8 v22.014 of 0599255 india black and 0589877 say angolia white
Note that even though both product codes will be of different regions, they will have the same core file,
Because they have the same version number.
But their rofs2 and rofs3 may differ, sometimes as much as by 20mb (rofs2) in size depending on the languages they carry.

So what do the comprise of?
Rofs1 in core comprises of all the files of the OS, including all OS app files like dialer, contacts, menu, etc etc
Rofs2 Comprises of the settings and mods files of the CFW's and the language files (r01/r02 etc)
Rofs3 is usually empty except for a few files,
Only for those product codes which are released by operators will have rofs3 with anything in it..
Else it will be only a few kb

What can you add to rofs1/2/3?
Whatever you add to core would be over written if the same files exist in rofs2 or rofs3
why?

The priority to the rofs1 2 & 3 goes something like this

Priority: rofs1(core) then rofs2 > then rofs3
so the final final version of abc.txt in rofs3 will overwrite the files copied by core and rofs2

Some one said that it does not over write but it simply ignores the files if that file is present in rofs 2 and rofs3
Ie the flashing is like rofs3 first then rofs2 and then core,
if the files are already present in rofs3 then it will ignore those files when it flashes rofs2 and core:
Every of them has flash space on phone.
for exampe:
1000-1300 ROFS1
1300-1600 ROFS2
1600-1900 ROFS3
the phone reads from third to first.
if the file exists on ROFS3 it ignores the file in ROFS1.
try to rename the file ROFS3 to ROFS2 and ROFS2 to ROFS3
you will see original ROFS3 will always "overwrite" it.

I dont know how far this is true, I dont work in nokia so I just dont know how it goes.

So as I was saying,
What can you add to the core?
You can add apps and mods whatever you like,
But make sure the same files are not present in rofs2 and rofs3

I would recommend you to add apps like maps/qt etc etc
But still it is important to verify whether each of the files in those apps are unique and do not contain any cenrep files from the BE9 folder (described below)
or any other files,

You can move the ring tones from rofs2 to core, which will give you more space in rofs2,
So you can add stuff there instead of the core,

Will apps work from CORE?
Yes, but you have to check and verify if any files are overlapping in rofs2
I personally tested Nokia Maps, and the recommended apps which I have attached below, all of which worked
Note: Maps would work if QT works in your phone

What about ROFS2 then?
You can put all your apps in core and the important mods in rofs2
{You can flash without rofs3 altogether if all files are in rofs2 itself, So now core behaves like your rofs 2 and rofs2 becomes rofs3 (theoretically)}

I recommend you to add all the mods to rofs2/rofs3

Now you might ask,
Why nokia chose to make rofs3 when all can be done by editing rofs2 itself? why do they have to make life difficult for us right?

Rofs3 is for the operators to add their files and software,
Then why separate file? because rofs3 is a very small file, it takes less bandwidth and think if there was only rofs2, then operators would have to mod entire rofs2 and every single operator would have separate rofs2 and this will make only a few mb requirement to multiply ten times or more,
So to avoid this bandwidth wastage, its made like this, so now nokia just has to take rofs3 files from every operator and flash their devices before they sell it to you


Maximize space in your ROFS2 & ROFS3
Lets say you are facing space problems, ie, you have reached the maximum limit of 59mb for rofs2,
How to maximize space in your ROFS2 & ROFS3?
Look here
What fataqui wrote:
ROFS2 application (exe) and shared (dll) libraries are not compressed with PETRAN. Also many retail applications (exe) and their shared (dll) libraries are also not compressed by default. So before building your ROFS2 or ROFS3 files make sure you run them through PETRAN so you maximize your ROFS2 or ROFS3 file space. This way you can add many more applications to your ROFS2 or ROFS3 file without running out of space... please check back later for an example on how to do this.

Example...
Before petran compression...
OVI Maps 3.06 (637) english only, default size (not all exe, dll files compressed) = 11.6 MB (12,179,312 bytes)
After petran compression...
OVI Maps 3.06 (637) english only, compressed size (all exe, dll files compressed) = 10.7 MB (11,286,311 bytes)
Overall Space Saved = 893.001 bytes (almost 1MB of space saved)
Nokia File Compressor


Finally we are in the best part of the topic,
How to mod the CORE & rofs2/rofs3
(enough of all that knowledge already right?)

well here it goes:

The procedure is very simple:

Before modding rofs2 or rofs3 we need to calibrate core because if we dont, we will get this checksum error,
Our Daily Mobile member Doctorly had found a bug in nokia firmwares few months ago that we can flash modded if we calibrate the core to 2c

How to achieve this:
I think there are many tutorials which will tell you this,
But I shall post for your convenience
These steps taken from witchers tutorial:

Calibrate the core using NFE Core 2 (Many many thanks to nicesoni_ash, without him i would've been stuck with a dead phone after flash with modded rofs files)
Make whatever changes you want by opening the files folder in NFEcore2 install folder

Open NFE Core 2
Download it here

#1 Click on the "Open" button and select the core file to be calibrated
#2 After the file is initialized click on the "ROFS calibration" button
#3 A popup window appears, change all values to "2C"
#4 Click on "Apply"
#5 Click on "Exit"

Note for those who wish to MOD the CORE:
Those of you who want to mod the core can continue to do so before you click on exit, after step four above,
Click on unpack and make your changes inside the rofs folder in NFEcore2 installed folder,
If needed you can click on EXPANSION ROFS1 and this will increase rofs size by 20MB approx, so you can add your apps also,
Then after you've made all your changes, Click on repack
Go to the Repack folder inside NFEcore2 installed folder and there you will have your new modded CORE file



Once this is done you are good to go!

1. Open the rofs file you want to mod, in any firmware editing program (I am using nokia cooker, it works well for rofs and uda files)

2. First extract all the mods you will find to a separate folder lets call that folder rofs for now
So some mods will be from 10202be9 folder in private some will comprise of the sys folder,
some from system and some from resource etc etc..

NOTE:
Some mods are in sis format,
You will have to extract them using sis contents (posted below) into your desired folder before copying them into rofs.

3. Now once the mods are extracted you just have to drag and drop them to the opened firmware in nokia cooker thats it.

4. Click on repack.

5. Test by flashing it.

Lateset Phoenix get here from my thread
You can use other flashers too if you want but there are not many tutorials for other flashers

IMPORTANT (Im shouting)
Now you people will say I getting some wierd checksum error when I mod rofs2, why does that appear?
Answer is, follow this tutorial by witcher carefully and you will never get checksum error in your life
There are millions of tutorials there in this forum and other blogs in the worldwide web,
So please save me and many other members the pain of answering silly questions regarding how to flash, and errors regarding flashing process,
I hope you who read this wont spam this thread with such questions

Next add apps to rofs so they work directly from Z drive!

This is quite simple:
1. Download siscontents from You are not allowed to view links. Register or Login or anywhere else there are tonnes of links in google
2. Just open the sis files of the apps you need and click on extract
3. Copy paste the files into their respective directories

Done,

this sounds too easy doesn't it,
But it isnt, some apps do not work from Z, because they need to create files in C for instance,
All the autostart apps will also not work perfectly, for that you need to add the to the startup file,
Some will prevent others from working,
So you need to flash and check every single time to make sure,

For now these apps working in Z (just copy paste)
1. Kill me 1.36
2. Filebrowser from coderus
3. Easy keylock modded icon (no sound)
4. Tweaks 1.12
5. Memcheck v0.05
6. Rompatcher 3.1 with autostart from nicesoni_ash
7. I have not checked any more yet for compatibility yet

Even for rompatcher we need a startup file..

All these apps I recommend for your CFW because they are essential,
I have extracted and attached them so all you have to do is extract this folder and copy paste it (drag it) into the rofs folder using nokia cooker and repack!
youre done

List of apps which work from Z on s60v5; some may work some wont

How to edit apps so that they work from Z:

Its not as simple as adding apps to the firmware,
This time you will need the resource editor(see below) and few other tools,
I cannot explain everything but I shall give you an example how I edited one app,

I recently edited the camera update app for N8 to work from Z,
If you just copy paste it, it gives system error when you try to open it,

So I opened the registry file of english language(.rsc and .r01 files) and edited it and renamed all dependancies in C to Z
Meaning, files which were referenced from C were now being referenced from Z


Now dont ask me how to use it, I cannot explain everything,
Perhaps it would be good if you'd befriend google at such times


To remove useless built in apps from the Firmware:


Nokia FW Cleaner 3.0

Note: that since this is an application developed to work with s60v5 phones, it will surely miss out certain files,
So its best to know all the dependencies and remove the files one by one..
Same goes for other applications like NFE STDv0.3, Language tool, etc which are for s60v5..
Point is they work, but not perfectly as we may expect it to..

How to removing programs from the startup

There are two methods:
Method 1:

1.Hack your mobile and use hacked file browser by CODeRUS and copy paste this folder from the RAM "Z" drive:
z:private\2000d75b to E drive and load it to your pc
you will find four rsc files look inside all folders,

2.Now get ready to edit the .rsc files because in those files you will have all your startup apps
Download this Resource Editor
And open all of them in the app one by one

3.Now to remove apps, Just select the apps you want to remove and rename them one by one; then click on apply > Save as > same file name...


4.Save it to your rofs (1,2or3) in the very same folders like they were when you copied them

5.Flash

Done!

Method 2:
1.Second method is to open core using doctorly's tool, Copy same folder to any other drive and all other steps will remain the same


How to add apps with autostart to startup:

This method is to add those apps which have autostart

So lets begin:

1.Install the program you want to install first

2.Go through the C:\private and find where your app's startup is integrated,
Most of the time you will find it in the folder mentioned above in C drive though
C:private\2000d75b

3.Once you found it, add to rofs and flash

For adding apps which do not have autostart;
I dont know yet, Will update as soon as I know

If someone knows better he can help!

Now this post has come to an end, go to the next post, where we shall go into more detail about the modding part
Previous
Next Post »