Reverse Engineering Blackberry Java Native Modules (?)
Multimedia Mike
Readers of this blog have highly diverse reverse engineering goals. I was contacted by a reader who is interested in reverse engineering a .cod file. This file comes from the Blackberry run time environment and has to do with Java. I suspect that it is a file full of native CPU code for whatever CPU happens to run inside of a Blackberry. Anyway, since I have neither the time nor the inclination to chase after every code format in existence (and I have never even been entirely sure on what a Blackberry even is), I thought I would put it to the readers in case anyone happens to know off the top of their head. Pertinent details, questions, and speculations:
- Blackberry JDE is available here
- Blackberry development documentation
- Is the .cod a native CPU code file?
- If it is a native code file, is this a fabled Java Native Interface (JNI) code file?
- If yes, is there a standard way to disassemble the files?
- If no, and this is some kind of custom file format, what is the format, the section definitions, etc.?
- I have examined one sample .cod file. It starts with hex bytes DE C0 FF FF (CODE FFFF in little endian). No other patterns jump out at me except for a few embedded PNG files.
If you have any insight into this format, feel free to contact me.
Posted in Java, Reverse Engineering |
9 Comments »
September 12th, 2006 at 10:58 pm
.cod is a RIM JVM code format. It’s a modified version of Sun’s Javavirtual Machin. The native code for Blackberry is ARM. Yes there’s a standard way for even decompiling the .cod files. The full version of rapc compiler contains the class the provides such ability. But JDE version of rapc contains only the classes for compilation. Format is propietary. But we can reverse it… ;)
November 18th, 2006 at 12:14 pm
How do you go about decompiling the .cod files? I can’t find documentation on it anywhere. Help!
June 2nd, 2008 at 4:35 pm
“But we can revers it…;)”
That’s an interesting statement.
The explanation of how, might be a bit longer.
Give us a tool cod2java, whould you?
;-)
September 12th, 2008 at 1:23 am
Plaese send me some information about cod 2 java
October 6th, 2008 at 12:27 pm
i am able to snatch a valid serial number for numerous blackberry applications, visit the link below for more info.
berryable.wordpress.com
October 31st, 2008 at 12:44 pm
All the tutorials point how to convert jar to cod, but not the other way :( Anyone can share a secret how to go back from cod to jar…and maybe than from jar > java
Thanks.
April 14th, 2009 at 6:59 am
I’ve opened a .cod file with winrar, but there is several .cod files inside.
December 7th, 2009 at 11:13 pm
what does the COD name stands for ?
like JAR – Java Archive
March 14th, 2010 at 8:22 am
COD is short for CODE (Code file)
According to Blackberry Support.