From ee71723e89b1b0ca99c7c2056aa0d4d2bb428572 Mon Sep 17 00:00:00 2001 From: Dylan Date: Sun, 8 Mar 2026 19:30:51 +0000 Subject: [PATCH] feat(photoshopmix): Update to use new patch format --- .../patches/photoshopmix/DisableLoginPatch.kt | 17 +++++++---- .../patches/photoshopmix/Fingerprints.kt | 28 ------------------- 2 files changed, 12 insertions(+), 33 deletions(-) delete mode 100644 patches/src/main/kotlin/app/revanced/patches/photoshopmix/Fingerprints.kt diff --git a/patches/src/main/kotlin/app/revanced/patches/photoshopmix/DisableLoginPatch.kt b/patches/src/main/kotlin/app/revanced/patches/photoshopmix/DisableLoginPatch.kt index a6255bf725..6678e759b1 100644 --- a/patches/src/main/kotlin/app/revanced/patches/photoshopmix/DisableLoginPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/photoshopmix/DisableLoginPatch.kt @@ -1,5 +1,6 @@ package app.revanced.patches.photoshopmix +import app.revanced.patcher.firstMethod import app.revanced.patcher.patch.bytecodePatch import app.revanced.util.returnEarly @@ -11,12 +12,18 @@ val disableLoginPatch = bytecodePatch( ) { compatibleWith("com.adobe.photoshopmix") - execute { - disableLoginFingerprint.method.returnEarly(true) + apply { + var psMixFragment = "Lcom/adobe/photoshopmix/PSMixFragment;" + var firstLoginMethod = firstMethod{ name == "isLoggedIn" && definingClass == "Lcom/adobe/acira/accreativecloudlibrary/CreativeCloudSource;" && returnType == "Z"} + var libButtonClickedMethod = firstMethod{name=="ccLibButtonClickHandler" && definingClass==psMixFragment} + var lightroomButtonClickedMethod = firstMethod{name=="lightroomButtonClickHandler" && definingClass==psMixFragment} + var ccButtonClickedMethod = firstMethod{name=="ccButtonClickHandler" && definingClass==psMixFragment} + + firstLoginMethod.returnEarly(true) // Disables these buttons that cause the app to crash while not logged in - libButtonClickedFingerprint.method.returnEarly() - lightroomButtonClickedFingerprint.method.returnEarly() - ccButtonClickedFingerprint.method.returnEarly() + libButtonClickedMethod.returnEarly() + lightroomButtonClickedMethod.returnEarly() + ccButtonClickedMethod.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 deleted file mode 100644 index b7a66ad77c..0000000000 --- a/patches/src/main/kotlin/app/revanced/patches/photoshopmix/Fingerprints.kt +++ /dev/null @@ -1,28 +0,0 @@ -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