I am attempting to obfuscate an Android Library Project (APKLIB), allowing the library to distributed to potential clients for test development without compromising the majority of the source code.

我试图混淆Android库项目(APKLIB),允许库分发给潜在客户进行测试开发,而不会影响大部分源代码。

Unfortunately, there is no documentation and no examples that Google can provide, and the only references to obfuscated APKLIBs are question posts with no solutions.

遗憾的是,没有文档也没有Google可以提供的示例,并且对模糊APKLIB的唯一引用是没有解决方案的问题帖子。

I have attempted to use the android-maven-plugin as well as the maven-proguard-plugin with Maven to obfuscate the APKLIB, but the end result is not obfuscated. I also tried moving the proguard goal to the process-classes and prepare-package phases of maven with no success.

我曾尝试使用android-maven-plugin以及maven-proguard-plugin与Maven来混淆APKLIB,但最终结果并未混淆。我也尝试将proguard目标移动到maven的进程类和准备包阶段,但没有成功。

My last resort is splitting the source code out of the APKLIB and obfuscating it as a JAR, while leaving the APKLIB as AIDL files and resources with a dependency on the obfuscated JAR. However, I would like to avoid this if possible since our project has a large number of libraries already.

我最后的办法是将源代码从APKLIB中分离出来,并将其作为JAR进行混淆,同时将APKLIB作为AIDL文件和资源,并依赖于混淆的JAR。但是,如果可能的话,我想避免这种情况,因为我们的项目已经拥有大量的库。

Does anyone know if it is even possible to obfuscate an APKLIB? And if so, how?

有谁知道甚至可能混淆APKLIB?如果是这样,怎么样?

1 个解决方案

#1


-1

Hi are you asking about creating a obfuscated jar file?

嗨,你问的是创建一个混淆的jar文件?

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

您可以通过向其添加build.xml文件并在proguard-project.txt文件中进行更改并从命令行运行“ant release”来执行此操作,您将在项目的bin文件夹中的proguard文件夹下找到obfuscated.jar 。

Steps;

脚步;

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

- >在linux中的项目中添加build.xml打开一个终端并转到android / tools / ant文件夹并运行你的android库项目的./android更新项目-p / path。您将在项目根目录中找到build.xml。

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

- >要在编辑器中启用项目中的混淆,请打开project.properties文件并从proguard中删除注释。= $ {sdk.dir} /tools/proguard/proguard-android.txt:proguard-project.txt

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

- >将您的更改添加到proguard-project.txt文件,并在终端中转到您的项目并运行ant release

更多相关文章

  1. Android Studio Gradle 缓存文件夹设置
  2. NDK笔记---Android.mk文件
  3. android设备中的临时文件夹在哪里?
  4. 使用Java解析XML文件以获取名称列表
  5. cocos2d-x避免手动修改android.mk文件来编译
  6. 尝试查看所有XML文件的图形布局时出现StackOverFlowError
  7. 最近一年做Android项目过程中,对其的一些注意事项(优化)以及问题
  8. Android小项目之六 apk下载
  9. android使用存储在assets文件夹中的Linux工具

随机推荐

  1. MySQL免安装配置(亲测过,请放心借鉴)
  2. SQL Server 2005 所允许的 SQL 语句的最
  3. JPA hibernate spring repository pgsql
  4. 【原】Mysql最大连接数
  5. MySQL5.5.22版本安装配置以及基本命令的
  6. 请问用PL/SQL如何判断两个日期之间相差的
  7. 最近用到的SQL语句
  8. QT5.3连接mysql数据库
  9. postgresql 数组 多了引号 空格处理
  10. 解决缺少sql头文件编译错误