Skip to content

Commit

Permalink
fix(GmsCore support): Firebase installations error
Browse files Browse the repository at this point in the history
  • Loading branch information
YT-Advanced committed Jan 10, 2025
1 parent 8bdf785 commit 18cd39b
Show file tree
Hide file tree
Showing 3 changed files with 112 additions and 229 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,20 @@ fun baseAdsPatch(
) {
execute {

videoAdsFingerprint.methodOrThrow().apply {
addInstructionsWithLabels(
0, """
invoke-static {}, $classDescriptor->$methodDescriptor()Z
move-result v0
if-nez v0, :show_ads
return-void
""", ExternalLabel("show_ads", getInstruction(0))
)
setOf(
sslGuardFingerprint,
videoAdsFingerprint,
).forEach { fingerprint ->
fingerprint.methodOrThrow().apply {
addInstructionsWithLabels(
0, """
invoke-static {}, $classDescriptor->$methodDescriptor()Z
move-result v0
if-nez v0, :show_ads
return-void
""", ExternalLabel("show_ads", getInstruction(0))
)
}
}

musicAdsFingerprint.methodOrThrow().apply {
Expand All @@ -60,7 +65,6 @@ fun baseAdsPatch(
"""
)
}

}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ import app.revanced.util.or
import com.android.tools.smali.dexlib2.AccessFlags
import com.android.tools.smali.dexlib2.Opcode

internal val sslGuardFingerprint = legacyFingerprint(
name = "sslGuardFingerprint",
returnType = "V",
accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL,
strings = listOf("Cannot initialize SslGuardSocketFactory will null"),
)

internal val musicAdsFingerprint = legacyFingerprint(
name = "musicAdsFingerprint",
returnType = "V",
Expand Down
Loading

0 comments on commit 18cd39b

Please sign in to comment.