微信资源包混淆

  • 01.微信资源包混淆介绍

微信资源包混淆项目:https://github.com/shwenzhang/AndResGuard

 

资源包混淆作用

* 1.避免其他人拷贝图片资源

* 2.把apk变小(apk瘦身步骤)

开发中到底用不用:看需求,可以使用资源包混淆,

  • 02.微信资源包混淆AndResguard常用命令

1.配置config.xml文件

<issue id="sign" isactive="true">

    <!--the signature file path, in window use \, in linux use /, and the default path is the running location-->

    <path value="E:\ngyb\day2\MobileSafe\ngyb.jks"/>

    <!--storepass-->

    <storepass value="123456"/>

    <!--keypass-->

    <keypass value="123456"/>

    <!--alias-->

    <alias value="ngyb"/>

</issue>

2.简单命令(对签名和未签名apk都可以)

java -jar andresguard.jar ..\build\MobileSafe_signed.apk
扫描二维码关注公众号,回复: 5151942 查看本文章

3.指定配置文件或输出目录

java -jar andresguard.jar ..\build\MobileSafe_signed.apk -config config.xml -out ngyb

4.使用7zip打包

java -jar andresguard.jar ..\build\MobileSafe_signed.apk -config config.xml

-7zip 7za.exe -out ngyb_new
  • 03.ant打包手机卫士-集成AndResguard

 

<!-- 任务9:集成微信资源包混淆AndResGuard -->

<target name="andResGuard" depends="generateUnsignedApk">

    <echo message="任务9:微信资源包混淆"/>

    <exec executable="${java.exe}">

        <arg value="-jar"/>

        <arg value="${andresguard.jar}"/>

        <arg value="${unsignedApk}"/>

        <arg value="-config"/>

        <arg value="${config.xml}"/>

        <arg value="-out"/>

        <arg value="${resGuardOut}"/>

    </exec>

</target>

猜你喜欢

转载自www.cnblogs.com/nangongyibin/p/10354722.html