Use axml (ManifestEditor) lib from LSPosed

By doing so, we no longer need org.slf4j.* classes

ManifestEditor will now check atrribute types, so we choose correctly
the type of minSdkVersion.
This commit is contained in:
JingMatrix 2024-05-18 13:51:17 +02:00
parent cddf811b9c
commit 4a7cc257a7
7 changed files with 6 additions and 6 deletions

3
.gitmodules vendored
View File

@ -6,6 +6,3 @@
path = core path = core
url = https://github.com/JingMatrix/LSPosed.git url = https://github.com/JingMatrix/LSPosed.git
branch = master branch = master
[submodule "patch/libs/manifest-editor"]
path = patch/libs/manifest-editor
url = https://github.com/WindySha/ManifestEditor.git

2
core

@ -1 +1 @@
Subproject commit 69f73908ef82eaaac3d81e6274cbd625e2a5a418 Subproject commit 1f80050e1dfc1a0f47202aa8d6c9c3e2b2bdc63d

View File

@ -17,6 +17,7 @@ java {
} }
dependencies { dependencies {
implementation(projects.axml)
implementation(projects.apkzlib) implementation(projects.apkzlib)
implementation(projects.share.java) implementation(projects.share.java)

@ -1 +0,0 @@
Subproject commit 8133add330141096033cc3e6bad48100c1148c11

View File

@ -342,7 +342,7 @@ public class LSPatch {
if (overrideVersionCode) if (overrideVersionCode)
property.addManifestAttribute(new AttributeItem(NodeValue.Manifest.VERSION_CODE, 1)); property.addManifestAttribute(new AttributeItem(NodeValue.Manifest.VERSION_CODE, 1));
if (minSdkVersion < 28) 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(NodeValue.Application.DEBUGGABLE, debuggableFlag));
property.addApplicationAttribute(new AttributeItem("appComponentFactory", PROXY_APP_COMPONENT_FACTORY)); property.addApplicationAttribute(new AttributeItem("appComponentFactory", PROXY_APP_COMPONENT_FACTORY));
property.addMetaData(new ModificationProperty.MetaData("lspatch", metadata)); property.addMetaData(new ModificationProperty.MetaData("lspatch", metadata));

View File

@ -33,6 +33,7 @@ rootProject.name = "LSPatch"
include( include(
":apkzlib", ":apkzlib",
":core", ":core",
":axml",
":hiddenapi:bridge", ":hiddenapi:bridge",
":hiddenapi:stubs", ":hiddenapi:stubs",
":jar", ":jar",
@ -48,6 +49,7 @@ include(
) )
project(":core").projectDir = file("core/core") project(":core").projectDir = file("core/core")
project(":axml").projectDir = file("core/axml")
project(":hiddenapi:bridge").projectDir = file("core/hiddenapi/bridge") project(":hiddenapi:bridge").projectDir = file("core/hiddenapi/bridge")
project(":hiddenapi:stubs").projectDir = file("core/hiddenapi/stubs") project(":hiddenapi:stubs").projectDir = file("core/hiddenapi/stubs")
project(":services:daemon-service").projectDir = file("core/services/daemon-service") project(":services:daemon-service").projectDir = file("core/services/daemon-service")

View File

@ -5,5 +5,6 @@
-keepnames class org.lsposed.lspd.impl.LSPosedHookCallback -keepnames class org.lsposed.lspd.impl.LSPosedHookCallback
-keepnames class org.lsposed.lspd.util.Hookers -keepnames class org.lsposed.lspd.util.Hookers
-keepnames class org.lsposed.lspd.util.LspModuleClassLoader -keepnames class org.lsposed.lspd.util.LspModuleClassLoader
-keepnames class org.lsposed.lspd.util.MetaDataReader
-keepattributes SourceFile,LineNumberTable -keepattributes SourceFile,LineNumberTable