Skip to content

Commit

Permalink
Fixed restart promt
Browse files Browse the repository at this point in the history
  • Loading branch information
Slenderman00 committed Sep 1, 2023
1 parent 21a134f commit 0f95305
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package app.revanced.patches.grindr.unlimited.fingerprints

import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import org.jf.dexlib2.AccessFlags
import org.jf.dexlib2.Opcode

//A

@FuzzyPatternScanMethod(2)
object InnaccessibleProfileFingerprint : 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.GOTO,
Opcode.CONST_4,
Opcode.RETURN
),
)
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.method.annotation.FuzzyPatternScanMethod
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import org.jf.dexlib2.AccessFlags
import org.jf.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
),
)
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ class UnlockUnlimitedPatch : BytecodePatch(
IsNoXtraUpsellFingerprint,
IsPlusFingerprint,
IsUnlimitedFingerprint,
IsXtraFingerprint
IsXtraFingerprint,
InnaccessibleProfileFingerprint
)
) {
override fun execute(context: BytecodeContext): PatchResult {
Expand Down Expand Up @@ -100,6 +101,14 @@ class UnlockUnlimitedPatch : BytecodePatch(
}
} ?: return IsXtraFingerprint.toErrorResult()

InnaccessibleProfileFingerprint.result?.let { result ->
println("Found InnaccessibleProfileFingerprint!")
result.mutableMethod.apply {
replaceInstructions(0, _true)
}
} ?: return InnaccessibleProfileFingerprint.toErrorResult()


return PatchResultSuccess()
}
}

0 comments on commit 0f95305

Please sign in to comment.