{"id":15027465,"url":"https://github.com/bytedance/aabresguard","last_synced_at":"2025-04-08T16:09:28.101Z","repository":{"id":40645417,"uuid":"223898372","full_name":"bytedance/AabResGuard","owner":"bytedance","description":"The tool of obfuscated aab resources.(Android app bundle资源混淆工具)","archived":true,"fork":false,"pushed_at":"2021-11-25T00:59:07.000Z","size":4808,"stargazers_count":1366,"open_issues_count":61,"forks_count":194,"subscribers_count":21,"default_branch":"develop","last_synced_at":"2025-04-08T16:09:18.225Z","etag":null,"topics":["aab","android","android-app-bundle","resource-obfuscation"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bytedance.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-11-25T08:28:51.000Z","updated_at":"2025-04-08T03:02:32.000Z","dependencies_parsed_at":"2022-07-13T09:20:30.584Z","dependency_job_id":null,"html_url":"https://github.com/bytedance/AabResGuard","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytedance%2FAabResGuard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytedance%2FAabResGuard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytedance%2FAabResGuard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytedance%2FAabResGuard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bytedance","download_url":"https://codeload.github.com/bytedance/AabResGuard/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247878022,"owners_count":21011158,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aab","android","android-app-bundle","resource-obfuscation"],"created_at":"2024-09-24T20:06:29.247Z","updated_at":"2025-04-08T16:09:28.084Z","avatar_url":"https://github.com/bytedance.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AabResGuard\n\u003ch1 align=\"center\"\u003e\n  \u003cimg src=\"wiki/images/logo.png\" height=\"220\" width=\"460\"/\u003e\n  \u003cp align=\"center\" style=\"font-size: 0.3em\"\u003eThe tool of obfuscated aab resources\u003c/p\u003e\n\u003c/h1\u003e\n\n[ ![Download](https://api.bintray.com/packages/yeoh/maven/aabresguard-core/images/download.svg) ](https://bintray.com/yeoh/maven/aabresguard-plugin/)\n[![License](https://img.shields.io/badge/license-Apache2.0-brightgreen)](LICENSE)\n[![Bundletool](https://img.shields.io/badge/Dependency-Bundletool/0.10.0-blue)](https://github.com/google/bundletool)\n\n**[English](README.md)** | [简体中文](wiki/zh-cn/README.md)\n\n\u003e Powered by bytedance douyin android team.\n\n## Features\n\u003e The tool of obfuscated aab resources.\n\n- **Merge duplicated resources:** Consolidate duplicate resource files to reduce package size.\n- **Filter bundle files:** Support for filtering files in the `bundle` package. Currently only supports filtering in the `MATE-INFO/` and `lib/` paths.\n- **White list:** The resources in the whitelist are not to be obfuscated.\n- **Incremental obfuscation:** Input the `mapping` file to support incremental obfuscation.\n- **Remove string:** Input the unused file splits by lines to support remove strings.\n- **???:** Looking ahead, there will be more feature support, welcome to submit PR \u0026 issue.\n\n## [Data of size savings](wiki/en/DATA.md)\n**AabResGuard** is a resource obfuscation tool powered by the douyin Android team. It has been launched at the end of July 2018 in several overseas products, such as **Tiktok, Vigo**, etc. \nThere is no feedback on related resource issues. \nFor more data details, please go to **[Data of size savings](wiki/en/DATA.md)**.\n\n## Quick start\n- **Command tool:** Support command line.\n- **Gradle plugin:** Support for `gradle plugin`, using the original packaging command to execute obfuscation.\n\n### Gradle plugin\nConfigured in `build.gradle(root project)`\n```gradle\nbuildscript {\n  repositories {\n    mavenCentral()\n    jcenter()\n    google()\n   }\n  dependencies {\n    classpath \"com.bytedance.android:aabresguard-plugin:0.1.0\"\n  }\n}\n```\n\nConfigured in `build.gradle(application)`\n```gradle\napply plugin: \"com.bytedance.android.aabResGuard\"\naabResGuard {\n    mappingFile = file(\"mapping.txt\").toPath() // Mapping file used for incremental obfuscation\n    whiteList = [ // White list rules\n        \"*.R.raw.*\",\n        \"*.R.drawable.icon\"\n    ]\n    obfuscatedBundleFileName = \"duplicated-app.aab\" // Obfuscated file name, must end with '.aab'\n    mergeDuplicatedRes = true // Whether to allow the merge of duplicate resources\n    enableFilterFiles = true // Whether to allow filter files\n    filterList = [ // file filter rules\n        \"*/arm64-v8a/*\",\n        \"META-INF/*\"\n    ]\n    \n    enableFilterStrings = false // switch of filter strings\n    unusedStringPath = file(\"unused.txt\").toPath() // strings will be filtered in this file\n    languageWhiteList = [\"en\", \"zh\"] // keep en,en-xx,zh,zh-xx etc. remove others.\n}\n```\n\nThe `aabResGuard plugin` intrudes the `bundle` packaging process and can be obfuscated by executing the original packaging commands.\n```cmd\n./gradlew clean :app:bundleDebug --stacktrace\n```\n\nGet the obfuscated `bundle` file path by `gradle` .\n```groovy\ndef aabResGuardPlugin = project.tasks.getByName(\"aabresguard${VARIANT_NAME}\")\nPath bundlePath = aabResGuardPlugin.getObfuscatedBundlePath()\n```\n\n### [Whitelist](wiki/en/WHITELIST.md)\nThe resources that can not be confused. Welcome PR your configs which is not included in [WHITELIST](wiki/en/WHITELIST.md)\n\n### [Command line](wiki/en/COMMAND.md)\n**AabResGuard** provides a `jar` file that can be executed directly from the command line. More details, please go to **[Command Line](wiki/en/COMMAND.md)**.\n\n### [Output](wiki/en/OUTPUT.md)\nAfter the packaging is completed, the obfuscated file and the log files will be output. More details, please go to **[Output File](wiki/en/OUTPUT.md)**.\n- **resources-mapping.txt:** Resource obfuscation mapping, which can be used as the next obfuscation input to achieve incremental obfuscate.\n- **aab:** Optimized aab file.\n- **-duplicated.txt:** duplicated file logging.\n\n## [Change log](wiki/en/CHANGELOG.md)\nVersion change log. More details, please go to **[Change Log](wiki/en/CHANGELOG.md)** .\n\n## [Contribute](wiki/en/CONTRIBUTOR.md)\nRead the details to learn how to participate in the improvement **AabResGuard**.\n\n### Contributor\n* [JingYeoh](https://github.com/JingYeoh)\n* [Jun Li]()\n* [Zilai Jiang](https://github.com/Zzzia)\n* [Zhiqian Yang](https://github.com/yangzhiqian)\n* [Xiaoshuang Bai (Designer)](https://www.behance.net/shawnpai)\n\n## Thanks\n* [AndResGuard](https://github.com/shwenzhang/AndResGuard/)\n* [BundleTool](https://github.com/google/bundletool)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbytedance%2Faabresguard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbytedance%2Faabresguard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbytedance%2Faabresguard/lists"}