Skip to content

Commit a02c74f

Browse files
authored
chore: Merge branch dev to main (#3053)
2 parents 50735fa + 2fc4d7f commit a02c74f

File tree

58 files changed

+1169
-135
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+1169
-135
lines changed

CHANGELOG.md

Lines changed: 174 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,177 @@
1+
# [4.8.0-dev.24](https://github.com/ReVanced/revanced-patches/compare/v4.8.0-dev.23...v4.8.0-dev.24) (2024-05-21)
2+
3+
4+
### Bug Fixes
5+
6+
* **YouTube - Client spoof:** Spoof client to fix playback ([#3199](https://github.com/ReVanced/revanced-patches/issues/3199)) ([bec1eef](https://github.com/ReVanced/revanced-patches/commit/bec1eef10f2eb4e15696acb271357f1621543de1))
7+
8+
# [4.8.0-dev.23](https://github.com/ReVanced/revanced-patches/compare/v4.8.0-dev.22...v4.8.0-dev.23) (2024-05-18)
9+
10+
11+
### Features
12+
13+
* **Piccoma:** Add `Spoof Android device ID` patch ([#3145](https://github.com/ReVanced/revanced-patches/issues/3145)) ([d953c6b](https://github.com/ReVanced/revanced-patches/commit/d953c6bdd4315d2ba44845fd569a3d12ac4d1af0))
14+
15+
# [4.8.0-dev.22](https://github.com/ReVanced/revanced-patches/compare/v4.8.0-dev.21...v4.8.0-dev.22) (2024-05-18)
16+
17+
18+
### Bug Fixes
19+
20+
* Use correct preference key ([3732b2c](https://github.com/ReVanced/revanced-patches/commit/3732b2ce6b617b4c1c6647397b614f8a040eece3))
21+
22+
# [4.8.0-dev.21](https://github.com/ReVanced/revanced-patches/compare/v4.8.0-dev.20...v4.8.0-dev.21) (2024-05-18)
23+
24+
25+
### Features
26+
27+
* **Piccoma:** Add `Disable tracking` patch ([#3143](https://github.com/ReVanced/revanced-patches/issues/3143)) ([8ab9e8f](https://github.com/ReVanced/revanced-patches/commit/8ab9e8f89d2bd014138e31dab7004f8ba77cae10))
28+
* **YouTube - Navigation buttons:** Add option to hide navigation button labels ([#3189](https://github.com/ReVanced/revanced-patches/issues/3189)) ([f9dc705](https://github.com/ReVanced/revanced-patches/commit/f9dc7050513b9fdb7766838a63a172f1478296f7))
29+
30+
# [4.8.0-dev.20](https://github.com/ReVanced/revanced-patches/compare/v4.8.0-dev.19...v4.8.0-dev.20) (2024-05-16)
31+
32+
33+
### Features
34+
35+
* **YT Music:** Add support for `7.01.52` ([#3177](https://github.com/ReVanced/revanced-patches/issues/3177)) ([e9bfb25](https://github.com/ReVanced/revanced-patches/commit/e9bfb25dfe85754fd7fa5c9db934bb4fc52e4694))
36+
37+
# [4.8.0-dev.19](https://github.com/ReVanced/revanced-patches/compare/v4.8.0-dev.18...v4.8.0-dev.19) (2024-05-16)
38+
39+
40+
### Features
41+
42+
* **YouTube - Hide Shorts components:** Hide 'Buy super thanks' button ([#3176](https://github.com/ReVanced/revanced-patches/issues/3176)) ([89c1548](https://github.com/ReVanced/revanced-patches/commit/89c154861c8b3afa665542e97ff201c3e84410b2))
43+
44+
# [4.8.0-dev.18](https://github.com/ReVanced/revanced-patches/compare/v4.8.0-dev.17...v4.8.0-dev.18) (2024-05-14)
45+
46+
47+
### Bug Fixes
48+
49+
* **YouTube Music:** Make `Hide 'Get Music Premium' label` and `Remove upgrade button` compatible with latest version ([#3164](https://github.com/ReVanced/revanced-patches/issues/3164)) ([3ff20de](https://github.com/ReVanced/revanced-patches/commit/3ff20dee4aea49ca77dcd3fbe148287b55a2b5e3))
50+
51+
# [4.8.0-dev.17](https://github.com/ReVanced/revanced-patches/compare/v4.8.0-dev.16...v4.8.0-dev.17) (2024-05-12)
52+
53+
54+
### Features
55+
56+
* **Photomath:** Support version `8.37.0` ([#3109](https://github.com/ReVanced/revanced-patches/issues/3109)) ([fb02b48](https://github.com/ReVanced/revanced-patches/commit/fb02b481e2be8c2bc4441dc5b3dc6a9df3a2a379))
57+
58+
# [4.8.0-dev.16](https://github.com/ReVanced/revanced-patches/compare/v4.8.0-dev.15...v4.8.0-dev.16) (2024-05-12)
59+
60+
61+
### Features
62+
63+
* **WarnWetter - Promo code unlock:** Constrain to last working version ([#3110](https://github.com/ReVanced/revanced-patches/issues/3110)) ([92fc8aa](https://github.com/ReVanced/revanced-patches/commit/92fc8aaad80f8fad35b75e6de032692986211536))
64+
65+
# [4.8.0-dev.15](https://github.com/ReVanced/revanced-patches/compare/v4.8.0-dev.14...v4.8.0-dev.15) (2024-05-11)
66+
67+
68+
### Bug Fixes
69+
70+
* **YouTube - Restore old video quality menu:** Show advanced quality menu in Shorts quality flyout ([#3155](https://github.com/ReVanced/revanced-patches/issues/3155)) ([c2b5bb7](https://github.com/ReVanced/revanced-patches/commit/c2b5bb723416e43a920817f97b9e0ee4ceab4f6b))
71+
72+
# [4.8.0-dev.14](https://github.com/ReVanced/revanced-patches/compare/v4.8.0-dev.13...v4.8.0-dev.14) (2024-05-08)
73+
74+
75+
### Bug Fixes
76+
77+
* **YouTube - SponsorBlock:** Show correct segment times if video is over 24 hours in length ([#3138](https://github.com/ReVanced/revanced-patches/issues/3138)) ([6cdf697](https://github.com/ReVanced/revanced-patches/commit/6cdf697e8e47f6d53964497703dbe79fab3b1821))
78+
79+
# [4.8.0-dev.13](https://github.com/ReVanced/revanced-patches/compare/v4.8.0-dev.12...v4.8.0-dev.13) (2024-05-06)
80+
81+
82+
### Bug Fixes
83+
84+
* **YouTube - Navigation buttons:** Adjust summary text of switch notification button ([#3130](https://github.com/ReVanced/revanced-patches/issues/3130)) ([cc8b4c9](https://github.com/ReVanced/revanced-patches/commit/cc8b4c913ed25d07fd4000cfd6318bb06a9d27c0))
85+
86+
# [4.8.0-dev.12](https://github.com/ReVanced/revanced-patches/compare/v4.8.0-dev.11...v4.8.0-dev.12) (2024-05-06)
87+
88+
89+
### Bug Fixes
90+
91+
* **YouTube - Player flyout menu:** Remove obsolete `Hide report menu` ([d627d44](https://github.com/ReVanced/revanced-patches/commit/d627d44ad07fa32bb2f247ce24a3591ec5e1be0e))
92+
93+
# [4.8.0-dev.11](https://github.com/ReVanced/revanced-patches/compare/v4.8.0-dev.10...v4.8.0-dev.11) (2024-05-06)
94+
95+
96+
### Bug Fixes
97+
98+
* **Reddit is Fun - Spoof client:** Fix login by updating the authorization subdomain from "old" to "ssl" ([b156cb1](https://github.com/ReVanced/revanced-patches/commit/b156cb1d8996c4314d59e3441c6b85d8f704cdff))
99+
100+
# [4.8.0-dev.10](https://github.com/ReVanced/revanced-patches/compare/v4.8.0-dev.9...v4.8.0-dev.10) (2024-05-02)
101+
102+
103+
### Features
104+
105+
* **Tumblr:** Add `Disable Ad-Free Banner` patch ([#3091](https://github.com/ReVanced/revanced-patches/issues/3091)) ([54baf08](https://github.com/ReVanced/revanced-patches/commit/54baf08f777b7c975fa0b6508f0a4de19ac491f4))
106+
107+
# [4.8.0-dev.9](https://github.com/ReVanced/revanced-patches/compare/v4.8.0-dev.8...v4.8.0-dev.9) (2024-04-29)
108+
109+
110+
### Bug Fixes
111+
112+
* Correctly handle patches jar path if it contains exclamation marks ([056e2d7](https://github.com/ReVanced/revanced-patches/commit/056e2d7dd5bbacb7dc6b109b3e2d44d55e7eb7d3))
113+
114+
# [4.8.0-dev.8](https://github.com/ReVanced/revanced-patches/compare/v4.8.0-dev.7...v4.8.0-dev.8) (2024-04-23)
115+
116+
117+
### Bug Fixes
118+
119+
* **YouTube - Hide ads:** Fix string typo ([ecc56d6](https://github.com/ReVanced/revanced-patches/commit/ecc56d643a0c4e5f25b933431f097a03d4bf2e69))
120+
121+
# [4.8.0-dev.7](https://github.com/ReVanced/revanced-patches/compare/v4.8.0-dev.6...v4.8.0-dev.7) (2024-04-23)
122+
123+
124+
### Bug Fixes
125+
126+
* URL decode path to JAR containing spaces to get JAR manifest ([#3079](https://github.com/ReVanced/revanced-patches/issues/3079)) ([e1bbcb3](https://github.com/ReVanced/revanced-patches/commit/e1bbcb338dd7fce895b606440bd6f040d5486a64))
127+
128+
# [4.8.0-dev.6](https://github.com/ReVanced/revanced-patches/compare/v4.8.0-dev.5...v4.8.0-dev.6) (2024-04-23)
129+
130+
131+
### Features
132+
133+
* **YouTube - Hide ads:** Add option to hide the 'Visit store' button on channel pages ([#3077](https://github.com/ReVanced/revanced-patches/issues/3077)) ([03d2cfa](https://github.com/ReVanced/revanced-patches/commit/03d2cfafbf977340456598a848858ac9452c853f))
134+
135+
# [4.8.0-dev.5](https://github.com/ReVanced/revanced-patches/compare/v4.8.0-dev.4...v4.8.0-dev.5) (2024-04-23)
136+
137+
138+
### Bug Fixes
139+
140+
* **YouTube - Hide Shorts components:** Rename option title to make it consistent ([4d6e34b](https://github.com/ReVanced/revanced-patches/commit/4d6e34b0540a3334bd77b2b48a1a5e10329171c8))
141+
142+
# [4.8.0-dev.4](https://github.com/ReVanced/revanced-patches/compare/v4.8.0-dev.3...v4.8.0-dev.4) (2024-04-23)
143+
144+
145+
### Features
146+
147+
* **YouTube - Comments:** Add option to hide timestamp and emoji buttons ([#3076](https://github.com/ReVanced/revanced-patches/issues/3076)) ([7efe5ae](https://github.com/ReVanced/revanced-patches/commit/7efe5aefb252a2ed908907ff218b879e2ad1a331))
148+
149+
# [4.8.0-dev.3](https://github.com/ReVanced/revanced-patches/compare/v4.8.0-dev.2...v4.8.0-dev.3) (2024-04-22)
150+
151+
152+
### Bug Fixes
153+
154+
* Publicize abstract property ([b7c108e](https://github.com/ReVanced/revanced-patches/commit/b7c108ee201c84df31b079f3fecb6cc2f5eaf9f1))
155+
156+
# [4.8.0-dev.2](https://github.com/ReVanced/revanced-patches/compare/v4.8.0-dev.1...v4.8.0-dev.2) (2024-04-21)
157+
158+
159+
### Bug Fixes
160+
161+
* Case patch option title correctly ([259c8b4](https://github.com/ReVanced/revanced-patches/commit/259c8b4e58df51d92d7e19417e13afa3848afc73))
162+
163+
# [4.8.0-dev.1](https://github.com/ReVanced/revanced-patches/compare/v4.7.0...v4.8.0-dev.1) (2024-04-21)
164+
165+
166+
### Bug Fixes
167+
168+
* **YouTube - Hide video action buttons:** Remove obsolete `hide Shop button` ([#3057](https://github.com/ReVanced/revanced-patches/issues/3057)) ([b5e34f3](https://github.com/ReVanced/revanced-patches/commit/b5e34f3aabc1d9df8c41f92251618243caecdc9f))
169+
170+
171+
### Features
172+
173+
* **YouTube - Hide Shorts components:** Hide like / dislike button in video ads ([#3062](https://github.com/ReVanced/revanced-patches/issues/3062)) ([1296985](https://github.com/ReVanced/revanced-patches/commit/12969853adfe530eb6006df38e1a5aa30b28fdf9))
174+
1175
# [4.7.0](https://github.com/ReVanced/revanced-patches/compare/v4.6.0...v4.7.0) (2024-04-21)
2176

3177

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ This document describes how to contribute to ReVanced Patches.
6464

6565
## 📖 Resources to help you get started
6666

67-
* The [documentation](https://github.com/ReVanced/revanced-patcher/tree/docs/docs) contains the fundamentals
67+
* The [documentation](https://github.com/ReVanced/revanced-patcher/tree/main/docs) contains the fundamentals
6868
of ReVanced Patcher and how to use ReVanced Patcher to create patches
6969
* [Our backlog](https://github.com/orgs/ReVanced/projects/12) is where we keep track of what we're working on
7070
* [Issues](https://github.com/ReVanced/revanced-patches/issues) are where we keep track of bugs and feature requests

api/revanced-patches.api

Lines changed: 33 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ public final class app/revanced/patches/all/misc/debugging/EnableAndroidDebuggin
3030

3131
public final class app/revanced/patches/all/misc/hex/HexPatch : app/revanced/patches/shared/misc/hex/BaseHexPatch {
3232
public fun <init> ()V
33+
public fun getReplacements ()Ljava/util/List;
3334
}
3435

3536
public final class app/revanced/patches/all/misc/network/OverrideCertificatePinningPatch : app/revanced/patcher/patch/ResourcePatch {
@@ -486,6 +487,18 @@ public final class app/revanced/patches/photomath/misc/unlock/plus/UnlockPlusPat
486487
public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V
487488
}
488489

490+
public final class app/revanced/patches/piccomafr/misc/SpoofAndroidDeviceIdPatch : app/revanced/patcher/patch/BytecodePatch {
491+
public static final field INSTANCE Lapp/revanced/patches/piccomafr/misc/SpoofAndroidDeviceIdPatch;
492+
public fun execute (Lapp/revanced/patcher/data/BytecodeContext;)V
493+
public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V
494+
}
495+
496+
public final class app/revanced/patches/piccomafr/tracking/DisableTrackingPatch : app/revanced/patcher/patch/BytecodePatch {
497+
public static final field INSTANCE Lapp/revanced/patches/piccomafr/tracking/DisableTrackingPatch;
498+
public fun execute (Lapp/revanced/patcher/data/BytecodeContext;)V
499+
public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V
500+
}
501+
489502
public final class app/revanced/patches/pixiv/ads/HideAdsPatch : app/revanced/patcher/patch/BytecodePatch {
490503
public static final field INSTANCE Lapp/revanced/patches/pixiv/ads/HideAdsPatch;
491504
public fun execute (Lapp/revanced/patcher/data/BytecodeContext;)V
@@ -575,6 +588,7 @@ public final class app/revanced/patches/reddit/customclients/joeyforreddit/detec
575588
public final class app/revanced/patches/reddit/customclients/redditisfun/api/SpoofClientPatch : app/revanced/patches/reddit/customclients/BaseSpoofClientPatch {
576589
public static final field INSTANCE Lapp/revanced/patches/reddit/customclients/redditisfun/api/SpoofClientPatch;
577590
public fun patchClientId (Ljava/util/Set;Lapp/revanced/patcher/data/BytecodeContext;)V
591+
public fun patchMiscellaneous (Ljava/util/Set;Lapp/revanced/patcher/data/BytecodeContext;)V
578592
public fun patchUserAgent (Ljava/util/Set;Lapp/revanced/patcher/data/BytecodeContext;)V
579593
}
580594

@@ -677,6 +691,7 @@ public abstract class app/revanced/patches/shared/misc/hex/BaseHexPatch : app/re
677691
public fun <init> ()V
678692
public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V
679693
public fun execute (Lapp/revanced/patcher/data/ResourceContext;)V
694+
public abstract fun getReplacements ()Ljava/util/List;
680695
}
681696

682697
public final class app/revanced/patches/shared/misc/hex/BaseHexPatch$Replacement {
@@ -1060,6 +1075,12 @@ public final class app/revanced/patches/tumblr/ads/DisableDashboardAds : app/rev
10601075
public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V
10611076
}
10621077

1078+
public final class app/revanced/patches/tumblr/annoyances/adfree/DisableAdFreeBannerPatch : app/revanced/patcher/patch/BytecodePatch {
1079+
public static final field INSTANCE Lapp/revanced/patches/tumblr/annoyances/adfree/DisableAdFreeBannerPatch;
1080+
public fun execute (Lapp/revanced/patcher/data/BytecodeContext;)V
1081+
public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V
1082+
}
1083+
10631084
public final class app/revanced/patches/tumblr/annoyances/inappupdate/DisableInAppUpdatePatch : app/revanced/patcher/patch/BytecodePatch {
10641085
public static final field INSTANCE Lapp/revanced/patches/tumblr/annoyances/inappupdate/DisableInAppUpdatePatch;
10651086
public fun execute (Lapp/revanced/patcher/data/BytecodeContext;)V
@@ -1610,12 +1631,10 @@ public final class app/revanced/patches/youtube/misc/dimensions/spoof/SpoofDevic
16101631
public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V
16111632
}
16121633

1613-
public final class app/revanced/patches/youtube/misc/fix/playback/ClientSpoofPatch : app/revanced/patches/all/misc/transformation/BaseTransformInstructionsPatch {
1614-
public static final field INSTANCE Lapp/revanced/patches/youtube/misc/fix/playback/ClientSpoofPatch;
1615-
public synthetic fun filterMap (Lcom/android/tools/smali/dexlib2/iface/ClassDef;Lcom/android/tools/smali/dexlib2/iface/Method;Lcom/android/tools/smali/dexlib2/iface/instruction/Instruction;I)Ljava/lang/Object;
1616-
public fun filterMap (Lcom/android/tools/smali/dexlib2/iface/ClassDef;Lcom/android/tools/smali/dexlib2/iface/Method;Lcom/android/tools/smali/dexlib2/iface/instruction/Instruction;I)Lkotlin/Triple;
1617-
public synthetic fun transform (Lapp/revanced/patcher/util/proxy/mutableTypes/MutableMethod;Ljava/lang/Object;)V
1618-
public fun transform (Lapp/revanced/patcher/util/proxy/mutableTypes/MutableMethod;Lkotlin/Triple;)V
1634+
public final class app/revanced/patches/youtube/misc/fix/playback/SpoofClientPatch : app/revanced/patcher/patch/BytecodePatch {
1635+
public static final field INSTANCE Lapp/revanced/patches/youtube/misc/fix/playback/SpoofClientPatch;
1636+
public fun execute (Lapp/revanced/patcher/data/BytecodeContext;)V
1637+
public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V
16191638
}
16201639

16211640
public final class app/revanced/patches/youtube/misc/fix/playback/SpoofSignaturePatch : app/revanced/patcher/patch/BytecodePatch {
@@ -1630,6 +1649,14 @@ public final class app/revanced/patches/youtube/misc/fix/playback/SpoofSignature
16301649
public fun execute (Lapp/revanced/patcher/data/ResourceContext;)V
16311650
}
16321651

1652+
public final class app/revanced/patches/youtube/misc/fix/playback/UserAgentClientSpoofPatch : app/revanced/patches/all/misc/transformation/BaseTransformInstructionsPatch {
1653+
public static final field INSTANCE Lapp/revanced/patches/youtube/misc/fix/playback/UserAgentClientSpoofPatch;
1654+
public synthetic fun filterMap (Lcom/android/tools/smali/dexlib2/iface/ClassDef;Lcom/android/tools/smali/dexlib2/iface/Method;Lcom/android/tools/smali/dexlib2/iface/instruction/Instruction;I)Ljava/lang/Object;
1655+
public fun filterMap (Lcom/android/tools/smali/dexlib2/iface/ClassDef;Lcom/android/tools/smali/dexlib2/iface/Method;Lcom/android/tools/smali/dexlib2/iface/instruction/Instruction;I)Lkotlin/Triple;
1656+
public synthetic fun transform (Lapp/revanced/patcher/util/proxy/mutableTypes/MutableMethod;Ljava/lang/Object;)V
1657+
public fun transform (Lapp/revanced/patcher/util/proxy/mutableTypes/MutableMethod;Lkotlin/Triple;)V
1658+
}
1659+
16331660
public final class app/revanced/patches/youtube/misc/gms/GmsCoreSupportPatch : app/revanced/patches/shared/misc/gms/BaseGmsCoreSupportPatch {
16341661
public static final field INSTANCE Lapp/revanced/patches/youtube/misc/gms/GmsCoreSupportPatch;
16351662
}

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
org.gradle.parallel = true
22
org.gradle.caching = true
33
kotlin.code.style = official
4-
version = 4.7.0
4+
version = 4.8.0-dev.24

src/main/kotlin/app/revanced/patches/all/misc/hex/HexPatch.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class HexPatch : BaseHexPatch() {
1919
// Replace the custom option type with a stringArrayOption once the issue is resolved.
2020
private val replacementsOption by registerNewPatchOption<PatchClass<*>, List<String>>(
2121
key = "replacements",
22-
title = "replacements",
22+
title = "Replacements",
2323
description = """
2424
Hexadecimal patterns to search for and replace with another in a target file.
2525

src/main/kotlin/app/revanced/patches/music/layout/premium/fingerprints/HideGetPremiumFingerprint.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ internal object HideGetPremiumFingerprint : MethodFingerprint(
1212
listOf(
1313
Opcode.IF_NEZ,
1414
Opcode.CONST_16,
15-
Opcode.GOTO,
16-
Opcode.NOP,
1715
Opcode.INVOKE_VIRTUAL,
1816
),
1917
listOf("FEmusic_history", "FEmusic_offline"),

src/main/kotlin/app/revanced/patches/music/layout/upgradebutton/fingerprints/PivotBarConstructorFingerprint.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ internal object PivotBarConstructorFingerprint : MethodFingerprint(
1313
Opcode.CHECK_CAST,
1414
Opcode.INVOKE_INTERFACE,
1515
Opcode.GOTO,
16-
Opcode.NOP,
1716
Opcode.IPUT_OBJECT,
1817
Opcode.RETURN_VOID,
1918
),
Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,10 @@
11
package app.revanced.patches.music.misc.integrations.fingerprints
22

33
import app.revanced.patches.shared.misc.integrations.BaseIntegrationsPatch.IntegrationsFingerprint
4-
import com.android.tools.smali.dexlib2.Opcode
54

65
internal object ApplicationInitFingerprint : IntegrationsFingerprint(
76
returnType = "V",
87
parameters = emptyList(),
9-
opcodes = listOf(
10-
Opcode.NEW_INSTANCE,
11-
Opcode.INVOKE_DIRECT,
12-
Opcode.INVOKE_STATIC,
13-
Opcode.NEW_INSTANCE,
14-
Opcode.INVOKE_DIRECT,
15-
Opcode.INVOKE_VIRTUAL
16-
),
178
strings = listOf("activity"),
189
customFingerprint = { methodDef, _ -> methodDef.name == "onCreate" },
1910
)

src/main/kotlin/app/revanced/patches/photomath/detection/deviceid/SpoofDeviceIdPatch.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import kotlin.random.Random
1414
name = "Spoof device ID",
1515
description = "Spoofs device ID to mitigate manual bans by developers.",
1616
dependencies = [SignatureDetectionPatch::class],
17-
compatiblePackages = [CompatiblePackage("com.microblink.photomath", ["8.32.0"])]
17+
compatiblePackages = [CompatiblePackage("com.microblink.photomath", ["8.37.0"])]
1818
)
1919
@Suppress("unused")
2020
object SpoofDeviceIdPatch : BytecodePatch(
Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,21 @@
11
package app.revanced.patches.photomath.detection.deviceid.fingerprints
22

33
import app.revanced.patcher.fingerprint.MethodFingerprint
4+
import com.android.tools.smali.dexlib2.Opcode
45

56
internal object GetDeviceIdFingerprint : MethodFingerprint(
67
returnType = "Ljava/lang/String;",
7-
strings = listOf("androidId", "android_id"),
8+
opcodes = listOf(
9+
Opcode.SGET_OBJECT,
10+
Opcode.IGET_OBJECT,
11+
Opcode.INVOKE_STATIC,
12+
Opcode.MOVE_RESULT_OBJECT,
13+
Opcode.IF_NEZ,
14+
Opcode.INVOKE_STATIC,
15+
Opcode.MOVE_RESULT_OBJECT,
16+
Opcode.INVOKE_VIRTUAL,
17+
Opcode.MOVE_RESULT_OBJECT,
18+
Opcode.INVOKE_VIRTUAL,
19+
),
820
parameters = listOf()
921
)

0 commit comments

Comments
 (0)