diff --git a/build.gradle.kts b/build.gradle.kts index 722156d50a..ad15946fa5 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -27,7 +27,7 @@ repositories { } dependencies { - implementation("app.revanced:revanced-patcher:9.0.0") + implementation("app.revanced:revanced-patcher:10.0.0") implementation("app.revanced:multidexlib2:2.5.3-a3836654") // Required for meta implementation("com.google.code.gson:gson:2.10.1") diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/microg/fingerprints/GooglePlayUtilityFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/microg/fingerprints/GooglePlayUtilityFingerprint.kt index e50f656993..ebca7a6ba3 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/microg/fingerprints/GooglePlayUtilityFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/microg/fingerprints/GooglePlayUtilityFingerprint.kt @@ -5,8 +5,8 @@ import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint import org.jf.dexlib2.AccessFlags object GooglePlayUtilityFingerprint : MethodFingerprint( - "I", - AccessFlags.PUBLIC or AccessFlags.STATIC, - listOf("L", "L"), + returnType = "I", + accessFlags = AccessFlags.PUBLIC or AccessFlags.STATIC, + parameters = listOf("L", "I"), strings = listOf("This should never happen.", "MetadataValueReader", "com.google.android.gms") ) \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/microg/fingerprints/ServiceCheckFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/microg/fingerprints/ServiceCheckFingerprint.kt index 9a07e25461..8c98f055a6 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/microg/fingerprints/ServiceCheckFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/microg/fingerprints/ServiceCheckFingerprint.kt @@ -5,6 +5,8 @@ import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint import org.jf.dexlib2.AccessFlags object ServiceCheckFingerprint : MethodFingerprint( - "V", AccessFlags.PUBLIC or AccessFlags.STATIC, listOf("L", "I"), + returnType = "V", + accessFlags = AccessFlags.PUBLIC or AccessFlags.STATIC, + parameters = listOf("L", "I"), strings = listOf("Google Play Services not available", "GooglePlayServices not available due to error ") ) \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/util/microg/MicroGBytecodeHelper.kt b/src/main/kotlin/app/revanced/util/microg/MicroGBytecodeHelper.kt index b4b4038cb8..e780aafed5 100644 --- a/src/main/kotlin/app/revanced/util/microg/MicroGBytecodeHelper.kt +++ b/src/main/kotlin/app/revanced/util/microg/MicroGBytecodeHelper.kt @@ -5,6 +5,7 @@ import app.revanced.patcher.extensions.addInstruction import app.revanced.patcher.extensions.addInstructions import app.revanced.patcher.extensions.replaceInstruction import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint +import app.revanced.patcher.patch.PatchResultError import app.revanced.patcher.util.proxy.mutableTypes.MutableClass import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod import app.revanced.util.microg.Constants.ACTIONS @@ -218,6 +219,7 @@ internal object MicroGBytecodeHelper { */ private fun List.returnEarly() { this.forEach { fingerprint -> + if (fingerprint.result == null) throw PatchResultError(fingerprint.toString()) val result = fingerprint.result!! val stringInstructions = when (result.method.returnType.first()) { 'L' -> """