mirror of
https://github.com/ReVanced/revanced-patches.git
synced 2026-01-10 05:06:17 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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")
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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.
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user