-
-
Notifications
You must be signed in to change notification settings - Fork 631
fix(Lightroom): Add Disable version check patch
#6315
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Changes from 2 commits
10cc62d
aba800c
f2ea6c6
1ac1e5f
f3b10dd
1db0507
6d3506c
ab6c85c
b882a33
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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", | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add a description with the purpose of the patch
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 { | ||
|
||
| it.opcode == Opcode.IGET | ||
| } | ||
|
|
||
| if (igetIndex != -1) { | ||
| addInstruction(igetIndex + 1, "const/4 v1, -0x2") | ||
|
||
| } | ||
| } | ||
| } | ||
| } | ||
| 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 { | ||
|
||
| // Matches public static k()V | ||
oSumAtrIX marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| 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 | ||
oSumAtrIX marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
oSumAtrIX marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| ) | ||
| } | ||
There was a problem hiding this comment.
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
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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