|
|
||
|---|---|---|
| .github/workflows | ||
| apksigner@e1bd6e19a0 | ||
| app | ||
| appstub | ||
| axmlprinter | ||
| gradle/wrapper | ||
| mmp@efe7306fed | ||
| patch | ||
| share | ||
| .gitignore | ||
| .gitmodules | ||
| LICENSE | ||
| README.md | ||
| build.gradle | ||
| gradle.properties | ||
| gradlew | ||
| gradlew.bat | ||
| settings.gradle | ||
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
- use LSPosed as Hook framework
- Clean up the code
- merge Xpatch's Loader and Patch into a single project
Usage
- download the artifact
- run
java -jar lspatch.jar
Build
gradlew build[Debug|Release]
Supported Android Versions
Same with LSPosed
Principle
- Decompress target APK.
- Patch the app property of AndroidManifest.xml in the target APK, changing it to the Application class in the inserted dex.
- Copy all files in
list-so,list-assets,list-dexinto target APK. - Package and sign target APK.
Running Stage:
- Inserted dex initializes LSPosed
- New ClassLoader from
assets/lsploader.dex. - Loads the Xposed module installed in the system with new ClassLoader.
Known issues
- Can't solve the signature verification issue perfectly
- If you use under Windows, you need open
CMD/PowershellwithRun as Administrator, See Code.