diff --git a/meta-loader/build.gradle.kts b/meta-loader/build.gradle.kts index 0af01bbd..46de5f23 100644 --- a/meta-loader/build.gradle.kts +++ b/meta-loader/build.gradle.kts @@ -42,4 +42,5 @@ androidComponents.onVariants { variant -> dependencies { compileOnly(projects.hiddenapi.stubs) implementation(projects.share.java) + implementation("org.lsposed.hiddenapibypass:hiddenapibypass:4.3") } diff --git a/meta-loader/src/main/java/org/lsposed/lspatch/metaloader/LSPAppComponentFactoryStub.java b/meta-loader/src/main/java/org/lsposed/lspatch/metaloader/LSPAppComponentFactoryStub.java index 6ee8c0a3..c7ae135b 100644 --- a/meta-loader/src/main/java/org/lsposed/lspatch/metaloader/LSPAppComponentFactoryStub.java +++ b/meta-loader/src/main/java/org/lsposed/lspatch/metaloader/LSPAppComponentFactoryStub.java @@ -9,6 +9,7 @@ import android.util.JsonReader; import android.util.Log; +import org.lsposed.hiddenapibypass.HiddenApiBypass; import org.lsposed.lspatch.share.Constants; import java.io.ByteArrayOutputStream; @@ -68,7 +69,7 @@ public class LSPAppComponentFactoryStub extends AppComponentFactory { var ipm = IPackageManager.Stub.asInterface(ServiceManager.getService("package")); ApplicationInfo manager; if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { - manager = ipm.getApplicationInfo(Constants.MANAGER_PACKAGE_NAME, 0L, 0); + manager = (ApplicationInfo) HiddenApiBypass.invoke(IPackageManager.class, ipm, "getApplicationInfo", Constants.MANAGER_PACKAGE_NAME, 0L, 0); } else { manager = ipm.getApplicationInfo(Constants.MANAGER_PACKAGE_NAME, 0, 0); }