Creating a Custom Firmware - Walkthrough - Samsung i8910 Omnia HD User Forums 0){document.location.href='showthread.php?p='+cpostno;};} }">
 
i8910 HD Blog i8910 Omnia HD Firmware i8910 HD Themes Optimus 2X Forums Galaxy S Forums PSP Hacks PS3 Hacks

Go Back   Samsung i8910 Omnia HD User Forums > Samsung i8910 Omnia HD Discussion > Samsung i8910 Omnia HD Custom Roms / Cooked Roms

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-20-2010, 04:30 PM
Senior Member
 
Join Date: Aug 2009
Location: Kenilworth, UK
Posts: 122
Thanks: 19
Thanked 56 Times in 21 Posts
mwarner is on a distinguished road
Default Creating a Custom Firmware - Walkthrough

Following my experiences creating my Custom UK JB1 firmware, I thought I would share my experiences and knowledge with the rest of the community by outlining the process required to create your own custom firmware.

What we will need

Before we start, we will need to download some tools:

1. Codeneos' Rofsviewer utility. This will allow us to edit the firmware

2. Samsung's Symbian Flash Tool 1.50. This allows us to flash out phones with firmware without going through Samsung PC Studio 7.

3. A firmware to edit. There are a large selection to download from Pavel's Thread. At the time of writing I would suggest a JB1 firmware, e.g. XEJB1 SERJB1 Generic Russia.

Extract and place all your files in a folder structure, e.g. in C:\Samsung i8910\

Installing the software

Rofsviewer
Before starting it is wise to update to the latest version of the Rofsviewer tool. This can be done by selecting Updates from the menu. The latest version should automatically be downloaded and replace your current version.

