From 7de0b96bedd9793fd9e06b4d77d40beaba09d32d Mon Sep 17 00:00:00 2001 From: Dylan Date: Sun, 8 Mar 2026 17:59:58 +0000 Subject: [PATCH] feat(photoshopmix): Add disable login patch --- patches/api/patches.api | 4 +++ .../patches/photoshopmix/DisableLoginPatch.kt | 22 +++++++++++++++ .../patches/photoshopmix/Fingerprints.kt | 28 +++++++++++++++++++ 3 files changed, 54 insertions(+) create mode 100644 patches/src/main/kotlin/app/revanced/patches/photoshopmix/DisableLoginPatch.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 5d5c92c7b8..ffbd6add8b 100644 --- a/patches/api/patches.api +++ b/patches/api/patches.api @@ -669,6 +669,10 @@ public final class app/revanced/patches/photomath/misc/unlock/plus/UnlockPlusPat public static final fun getUnlockPlusPatch ()Lapp/revanced/patcher/patch/BytecodePatch; } +public final class app/revanced/patches/photoshopmix/DisableLoginPatchKt { + public static final fun getDisableLoginPatch ()Lapp/revanced/patcher/patch/BytecodePatch; +} + public final class app/revanced/patches/piccomafr/misc/SpoofAndroidDeviceIdPatchKt { public static final fun getSpoofAndroidDeviceIdPatch ()Lapp/revanced/patcher/patch/BytecodePatch; } diff --git a/patches/src/main/kotlin/app/revanced/patches/photoshopmix/DisableLoginPatch.kt b/patches/src/main/kotlin/app/revanced/patches/photoshopmix/DisableLoginPatch.kt new file mode 100644 index 0000000000..a6255bf725 --- /dev/null +++ b/patches/src/main/kotlin/app/revanced/patches/photoshopmix/DisableLoginPatch.kt @@ -0,0 +1,22 @@ +package app.revanced.patches.photoshopmix + +import app.revanced.patcher.patch.bytecodePatch +import app.revanced.util.returnEarly + +@Suppress("unused") +val disableLoginPatch = bytecodePatch( + name = "Disable login", + description = "Allows you to use the app after its discontinuation", + use = false, +) { + compatibleWith("com.adobe.photoshopmix") + + execute { + disableLoginFingerprint.method.returnEarly(true) + + // Disables these buttons that cause the app to crash while not logged in + libButtonClickedFingerprint.method.returnEarly() + lightroomButtonClickedFingerprint.method.returnEarly() + ccButtonClickedFingerprint.method.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 0000000000..b7a66ad77c --- /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.fingerprint + +internal val disableLoginFingerprint = fingerprint { + custom { method, classDef -> + classDef.endsWith("CreativeCloudSource;") && method.name == "isLoggedIn" + } + returns("Z") +} + +internal val libButtonClickedFingerprint = fingerprint { + custom { method, classDef -> + classDef.endsWith("PSMixFragment;") && method.name == "ccLibButtonClickHandler" + } +} + +internal val lightroomButtonClickedFingerprint = fingerprint { + custom { method, classDef -> + classDef.endsWith("PSMixFragment;") && method.name == "lightroomButtonClickHandler" + } +} + +internal val ccButtonClickedFingerprint = fingerprint { + custom { method, classDef -> + classDef.endsWith("PSMixFragment;") && method.name == "ccButtonClickHandler" + } +} \ No newline at end of file