Reverse Engineering Blackberry Java Native Modules (?)

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.

9 thoughts on “Reverse Engineering Blackberry Java Native Modules (?)

  1. Hex

    .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… ;)

  2. Petit

    “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?

  3. Jiggaman

    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


Comments are closed.