4

I want to distribute an SDK to end developers but I don’t want to share my code. I have used AAR file to share my SDK (Android Archive Library (aar) vs standard jar). But there is a possibility that others can view my class files. How to avoid that? Please help us.

Note: I had review this “Android - Need a way to create the library(.aar file) without source code” but it didn’t solve my problem.

Community
  • 1
  • 1
Madhan
  • 133
  • 2
  • 9

1 Answers1

0

Proguard cuts unused classes. Libraries are standalone products, and has some specific entry points, which should not be obfsuscated. So you need to add rules to keep this entry points. Rules lookes like this:

-keep class packagename {public *;}

But, Proguard but will not encrypt strings.

Dexguard is a paid tool that includes string encryption and other features.

For a full comparison see this chart: https://www.saikoa.com/comparison-proguard-and-dexguard

Chintan Soni
  • 24,761
  • 25
  • 106
  • 174
  • We need that the method name should be shown but the method definition should not be shown. When using Dexguard, both the method name and method definition are not shown. – Madhan Feb 18 '16 at 12:23