generated from ReVanced/revanced-patches-template
-
-
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
Open
f1re4xx
wants to merge
9
commits into
ReVanced:dev
Choose a base branch
from
f1re4xx:main
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+45
−0
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
10cc62d
fix: lightroom version bypass patch (allow 9.3.0 to open)
f1re4xx aba800c
fix: [lightroom patch] add patch description, simplify fingerprint
f1re4xx f2ea6c6
Apply suggestion from @oSumAtrIX
oSumAtrIX 1ac1e5f
Update patches/src/main/kotlin/app/revanced/patches/lightroom/misc/by…
oSumAtrIX f3b10dd
fix: [lightroom patch] make implementation more clear
f1re4xx 1db0507
fix: [lightroom patch] rename fingerprint
f1re4xx 6d3506c
Apply suggestions from code review
oSumAtrIX ab6c85c
fix: [lightroom patch] add description to DisableVersionCheck
f1re4xx b882a33
Apply suggestion from @oSumAtrIX
oSumAtrIX File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
...kotlin/app/revanced/patches/lightroom/misc/bypassVersionCheck/DisableVersionCheckPatch.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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", | ||
|
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 |
||
| 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") | ||
| } | ||
| } | ||
| } | ||
18 changes: 18 additions & 0 deletions
18
...es/src/main/kotlin/app/revanced/patches/lightroom/misc/bypassVersionCheck/Fingerprints.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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. | ||
| ) | ||
| } |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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