From 24caae98b7b4d61b388f644cc1512438e408e6b1 Mon Sep 17 00:00:00 2001 From: Dylan Date: Mon, 9 Mar 2026 19:03:25 +0000 Subject: [PATCH] feat(Photoshop Mix): Add `Bypass login` patch (#6745) Co-authored-by: oSumAtrIX --- patches/api/patches.api | 4 +++ .../patches/photoshopmix/BypassLoginPatch.kt | 21 ++++++++++++++ .../patches/photoshopmix/Fingerprints.kt | 28 +++++++++++++++++++ 3 files changed, 53 insertions(+) create mode 100644 patches/src/main/kotlin/app/revanced/patches/photoshopmix/BypassLoginPatch.kt create mode 100644 patches/src/main/kotlin/app/revanced/patches/photoshopmix/Fingerprints.kt diff --git a/patches/api/patches.api b/patches/api/patches.api index 57f2abaa1..bf62f55d8 100644 --- a/patches/api/patches.api +++ b/patches/api/patches.api @@ -627,6 +627,10 @@ public final class app/revanced/patches/photomath/misc/unlock/plus/UnlockPlusPat public static final fun getUnlockPlusPatch ()Lapp/revanced/patcher/patch/Patch; } +public final class app/revanced/patches/photoshopmix/BypassLoginPatchKt { + public static final fun getBypassLoginPatch ()Lapp/revanced/patcher/patch/BytecodePatch; +} + public final class app/revanced/patches/piccomafr/misc/SpoofAndroidDeviceIdPatchKt { public static final fun getSpoofAndroidDeviceIDPatch ()Lapp/revanced/patcher/patch/Patch; } diff --git a/patches/src/main/kotlin/app/revanced/patches/photoshopmix/BypassLoginPatch.kt b/patches/src/main/kotlin/app/revanced/patches/photoshopmix/BypassLoginPatch.kt new file mode 100644 index 000000000..104db4a72 --- /dev/null +++ b/patches/src/main/kotlin/app/revanced/patches/photoshopmix/BypassLoginPatch.kt @@ -0,0 +1,21 @@ +package app.revanced.patches.photoshopmix + +import app.revanced.patcher.patch.bytecodePatch +import app.revanced.util.returnEarly + +@Suppress("unused") +val bypassLoginPatch = bytecodePatch( + name = "Bypass login", + description = "Allows the use of the app after its discontinuation.", +) { + compatibleWith("com.adobe.photoshopmix") + + apply { + isLoggedInMethod.returnEarly(true) + + // Disables these buttons that cause the app to crash while not logged in. + ccLibButtonClickHandlerMethod.returnEarly() + lightroomButtonClickHandlerMethod.returnEarly() + ccButtonClickHandlerMethod.returnEarly() + } +} diff --git a/patches/src/main/kotlin/app/revanced/patches/photoshopmix/Fingerprints.kt b/patches/src/main/kotlin/app/revanced/patches/photoshopmix/Fingerprints.kt new file mode 100644 index 000000000..4fca34a3f --- /dev/null +++ b/patches/src/main/kotlin/app/revanced/patches/photoshopmix/Fingerprints.kt @@ -0,0 +1,28 @@ +package app.revanced.patches.photoshopmix + +import app.revanced.patcher.definingClass +import app.revanced.patcher.gettingFirstMethodDeclaratively +import app.revanced.patcher.name +import app.revanced.patcher.patch.BytecodePatchContext +import app.revanced.patcher.returnType + +internal val BytecodePatchContext.isLoggedInMethod by gettingFirstMethodDeclaratively { + name("isLoggedIn") + definingClass("CreativeCloudSource;") + returnType("Z") +} + +internal val BytecodePatchContext.ccLibButtonClickHandlerMethod by gettingFirstMethodDeclaratively { + name("ccLibButtonClickHandler") + definingClass("PSMixFragment;") +} + +internal val BytecodePatchContext.lightroomButtonClickHandlerMethod by gettingFirstMethodDeclaratively { + name("lightroomButtonClickHandler") + definingClass("PSMixFragment;") +} + +internal val BytecodePatchContext.ccButtonClickHandlerMethod by gettingFirstMethodDeclaratively { + name("ccButtonClickHandler") + definingClass("PSMixFragment;") +}