Join Today
Page 1 of 20 123 11 ... LastLast
Results 1 to 10 of 192
  1. #1
    Senior Member
    Join Date
    Jan 2011
    Posts
    284
    Thanks (Given)
    0
    Thanks (Received)
    0

    Default The Nokia Firmware File-Format

    This thread is dedicated for the discussion of the Nokia Firmwares File-Format.

    The ROFS Firmware Contains a very big header starting from a "B2" Sign.
    The Header Is nothing but the boot info and the version info of the firmware



    The Actual Image Begins from a "52" Code Block



    The Actual image is contained by several 0x54 Code Blocks

    There are also some more 0x5D Data Blocks....



    If These two Headers are Removed The Actual ROM Image comes out which can be extracted by "readimage.exe" and can be built by "rofsbuild.exe".....

    Any Extra Contribution by any programmer is Appreciable....

  2. #2
    Senior Member
    Join Date
    Jan 2011
    Posts
    284
    Thanks (Given)
    0
    Thanks (Received)
    0

    Default Re: The Nokia Firmware File-Format

    I still dont know the formula to repack..
    If the Removed Headers should be added again or not??
    If yes, How The Should Be arranged??

  3. #3
    Senior Member
    Join Date
    Jan 2011
    Posts
    284
    Thanks (Given)
    0
    Thanks (Received)
    0

    Default Re: The Nokia Firmware File-Format


    NOw Only Repack is Needed

  4. #4
    Senior Member
    Join Date
    Dec 2009
    Posts
    634
    Thanks (Given)
    0
    Thanks (Received)
    1

    Default Re: The Nokia Firmware File-Format

    Quote Originally Posted by writz
    If These two Headers are Removed The Actual ROM Image comes out which can be extracted by "readimage.exe" and can be built by "rofsbuild.exe".....
    No, you can't use readimage.exe and rofsbuild.exe for the ROM image... Because those tools don't support the ROM file format.
    You can use them for the ROFS image, but you'll not be able to repack properly the ROFS image because the readimage.exe can't read all the needed fields from the ROFS.

    Quote Originally Posted by writz
    I still dont know the formula to repack..
    If the Removed Headers should be added again or not??
    If yes, How The Should Be arranged??
    If you want to properly repack the fw file, of course you need to put again the header and all the 54 01 17 packets...

    Time ago I shared some c# source which can be useful for parsing the fw file format.
    http://forum.dailymobile.net/index.p...=44918.new#new

    Here are some more info about the 54 01 17 packets:
    54 = Code Block
    01 = Unkn
    17 = Unkn
    01 = BlockHeaderSize
    01 = ProcessorType
    0102 = Unkn
    0102 = ContentChecksum
    01 = UnknConst01
    01020304 = Data Size
    01020304 = Location
    01 = PacketChecksum

    the ContentChecksum 0x0102 is computed as follow:
    the 0x01 is the LRC of the odd bytes of the content
    the 0x02 is the LRC of the pair bytes of the content

    the PacketChecksum is computed as 0xFF - byte01 - byte02 - byte03 ...


  5. #5
    Senior Member
    Join Date
    Jan 2011
    Posts
    284
    Thanks (Given)
    0
    Thanks (Received)
    0

    Default Re: The Nokia Firmware File-Format

    Quote Originally Posted by writz

    If These two Headers are Removed The Actual ROM Image comes out which can be extracted by "readimage.exe" and can be built by "rofsbuild.exe".....
    Oh There Is My Mistake I wanted to write The ROFS Image But Wrote ROM Image.....Sorry.....

    But U again told that the tools were unable to repack the firmwares properly......

    But With These Steps The Output Must[and Should] be correct........
    Original FW Rofs >> Remove Headers >> Use ReadImage.exe >> Editing>>Use RofsBuild.Exe >> Add The Headers and The 54 01 17 Packets >> Cooked FW ROFS....
    Am I correct..............


    [Stuck at the bolded part]


    Another Question Is How To Merge The Header and the 52 01 17 Packets Again In the File....like it was before....
    The HEader can be added easily.....but
    I think I should keep a track of the removed packets and their offsets.....and at last add them according to their original position.......

  6. #6
    Senior Member
    Join Date
    Dec 2009
    Posts
    634
    Thanks (Given)
    0
    Thanks (Received)
    1

    Default Re: The Nokia Firmware File-Format

    Quote Originally Posted by writz
    But With These Steps The Output Must[and Should] be correct........
    Original FW Rofs >> Remove Headers >> Use ReadImage.exe >> Editing>>Use RofsBuild.Exe >> Add The Headers and The 54 01 17 Packets >> Cooked FW ROFS....
    Am I correct..............
    No, you're wrong, because someinformations contained in the ROFS can't be extracted using ReadImage.exe (or unrofs.exe)
    So you need to write your own tool to read the ROFS image... you can find further detailed informations here:
    http://forum.dailymobile.net/index.p...3789#msg413789


    Quote Originally Posted by writz
    Another Question Is How To Merge The Header and the 52 01 17 Packets Again In the File....like it was before....
    The HEader can be added easily.....but
    I think I should keep a track of the removed packets and their offsets.....and at last add them according to their original position.......
    You already answered to your own question

  7. #7
    Senior Member
    Join Date
    Jan 2011
    Posts
    284
    Thanks (Given)
    0
    Thanks (Received)
    0

    Default Re: The Nokia Firmware File-Format

    Quote Originally Posted by Il.Socio
    No, you're wrong, because some informations contained in the ROFS can't be extracted using ReadImage.exe (or unrofs.exe)
    Can RofsViewer Do It Correctly?

    And Does rofsbuild.exe repacks firmwares correctly?

  8. #8
    Senior Member
    Join Date
    Dec 2009
    Posts
    634
    Thanks (Given)
    0
    Thanks (Received)
    1

    Default Re: The Nokia Firmware File-Format

    no, rofsviewer will not solve the problem.
    you need to write your own tool to read the ROFS image... you can find further detailed informations here:
    http://forum.dailymobile.net/index.p...3789#msg413789

    Yes, rofsbuild.exe repacks firmwares correctly.

  9. #9
    Senior Member
    Join Date
    Jan 2011
    Posts
    284
    Thanks (Given)
    0
    Thanks (Received)
    0

    Default Re: The Nokia Firmware File-Format

    So,
    the 0xFFFFFFFF files are the problem.......
    now readimage does not tell which files that has the iFileAddress=0xFFFFFFFF
    How can I get the iFileAddress of a File??
    any tool which can point out the iFileAddress?
    Or How to Find the iFileAddress in the Hex Editor
    BTW I am trying to get how to do it on my own....

  10. #10
    Senior Member
    Join Date
    Dec 2009
    Posts
    634
    Thanks (Given)
    0
    Thanks (Received)
    1

    Default Re: The Nokia Firmware File-Format

    I quote here a post that I wrote on SF forum long time ago. You should to pay attention to this part: "you'll need to parse the ROFS image..."


    About the ROFS/ROFX stuff...
    when you extract files using readimage.exe or unrofs.exe tool, you'll notice that sometimes, you'll got some 0-bytes files.
    (maybe unrofs.exe just ignores the 0-bytes files and will not extract them, I don't remember well)

    This could happen in 2 cases:
    1) the file is contained in the ROFS and it is 0-bytes length, so it has been extracted with 0-bytes length.
    2) the file is not contained in the ROFS. It is just a stub-entry which is used to hide the file which is contained in the CORE.

    You can't know which kind of entry it is, unless you extract them on your own...
    The information about the kind of entry, is contained inside the ROFS (TRofsEntry.iFileAddress)

    When you create the .oby you should use the "hide" keyword only for those files with "iFileAddress" = 0xFFFFFFFF because this is a (CORE) file which has been hidden by the ROFS.
    while you should use the "data" keyword for all other files (also for 0-bytes length files)

    The "iFileAddress" is a field of the "TRofsEntry" struct (you'll need to parse the ROFS image by starting with TRofsHeader and TRofsDir structs and eventually TRofsEntry)
    (Take a look at the rofs.h file included in the attachment)

    For now, you should take in consideration only the ROFS file format, because the management of these particular entries gets a bit more complicated when you start working on ROFX file format...


    Take this firmware as example: N97 - RM507 and open the file: RM-507_20.2.019_prd.rofs2.V30
    In there, you'll find the file gsfmtxplugin.dll which has iFileAddress = 0xFFFFFFFF
    When you create the .oby file for this firmware, you should use the hide keyword to properly hide the gsfmtxplugin.dll file.
    When you flash the original firmware, the gsfmtxplugin.dll is not supposed to be present in z: because it has been hidden by the ROFS2.

    If you include it using the "data" keyword, that file will be present in z: and you'll notice that the repacked firmware will not contain any entries with iFileAddress = 0xFFFFFFFF (because you didn't used the "hide" keyword) so the result is a wrong repacked firmware.
    Attached Files Attached Files


 
Page 1 of 20 123 11 ... LastLast

Similar Threads

  1. request file to format mass memory of nokia n8 in dead mode
    By sanjayp in forum Symbian^3 Mods Request and Discussion
    Replies: 19
    Last Post: 02-19-2013, 07:22 PM
  2. [INFO] Scriptinit.txt file format
    By Szakalit in forum Symbian S60V5 Modding
    Replies: 31
    Last Post: 07-09-2012, 02:11 AM
  3. how to change the file format
    By areku in forum Symbian S60V5 Custom Firmware / Cooking - Discussion
    Replies: 3
    Last Post: 06-27-2011, 11:35 AM
  4. Firmware File Format - C# source code
    By Il.Socio in forum Symbian S60V5 Custom Firmware / Cooking - Discussion
    Replies: 3
    Last Post: 03-31-2011, 02:07 PM
  5. Help With .svgb File Format!
    By PrinceRM in forum Symbian S60V5 Custom Firmware / Cooking - Discussion
    Replies: 4
    Last Post: 01-30-2011, 03:17 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •