From a0fdee81a6d6773603520e7c3040ae8637642d58 Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Sat, 28 May 2022 14:31:20 +0200 Subject: [PATCH] fix: wrong annotation and signature in patches --- .../youtube/misc/integrations/patch/IntegrationsPatch.kt | 4 ++-- .../youtube/misc/manifest/patch/FixLocaleConfigErrorPatch.kt | 4 ++-- .../youtube/misc/microg/patch/bytecode/MicroGBytecodePatch.kt | 3 +-- .../youtube/misc/microg/patch/resource/MicroGResourcePatch.kt | 3 +-- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/integrations/patch/IntegrationsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/integrations/patch/IntegrationsPatch.kt index a396e0d1d..25bfe66e2 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/integrations/patch/IntegrationsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/integrations/patch/IntegrationsPatch.kt @@ -13,7 +13,7 @@ import app.revanced.patcher.patch.implementation.misc.PatchResultSuccess import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod.Companion.toMutable import app.revanced.patcher.util.smali.toInstructions import app.revanced.patches.youtube.misc.integrations.annotations.IntegrationsCompatibility -import app.revanced.patches.youtube.misc.microg.signatures.IntegrityCheckSignature +import app.revanced.patches.youtube.misc.integrations.signatures.InitSignature import org.jf.dexlib2.AccessFlags import org.jf.dexlib2.immutable.ImmutableMethod import org.jf.dexlib2.immutable.ImmutableMethodImplementation @@ -25,7 +25,7 @@ import org.jf.dexlib2.immutable.ImmutableMethodImplementation @Version("0.0.1") class IntegrationsPatch : BytecodePatch( listOf( - IntegrityCheckSignature + InitSignature ) ) { override fun execute(data: BytecodeData): PatchResult { diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/manifest/patch/FixLocaleConfigErrorPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/manifest/patch/FixLocaleConfigErrorPatch.kt index e7491ca1e..6248acc55 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/manifest/patch/FixLocaleConfigErrorPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/manifest/patch/FixLocaleConfigErrorPatch.kt @@ -8,13 +8,13 @@ import app.revanced.patcher.patch.annotations.Patch import app.revanced.patcher.patch.implementation.ResourcePatch import app.revanced.patcher.patch.implementation.misc.PatchResult import app.revanced.patcher.patch.implementation.misc.PatchResultSuccess -import app.revanced.patches.youtube.misc.microg.annotations.MicroGPatchCompatibility +import app.revanced.patches.youtube.misc.manifest.annotations.FixLocaleConfigErrorCompatibility import org.w3c.dom.Element @Patch @Name("locale-config-fix") @Description("Fix an error when building the resources by patching the manifest file.") -@MicroGPatchCompatibility +@FixLocaleConfigErrorCompatibility @Version("0.0.1") class FixLocaleConfigErrorPatch : ResourcePatch() { override fun execute(data: ResourceData): PatchResult { diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/microg/patch/bytecode/MicroGBytecodePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/microg/patch/bytecode/MicroGBytecodePatch.kt index 75448a5f5..c958d9f16 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/microg/patch/bytecode/MicroGBytecodePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/microg/patch/bytecode/MicroGBytecodePatch.kt @@ -9,7 +9,6 @@ import app.revanced.patcher.data.implementation.BytecodeData import app.revanced.patcher.data.implementation.proxy import app.revanced.patcher.extensions.addInstructions import app.revanced.patcher.extensions.or -import app.revanced.patcher.patch.annotations.Patch import app.revanced.patcher.patch.implementation.BytecodePatch import app.revanced.patcher.patch.implementation.misc.PatchResult import app.revanced.patcher.patch.implementation.misc.PatchResultSuccess @@ -35,7 +34,7 @@ import org.jf.dexlib2.iface.instruction.formats.Instruction21c import org.jf.dexlib2.iface.reference.StringReference import org.jf.dexlib2.immutable.reference.ImmutableStringReference -@Patch +// @Patch TODO: finish patch @Name("microg-bytecode-patch") @Description("Patch to allow YouTube ReVanced to run without root and under a different package name.") @MicroGPatchCompatibility diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/microg/patch/resource/MicroGResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/microg/patch/resource/MicroGResourcePatch.kt index 6998e0068..074674f80 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/microg/patch/resource/MicroGResourcePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/microg/patch/resource/MicroGResourcePatch.kt @@ -4,7 +4,6 @@ import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Version import app.revanced.patcher.data.implementation.ResourceData -import app.revanced.patcher.patch.annotations.Patch import app.revanced.patcher.patch.implementation.ResourcePatch import app.revanced.patcher.patch.implementation.misc.PatchResult import app.revanced.patcher.patch.implementation.misc.PatchResultSuccess @@ -12,7 +11,7 @@ import app.revanced.patches.youtube.misc.microg.annotations.MicroGPatchCompatibi import app.revanced.patches.youtube.misc.microg.shared.Constants.BASE_MICROG_PACKAGE_NAME import app.revanced.patches.youtube.misc.microg.shared.Constants.REVANCED_PACKAGE_NAME -@Patch +// @Patch TODO: finish patch @Name("microg-resource-patch") @Description("Resource patch to allow YouTube ReVanced to run without root and under a different package name.") @MicroGPatchCompatibility