mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-05-01 23:24:28 +02:00
add certificate-spoof
patch: fix Android Auto connection issue with MicroG builds
This commit is contained in:
parent
e41fc03e64
commit
2be738b75c
@ -0,0 +1,9 @@
|
|||||||
|
package app.revanced.patches.music.misc.androidauto.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
|
||||||
|
object CertificateCheckFingerprint : MethodFingerprint(
|
||||||
|
returnType = "Z",
|
||||||
|
parameters = listOf("L"),
|
||||||
|
strings = listOf("X509")
|
||||||
|
)
|
@ -0,0 +1,35 @@
|
|||||||
|
package app.revanced.patches.music.misc.androidauto.patch
|
||||||
|
|
||||||
|
import app.revanced.extensions.toErrorResult
|
||||||
|
import app.revanced.patcher.annotation.Description
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.annotation.Version
|
||||||
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
|
import app.revanced.patcher.extensions.addInstructions
|
||||||
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
import app.revanced.patcher.patch.PatchResult
|
||||||
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
|
import app.revanced.patches.music.misc.androidauto.fingerprints.CertificateCheckFingerprint
|
||||||
|
import app.revanced.patches.shared.annotation.YouTubeMusicCompatibility
|
||||||
|
|
||||||
|
@Patch
|
||||||
|
@Name("certificate-spoof")
|
||||||
|
@Description("Spoofs the YouTube Music certificate for Android Auto.")
|
||||||
|
@YouTubeMusicCompatibility
|
||||||
|
@Version("0.0.1")
|
||||||
|
class AndroidAutoCertificatePatch : BytecodePatch(
|
||||||
|
listOf(CertificateCheckFingerprint)
|
||||||
|
) {
|
||||||
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
|
|
||||||
|
CertificateCheckFingerprint.result?.mutableMethod?.addInstructions(
|
||||||
|
0, """
|
||||||
|
const/4 v0, 0x1
|
||||||
|
return v0
|
||||||
|
"""
|
||||||
|
) ?: return CertificateCheckFingerprint.toErrorResult()
|
||||||
|
|
||||||
|
return PatchResultSuccess()
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user