Breaking Eggs And Making Omelettes

Topics On Multimedia Technology and Reverse Engineering


Reverse Engineering Blackberry Java Native Modules (?)

August 21st, 2005 by 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 »

9 Responses

  1. Hex Says:

    .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. Tony Says:

    How do you go about decompiling the .cod files? I can’t find documentation on it anywhere. Help!

  3. Petit Says:

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

  4. sam Says:

    Plaese send me some information about cod 2 java

  5. berryable Says:

    i am able to snatch a valid serial number for numerous blackberry applications, visit the link below for more info.

  6. Jiggaman Says:

    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


  7. yopuz Says:

    I’ve opened a .cod file with winrar, but there is several .cod files inside.

  8. vijay Says:

    what does the COD name stands for ?
    like JAR – Java Archive

  9. David Williams Says:

    COD is short for CODE (Code file)
    According to Blackberry Support.