mirror of
https://github.com/ReVanced/revanced-patches.git
synced 2026-01-24 19:21:03 +00:00
feat(Strava): Add Enable password login patch (#6396)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
This commit is contained in:
@@ -1188,6 +1188,10 @@ public final class app/revanced/patches/stocard/layout/HideStoryBubblesPatchKt {
|
|||||||
public static final fun getHideStoryBubblesPatch ()Lapp/revanced/patcher/patch/ResourcePatch;
|
public static final fun getHideStoryBubblesPatch ()Lapp/revanced/patcher/patch/ResourcePatch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final class app/revanced/patches/strava/password/EnablePasswordLoginPatchKt {
|
||||||
|
public static final fun getEnablePasswordLoginPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/strava/subscription/UnlockSubscriptionPatchKt {
|
public final class app/revanced/patches/strava/subscription/UnlockSubscriptionPatchKt {
|
||||||
public static final fun getUnlockSubscriptionPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun getUnlockSubscriptionPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
package app.revanced.patches.strava.password
|
||||||
|
|
||||||
|
import app.revanced.patcher.Fingerprint
|
||||||
|
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
||||||
|
import app.revanced.patcher.patch.bytecodePatch
|
||||||
|
|
||||||
|
@Suppress("unused")
|
||||||
|
val enablePasswordLoginPatch = bytecodePatch(
|
||||||
|
name = "Enable password login",
|
||||||
|
description = "Re-enables password login after having used an OTP code.",
|
||||||
|
) {
|
||||||
|
compatibleWith("com.strava")
|
||||||
|
|
||||||
|
execute {
|
||||||
|
fun Fingerprint.loadTrueInsteadOfField() =
|
||||||
|
method.replaceInstruction(patternMatch!!.startIndex, "const/4 v0, 0x1")
|
||||||
|
|
||||||
|
logInGetUsePasswordFingerprint.loadTrueInsteadOfField()
|
||||||
|
emailChangeGetUsePasswordFingerprint.loadTrueInsteadOfField()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
package app.revanced.patches.strava.password
|
||||||
|
|
||||||
|
import app.revanced.patcher.fingerprint
|
||||||
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
|
internal val logInGetUsePasswordFingerprint = fingerprint {
|
||||||
|
opcodes(Opcode.IGET_BOOLEAN)
|
||||||
|
custom { method, classDef ->
|
||||||
|
method.name == "getUsePassword" && classDef.endsWith("/RequestOtpLogInNetworkResponse;")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal val emailChangeGetUsePasswordFingerprint = fingerprint {
|
||||||
|
opcodes(Opcode.IGET_BOOLEAN)
|
||||||
|
custom { method, classDef ->
|
||||||
|
method.name == "getUsePassword" && classDef.endsWith("/RequestEmailChangeWithOtpOrPasswordResponse;")
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user