Symbian Rom Flashing tool
Install msxml. This is required before the tool will function (it uses Microsoft's XML API to parse the XML files)

Understanding the Firmware files

Before we can create our own firmware, we need to have an idea of what the extracted firmware contains.
With released firmwares we will see a folder structure as follows:

- Modem_I8910xxxxxx
- PDA_Code_I8910xxxxx
- PDA_CSC_I8910xxxxx

Each folder contains information pertaining to the firmware.

- The Modem folder contains a .bin file which is the firmware's Modem controller code
- The PDA Code folder contains the main firmware file (e.g. JB1)
- The PDA CSC folder contains all the operator / language specific customisations & tweaks.

Generally there are three files that are important to us & editable. An example filename is shown below (the precise names can change depending on firmware):

- PDA_Code_I8910XEJB1\core\I8910XEJB1_XXE.rofs1.img

This is the Main firmware. If you want to modify any of the low-level functions or settings of the firmware, then this is where you need to look

- PDA_CSC_I8910SERJB1\rofs2\I8910SERJB1_UK_Custom.ro fs2.img
- PDA_CSC_I8910SERJB1\rofs3\I8910SERJB1_UK_Custom.ro fs3.img

These are the Custom parts of the firmware, containing the languages and customisations of the operator. If you need to delete operator specific applications, widgets or settings, this is where you need to look

- PDA_CSC_I8910SERJB1\CSC_I8910UKCJB1.xml
- PDA_Code_I8910XEJB1\CODE_I8910XEJB1.xml

These are the XML files that tell the ROM Flashing tool what files to flash, what they called, how big the files, their checksums and how big all the 'partitions' are in the phone (e.g. the C: drive is a partition in the main firmware where the phone stores programs and settings)

Performing a simple modification to the firmware

Currently, the easiest way to make changes to your firmware is to run RofsViewer, edit files in place in the tool and then recompile the firmware.

At the moment I would recommend that you copy the three main files (I8910xxxxx_xxx.rofs1.img, I8910xxxxxx_xxxxxx.rofs2.img, I8910xxxxxx_xxxxxx.rofs3.img) into the same folder as Rofsviewer itself (there is a bug in the version of Rofsviewer, as of writing, which can cause problems if you edit files in place)

Below we will change location of the web cache, moving it from C: to E:. Many such tweaks can be found in the Custom Firmware thread.

To do this we will need to change the file "private\10202BE9\101F8557.txt" so we point the cache folder to the E: drive rather than the C: drive.

1. Run Rofsviewer
2. File / Open two of these files (the rofs1 and rofs2). The file is present both in the main firmware, and also in the customisations. We had best change both of them!
2. Click on the Rofs1 file
3. In the search box, type 101F8557.txt and hit search
4. Double click on the file to edit it & change the cache folder entries from "c:\\system\\cache" to "e:\\system\\cache"
5. Click on Save in Notepad
6. Rofsviewer will notice the change and prompt for you to update the file in the ROM. Click on 'Yes'
7. Repeat from step 2 for rofs2.

Recompile our ROMs

Now we have made the changes, we need to compile our rofs files.

1. Click on rofs1 and select File / Rebuild Image.
2. Click on ''Output image" & just select the same filename (we will overwrite this for simplicity!)
3. Do the same for rofs2.

We have made the relevant changes to our ROMs, but now we need to update our XML files to reflect the changes!

Update the XML files

We have changed both the rofs1 image (which is the Main firmware file) and the Rofs2 image (which is part of the customisations).

For rofs1 changes we need to update the CODE_I8910xxxxxx.xml file
For rofs2 or rofs3 changes we need to update the CSC_I8910xxxxxxxx.xml file
For major changes, which will affect the size of the partitions we need to update both files, but we won't worry about this at the moment!

Get the XML parameters from Rofsviewer

After the roms have been compiled, the rofsviewer tool can be used to calculate the values we need to enter into the XML file.
To get these parameters, select Tools / XML Parameters from the menu in Rofsviewer.

Copy the updated rofs files

Copy the updated rofs files you have just created in the Rofsviewer folder over the top of the ones in the original firmware locations.

Update CODE_I8910xxxxxx.xml

Edit this file & find an entry similar to that shown below. Note that there may be some dummy entries in here, so make sure you find the entry with the correct filename:

<image id="1" img_name="I8910XEJB1_XXE.rofs1.img" md5="28cdcbab69464d138a341258155496c0" size="82662720"/>

Copy and paste the entries from Rofsviewer for the rofs1 image into the md5 and size sections of this entry (called MD5 checksum and Byte Size in Rofsviewer) and save it out. Note that Rofsviewer also provides us with an XML size - this is used for partitioning information ... but we won't worry about that yet!

Update CSC_I8910xxxxxx.xml

Edit this file and perform the same operation for the rofs2 image, i.e. find an entry like this:

<image id="1" img_name="I8910SERJB1_UK_Custom.rofs2.img" md5="24f876c495b213213286e41633ae14c2" size="31167020"/>

... and update it. Note that there may be multiple languages in the XML file - make sure you find the entry corresponding with the actual filename of your rofs file!

If you have made changes to rofs3, then your XML parameters for this file also need to be put in the XML.

Reflash your firmware

At this point we have updated our firmware with our change, compiled our new rom images and updated our XML files. We are finished for our simple change!

1. Open up the Symbian Rom flashing tool
2. Point the Code XML file to our updated CODE_I8910xxxxxx.xml file
3. Point the CSC XML file to our updated CSC_I8910xxxxxx.xml file
4. Point the Modem BIN file to our unchanged Modem .bin file
5. Uncheck 'Boot' in download option. This is especially important when flashing with our own custom file, as we don't want to brick it!
6. Once we have backed up all the data from our phones, key in *#7370# to reformat completely (pin: 00000000 - 8 x zeros). This is strictly not required every time, but it's best to start from scratch the first time!
7. Power your device off
8. Power your device on & enter Boot mode by holding down volume up + power + lock key while booting
9. Once the screen has entered Boot mode, plug it into the USB port of your PC
10. Click on 'Download Start' once the Symbian Rom Flashing tool has noticed your device.

Once the flashing process has completed, you will have your custom firmware on your phone!

Advanced XML Editing

The CODE and CSC XML files can be edited as you see fit. Unnecessary language entries can be removed, the filenames of your custom rofs can be changed & the size of C: drive can be set.

Setting the size of C:

To do this we need to use the XML size from the Rofsviewer application. In both the CODE and CSC XML files we will find entries like (this is from my UK custom firmware - you can see I have personalised it a bit!):

<country name="UK Custom">
<operator name="MKW">
<partition name="nbl1" img_id="1" partition_id="0" partition_size="0" smd_xsr_attr="0x00000022"
.
.
<partition name="fat" img_id="-1" partition_id="8" partition_size="400" smd_xsr_attr="0x00000001" smd_xsr_type="STL" smd_xsr_spare="0"/>

<history id="0" name="I8910UKCJB1"/>
</operator>

Notice the Partition Size entries! This tells us how big our partitions are. The following entries tell the ROM flashing tool how big each of the firmware files is:

<partition name="rofs1" img_id="1" partition_id="4" partition_size="631" smd_xsr_attr="0x00000001" smd_xsr_type="BML" smd_xsr_spare="0"/>
<partition name="rofs2" img_id="3" partition_id="268435465" partition_size="238" smd_xsr_attr="0x00000001" smd_xsr_type="BML" smd_xsr_spare="0"/>
<partition name="rofs3" img_id="3" partition_id="268435466" partition_size="119" smd_xsr_attr="0x00000001" smd_xsr_type="BML" smd_xsr_spare="0"/>

We need to use the Rofsviewer application to update the partition_size entries in here to reflect the actual size of our created ROM files. Once we have updated the entries here with the actual values from our rofs files we need to work out how much space is left to allocate to the C: drive.

<partition name="fat" img_id="-1" partition_id="8" partition_size="400" smd_xsr_attr="0x00000001" smd_xsr_type="STL" smd_xsr_spare="0"/>

The one marked 'fat' (at the end) tells us how big our C: drive will be. This needs to be worked out! Add up all the entries above fat (not including fat!) and take it away from 2000 (which is how big the file system is). As an example, you will see that the partition size from my Custom UK ROM is 400 (40.0MB), so all the entries above it worked out to be 2000-400=1600.

You will note that there is a similar partition section in both CODE and CSC. Make sure both of these files contain the same entries!

Last edited by mwarner; 07-23-2010 at 07:48 PM. Reason: Minor corrections
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
The Following 11 Users Say Thank You to mwarner For This Useful Post:
AawarA (02-22-2010), arsenal2006 (02-20-2010), dermeanwang (09-25-2010), DSA (05-07-2010), ltnine2 (02-21-2010), Marshall.87 (08-18-2010), mohcivil (02-20-2010), n95star (03-03-2010), nedooo (06-02-2010), pathaniya (02-02-2011), Persian0123 (12-14-2010)
Sponsored Links
Advertisement
 
  #2 (permalink)  
Old 02-20-2010, 07:00 PM
arsenal2006's Avatar
Member
 
Join Date: Jul 2009
Location: Singapore
Posts: 87
Thanks: 28
Thanked 7 Times in 4 Posts
arsenal2006 is on a distinguished road
Default

thx for the nice tutorial..
but i need help..if i wanna remove certain applications from
the firmware,where shall i find it?wad r the files i need to remove.
im stucked at my repacking for 2days..i dont noe how to do tt.
and wad did u mean by
"
For major changes, which will affect the size of the partitions we need to update both files, but we won't worry about this at the moment!"

what is a major change??
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-20-2010, 11:40 PM
Senior Member
 
Join Date: Aug 2009
Location: Kenilworth, UK
Posts: 122
Thanks: 19
Thanked 56 Times in 21 Posts
mwarner is on a distinguished road
Default

You will find region specific applications in rofs2 & 3 (as these are the regional customisation files), and built-in Samsung apps in rofs1 (which is the main firmware).

By "Big Change" I mean if you remove or add applications or other files, rather than just slightly modifying configuration files. Removing applications will reduce the size of the firmware, so you will need to resize the partitions, as shown in the Advanced XML section of the above tutorial. As the partition information is present in both the CODE and CSC XML files, you need to modify both files.

If you want to delete applications then it very much depends on the application. Generally if, for example, you want to remove Asphalt 4 then you would use the search function in the Rofsviewer for the text "Asphalt" and delete all the relevant files where ever you found them (this is a very simplistic explanation as it will not always work, although is probably OK for the removal of some simple applications. Really you need to have a deeper understanding of how the app works & what config files it uses). For more advanced changes you really need to look through and get a better understanding of all the files in the rom images.

Last edited by mwarner; 02-20-2010 at 11:47 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
The Following User Says Thank You to mwarner For This Useful Post:
arsenal2006 (02-21-2010)
 
  #4 (permalink)  
Old 02-21-2010, 05:56 AM
arsenal2006's Avatar
Member
 
Join Date: Jul 2009
Location: Singapore
Posts: 87
Thanks: 28
Thanked 7 Times in 4 Posts
arsenal2006 is on a distinguished road
Default

thank u for the reply bro.
i now need editing in advance xml.
i removed a few apps..hope it works.
mainly i did the custom firmware is to remove all the other languages
and to keep only english..

and i did not understand this part
"The one marked 'fat' (at the end) tells us how big our C: drive will be. This needs to be worked out! Add up all the entries above fat (not including fat!) and take it away from 2000 (which is how big the file system is). As an example, you will see that the partition size from my Custom UK ROM is 400 (40.0MB), so all the entries above it worked out to be 2000-400=1600."

so now i have calculated mine.
its 1629-212=1417
so now what m i suppose to change?
change the fat partition size to 1417?
and also the same procedure to csc file rite?
and bro.also hw to change the partition size in c drive.i tried changing to a higher value than i cant
flash my device.

Last edited by arsenal2006; 02-21-2010 at 11:53 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-21-2010, 12:03 PM
Senior Member
 
Join Date: Aug 2009
Location: Kenilworth, UK
Posts: 122
Thanks: 19
Thanked 56 Times in 21 Posts
mwarner is on a distinguished road
Default

Ok, so all the partitions above the one marked 'fat' add up to 1629. This means that you should set the fat partition size to 2000-1629 = 371.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
The Following User Says Thank You to mwarner For This Useful Post:
arsenal2006 (02-21-2010)
  #6 (permalink)  
Old 02-21-2010, 12:39 PM
arsenal2006's Avatar
Member
 
Join Date: Jul 2009
Location: Singapore
Posts: 87
Thanks: 28
Thanked 7 Times in 4 Posts
arsenal2006 is on a distinguished road
Default

thx bro..i have a another question also.
is it possible for us to extract hyperx 2.0 final fw?
i would like to edit some changes for myself.
by this i can stop bothering him for another release as i can just edit
wadever i want from his firmware..
this would also be helpful to other cookers.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-22-2010, 06:08 PM
AawarA's Avatar
Member
 
Join Date: Jul 2009
Posts: 99
Thanks: 31
Thanked 13 Times in 10 Posts
AawarA is on a distinguished road
Default

thanx for tutorial, thats a great contribution.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 02-28-2010, 02:44 PM
Member
 
Join Date: Sep 2009
Posts: 37
Thanks: 20
Thanked 4 Times in 4 Posts
neverdawn is on a distinguished road
Default

Can this be done on windows vista?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 02-28-2010, 05:28 PM
Senior Member
 
Join Date: Aug 2009
Location: Kenilworth, UK
Posts: 122
Thanks: 19
Thanked 56 Times in 21 Posts
mwarner is on a distinguished road
Default

You can certainly do all the firmware editing on Windows Vista, but I am not sure about the flashing. I doubt it, as I have to reboot to XP from Win7 in order for the Symbian Flash Tool 1.5 to recognise the phone.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 02-28-2010, 05:57 PM
Fevves's Avatar
@bstract Journeyman
 
Join Date: Jul 2009
Location: Behind your screen...
Posts: 2,663
Thanks: 404
Thanked 765 Times in 450 Posts
Fevves is on a distinguished road
Default

Quote:
Originally Posted by arsenal2006 View Post
thx bro..i have a another question also.
is it possible for us to extract hyperx 2.0 final fw?
i would like to edit some changes for myself.
by this i can stop bothering him for another release as i can just edit
wadever i want from his firmware..
this would also be helpful to other cookers.
Why not asking HX himself to provide some help on extraction or even providing some of his code? I bet he would help you on this in best of manners if you're ready to acknowledge the base and his work alltogether, and I'm sure you would.
__________________
If you're to win, you can't afford to lose!
If you think life sucks... go contemplate the other possibility!
----------------------------------------------------------

Read & obey Global Forum Rules, GUI section Rules, Netiquette, common sense and post accordingly.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
The Following User Says Thank You to Fevves For This Useful Post:
arsenal2006 (03-01-2010)
Sponsored Links
Advertisement
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




eXTReMe Tracker

 

PSP Custom Firmware | PSP Downloads | PSP Forums | PSP Emulator | PSP Hacks | Optimus 2X Forums | Samsung i8910 HD | Galaxy S Forum


All times are GMT +1. The time now is 04:51 PM.
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
vBulletin Security provided by vBSecurity v2.2.2 (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Designed By: vBSkinworks