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
New Contributor
Posts: 6
Registered: ‎05-24-2012
My Device: Curve -8520
My Carrier: Airtel

Obfuscate code in blackberry using proguard

Hi,

 

I want to obfuscate my code using proguard in eclipse plugin.

 

i found a below article to do it, but i am facing some challenges.

http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800901/How_To_-_Obfus...

 

problems in Obfuscating code and creating cod.

1) in step 4- I can't see extracted content of jar file if i extract jar file using " jar xvf SampleApplication.jar. i am able to solve this by extracting jar using winrar ( not sure if its correct way of doing it)

 

2)  step 5 and step 6, i am performing using proguard utility. ( i am using proguard 4.8). here if i ingore all warning while obfuscating then only i am able to do obfuscation.

 

3) in step 8 , its mentioned that run rapc.exe on obfuscated files, but when i checked rapc.exe requires .java or .jar file as input, how to run rapc.exe on class files?

one more question, in my project , there are many class files, Do i have to list all .class files while creating cod ?

or can i give directory name to generate cod?

 

General Questions :

1) has any one has tried obfuscating blackberry code using proguard?

2) also, is there anyway i can configure proguard directly in eclipse?

 

Thanks in advance.

 

- Divyesh




 

 

 

New Contributor
Posts: 6
Registered: ‎05-24-2012
My Device: Curve -8520
My Carrier: Airtel

Re: Obfuscate code in blackberry using proguard

I do shrink,obfuscate and optimize jar file using proguard.

then i use preverify command of RIM to preverify,

 

but after this I am not able to generate cod file using rapc command on obfuscated file. i get one or other error like Error:missing stack map in:com.app.controller at label 23

 

P.S : if i do only shrink using proguard, then after preverify I am able to generate cod using rapc command.

 

hence, as per my understanding , there is something wrong happening in obfuscation or optimisation.

I have tried verious options available in proguard for obfuscation, but no luck Smiley Sad

so my questions is, what are the options to be used in proguard while obfuscation the jar file ?

 

is there is any other reliable tool for blackberry code obfuscation?

 

Thanks.