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
- download the artifact
- run
java -jar lspatch.jar
gradlew build[Debug|Release]
Same with LSPosed
- 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-dex
into 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.
- Can't solve the signature verification issue perfectly
- If you use under Windows, you need open
CMD/Powershell
withRun as Administrator
, See Code.