Skip to content

Commit

Permalink
Successfully generating fcm token
Browse files Browse the repository at this point in the history
  • Loading branch information
Slenderman00 committed Aug 31, 2023
1 parent d9a1cbc commit 878cc59
Show file tree
Hide file tree
Showing 9 changed files with 53 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,7 @@ internal object Constants {
const val REVANCED_PACKAGE_NAME = "com.grindrrevanced.android"
const val PACKAGE_NAME = "com.grindrapp.android"
const val SPOOFED_PACKAGE_NAME = PACKAGE_NAME
const val SPOOFED_PACKAGE_SIGNATURE = "92A99370F1ABE83DFDA3F36D4E564428B27738FC"
const val SPOOFED_PACKAGE_SIGNATURE = "823F5A17C33B16B4775480B31607E7DF35D67AF8"
//old 92A99370F1ABE83DFDA3F36D4E564428B27738FC
//new 823F5A17C33B16B4775480B31607E7DF35D67AF8
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package app.revanced.patches.grindr.microg.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint

object GetPackageNameFingerprint : MethodFingerprint(
"Ljava/lang/String;",
customFingerprint = { methodDef, _ ->
methodDef.name.contains("getPackageName")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint

object GoogleApiAvailabilityFingerprint : MethodFingerprint(
customFingerprint = { methodDef, _ ->
println("Found class: ${methodDef.definingClass} with method: ${methodDef.name} with return type: ${methodDef.returnType}")
methodDef.name.contains("getInstance")
}
)
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ object OnChangedFingerprint : MethodFingerprint(
returnType = "V",
strings = listOf("account_verify_required_google", "no_google_play_service"),
customFingerprint = { methodDef, _ ->
println("Found class: ${methodDef.definingClass} with method: ${methodDef.name} with return type: ${methodDef.returnType}")
methodDef.name.contains("onChanged")
}
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package app.revanced.patches.grindr.microg.fingerprints

import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint

object OpenHttpURLConnectionFingerprint : MethodFingerprint(
returnType = "Ljava/net/HttpURLConnection",
strings = listOf("Failed to get heartbeats header", "ContentValues", "Content-Type", "application/json", "Accept"),
)
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
object PrimeFingerprint : MethodFingerprint(
strings = listOf("com.android.vending", "com.google.android.gms"),
customFingerprint = { methodDef, _ ->
println("Found class: ${methodDef.definingClass} with method: ${methodDef.name} with return type: ${methodDef.returnType}")
methodDef.name.contains("startConnection")
}
)
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import app.revanced.extensions.toErrorResult

import app.revanced.patches.grindr.microg.fingerprints.GetPackageNameFingerprint

import app.revanced.patcher.extensions.InstructionExtensions.replaceInstructions
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions

import app.revanced.patches.grindr.microg.Constants.PACKAGE_NAME
class GetPackageNamePatch : BytecodePatch(
Expand All @@ -22,10 +22,10 @@ class GetPackageNamePatch : BytecodePatch(
) {
override fun execute(context: BytecodeContext): PatchResult {
GetPackageNameFingerprint.result?.let { result ->
println("Found fingerprint!")
println("Found GetPackageName fingerprint!")

result.mutableMethod.apply {
replaceInstructions(
addInstructions(
0,
"""
const-string v0, "${PACKAGE_NAME}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ 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])
@DependsOn([MicroGResourcePatch::class, lyImgPatch::class, GooglePlayServicesManifestResourcePatch::class, GooglePlayServicesManifestValueExceptionPatch::class, FirebaseGetCertPatch::class, GetPackageNamePatch::class, OpenHttpURLConnectionPatch::class])
@Name("Vanced MicroG support")
@Description("Allows Grindr ReVanced to run without root and under a different package name with Vanced MicroG.")
@MicroGPatchCompatibility
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
package app.revanced.patches.grindr.microg.patch.bytecode

import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.DependsOn
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.extensions.toErrorResult

import app.revanced.patches.grindr.microg.fingerprints.OpenHttpURLConnectionFingerprint

import app.revanced.patcher.extensions.InstructionExtensions.replaceInstructions

class OpenHttpURLConnectionPatch : BytecodePatch(
listOf(
OpenHttpURLConnectionFingerprint,
)
) {
override fun execute(context: BytecodeContext): PatchResult {
OpenHttpURLConnectionFingerprint.result?.let { result ->
println("Found fingerprint!")

result.mutableMethod.apply {
replaceInstructions(
23,
"""
const-string v2, "com.grindrapp.android"
"""
)
}
} ?: return OpenHttpURLConnectionFingerprint.toErrorResult()

return PatchResultSuccess()
}
}

0 comments on commit 878cc59

Please sign in to comment.