Skip to content
4 changes: 4 additions & 0 deletions patches/api/patches.api
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the patch can be directly placed in misc package. The file name should start with uppercase

Copy link
Author

@f1re4xx f1re4xx Nov 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I placed it similarly to the two existing patches

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure but the file still seems in the wrong package

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The package name should be lowercase "versioncheck" for example

Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package app.revanced.patches.lightroom.misc.version

import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
import app.revanced.patcher.patch.bytecodePatch
import com.android.tools.smali.dexlib2.Opcode

@Suppress("unused")
val DisableVersionCheckPatch = bytecodePatch(
name = "Disable version check",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a description with the purpose of the patch

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

description added

description = "Disables the server-side version check that prevents the app from starting.",
) {
compatibleWith("com.adobe.lrmobile"("9.3.0"))

execute {
refreshRemoteConfigurationFingerprint.method.apply {
val igetIndex = refreshRemoteConfigurationFingerprint.patternMatch!!.endIndex

// 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")
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
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 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,
Opcode.IGET, // Overwrite this instruction to disable the check.
)
}