forked from ReVanced/revanced-patches-template
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactored all patches to work with new versions of revanced
- Loading branch information
1 parent
66f773e
commit c3b55c3
Showing
31 changed files
with
364 additions
and
33 deletions.
There are no files selected for viewing
Empty file.
Empty file.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -127,3 +127,6 @@ node_modules/ | |
|
||
# Ignore IDEA files | ||
.idea/ | ||
|
||
#ignoring all builds | ||
build/ |
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ plugins { | |
`maven-publish` | ||
} | ||
|
||
group = "your.org" | ||
group = "patches.grindr" | ||
|
||
repositories { | ||
mavenCentral() | ||
|
@@ -32,14 +32,14 @@ kotlin { | |
|
||
tasks.withType(Jar::class) { | ||
manifest { | ||
attributes["Name"] = "Your Patches" | ||
attributes["Description"] = "Patches for ReVanced." | ||
attributes["Name"] = "Grindr patches" | ||
attributes["Description"] = "Patches for Grindr." | ||
attributes["Version"] = version | ||
attributes["Timestamp"] = System.currentTimeMillis().toString() | ||
attributes["Source"] = "[email protected]:you/revanced-patches.git" | ||
attributes["Source"] = "[email protected]:Slenderman00/revanced-patches-grindr.git" | ||
attributes["Author"] = "You" | ||
attributes["Contact"] = "[email protected]" | ||
attributes["Origin"] = "https://your.homepage" | ||
attributes["Contact"] = "[email protected]" | ||
attributes["Origin"] = "https://joar.me" | ||
attributes["License"] = "GNU General Public License v3.0" | ||
} | ||
} | ||
|
@@ -82,9 +82,9 @@ publishing { | |
from(components["java"]) | ||
|
||
pom { | ||
name = "Your Patches" | ||
description = "Patches for ReVanced." | ||
url = "https://your.homepage" | ||
name = "Grindr patches" | ||
description = "Patches for Grindr." | ||
url = "https://joar.me" | ||
|
||
licenses { | ||
license { | ||
|
@@ -95,14 +95,14 @@ publishing { | |
developers { | ||
developer { | ||
id = "Your ID" | ||
name = "Your Name" | ||
email = "[email protected]" | ||
name = "Joar Heimonen" | ||
email = "[email protected]" | ||
} | ||
} | ||
scm { | ||
connection = "scm:git:git://github.com/you/revanced-patches.git" | ||
developerConnection = "scm:git:[email protected]:you/revanced-patches.git" | ||
url = "https://github.com/you/revanced-patches" | ||
developerConnection = "scm:git:[email protected]:Slenderman00/revanced-patches-grindr.git" | ||
url = "https://github.com/Slenderman00/revanced-patches-grindr/" | ||
} | ||
} | ||
} | ||
|
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package app.revanced.patches.grindr | ||
|
||
internal object Constants { | ||
const val PACKAGE_NAME = "com.grindrapp.android" | ||
const val SPOOFED_PACKAGE_SIGNATURE = "823F5A17C33B16B4775480B31607E7DF35D67AF8" | ||
} |
12 changes: 12 additions & 0 deletions
12
src/main/kotlin/grindr/patches/grindr/firebase/fingerprints/GetMessagingCertFingerprint.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package app.revanced.patches.grindr.firebase.fingerprints | ||
|
||
import app.revanced.patcher.fingerprint.MethodFingerprint | ||
|
||
object GetMessagingCertFingerprint : MethodFingerprint( | ||
"Ljava/lang/String;", | ||
strings = listOf( | ||
"ContentValues", | ||
"Could not get fingerprint hash for package: ", | ||
"No such package: " | ||
) | ||
) |
12 changes: 12 additions & 0 deletions
12
...main/kotlin/grindr/patches/grindr/firebase/fingerprints/GetRegistrationCertFingerprint.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package app.revanced.patches.grindr.firebase.fingerprints | ||
|
||
import app.revanced.patcher.fingerprint.MethodFingerprint | ||
|
||
object GetRegistrationCertFingerprint : MethodFingerprint( | ||
"Ljava/lang/String;", | ||
strings = listOf( | ||
"FirebaseRemoteConfig", | ||
"Could not get fingerprint hash for package: ", | ||
"No such package: " | ||
) | ||
) |
36 changes: 36 additions & 0 deletions
36
src/main/kotlin/grindr/patches/grindr/firebase/patch/FirebaseGetCertPatch.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package app.revanced.patches.grindr.firebase.patch | ||
|
||
import app.revanced.patcher.data.BytecodeContext | ||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions | ||
import app.revanced.patcher.patch.BytecodePatch | ||
import app.revanced.patcher.patch.PatchResult | ||
import app.revanced.patches.grindr.firebase.fingerprints.GetMessagingCertFingerprint | ||
import app.revanced.patches.grindr.firebase.fingerprints.GetRegistrationCertFingerprint | ||
import app.revanced.patches.grindr.Constants.SPOOFED_PACKAGE_SIGNATURE | ||
|
||
class FirebaseGetCertPatchGrindr : BytecodePatch( | ||
setOf( | ||
GetRegistrationCertFingerprint, | ||
GetMessagingCertFingerprint | ||
) | ||
) { | ||
override fun execute(context: BytecodeContext) { | ||
val spoofedInstruction = | ||
""" | ||
const-string v0, "$SPOOFED_PACKAGE_SIGNATURE" | ||
return-object v0 | ||
""" | ||
|
||
val registrationCertMethod = GetRegistrationCertFingerprint.result!!.mutableMethod | ||
val messagingCertMethod = GetMessagingCertFingerprint.result!!.mutableMethod | ||
|
||
registrationCertMethod.addInstructions( | ||
0, | ||
spoofedInstruction | ||
) | ||
messagingCertMethod.addInstructions( | ||
0, | ||
spoofedInstruction | ||
) | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
src/main/kotlin/grindr/patches/grindr/unlimited/fingerprints/HasFeatureFingerprint.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package app.revanced.patches.grindr.unlimited.fingerprints | ||
|
||
import app.revanced.patcher.extensions.or | ||
import app.revanced.patcher.fingerprint.annotation.FuzzyPatternScanMethod | ||
import app.revanced.patcher.fingerprint.MethodFingerprint | ||
import com.android.tools.smali.dexlib2.AccessFlags | ||
import com.android.tools.smali.dexlib2.Opcode | ||
|
||
object HasFeatureFingerprint : MethodFingerprint( | ||
"Z", | ||
parameters = listOf("Lcom/grindrapp/android/model/Feature;"), | ||
opcodes = listOf( | ||
Opcode.CONST_STRING, | ||
Opcode.INVOKE_STATIC, | ||
Opcode.INVOKE_STATIC, | ||
Opcode.MOVE_RESULT, | ||
Opcode.CONST_4, | ||
Opcode.IF_LEZ, | ||
Opcode.IGET_OBJECT, | ||
Opcode.NEW_INSTANCE, | ||
Opcode.INVOKE_DIRECT, | ||
Opcode.CONST_STRING, | ||
Opcode.INVOKE_VIRTUAL, | ||
Opcode.INVOKE_VIRTUAL | ||
), | ||
) |
28 changes: 28 additions & 0 deletions
28
...n/grindr/patches/grindr/unlimited/fingerprints/InnaccessibleProfileManagerbFingerprint.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package app.revanced.patches.grindr.unlimited.fingerprints | ||
|
||
import app.revanced.patcher.extensions.or | ||
import app.revanced.patcher.fingerprint.annotation.FuzzyPatternScanMethod | ||
import app.revanced.patcher.fingerprint.MethodFingerprint | ||
import com.android.tools.smali.dexlib2.AccessFlags | ||
import com.android.tools.smali.dexlib2.Opcode | ||
|
||
@FuzzyPatternScanMethod(2) | ||
object InnaccessibleProfileManagerbFingerprint : MethodFingerprint( | ||
"Z", | ||
accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL, | ||
opcodes = listOf( | ||
Opcode.IGET_OBJECT, | ||
Opcode.INVOKE_VIRTUAL, | ||
Opcode.MOVE_RESULT, | ||
Opcode.IF_EQZ, | ||
Opcode.IGET_OBJECT, | ||
Opcode.INVOKE_VIRTUAL, | ||
Opcode.MOVE_RESULT_OBJECT, | ||
Opcode.SGET_OBJECT, | ||
Opcode.IF_EQ, | ||
Opcode.CONST_4, | ||
Opcode.GOTO, | ||
Opcode.CONST_4, | ||
Opcode.RETURN | ||
), | ||
) |
20 changes: 20 additions & 0 deletions
20
...n/grindr/patches/grindr/unlimited/fingerprints/InnaccessibleProfileManagerdFingerprint.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package app.revanced.patches.grindr.unlimited.fingerprints | ||
|
||
import app.revanced.patcher.extensions.or | ||
import app.revanced.patcher.fingerprint.annotation.FuzzyPatternScanMethod | ||
import app.revanced.patcher.fingerprint.MethodFingerprint | ||
import com.android.tools.smali.dexlib2.AccessFlags | ||
import com.android.tools.smali.dexlib2.Opcode | ||
|
||
object InnaccessibleProfileManagerdFingerprint : MethodFingerprint( | ||
"Z", | ||
opcodes = listOf( | ||
Opcode.INVOKE_VIRTUAL, | ||
Opcode.MOVE_RESULT, | ||
Opcode.XOR_INT_LIT8, | ||
Opcode.RETURN | ||
), | ||
customFingerprint = { methodDef, _ -> | ||
methodDef.definingClass.contains("InaccessibleProfileManager") | ||
} | ||
) |
21 changes: 21 additions & 0 deletions
21
src/main/kotlin/grindr/patches/grindr/unlimited/fingerprints/IsFreeFingerprint.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package app.revanced.patches.grindr.unlimited.fingerprints | ||
|
||
import app.revanced.patcher.extensions.or | ||
import app.revanced.patcher.fingerprint.annotation.FuzzyPatternScanMethod | ||
import app.revanced.patcher.fingerprint.MethodFingerprint | ||
import com.android.tools.smali.dexlib2.AccessFlags | ||
import com.android.tools.smali.dexlib2.Opcode | ||
|
||
object IsFreeFingerprint : MethodFingerprint( | ||
"Z", | ||
accessFlags = AccessFlags.PUBLIC.value, | ||
opcodes = listOf( | ||
Opcode.IGET_OBJECT, | ||
Opcode.INVOKE_INTERFACE, | ||
Opcode.MOVE_RESULT, | ||
Opcode.RETURN | ||
), | ||
customFingerprint = { methodDef, _ -> | ||
methodDef.definingClass.contains("storage") | ||
} | ||
) |
28 changes: 28 additions & 0 deletions
28
src/main/kotlin/grindr/patches/grindr/unlimited/fingerprints/IsNoPlusUpsellFingerprint.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package app.revanced.patches.grindr.unlimited.fingerprints | ||
|
||
import app.revanced.patcher.extensions.or | ||
import app.revanced.patcher.fingerprint.annotation.FuzzyPatternScanMethod | ||
import app.revanced.patcher.fingerprint.MethodFingerprint | ||
import com.android.tools.smali.dexlib2.AccessFlags | ||
import com.android.tools.smali.dexlib2.Opcode | ||
|
||
object IsNoPlusUpsellFingerprint : MethodFingerprint( | ||
"Z", | ||
accessFlags = AccessFlags.PUBLIC.value, | ||
opcodes = listOf( | ||
Opcode.INVOKE_VIRTUAL, | ||
Opcode.MOVE_RESULT, | ||
Opcode.IF_NEZ, | ||
Opcode.INVOKE_VIRTUAL, | ||
Opcode.MOVE_RESULT, | ||
Opcode.IF_NEZ, | ||
Opcode.INVOKE_VIRTUAL, | ||
Opcode.MOVE_RESULT, | ||
Opcode.IF_EQZ, | ||
Opcode.GOTO, | ||
Opcode.CONST_4, | ||
Opcode.GOTO, | ||
Opcode.CONST_4, | ||
Opcode.RETURN | ||
), | ||
) |
24 changes: 24 additions & 0 deletions
24
src/main/kotlin/grindr/patches/grindr/unlimited/fingerprints/IsNoXtraUpsellFingerprint.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package app.revanced.patches.grindr.unlimited.fingerprints | ||
|
||
import app.revanced.patcher.extensions.or | ||
import app.revanced.patcher.fingerprint.annotation.FuzzyPatternScanMethod | ||
import app.revanced.patcher.fingerprint.MethodFingerprint | ||
import com.android.tools.smali.dexlib2.AccessFlags | ||
import com.android.tools.smali.dexlib2.Opcode | ||
|
||
object IsNoXtraUpsellFingerprint : MethodFingerprint( | ||
"Z", | ||
accessFlags = AccessFlags.PUBLIC.value, | ||
opcodes = listOf( | ||
Opcode.INVOKE_VIRTUAL, | ||
Opcode.MOVE_RESULT, | ||
Opcode.IF_NEZ, | ||
Opcode.INVOKE_VIRTUAL, | ||
Opcode.MOVE_RESULT, | ||
Opcode.IF_NEZ, | ||
Opcode.CONST_4, | ||
Opcode.GOTO, | ||
Opcode.CONST_4, | ||
Opcode.RETURN | ||
) | ||
) |
35 changes: 35 additions & 0 deletions
35
src/main/kotlin/grindr/patches/grindr/unlimited/fingerprints/ShowStoreFingerprint.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package app.revanced.patches.grindr.unlimited.fingerprints | ||
|
||
import app.revanced.patcher.extensions.or | ||
import app.revanced.patcher.fingerprint.annotation.FuzzyPatternScanMethod | ||
import app.revanced.patcher.fingerprint.MethodFingerprint | ||
import com.android.tools.smali.dexlib2.AccessFlags | ||
import com.android.tools.smali.dexlib2.Opcode | ||
|
||
//A | ||
|
||
@FuzzyPatternScanMethod(2) | ||
object ShowStoreFingerprint : MethodFingerprint( | ||
"Z", | ||
accessFlags = AccessFlags.PUBLIC.value, | ||
opcodes = listOf( | ||
Opcode.SGET_OBJECT, | ||
Opcode.INVOKE_VIRTUAL, | ||
Opcode.MOVE_RESULT, | ||
Opcode.IF_EQZ, | ||
Opcode.SGET_OBJECT, | ||
Opcode.INVOKE_VIRTUAL, | ||
Opcode.MOVE_RESULT, | ||
Opcode.IF_NEZ, | ||
Opcode.INVOKE_VIRTUAL, | ||
Opcode.MOVE_RESULT_OBJECT, | ||
Opcode.INVOKE_VIRTUAL, | ||
Opcode.MOVE_RESULT, | ||
Opcode.IF_NEZ, | ||
Opcode.GOTO, | ||
Opcode.CONST_4, | ||
Opcode.GOTO, | ||
Opcode.CONST_4, | ||
Opcode.RETURN | ||
), | ||
) |
Oops, something went wrong.