File tree Expand file tree Collapse file tree
patches/src/main/kotlin/li/auna/patches Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,16 +7,14 @@ internal val hasPurchasedFingerprint = fingerprint {
77 accessFlags(AccessFlags .PUBLIC , AccessFlags .FINAL )
88 returns(" Z" )
99 custom { methodDef, classDef ->
10- classDef.type.endsWith(" Lorg/kustom/billing/LicenseState;" ) &&
11- methodDef.name == " isLicensed"
10+ methodDef.name == " isLicensed" && classDef.type.endsWith(" Lorg/kustom/billing/LicenseState;" )
1211 }
1312}
1413
1514internal val isPurchaseValidFingerprint = fingerprint {
1615 accessFlags(AccessFlags .PUBLIC , AccessFlags .FINAL )
1716 returns(" Z" )
1817 custom { methodDef, classDef ->
19- classDef.type.endsWith(" Lorg/kustom/billing/LicenseState;" ) &&
20- methodDef.name == " isValid"
18+ methodDef.name == " isValid" && classDef.type.endsWith(" Lorg/kustom/billing/LicenseState;" )
2119 }
2220}
Original file line number Diff line number Diff line change 1- package app.revanced .patches.shared
1+ package li.auna .patches.shared
22
33import app.revanced.patcher.fingerprint
44
Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ import app.revanced.patcher.fingerprint
55internal val hideSponsoredMessagesFingerprint = fingerprint {
66 returns(" V" )
77 custom { methodDef, classDef ->
8- // org.telegram.ui.ChatActivity -> Lorg/telegram/ui/ChatActivity;
9- classDef.type.endsWith(" Lorg/telegram/ui/ChatActivity;" ) && methodDef.name == " addSponsoredMessages"
8+ methodDef.name == " addSponsoredMessages" && classDef.type.endsWith(" Lorg/telegram/ui/ChatActivity;" )
109 }
1110}
Original file line number Diff line number Diff line change 11package li.auna.patches.telegram.bypassintegrity
22
33import app.revanced.patcher.Fingerprint
4+ import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
45import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
56import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
67import app.revanced.patcher.patch.bytecodePatch
@@ -30,6 +31,15 @@ val bypassIntegrityPatch = bytecodePatch(
3031 }
3132
3233 bypassIntegrityFingerprint.patch()
34+ spoofSignatureFingerprint.method.apply {
35+ addInstructions(
36+ 0 ,
37+ """
38+ const-string v0, "49C1522548EBACD46CE322B6FD47F6092BB745D0F88082145CAF35E14DCC38E1"
39+ return-object v0
40+ """
41+ )
42+ }
3343 }
3444}
3545
Original file line number Diff line number Diff line change @@ -3,9 +3,14 @@ package li.auna.patches.telegram.bypassintegrity
33import app.revanced.patcher.fingerprint
44import com.android.tools.smali.dexlib2.AccessFlags
55
6- // lambda$fillNextCodeParams$29
76internal val bypassIntegrityFingerprint = fingerprint {
87 accessFlags(AccessFlags .PRIVATE , AccessFlags .SYNTHETIC )
98 returns(" V" )
109 strings(" basicIntegrity" , " ctsProfileMatch" )
10+ }
11+
12+ internal val spoofSignatureFingerprint = fingerprint {
13+ custom { methodDef, classDef ->
14+ methodDef.name == " getCertificateSHA256Fingerprint" && classDef.type.endsWith(" Lorg/telegram/messenger/AndroidUtilities;" )
15+ }
1116}
Original file line number Diff line number Diff line change @@ -5,23 +5,22 @@ import app.revanced.patcher.fingerprint
55internal val isPremiumUserFingerprint = fingerprint {
66 returns(" Z" )
77 custom { methodDef, classDef ->
8- classDef.type.endsWith(" Lorg/telegram/messenger/MessagesController;" ) &&
9- methodDef.name == " isPremiumUser "
8+ methodDef.name == " isPremiumUser " && classDef.type.endsWith(" Lorg/telegram/messenger/MessagesController;" )
9+
1010 }
1111}
1212
1313internal val isPremiumFingerprint = fingerprint {
1414 returns(" Z" )
1515 custom { methodDef, classDef ->
16- classDef.type.endsWith(" Lorg/telegram/messenger/UserConfig;" ) &&
17- methodDef.name == " isPremium"
16+ methodDef.name == " isPremium" && classDef.type.endsWith(" Lorg/telegram/messenger/UserConfig;" )
1817 }
1918}
2019
2120internal val isPremiumForStoryFingerprint = fingerprint {
2221 returns(" Z" )
2322 custom { methodDef, classDef ->
24- classDef.type.endsWith(" Lorg/telegram/ui/Stories/StoriesController;" ) &&
25- methodDef.name == " isPremium "
23+ methodDef.name == " isPremium " && classDef.type.endsWith(" Lorg/telegram/ui/Stories/StoriesController;" )
24+
2625 }
2726}
You can’t perform that action at this time.
0 commit comments