From 00deb174fdfe3db7a42ad90e46687ede8a321ac6 Mon Sep 17 00:00:00 2001 From: 327135569 Date: Sat, 24 Apr 2021 15:04:15 +0800 Subject: [PATCH] update README --- README.md | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index aa85772..057d951 100644 --- a/README.md +++ b/README.md @@ -12,18 +12,31 @@ LSPatch provides a way to insert dex and so into the target APK by repackaging. ## Usage 1. download the artifact -1. run `java -jar mmpatch.jar` +1. run `java -jar lspatch.jar` ## Build ``` -gradle build[Debug|Release] +gradlew build[Debug|Release] ``` +## Supported Android Versions +Same with [LSPosed]( +https://github.com/LSPosed/LSPosed#supported-versions) + ## Principle -LSPatch modifies the app property of AndroidManifest.xml in the target APK, changing it to the Application class in the inserted dex. Then it initializes LSPosed, and loads the Xposed module installed in the system. +1. Decompress target APK. +1. Patch the app property of AndroidManifest.xml in the target APK, changing it to the Application class in the inserted dex. +1. Copy all files in `list-so`, `list-assets`, `list-dex` into target APK. +1. Package and sign target APK. + +Running Stage: +1. Inserted dex initializes LSPosed +1. New ClassLoader from `assets/lsploader.dex`. +1. Loads the Xposed module installed in the system with new ClassLoader. ## Known issues -Can't solve the signature verification issue perfectly +1. Can't solve the signature verification issue perfectly +1. If you use under Windows, you need open `CMD/Powershell` with `Run as Administrator`, See [Code](https://github.com/LSPosed/LSPatch/blob/ab1a213161f90ec7ac604df47434201170b92b9a/patch/src/main/java/org/lsposed/patch/util/FileUtils.java#L67-L70).