{"id":20507459,"url":"https://github.com/lsposed/lspollution","last_synced_at":"2025-09-01T21:41:35.432Z","repository":{"id":237404484,"uuid":"609618333","full_name":"LSPosed/LSPollution","owner":"LSPosed","description":"Android app bundle resource obfuscator.","archived":false,"fork":false,"pushed_at":"2023-03-04T18:14:14.000Z","size":3918,"stargazers_count":30,"open_issues_count":2,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-27T12:13:18.973Z","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/LSPosed.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-04T18:12:31.000Z","updated_at":"2025-03-01T10:50:35.000Z","dependencies_parsed_at":"2024-05-01T09:54:36.254Z","dependency_job_id":null,"html_url":"https://github.com/LSPosed/LSPollution","commit_stats":null,"previous_names":["lsposed/lspollution"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LSPosed%2FLSPollution","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LSPosed%2FLSPollution/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LSPosed%2FLSPollution/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LSPosed%2FLSPollution/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LSPosed","download_url":"https://codeload.github.com/LSPosed/LSPollution/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248788867,"owners_count":21161726,"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-11-15T20:14:11.010Z","updated_at":"2025-04-13T21:52:36.823Z","avatar_url":"https://github.com/LSPosed.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build](https://github.com/LSPosed/LSPollution/actions/workflows/build.yml/badge.svg)](https://github.com/LSPosed/LSPollution/actions/workflows/build.yml)\n\nLSPollution\n========\n\nResource obfuscator for Android applications. LSPollution supports [configuration cache](https://docs.gradle.org/current/userguide/configuration_cache.html).\n\nFeatures\n--------\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\nUsage\n-----\nIn order to make LSPollution work with your project you have to apply the LSPollution Gradle plugin\nto the project.\n\nThe following is an example `settings.gradle.kts` to apply LSPollution.\n```kotlin\npluginManagement {\n  repositories {\n    mavenCentral()\n  }\n  plugins {\n    id(\"org.lsposed.lspollution\") version \"0.2.0\"\n  }\n}\n```\n\n**Note that you should use at least Java 17 to launch the gradle daemon for this plugin (this is also required by AGP 8+).**\nThe project that uses this plugin on the other hand does not necessarily to target Java 17.\n\nConfiguration\n-------------\nLSPollution plugin can be configured using `lspollution` extension object.\n\nThe following is an example `build.gradle.kts` that configures `lspollution` extension object with default values.\n```kotlin\nplugins {\n  id(\"org.lsposed.lspollution\")\n  // other plugins...\n}\n\nlspollution {\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 `lspollution 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```kotlin\nval lspollutionPlugin = project.tasks.getByName(\"lspollution${VARIANT_NAME}\")\nval bundlePath = lspollutionPlugin.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**LSPollution** 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\nCredit\n------\nLSPollution was forked from https://github.com/bytedance/AabResGuard. Credits to its original authors.\n\nLicense\n=======\n    Copyright 2019-2021 AabResGuard Authors\n    Copyright 2023 LSPosed\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flsposed%2Flspollution","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flsposed%2Flspollution","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flsposed%2Flspollution/lists"}