Skip to content

Commit 08e875b

Browse files
committed
fix(docs): Improve description of patches
1 parent 776704b commit 08e875b

File tree

9 files changed

+39
-55
lines changed

9 files changed

+39
-55
lines changed

patches/api/patches.api

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@ public final class app/revanced/patches/hevy/subscription/UnlockSubscriptionPatc
1010
public static final fun getUnlockSubscriptionPatch ()Lapp/revanced/patcher/patch/RawResourcePatch;
1111
}
1212

13-
public final class app/revanced/patches/komoot/navigation/UnlockNavigationPatchKt {
14-
public static final fun getUnlockProPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
15-
}
16-
1713
public final class app/revanced/patches/komoot/premium/UnlockPremiumFeaturesPatchKt {
1814
public static final fun getUnlockProPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
1915
}

patches/src/main/kotlin/app/revanced/patches/calistree/pro/UnlockProPatch.kt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,17 @@ import com.android.tools.smali.dexlib2.iface.reference.StringReference
99

1010
@Suppress("unused")
1111
val unlockProPatch = bytecodePatch(
12-
name = "Unlock Pro",
12+
name = "Unlock Pro features",
13+
description = "Unlock Pro features. " +
14+
"Sometimes the app forget about my patches and a popup screen asking " +
15+
"to subscribe will be shown. In this screen, just swipe down to refresh " +
16+
"and the app will have Pro features again."
1317
) {
1418
compatibleWith("com.calistree.calistree"("4.17.8"))
1519

1620
execute {
1721
proFingerprint.method.apply {
18-
val subscriptionsInstruction = implementation!!.instructions.first { it ->
22+
val subscriptionsInstruction = implementation!!.instructions.first {
1923
if (it.opcode != Opcode.CONST_STRING) return@first false
2024

2125
((it as ReferenceInstruction).reference as StringReference).string == "subscriptions"
@@ -61,4 +65,4 @@ val unlockProPatch = bytecodePatch(
6165
)
6266
}
6367
}
64-
}
68+
}

patches/src/main/kotlin/app/revanced/patches/geocaching/subscription/UnlockProPatch.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.RegisterRangeInstructio
1111
@Suppress("unused")
1212
val unlockPremiumPatch = bytecodePatch(
1313
name = "Unlock Premium features",
14-
description = "WARNING: This only works via mount install (root required). Lists are still locked as they are server sided."
14+
description = "WARNING: This only works via mount install (root required). " +
15+
"Unlock Premium features. Lists are still locked as they are server sided."
1516
) {
1617
compatibleWith("com.groundspeak.geocaching.intro")
1718

@@ -39,4 +40,4 @@ val unlockPremiumPatch = bytecodePatch(
3940

4041
overrideRegister(ownProfileDeserializerFingerprint, 13)
4142
}
42-
}
43+
}

patches/src/main/kotlin/app/revanced/patches/hevy/subscription/UnlockSubscriptionPatch.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ import app.revanced.patches.shared.misc.hex.hexPatch
55
import app.revanced.patches.shared.misc.hex.Replacement
66

77
@Suppress("unused")
8-
@Deprecated("This patch no longer works and will be removed in the future.")
98
val unlockSubscriptionPatch = rawResourcePatch(
10-
name = "Unlock PRO",
11-
description = "Unlocks PRO Subscription.",
9+
name = "Unlock Pro features",
10+
description = "Unlocks Pro features. Most features in this app are server sided, so they can't be patched. " +
11+
"This should unlock everything which is possible to patch.",
1212
) {
1313
compatibleWith("com.hevy"("2.0.0"))
1414

@@ -49,4 +49,4 @@ val unlockSubscriptionPatch = rawResourcePatch(
4949
)
5050
}
5151
)
52-
}
52+
}

patches/src/main/kotlin/app/revanced/patches/komoot/navigation/Fingerprints.kt

Lines changed: 0 additions & 12 deletions
This file was deleted.

patches/src/main/kotlin/app/revanced/patches/komoot/navigation/UnlockNavigationPatch.kt

Lines changed: 0 additions & 25 deletions
This file was deleted.

patches/src/main/kotlin/app/revanced/patches/komoot/premium/Fingerprints.kt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,12 @@ internal val displayPremiumFingerprint = fingerprint {
2222
custom { _, classDef ->
2323
classDef.endsWith("PublicUserProfileV7\$Companion;")
2424
}
25-
}
25+
}
26+
27+
internal val routingPermissionFingerprint = fingerprint {
28+
accessFlags(AccessFlags.PUBLIC, AccessFlags.CONSTRUCTOR)
29+
parameters("L")
30+
custom { _, classDef ->
31+
classDef.endsWith("api/model/RoutingPermission;")
32+
}
33+
}

patches/src/main/kotlin/app/revanced/patches/komoot/premium/UnlockPremiumFeaturesPatch.kt

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ import com.android.tools.smali.dexlib2.Opcode
66

77
@Suppress("unused")
88
val unlockProPatch = bytecodePatch(
9-
name = "Unlock Premium",
10-
description = "Unlock weather forecasting and multi-days planning (not possible to save a multi-day tour, however)"
9+
name = "Unlock Premium features",
10+
description = "Unlock Premium features. Some features are not possible to patch (server sided), " +
11+
"such as saving a multi-days hike."
1112
) {
1213
compatibleWith("de.komoot.android"("2024.29.3"))
1314

@@ -39,5 +40,16 @@ val unlockProPatch = bytecodePatch(
3940
"""
4041
)
4142
}
43+
44+
routingPermissionFingerprint.method.apply {
45+
val index = implementation!!.instructions.indexOfLast{
46+
Opcode.MOVE_RESULT_OBJECT == it.opcode
47+
}
48+
49+
addInstructions(
50+
index + 1,
51+
"sget-object p1, Lde/komoot/android/services/api/model/RoutingPermission\$StatusPermission;->GRANTED:Lde/komoot/android/services/api/model/RoutingPermission\$StatusPermission;",
52+
)
53+
}
4254
}
43-
}
55+
}

patches/src/main/kotlin/app/revanced/patches/park4night/subscription/UnlockProPatch.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import app.revanced.patcher.patch.bytecodePatch
66
@Suppress("unused")
77
val unlockProPatch = bytecodePatch(
88
name = "Unlock Pro features",
9-
description = "Unlock Pro features (park4night +)"
9+
description = "Unlock Pro features (park4night +). You have be logged in with an account."
1010
) {
1111
compatibleWith("fr.tramb.park4night"("7.1.11"))
1212

0 commit comments

Comments
 (0)