1

I have a Jar library developed in Eclipse ADT. I want to share it to customers but before that, I have to obfuscate my Android Jar library. I have searched enough but no clear answer was found. How can I do this?

I have tried Proguard inside and outside Eclipse but failed to get result! Also tried to get information by communicating with Guardsquare company, but no clear result yet! Any help is appreciated. Thanks in advance!

sajjad
  • 834
  • 6
  • 13
  • I think while using proguard, it is obfuscating URL present in JAR. Thats why you are not getting result. Please add --keepClass with class name which has URL. – Rohit Mar 28 '17 at 05:04
  • Did you find this in your search: http://stackoverflow.com/questions/4629444/ant-build-for-android-proguard-obfuscation – Morrison Chang Mar 28 '17 at 05:07
  • @MorrisonChang It's talking about apk output. My case is a jar output. – sajjad Mar 28 '17 at 05:23
  • @Rohit The problem is I don't get the output jar. – sajjad Mar 28 '17 at 05:23
  • @Josh I'll leave this reference: http://stackoverflow.com/a/21421213/295004 but I think you need to be more detailed in your question about what does work and what doesn't work. – Morrison Chang Mar 28 '17 at 05:29
  • @MorrisonChang Thanks for the effort. I have seen this post but I noticed that the asker finally said he tried proguard outside of eclipse. That means the answer to which you referred me didn't work for the asker. I'd appreciate if I could talk to you somewhere outside here to give you more details cuz there are restrictions here. Thanks. xvx_1@yahoo.com – sajjad Mar 28 '17 at 05:47

1 Answers1

0

So I ended up using native c++ code for important parts of my library. Now I have to share an .SO library beside my Jar library so users import both. Not so bad! At least Android Studio decompiler won't decompile my .SO file.

Advice: Don't waste your time securing your Jar file! It'll be reverse engineered like a piece of cake! The .SO file also can be decompiled, but it would be much harder and result won't be same as the source code!

sajjad
  • 834
  • 6
  • 13