feat(Strava): Add Enable password login patch (#6396)

Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
This commit is contained in:
xehpuk
2025-12-27 18:45:09 +01:00
committed by GitHub
parent da02d68587
commit 8f3f4c95bb
3 changed files with 43 additions and 0 deletions

View File

@@ -1188,6 +1188,10 @@ public final class app/revanced/patches/stocard/layout/HideStoryBubblesPatchKt {
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 static final fun getUnlockSubscriptionPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
}

View File

@@ -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()
}
}

View File

@@ -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;")
}
}