Skip to content

Commit

Permalink
Use axml (ManifestEditor) lib from LSPosed
Browse files Browse the repository at this point in the history
By doing so, we no longer need org.slf4j.* classes

ManifestEditor will now check atrribute types, so we choose correctly
the type of minSdkVersion.
  • Loading branch information
JingMatrix committed May 18, 2024
1 parent cddf811 commit 4a7cc25
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 6 deletions.
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,3 @@
path = core
url = https://github.com/JingMatrix/LSPosed.git
branch = master
[submodule "patch/libs/manifest-editor"]
path = patch/libs/manifest-editor
url = https://github.com/WindySha/ManifestEditor.git
1 change: 1 addition & 0 deletions patch/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ java {
}

dependencies {
implementation(projects.axml)
implementation(projects.apkzlib)
implementation(projects.share.java)

Expand Down
1 change: 0 additions & 1 deletion patch/libs/manifest-editor
Submodule manifest-editor deleted from 8133ad
2 changes: 1 addition & 1 deletion patch/src/main/java/org/lsposed/patch/LSPatch.java
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ private byte[] modifyManifestFile(InputStream is, String metadata, int minSdkVer
if (overrideVersionCode)
property.addManifestAttribute(new AttributeItem(NodeValue.Manifest.VERSION_CODE, 1));
if (minSdkVersion < 28)
property.addUsesSdkAttribute(new AttributeItem(NodeValue.UsesSDK.MIN_SDK_VERSION, "28"));
property.addUsesSdkAttribute(new AttributeItem(NodeValue.UsesSDK.MIN_SDK_VERSION, 28));
property.addApplicationAttribute(new AttributeItem(NodeValue.Application.DEBUGGABLE, debuggableFlag));
property.addApplicationAttribute(new AttributeItem("appComponentFactory", PROXY_APP_COMPONENT_FACTORY));
property.addMetaData(new ModificationProperty.MetaData("lspatch", metadata));
Expand Down
2 changes: 2 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ rootProject.name = "LSPatch"
include(
":apkzlib",
":core",
":axml",
":hiddenapi:bridge",
":hiddenapi:stubs",
":jar",
Expand All @@ -48,6 +49,7 @@ include(
)

project(":core").projectDir = file("core/core")
project(":axml").projectDir = file("core/axml")
project(":hiddenapi:bridge").projectDir = file("core/hiddenapi/bridge")
project(":hiddenapi:stubs").projectDir = file("core/hiddenapi/stubs")
project(":services:daemon-service").projectDir = file("core/services/daemon-service")
Expand Down
1 change: 1 addition & 0 deletions share/lspatch-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
-keepnames class org.lsposed.lspd.impl.LSPosedHookCallback
-keepnames class org.lsposed.lspd.util.Hookers
-keepnames class org.lsposed.lspd.util.LspModuleClassLoader
-keepnames class org.lsposed.lspd.util.MetaDataReader

-keepattributes SourceFile,LineNumberTable

0 comments on commit 4a7cc25

Please sign in to comment.