Skip to content

Commit

Permalink
everything works
Browse files Browse the repository at this point in the history
  • Loading branch information
Slenderman00 committed Aug 31, 2023
1 parent e5a061e commit 2537c04
Show file tree
Hide file tree
Showing 26 changed files with 14 additions and 46 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@ import org.jf.dexlib2.Opcode

object ConfigFingerprint : MethodFingerprint(
strings = listOf("com.grindrapp.android"),
customFingerprint = { methodDef, _ ->
!methodDef.name.contains("zzb")
}
)
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package app.revanced.patches.grindr.microg.annotations
package app.revanced.patches.grindr.firebase.annotations

import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
object PrimeFingerprint : MethodFingerprint(
strings = listOf("com.android.vending", "com.google.android.gms"),
customFingerprint = { methodDef, _ ->
methodDef.name.contains("startConnection")
methodDef.name.contains("startConnection") && !methodDef.name.contains("zzb")
}
)
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package app.revanced.patches.grindr.microg.patch.bytecode
package app.revanced.patches.grindr.firebase.patch.bytecode

import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
Expand All @@ -7,9 +7,9 @@ import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patches.grindr.microg.fingerprints.GetMessagingCertFingerprint
import app.revanced.patches.grindr.microg.fingerprints.GetReqistrationCertFingerprint
import app.revanced.patches.grindr.microg.Constants.SPOOFED_PACKAGE_SIGNATURE
import app.revanced.patches.grindr.firebase.fingerprints.GetMessagingCertFingerprint
import app.revanced.patches.grindr.firebase.fingerprints.GetReqistrationCertFingerprint
import app.revanced.patches.grindr.firebase.Constants.SPOOFED_PACKAGE_SIGNATURE

class FirebaseGetCertPatch : BytecodePatch(
listOf(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,44 +27,9 @@ import app.revanced.patches.grindr.ConfigFingerprint
import app.revanced.util.microg.MicroGBytecodeHelper

@Patch
@DependsOn([MicroGResourcePatch::class, lyImgPatch::class, GooglePlayServicesManifestResourcePatch::class, GooglePlayServicesManifestValueExceptionPatch::class, FirebaseGetCertPatch::class, GetPackageNamePatch::class, OpenHttpURLConnectionPatch::class])
@Name("Vanced MicroG support")
//@DependsOn([MicroGResourcePatch::class, lyImgPatch::class, GooglePlayServicesManifestResourcePatch::class, GooglePlayServicesManifestValueExceptionPatch::class, FirebaseGetCertPatch::class, GetPackageNamePatch::class, OpenHttpURLConnectionPatch::class])
//@DependsOn([FirebaseGetCertPatch::class, GetPackageNamePatch::class, OpenHttpURLConnectionPatch::class])
@DependsOn([FirebaseGetCertPatch::class])
@Name("Firebase patch")
@Description("Allows Grindr ReVanced to run without root and under a different package name with Vanced MicroG.")
@MicroGPatchCompatibility
class MicroGBytecodePatch : BytecodePatch(
listOf(
ServiceCheckFingerprint,
ConfigFingerprint,
GooglePlayUtilityFingerprint,
OnChangedFingerprint,
GoogleApiAvailabilityFingerprint
)
) {
override fun execute(context: BytecodeContext): PatchResult {
println(PACKAGE_NAME)

println("patching microg bytecode")

// apply common microG patch
MicroGBytecodeHelper.patchBytecode(
context, arrayOf(
MicroGBytecodeHelper.packageNameTransform(
PACKAGE_NAME,
REVANCED_PACKAGE_NAME
)
),
MicroGBytecodeHelper.PrimeMethodTransformationData(
ConfigFingerprint,
PACKAGE_NAME,
REVANCED_PACKAGE_NAME
),
listOf(
ServiceCheckFingerprint,
GooglePlayUtilityFingerprint,
OnChangedFingerprint,
)
)

return PatchResultSuccess()
}
}
@MicroGPatchCompatibility

0 comments on commit 2537c04

Please sign in to comment.