Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
Posts: 174
Registered: ‎01-25-2011
My Device: Not Specified

Security of .cod file

Hi frds,

 

I just want to know the security policies of .cod file....  How secure is the file... will we be able to extract  .java files from the .cod file??...  Just want to know a few facts related to .cod file... thanx in advance!!

Developer
Posts: 17,012
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Security of .cod file

there is a decompiler, and i know people who successfully decompiled applications, but i did not succeed using it, it is kind of compilcated and does not work for everything most likely.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
Posts: 174
Registered: ‎01-25-2011
My Device: Not Specified

Re: Security of .cod file

So, you mean .cod is most secured???

Developer
Posts: 889
Registered: ‎08-31-2009
My Device: 9530, 9630, 9800, 8530, 9900, 9810, 9930, PlayBook, Dev Alpha
My Carrier: Verizon

Re: Security of .cod file

.cod files are pretty secure. Like any java binary they can be decompiled, but the data is also compressed which makes the source code near impossible to use. I would feel pretty safe with the level of security that they provide for your source...


Read my thoughts on BlackBerry Development at news.ebscer.com
Developer
Posts: 78
Registered: ‎05-17-2012
My Device: 9900 - OS 7.0 Torch device
My Carrier: Reliance

Re: Security of .cod file

Hi All

 

I don't think its most secured one. There are few softwares which can decompile the .cod files to generate .java files. But there some disturbance is there but a developer can resolve those issues to make use of the code successfully.

Developer
Posts: 17,012
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Security of .cod file

from the things i tested you get proprietary bytecode out of the decompiler. You can use that to find a password string in the code or similar, but it is very unlikely that you can copy an ui layout or complex processing code.
if there are tools to get java out of the jvm bytecode is unknown to me, but i would be quite surprised as BB is a rather limited field.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
Posts: 174
Registered: ‎01-25-2011
My Device: Not Specified

Re: Security of .cod file

Then what about resources residing in the res folder(images, html files. n so on).. will it be extracted in the right format when we decompile??? or in undefined format...
Developer
Posts: 1,807
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-10.3.2.858, Z10 (STL100-3)-10.3.1.2576, Z30 (STA100-5)-10.3.1.2582, Passport (SQW100-1)-10.3.1.2576, PlayBook (16GB)-2.1.0.1917
My Carrier: Verizon

Re: Security of .cod file

As simon said, there is a decompiler. It kinda works, you need a very, very, very specific COD in order for it to work. Make a simple hello world app (with GUI) and it won't be able to decompile that (most of the time).

If you use that same decompiler on a COD with resources, it will put out something along the line of:
arrayinit [-119, 80, 78, 71, 13, 10, 26, 10, ..., -126]
astore_1
aload_0
ldc literal_9:"IconFocused_Open.png"
aload_1
invokevirtual java.lang.Object put( java.util.Hashtable, java.lang.Object, java.lang.Object ) // pc=3
pop

That is, if the decompiler works on the specified COD.
---Spends time in #blackberrydev on freenode (IRC)----
Three simple rules:
1. Please use the search bar before making new posts.
2. "Like" posts that you find helpful.
3. If a solution has been found for your post, mark it as solved.
--I code too much. Well, too bad.