A fork of NPatch allowing to patch API 101 plugins (gkms-localify only)
Go to file
LoveSy 2e53bf7ec5 Fix embed strategy 2021-06-22 01:49:08 +08:00
.github/workflows Merge so and dex into jar 2021-06-19 13:54:43 +08:00
apksigner@e1bd6e19a0 add apksigner as submodule 2021-04-07 23:30:59 +08:00
app Fix embed strategy 2021-06-22 01:49:08 +08:00
appstub New inject way 2021-06-20 17:29:09 +08:00
axmlprinter fix build again 2021-04-08 23:46:35 +08:00
core@9891fc4760 Support configuration 2021-06-22 01:31:22 +08:00
gradle/wrapper update gradle 2021-06-17 16:05:40 +08:00
patch Support configuration 2021-06-22 01:31:22 +08:00
share supports signature bypass level 2021-04-23 09:19:18 +08:00
.gitattributes normalize eol 2021-06-02 17:20:50 +08:00
.gitignore done with project structure refine 2021-04-07 12:06:30 +08:00
.gitmodules Use origin repo 2021-06-20 00:11:20 +08:00
LICENSE Create LICENSE 2021-04-09 11:48:53 +08:00
README.md update AGP 2021-06-03 10:44:27 +08:00
build.gradle update gradle 2021-06-17 16:05:40 +08:00
gradle.properties done with project structure refine 2021-04-07 12:06:30 +08:00
gradlew done with project structure refine 2021-04-07 12:06:30 +08:00
gradlew.bat done with project structure refine 2021-04-07 12:06:30 +08:00
settings.gradle Use origin repo 2021-06-20 00:11:20 +08:00

README.md

Introduction

LSPatch fork from Xpatch.

LSPatch provides a way to insert dex and so into the target APK by repackaging. The following changes have been made since Xpatch

  1. use LSPosed as Hook framework
  2. Clean up the code
  3. merge Xpatch's Loader and Patch into a single project

Usage

  1. download the artifact
  2. run java -jar lspatch.jar

Build

Android Studio Arctic Fox | 2020.3.1 Beta 3
gradlew build[Debug|Release]

Supported Android Versions

Same with LSPosed

Principle

  1. Decompress target APK.
  2. Patch the app property of AndroidManifest.xml in the target APK, changing it to the Application class in the inserted dex.
  3. Copy all files in list-so, list-assets, list-dex into target APK.
  4. Package and sign target APK.

Running Stage:

  1. Inserted dex initializes LSPosed
  2. New ClassLoader from assets/lsploader.dex.
  3. Loads the Xposed module installed in the system with new ClassLoader.

Known issues

  1. Can't solve the signature verification issue perfectly
  2. If you use under Windows, you need open CMD/Powershell with Run as Administrator, See Code.