fix(Lightroom): Add Disable version check patch to fix opening the app (#6315)

Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
This commit is contained in:
f1re4xx
2025-12-14 15:38:26 +00:00
committed by GitHub
parent 9a77beea8a
commit 018d176914
3 changed files with 45 additions and 0 deletions

View File

@@ -352,6 +352,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;
}

View File

@@ -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",
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")
}
}
}

View File

@@ -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.
)
}