Giter Club home page Giter Club logo

andresguard's Introduction

Android资源混淆工具使用说明

A fork of https://github.com/shwenzhang/AndResGuard, only bug fixs,no new features.

Changes

1.2.23

兼容AGP 7.4.x

1.2.22.6

  1. only support gradle 7.0+
  2. sevenzip support osx aarch

1.2.23-SNAPSHOT (from 1.2.22.6 )

  1. update sevenzip version to 21.07 (except windows)
  2. add new arch linux-arm_32/ linux-aarch_64

How to Use(refer origin repo,and modify as belows)

change group id:

com.tencent.mm --> io.github.leon406

change version:

  • stable(mavenCentral): 1.2.21 --> 1.2.23

  • snapshot: 1.2.21 --> 1.2.22.6-SNAPSHOT

    ​ add snapshots repo to your build.gradle

maven {
    url "https://s01.oss.sonatype.org/content/repositories/snapshots/"
}

问题及临时解决方案

  1. 无法进行混淆

    AGP 4.2.+ 引入资源压缩, 但效果不如AndResGuard,两个同时启用无法正常使用,需要在 gradle.properties禁用

    android.enableResourceOptimizations=false
    

    测试AGP 4.2.2 AGP 7.0.4 可以正常使用

  2. 7zip无法运行

    配置本地7zip文件路径

    sevenzip {
            path = "xxxx/SevenZip-windows-x86_64.exe"
        }
    
  3. 避免字体资源混淆 (API 级别 26引入字体资源)

    andResGuard {
    	whiteList = [
    	"R.font.*
    	]
    }
    
  4. ConstraintLayout布局约束失效

    constraint_referenced_ids不能混淆,请用通配符加入白名单,如constraint_xxx

    andResGuard {
    	whiteList = [
    	"R.id.constraint*
    	]
    }
    
  5. 已测试AGP版本

    • 7.0.4
    • 7.1.1 有兼容问题
    • 7.3.1
    • 7.4.1 (1.2.23+ 支持)

andresguard's People

Contributors

simpleton avatar imknown avatar leon406 avatar shwenzhang avatar caij avatar jokermonn avatar ysbing avatar leleliu008 avatar heruoxin avatar uknownothingsnow avatar iclinux avatar pranaysharma avatar scauzhangpeng avatar seven456 avatar mikeyang01 avatar lizhuangs avatar zjn0505 avatar zlrab avatar eurstein avatar xen0n avatar gitter-badger avatar zacklee avatar suki-vt avatar cnhappier avatar xing634325131 avatar niluogege avatar lnsooxd avatar zjupure avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.