Ok. Here is the next piece of Blackberry pie. In my previous post I presented a header structure of COD file. Another major structure of COD file is a data segment header structure. It starts from offset 0x2C plus codfh.code_size:
typedef struct {
ubyte flags;
ubyte version;
ushort num_icalls;
ubyte num_modules;
ubyte num_classes ;
ushort exported_string_offset;
ushort data_bytes_offset;
ushort empty_field;
ushort class_definitions;
ushort array_of_unknow_fields[14];
ushort aliases;
ushort array_of_unknow_fields[22];
} DATASEGTHEADER;
SizeOf (DATASEGHEADER) = 0x34
The next structure is
ushort classes_offsets[num_classes];
each record represents an offset from the begining of a data segment and points to a CLASS_STRUC.
Then we have
ushort module_offset;
ushort modules_offsets [num_modules-1];
ushort modules_offsets2[num_modules];
I still need to research this a bit, but usually module_offset field stores an offset to a string with a program or library name, modules_offsets array contains a similar offsets to additional modules if a program or library has more than one COD file. The modules_offsets2 contains an offset to a string with a version number (?).
Well the next post will be about DATABYTES and CLASS_STRUC structures.
Hey I find this reverse engineering of the blackberry interesting. Where did you happen to come by the resources to gain this information? It seems that this is proprietary to RIM I am unable to locate information to do my own research on RIM cod executables.
Mate, I’ll be back soon and happy to answer your question.
Any success here ?
Hi
I am working as a gaming engg. we generally deal with blackberry devices . so i will be glad if i will some more info regarding .cod files
Is this thread alive yet?
Hi,
I’m looking for your next topic
DATASEG & TAIL
Regards.
Hi, I found a mistake here:
ushort array_of_unknow_fields[14];
ushort array_of_unknow_fields[22];
both should be ubyte. Still great job.
Please hOw can switch back my bbm contact from a friend phone bbm i mistakingly use my I.d for in his new bbm. Pls help me out