Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can BlackBerry COD or ALX files be decompiled?

If I write Java software for a BlackBerry, can it be decompiled using freely available tools similar to .NET Reflector, or is it a more elaborate process?

like image 811
Blankman Avatar asked Dec 18 '08 17:12

Blankman


4 Answers

Software you write for any language, any platform, can be decompiled. It doesn't matter what code mangling (obfuscation) tools you use, it can be decompiled.

Any attempt to worry about this is going to be a waste of time. Just like DRM ;p

But the real point is, and I wish I had the link to the discussion I am thinking of because it was very good. But the point is this. Some one can decompile it, and if they just straight recompile it and try and resell it, what has been the point? It's still easy peasy to take them to court and win.

But you say "They can look at my code and figure out how I did it and redo it!". And to this I say: Don't flatter your self.

Think if you could get your hands on the source code to Windows. There would be a lot of "WTF are they doing here"? And "boy I would have done things differently". A few moments where you scratch your chin and go "Wow, nice". But over all, it's nothing you wouldn't have come to on your own. The real value is the time they spent to truly wrap their heads around the issue and come up with a solution.

Anyone who rips off your code won't be doing that. What is harder? writing new software or maintaining software? I think most developers would prefer the former.

So someone decompiles your software and either sells it in such an obvious way that you can easily prosecute, or they take the time to fully wrap their mind around the problems and design their own which in the end (years later?) will probably be completely different from yours.

It's just such a ridiculous scenario, I really wounder if anyone has ripped off a product by decompiling a competing product.

Don't worry about some one "stealing" your code. It CAN be done and there is nothing you can do to prevent it, but it won't be done, because it's ridiculous.

like image 88
Adam Avatar answered Oct 22 '22 05:10

Adam


RIM's RAPC tool transforms standard J2ME .jar files into .cod files - this is a proprietary format, and no details of it have been published. What's known is that the .cod file sizes are smaller than .jar file sizes, and a lot of stuff gets stripped out (anything not reachable from a static context, basically).

Note that when .cod files get big enough (or more accurately when their code or data sizes get big enough) then RAPC splits the .cod into 2 or more separate cods (named CODNAME-2.cod, etc.), zips them and renames the .zip to .cod. You can unzip this, but you're still left with a bunch of .cod files that you can't decompile.

So generally, no you can't decompile BlackBerry application files. There's a tool called coddec which claims to be able to decompile .cod files, but I haven't had any luck with it.

like image 10
Anthony Rizk Avatar answered Oct 22 '22 05:10

Anthony Rizk


Java code is easy to decompile. Search for obfuscators for Java Me, if you are interested in securing your code. Notably check this.

However, Adam's comment on why you shouldn't care should also be taken into account.

like image 4
Dan Rosenstark Avatar answered Oct 22 '22 05:10

Dan Rosenstark


RIM's toolchain also runs your code through an optimizer (rapc) that makes it even hard to decompile than standard bytecode. Unless somebody spent a lot of time specifically in order to decompile it, it's pretty unlikely.

like image 3
staktrace Avatar answered Oct 22 '22 04:10

staktrace