Skip to content

Conversation

@f1re4xx
Copy link

@f1re4xx f1re4xx commented Nov 24, 2025

This PR introduces a new patch for Adobe Lightroom named Disable version check.

It specifically targets version 9.3.0 to bypass the application's startup validation, which prevents the app from opening if the version is deemed "denylisted" or below the minimum requirement by the server.

Fingerprint: Locates the public static method responsible for fetching the version status (references denylisted_version_set_key and app_min_version_key).

Patch Logic:

  • Identifies the IGET opcode that retrieves the version status.
  • Injects const/4 v1, -0x2 immediately after the fetch.
  • This overwrites the actual server check result with -0x2, effectively bypassing the check.

API: Updated patches.api to expose the new DisableVersionCheckPatch


@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

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

Comment on lines 17 to 23
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
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 commenting code like this, say how you want to change the specific instruction, e.g "Overwrite this."

Comment on lines 17 to 23
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
Copy link
Member

Choose a reason for hiding this comment

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

Can the pattern be made shorter?

Copy link
Author

Choose a reason for hiding this comment

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

Simplified, seems to work fine

@oSumAtrIX oSumAtrIX changed the base branch from main to dev November 24, 2025 17:54
@oSumAtrIX oSumAtrIX changed the title fix(lightroom): add disable version check patch fix(Lightroom): Add Disable version check patch Nov 24, 2025

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

}

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.

}

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.

You can use "replaceInstruction instead of add

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

Copy link
Member

@oSumAtrIX oSumAtrIX left a comment

Choose a reason for hiding this comment

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants