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,28 @@
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")
/**
* 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",
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

) {
compatibleWith("com.adobe.lrmobile"("9.3.0"))

execute {
versionCheckFingerprint.method.apply {
val igetIndex = implementation!!.instructions.indexOfFirst {
Copy link
Member

Choose a reason for hiding this comment

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

Instead of this, use versionCheckFingerprint.patternMatch.endIndex

it.opcode == Opcode.IGET
}

if (igetIndex != -1) {
addInstruction(igetIndex + 1, "const/4 v1, -0x2")
Copy link
Member

Choose a reason for hiding this comment

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

Whats -0x2? Add a comment or use a named val to avoid magic constants.

Copy link
Member

Choose a reason for hiding this comment

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

You can use "replaceInstruction instead of add

}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
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 {
Copy link
Member

Choose a reason for hiding this comment

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

Is the name ideal for the fingerprint? Is the method it matches a "checkVersion()" method?

Copy link
Author

Choose a reason for hiding this comment

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

I'm not sure, as decompiling this gives a single letter method name. I assumed it's a valid name given what this patch does.

Copy link
Member

Choose a reason for hiding this comment

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

Try to infer from the methods implementation

Copy link
Author

Choose a reason for hiding this comment

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

Is refreshRemoteConfigurationFingerprint better? This method seems to load a current config from remote servers and save it to the app's storage.

Copy link
Member

@oSumAtrIX oSumAtrIX Nov 24, 2025

Choose a reason for hiding this comment

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

sure, or simpler saveRemoteConfigurationFingerprint or fetchRemoteConfigurationFingerprint

// 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,
Opcode.MOVE_RESULT_OBJECT,
Opcode.IGET, // <-- Overwrite this instruction
)
}