shwenzhang / AndResGuard
proguard resource for Android by wechat team
AI Architecture Analysis
This repository is indexed by RepoMind. By analyzing shwenzhang/AndResGuard in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.
Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.
Repository Overview (README excerpt)
Crawler viewAndResGuard *Read this in other languages: English, 简体中文.* is a tooling for reducing your apk size, it works like the for Java source code, but only aim at the resource files. It changes to , and renames the resource file to . Finally, it repackages the apk with 7zip, which can reduce the package size obviously. is fast, and it does **NOT** need the source codes. Input an Android apk, then we can get a 'ResGuard' apk in a few seconds. Some uses of are: • Obfuscate android resources. It contains all the resource type(such as drawable、layout、string...). It can prevent your apk from being reversed by . • Shrinking the apk size. It can reduce the and the package size obviously. • Repackage with . It supports repackage apk with , and we can specify the compression method for each file. is a command-line tool, it supports Windows, Linux and Mac. We suggest you to use 7zip in Linux or Mac platform for a higher compression ratio. How to use With Gradle This has been released on Wildcard The whiteList and compressFilePattern support wildcard include ? * +. WhiteList You need put all resource which access via into whiteList. **You can find more whitsList configs of third-part SDK in white_list.md. Welcome PR your configs which is not included in white_list.md** The whiteList only works on the specsName of resources, it wouldn't keep the path of resource. If you wanna keeping the path, please use to implement it. For example, we wanna keeping the path of icon, we need add below into our . How to Launch If you are using , you can find the generate task option in group. Or alternatively, you run in your terminal. The format of task name is as same as . Sevenzip The in gradle file can be set by or . Multiple assignments are allowed, but the winner is **always** . Result If finalApkBackupPath is null, AndResGuard will overwrite final APK to the path which assemble[Task] write. Otherwise, it will store in the path you assigned. Other Looking for more detail Known Issue • The first element of list which returned by is empty string when you're using the APK which is compressed by 7zip. #162 Best Practise • Do **NOT** add into unless the app size is really matter to you.(#84 #233) • Do **NOT** enable 7zip compression( ) when you distribute your APP on Google Play. It'll prevent the file-by-file patch when updating your APP. (#233) Thanks Apktool Connor Tumbleson v2sig @jonyChina162