LSPatch Generator is an automated tool designed to download and patch Android applications using LSPatch. It simplifies the process of applying LSPatch modifications by automating APK downloads and patching with specific configurations.
- Automated Downloads: Download APKs directly from APKPure or a specified direct URL.
- Customizable Patching: Configure LSPatch flags including:
--manager--embed(using predefined embed modules)--debuggable--injectdex--allowdown--sigbypasslv
- Concurrent Processing: Patches multiple applications in parallel with a configurable limit (default: 2).
- Automated Workflow: Combines downloading and patching in a single command.
- Node.js (Recommended version: 20+)
- pnpm (Recommended package manager)
- Java Runtime Environment (JRE): Required to execute
bin/lspatch.jar.
-
Clone the repository:
git clone https://github.com/green1052/LSPatch-Generator.git cd LSPatch-Generator -
Install the dependencies:
pnpm install
-
Ensure you have
lspatch.jarin thebin/directory.
Create or modify config.json in the root directory to define the applications you want to patch and their configurations.
embeds: A dictionary of names and paths to LSPatch modules you want to embed.applications: A dictionary where the key is the package name (or a unique identifier) and the value is anApplicationobject.
type: Either"apkpure"(for automated download from APKPure) or"direct"(for a manual download URL).url: (Optional) The download URL iftypeis"direct".manager: (Optional) Boolean. Iftrue, uses the--managerflag.embed: (Optional) An array of keys from theembedssection to include.debuggable: (Optional) Boolean. Iftrue, adds the--debuggableflag.injectdex: (Optional) Boolean. Iftrue, adds the--injectdexflag.allowdown: (Optional) Boolean. Iftrue, adds the--allowdownflag.sigbypasslv: (Optional) Integer (0, 1, or 2). Sets the--sigbypasslvflag level.
{
"embeds": {
"my-module": "embeds/my-module.apk"
},
"applications": {
"com.discord": {
"type": "apkpure",
"manager": true
},
"com.example.app": {
"type": "direct",
"url": "https://example.com/app.apk",
"embed": ["my-module"],
"debuggable": true
}
}
}Run the generator using the following command:
pnpm start