Could Android Library Project (APKLIB) be confusing to Proguard?

I am trying to confuse the Android library project (APKLIB) by allowing the library to be distributed to potential customers for test development without compromising much of the source code.

Unfortunately, there is no documentation and no examples that Google can provide, and the only links to the confusing APKLIB are messages without any solutions.

I tried using android-maven-plugin as well as maven-proguard-plugin with Maven to obfuscate the APKLIB, but the end result was not confused. I also tried moving the proguard target to the process classes and maven package preparation phases without success.

My latest application is to split the source code from APKLIB and obfuscate it as a JAR, leaving the APKLIB as AIDL files and resources depending on the running JAR. However, I would like to avoid this, if possible, since our project already has a large number of libraries.

Does anyone know if it's even possible to confuse APKLIB? And if so, how?

+4
source share
1 answer

Hi, are you asking about creating obfuscation jar file?

You can do this by adding the build.xml file to it and making changes to the proguard-project.txt file and running " ant release " from the command line, and you will find obfuscated.jar in the proguard folder in your bin in the project.

Steps;

-> To add build.xml to the project on linux, open a terminal and go to the android / tools / ant folder and run ./android update project -p /path of your android library project . And you will find build.xml in the project root directory.

-> To enable Obfuscation in your project in your editor, open the project.properties file and remove the comment from proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt

-> Add your changes to the proguard-project.txt file and go to the terminal in your project and run ant release

-1
source

Source: https://habr.com/ru/post/1440890/


All Articles