From 10cc62da82c0fb87ae8ec5bd53217ce43379c96f Mon Sep 17 00:00:00 2001 From: f1re4xx Date: Mon, 24 Nov 2025 18:48:18 +0100 Subject: [PATCH 1/9] fix: lightroom version bypass patch (allow 9.3.0 to open) --- patches/api/patches.api | 4 +++ .../misc/bypassVersionCheck/Fingerprints.kt | 25 +++++++++++++++++++ .../disableVersionCheckPatch.kt | 24 ++++++++++++++++++ 3 files changed, 53 insertions(+) create mode 100644 patches/src/main/kotlin/app/revanced/patches/lightroom/misc/bypassVersionCheck/Fingerprints.kt create mode 100644 patches/src/main/kotlin/app/revanced/patches/lightroom/misc/bypassVersionCheck/disableVersionCheckPatch.kt diff --git a/patches/api/patches.api b/patches/api/patches.api index 7615d8ae69..dbb8264b66 100644 --- a/patches/api/patches.api +++ b/patches/api/patches.api @@ -328,6 +328,10 @@ public final class app/revanced/patches/lightroom/misc/premium/UnlockPremiumPatc public static final fun getUnlockPremiumPatch ()Lapp/revanced/patcher/patch/BytecodePatch; } +public final class app/revanced/patches/lightroom/misc/version/DisableVersionCheckPatchKt { + public static final fun getDisableVersionCheckPatch ()Lapp/revanced/patcher/patch/BytecodePatch; +} + public final class app/revanced/patches/memegenerator/detection/license/LicenseValidationPatchKt { public static final fun getLicenseValidationPatch ()Lapp/revanced/patcher/patch/BytecodePatch; } diff --git a/patches/src/main/kotlin/app/revanced/patches/lightroom/misc/bypassVersionCheck/Fingerprints.kt b/patches/src/main/kotlin/app/revanced/patches/lightroom/misc/bypassVersionCheck/Fingerprints.kt new file mode 100644 index 0000000000..109295157d --- /dev/null +++ b/patches/src/main/kotlin/app/revanced/patches/lightroom/misc/bypassVersionCheck/Fingerprints.kt @@ -0,0 +1,25 @@ +package app.revanced.patches.lightroom.misc.version + +import app.revanced.patcher.fingerprint +import com.android.tools.smali.dexlib2.AccessFlags +import com.android.tools.smali.dexlib2.Opcode + +internal val versionCheckFingerprint = fingerprint { + // Matches public static k()V + accessFlags(AccessFlags.PUBLIC, AccessFlags.STATIC) + + strings( + "com.adobe.lrmobile.denylisted_version_set_key", + "com.adobe.lrmobile.app_min_version_key" + ) + + opcodes( + Opcode.INVOKE_STATIC, // invoke-static {}, Lbf/p;->b()Lbf/p$a; + Opcode.MOVE_RESULT_OBJECT, // move-result-object v0 + Opcode.IGET, // iget v1, v0, Lbf/p$a;->a:I <-- TARGET + Opcode.CONST_4, // const/4 v2, -0x2 + Opcode.CONST_STRING, // const-string v3... + Opcode.CONST_STRING, // const-string v4... + Opcode.IF_NE // if-ne v1, v2, :cond_0 + ) +} diff --git a/patches/src/main/kotlin/app/revanced/patches/lightroom/misc/bypassVersionCheck/disableVersionCheckPatch.kt b/patches/src/main/kotlin/app/revanced/patches/lightroom/misc/bypassVersionCheck/disableVersionCheckPatch.kt new file mode 100644 index 0000000000..320d9e6844 --- /dev/null +++ b/patches/src/main/kotlin/app/revanced/patches/lightroom/misc/bypassVersionCheck/disableVersionCheckPatch.kt @@ -0,0 +1,24 @@ +package app.revanced.patches.lightroom.misc.version + +import app.revanced.patcher.extensions.InstructionExtensions.addInstruction +import app.revanced.patcher.patch.bytecodePatch +import com.android.tools.smali.dexlib2.Opcode + +@Suppress("unused") +val disableVersionCheckPatch = bytecodePatch( + name = "Disable version check", +) { + compatibleWith("com.adobe.lrmobile"("9.3.0")) + + execute { + versionCheckFingerprint.method.apply { + val igetIndex = implementation!!.instructions.indexOfFirst { + it.opcode == Opcode.IGET + } + + if (igetIndex != -1) { + addInstruction(igetIndex + 1, "const/4 v1, -0x2") + } + } + } +} From aba800c7d5fe4e27ea7ead387d809998900f1783 Mon Sep 17 00:00:00 2001 From: f1re4xx Date: Mon, 24 Nov 2025 19:01:22 +0100 Subject: [PATCH 2/9] fix: [lightroom patch] add patch description, simplify fingerprint --- ...ersionCheckPatch.kt => DisableVersionCheckPatch.kt} | 6 +++++- .../lightroom/misc/bypassVersionCheck/Fingerprints.kt | 10 +++------- 2 files changed, 8 insertions(+), 8 deletions(-) rename patches/src/main/kotlin/app/revanced/patches/lightroom/misc/bypassVersionCheck/{disableVersionCheckPatch.kt => DisableVersionCheckPatch.kt} (75%) diff --git a/patches/src/main/kotlin/app/revanced/patches/lightroom/misc/bypassVersionCheck/disableVersionCheckPatch.kt b/patches/src/main/kotlin/app/revanced/patches/lightroom/misc/bypassVersionCheck/DisableVersionCheckPatch.kt similarity index 75% rename from patches/src/main/kotlin/app/revanced/patches/lightroom/misc/bypassVersionCheck/disableVersionCheckPatch.kt rename to patches/src/main/kotlin/app/revanced/patches/lightroom/misc/bypassVersionCheck/DisableVersionCheckPatch.kt index 320d9e6844..06a7c0084a 100644 --- a/patches/src/main/kotlin/app/revanced/patches/lightroom/misc/bypassVersionCheck/disableVersionCheckPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/lightroom/misc/bypassVersionCheck/DisableVersionCheckPatch.kt @@ -5,7 +5,11 @@ import app.revanced.patcher.patch.bytecodePatch import com.android.tools.smali.dexlib2.Opcode @Suppress("unused") -val disableVersionCheckPatch = bytecodePatch( +/** + * Disables the server-side version check that prevents the app from starting + * if the version is considered "denylisted" or below the minimum requirement. + */ +val DisableVersionCheckPatch = bytecodePatch( name = "Disable version check", ) { compatibleWith("com.adobe.lrmobile"("9.3.0")) diff --git a/patches/src/main/kotlin/app/revanced/patches/lightroom/misc/bypassVersionCheck/Fingerprints.kt b/patches/src/main/kotlin/app/revanced/patches/lightroom/misc/bypassVersionCheck/Fingerprints.kt index 109295157d..df8e1af8df 100644 --- a/patches/src/main/kotlin/app/revanced/patches/lightroom/misc/bypassVersionCheck/Fingerprints.kt +++ b/patches/src/main/kotlin/app/revanced/patches/lightroom/misc/bypassVersionCheck/Fingerprints.kt @@ -14,12 +14,8 @@ internal val versionCheckFingerprint = fingerprint { ) opcodes( - Opcode.INVOKE_STATIC, // invoke-static {}, Lbf/p;->b()Lbf/p$a; - Opcode.MOVE_RESULT_OBJECT, // move-result-object v0 - Opcode.IGET, // iget v1, v0, Lbf/p$a;->a:I <-- TARGET - Opcode.CONST_4, // const/4 v2, -0x2 - Opcode.CONST_STRING, // const-string v3... - Opcode.CONST_STRING, // const-string v4... - Opcode.IF_NE // if-ne v1, v2, :cond_0 + Opcode.INVOKE_STATIC, + Opcode.MOVE_RESULT_OBJECT, + Opcode.IGET, // <-- Overwrite this instruction ) } From f2ea6c6e9b5e1967ebb7a2001711ffc2723865ad Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Mon, 24 Nov 2025 19:06:36 +0100 Subject: [PATCH 3/9] Apply suggestion from @oSumAtrIX --- .../patches/lightroom/misc/bypassVersionCheck/Fingerprints.kt | 1 - 1 file changed, 1 deletion(-) diff --git a/patches/src/main/kotlin/app/revanced/patches/lightroom/misc/bypassVersionCheck/Fingerprints.kt b/patches/src/main/kotlin/app/revanced/patches/lightroom/misc/bypassVersionCheck/Fingerprints.kt index df8e1af8df..6b8a94e17c 100644 --- a/patches/src/main/kotlin/app/revanced/patches/lightroom/misc/bypassVersionCheck/Fingerprints.kt +++ b/patches/src/main/kotlin/app/revanced/patches/lightroom/misc/bypassVersionCheck/Fingerprints.kt @@ -5,7 +5,6 @@ import com.android.tools.smali.dexlib2.AccessFlags import com.android.tools.smali.dexlib2.Opcode internal val versionCheckFingerprint = fingerprint { - // Matches public static k()V accessFlags(AccessFlags.PUBLIC, AccessFlags.STATIC) strings( From 1ac1e5f295f77e9afe762c459fcc77be2a46ecc1 Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Mon, 24 Nov 2025 19:07:08 +0100 Subject: [PATCH 4/9] Update patches/src/main/kotlin/app/revanced/patches/lightroom/misc/bypassVersionCheck/Fingerprints.kt --- .../patches/lightroom/misc/bypassVersionCheck/Fingerprints.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patches/src/main/kotlin/app/revanced/patches/lightroom/misc/bypassVersionCheck/Fingerprints.kt b/patches/src/main/kotlin/app/revanced/patches/lightroom/misc/bypassVersionCheck/Fingerprints.kt index 6b8a94e17c..569435fa3c 100644 --- a/patches/src/main/kotlin/app/revanced/patches/lightroom/misc/bypassVersionCheck/Fingerprints.kt +++ b/patches/src/main/kotlin/app/revanced/patches/lightroom/misc/bypassVersionCheck/Fingerprints.kt @@ -15,6 +15,6 @@ internal val versionCheckFingerprint = fingerprint { opcodes( Opcode.INVOKE_STATIC, Opcode.MOVE_RESULT_OBJECT, - Opcode.IGET, // <-- Overwrite this instruction + Opcode.IGET, // Overwrite this instruction to disable the check. ) } From f3b10ddd5453c02830bd1ae56b2377eed113a20b Mon Sep 17 00:00:00 2001 From: f1re4xx Date: Mon, 24 Nov 2025 19:27:41 +0100 Subject: [PATCH 5/9] fix: [lightroom patch] make implementation more clear --- .../bypassVersionCheck/DisableVersionCheckPatch.kt | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/patches/src/main/kotlin/app/revanced/patches/lightroom/misc/bypassVersionCheck/DisableVersionCheckPatch.kt b/patches/src/main/kotlin/app/revanced/patches/lightroom/misc/bypassVersionCheck/DisableVersionCheckPatch.kt index 06a7c0084a..2de25e07ec 100644 --- a/patches/src/main/kotlin/app/revanced/patches/lightroom/misc/bypassVersionCheck/DisableVersionCheckPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/lightroom/misc/bypassVersionCheck/DisableVersionCheckPatch.kt @@ -1,6 +1,6 @@ package app.revanced.patches.lightroom.misc.version -import app.revanced.patcher.extensions.InstructionExtensions.addInstruction +import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction import app.revanced.patcher.patch.bytecodePatch import com.android.tools.smali.dexlib2.Opcode @@ -16,13 +16,11 @@ val DisableVersionCheckPatch = bytecodePatch( execute { versionCheckFingerprint.method.apply { - val igetIndex = implementation!!.instructions.indexOfFirst { - it.opcode == Opcode.IGET - } + val igetIndex = versionCheckFingerprint.patternMatch!!.endIndex - if (igetIndex != -1) { - addInstruction(igetIndex + 1, "const/4 v1, -0x2") - } + // This value represents the server command to clear all version restrictions + val STATUS_FORCE_RESET_HEX = "-0x2"; + replaceInstruction(igetIndex, "const/4 v1, $STATUS_FORCE_RESET_HEX") } } } From 1db0507c2e330a8ab3422644f299322ac95f2e18 Mon Sep 17 00:00:00 2001 From: f1re4xx Date: Mon, 24 Nov 2025 19:46:49 +0100 Subject: [PATCH 6/9] fix: [lightroom patch] rename fingerprint --- .../misc/bypassVersionCheck/DisableVersionCheckPatch.kt | 4 ++-- .../patches/lightroom/misc/bypassVersionCheck/Fingerprints.kt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/patches/src/main/kotlin/app/revanced/patches/lightroom/misc/bypassVersionCheck/DisableVersionCheckPatch.kt b/patches/src/main/kotlin/app/revanced/patches/lightroom/misc/bypassVersionCheck/DisableVersionCheckPatch.kt index 2de25e07ec..95585ef3e9 100644 --- a/patches/src/main/kotlin/app/revanced/patches/lightroom/misc/bypassVersionCheck/DisableVersionCheckPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/lightroom/misc/bypassVersionCheck/DisableVersionCheckPatch.kt @@ -15,8 +15,8 @@ val DisableVersionCheckPatch = bytecodePatch( compatibleWith("com.adobe.lrmobile"("9.3.0")) execute { - versionCheckFingerprint.method.apply { - val igetIndex = versionCheckFingerprint.patternMatch!!.endIndex + refreshRemoteConfigurationFingerprint.method.apply { + val igetIndex = refreshRemoteConfigurationFingerprint.patternMatch!!.endIndex // This value represents the server command to clear all version restrictions val STATUS_FORCE_RESET_HEX = "-0x2"; diff --git a/patches/src/main/kotlin/app/revanced/patches/lightroom/misc/bypassVersionCheck/Fingerprints.kt b/patches/src/main/kotlin/app/revanced/patches/lightroom/misc/bypassVersionCheck/Fingerprints.kt index 569435fa3c..bb8374a76b 100644 --- a/patches/src/main/kotlin/app/revanced/patches/lightroom/misc/bypassVersionCheck/Fingerprints.kt +++ b/patches/src/main/kotlin/app/revanced/patches/lightroom/misc/bypassVersionCheck/Fingerprints.kt @@ -4,7 +4,7 @@ import app.revanced.patcher.fingerprint import com.android.tools.smali.dexlib2.AccessFlags import com.android.tools.smali.dexlib2.Opcode -internal val versionCheckFingerprint = fingerprint { +internal val refreshRemoteConfigurationFingerprint = fingerprint { accessFlags(AccessFlags.PUBLIC, AccessFlags.STATIC) strings( From 6d3506cc4940cbfed0e8bd3e53ff58ae9bbc7e70 Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Tue, 25 Nov 2025 19:45:43 +0100 Subject: [PATCH 7/9] Apply suggestions from code review --- .../misc/bypassVersionCheck/DisableVersionCheckPatch.kt | 4 ++-- .../patches/lightroom/misc/bypassVersionCheck/Fingerprints.kt | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/patches/src/main/kotlin/app/revanced/patches/lightroom/misc/bypassVersionCheck/DisableVersionCheckPatch.kt b/patches/src/main/kotlin/app/revanced/patches/lightroom/misc/bypassVersionCheck/DisableVersionCheckPatch.kt index 95585ef3e9..764ffada2b 100644 --- a/patches/src/main/kotlin/app/revanced/patches/lightroom/misc/bypassVersionCheck/DisableVersionCheckPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/lightroom/misc/bypassVersionCheck/DisableVersionCheckPatch.kt @@ -18,8 +18,8 @@ val DisableVersionCheckPatch = bytecodePatch( refreshRemoteConfigurationFingerprint.method.apply { val igetIndex = refreshRemoteConfigurationFingerprint.patternMatch!!.endIndex - // This value represents the server command to clear all version restrictions - val STATUS_FORCE_RESET_HEX = "-0x2"; + // This value represents the server command to clear all version restrictions. + const val STATUS_FORCE_RESET_HEX = "-0x2"; replaceInstruction(igetIndex, "const/4 v1, $STATUS_FORCE_RESET_HEX") } } diff --git a/patches/src/main/kotlin/app/revanced/patches/lightroom/misc/bypassVersionCheck/Fingerprints.kt b/patches/src/main/kotlin/app/revanced/patches/lightroom/misc/bypassVersionCheck/Fingerprints.kt index bb8374a76b..67900c31ea 100644 --- a/patches/src/main/kotlin/app/revanced/patches/lightroom/misc/bypassVersionCheck/Fingerprints.kt +++ b/patches/src/main/kotlin/app/revanced/patches/lightroom/misc/bypassVersionCheck/Fingerprints.kt @@ -6,12 +6,10 @@ import com.android.tools.smali.dexlib2.Opcode internal val refreshRemoteConfigurationFingerprint = fingerprint { accessFlags(AccessFlags.PUBLIC, AccessFlags.STATIC) - strings( "com.adobe.lrmobile.denylisted_version_set_key", "com.adobe.lrmobile.app_min_version_key" ) - opcodes( Opcode.INVOKE_STATIC, Opcode.MOVE_RESULT_OBJECT, From ab6c85c32847290e92eeb0899c37f5ccdec18eb8 Mon Sep 17 00:00:00 2001 From: f1re4xx Date: Tue, 25 Nov 2025 20:02:08 +0100 Subject: [PATCH 8/9] fix: [lightroom patch] add description to DisableVersionCheck --- .../misc/bypassVersionCheck/DisableVersionCheckPatch.kt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/patches/src/main/kotlin/app/revanced/patches/lightroom/misc/bypassVersionCheck/DisableVersionCheckPatch.kt b/patches/src/main/kotlin/app/revanced/patches/lightroom/misc/bypassVersionCheck/DisableVersionCheckPatch.kt index 764ffada2b..813031257b 100644 --- a/patches/src/main/kotlin/app/revanced/patches/lightroom/misc/bypassVersionCheck/DisableVersionCheckPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/lightroom/misc/bypassVersionCheck/DisableVersionCheckPatch.kt @@ -5,12 +5,9 @@ import app.revanced.patcher.patch.bytecodePatch import com.android.tools.smali.dexlib2.Opcode @Suppress("unused") -/** - * Disables the server-side version check that prevents the app from starting - * if the version is considered "denylisted" or below the minimum requirement. - */ val DisableVersionCheckPatch = bytecodePatch( name = "Disable version check", + description = "Disables the server-side version check that prevents the app from starting", ) { compatibleWith("com.adobe.lrmobile"("9.3.0")) From b882a335472a30222d145352f5e79934c5dbf429 Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Wed, 3 Dec 2025 15:12:59 +0100 Subject: [PATCH 9/9] Apply suggestion from @oSumAtrIX --- .../misc/bypassVersionCheck/DisableVersionCheckPatch.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patches/src/main/kotlin/app/revanced/patches/lightroom/misc/bypassVersionCheck/DisableVersionCheckPatch.kt b/patches/src/main/kotlin/app/revanced/patches/lightroom/misc/bypassVersionCheck/DisableVersionCheckPatch.kt index 813031257b..e28d793ff3 100644 --- a/patches/src/main/kotlin/app/revanced/patches/lightroom/misc/bypassVersionCheck/DisableVersionCheckPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/lightroom/misc/bypassVersionCheck/DisableVersionCheckPatch.kt @@ -7,7 +7,7 @@ import com.android.tools.smali.dexlib2.Opcode @Suppress("unused") val DisableVersionCheckPatch = bytecodePatch( name = "Disable version check", - description = "Disables the server-side version check that prevents the app from starting", + description = "Disables the server-side version check that prevents the app from starting.", ) { compatibleWith("com.adobe.lrmobile"("9.3.0"))