-
-
Notifications
You must be signed in to change notification settings - Fork 277
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
feat: Add Change version code
patch
#3338
Conversation
What if an app is already installed but was not patched with this, can a downgraded version be installed with this? If the version number needs to be the same or greater to to update, should this use max integer so it's always the same or 'newer' than whatever is already installed? If this is the case and this is done, the downside is this patch is always needed to upgrade any existing installation. |
I think the idea with this patch is always to use this patch when patching apps, so you can install any previously patched app as well. |
No
You could do either the min or the max version code, where using the min one allows returning to the "real" version code, while the max would allow switching to this patch from an existing installation (already installed apps have to be signed with the ReVanced keys for both methods) |
Exactly |
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 should be renamed to what it precisely does. In this case it changes the version code so the patch should be called "Change version code" similar to how the package name patch is called "Change package name". While the main side effect is to "Add app downgrading" in reality what the patch does is "Change version code"
It seems using max integer version would be more immediate for what the goal is (downgrade an existing installation), since it can patch and downgrade in one go regardless how the existing app was previously patched and installed (only requirement is the user patched themselves and has the same signing key). Using version 1 does not allow downgrading an existing installation that did not originally include this patch, meaning for that install it's impossible to downgrade unless uninstalled first (and then this patch is not required). Maybe the version number can be exposed as a patch option, but that might be way more complicated than needed. |
I am not sure, but I think if the version code is max integer, that will effectively turn off Google play store updates since the existing installation will always show as 'newer' than whatever the play store has. |
Done, defaults to the Google Play maxium (https://developer.android.com/studio/publish/versioning) |
I don't think restricting to Google Play's maximum makes sense. In terms of Android, the integer max value can be used, so why not here? |
Done |
src/main/kotlin/app/revanced/patches/all/misc/versioncode/ChangeVersionCode.kt
Outdated
Show resolved
Hide resolved
Change version code
patch
Anything else left to do here @oSumAtrIX? |
src/main/kotlin/app/revanced/patches/all/misc/versioncode/ChangeVersionCodePatch.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/app/revanced/patches/all/misc/versioncode/ChangeVersionCodePatch.kt
Show resolved
Hide resolved
src/main/kotlin/app/revanced/patches/all/misc/versioncode/ChangeVersionCodePatch.kt
Show resolved
Hide resolved
Can |
'App version' usually refers to the user facing version the app presents itself as, such as |
# [4.10.0-dev.7](v4.10.0-dev.6...v4.10.0-dev.7) (2024-06-15) ### Features * Add `Change version code` patch ([#3338](#3338)) ([685ef39](685ef39))
This patch seems does not support widely
|
That's probably an Instagram issue as they do a lot of weird stuff with their apks to try to make reverse engineering harder |
This is not an issue with the patch but resource decompilation/AAPT. |
Sigh , AAPT again, hopefully it solved in near future. |
# [4.10.0](v4.9.0...v4.10.0) (2024-06-23) ### Bug Fixes * Correct invalid string name ([b84494f](b84494f)) * **YouTube - Client spoof:** Correctly play more livestreams using Android VR ([#3316](#3316)) ([c05264a](c05264a)) * **YouTube - Hide description components:** Replace `Hide game section` and `Hide music section` with `Hide attributes section` ([#3327](#3327)) ([0198a43](0198a43)) * **YouTube Music:** Rename `Minimized playback` to `Remove background playback restrictions` ([#3315](#3315)) ([3c31e55](3c31e55)) * **YouTube:** Rename `Minimized playback` to `Remove background playback restrictions` ([#3314](#3314)) ([37d415b](37d415b)) ### Features * Add `Change version code` patch ([#3338](#3338)) ([685ef39](685ef39)) * **Boost For Reddit:** Add `Fix /s/ links` patch ([#3154](#3154)) ([5fa9fd2](5fa9fd2)) * **Boost for Reddit:** Add `Fix audio missing in video downloads` patch ([#3287](#3287)) ([a9258d4](a9258d4)) * **YouTube - Comments:** Add `Hide 'Create a Short' button` option ([#3333](#3333)) ([be9e244](be9e244)) * **YouTube - Comments:** Add `Hide Thanks button` and `Hide 'Comments by members' header` options ([#3317](#3317)) ([9c4c4f0](9c4c4f0)) * **YouTube - Miniplayer:** Rename `Tablet mini player` and allow selecting the style of the in-app miniplayer ([#3302](#3302)) ([5511736](5511736))
# [4.10.0](v4.9.0...v4.10.0) (2024-06-23) ### Bug Fixes * Correct invalid string name ([b84494f](b84494f)) * **YouTube - Client spoof:** Correctly play more livestreams using Android VR ([ReVanced#3316](https://github.com/E85Addict/revanced-patches/issues/3316)) ([c05264a](c05264a)) * **YouTube - Hide description components:** Replace `Hide game section` and `Hide music section` with `Hide attributes section` ([ReVanced#3327](https://github.com/E85Addict/revanced-patches/issues/3327)) ([0198a43](0198a43)) * **YouTube Music:** Rename `Minimized playback` to `Remove background playback restrictions` ([ReVanced#3315](https://github.com/E85Addict/revanced-patches/issues/3315)) ([3c31e55](3c31e55)) * **YouTube:** Rename `Minimized playback` to `Remove background playback restrictions` ([ReVanced#3314](https://github.com/E85Addict/revanced-patches/issues/3314)) ([37d415b](37d415b)) ### Features * Add `Change version code` patch ([ReVanced#3338](https://github.com/E85Addict/revanced-patches/issues/3338)) ([685ef39](685ef39)) * **Boost For Reddit:** Add `Fix /s/ links` patch ([ReVanced#3154](https://github.com/E85Addict/revanced-patches/issues/3154)) ([5fa9fd2](5fa9fd2)) * **Boost for Reddit:** Add `Fix audio missing in video downloads` patch ([ReVanced#3287](https://github.com/E85Addict/revanced-patches/issues/3287)) ([a9258d4](a9258d4)) * **YouTube - Comments:** Add `Hide 'Create a Short' button` option ([ReVanced#3333](https://github.com/E85Addict/revanced-patches/issues/3333)) ([be9e244](be9e244)) * **YouTube - Comments:** Add `Hide Thanks button` and `Hide 'Comments by members' header` options ([ReVanced#3317](https://github.com/E85Addict/revanced-patches/issues/3317)) ([9c4c4f0](9c4c4f0)) * **YouTube - Miniplayer:** Rename `Tablet mini player` and allow selecting the style of the in-app miniplayer ([ReVanced#3302](https://github.com/E85Addict/revanced-patches/issues/3302)) ([5511736](5511736)) ### Performance Improvements * Personal Logo && Add upstream sync ([5a86c70](5a86c70))
# [4.10.0](v4.9.0...v4.10.0) (2024-07-07) ### Bug Fixes * Correct invalid string name ([b84494f](b84494f)) * **YouTube - Client spoof:** Correctly play more livestreams using Android VR ([ReVanced#3316](https://github.com/E85Addict/revanced-patches/issues/3316)) ([c05264a](c05264a)) * **YouTube - Hide description components:** Replace `Hide game section` and `Hide music section` with `Hide attributes section` ([ReVanced#3327](https://github.com/E85Addict/revanced-patches/issues/3327)) ([0198a43](0198a43)) * **YouTube Music:** Rename `Minimized playback` to `Remove background playback restrictions` ([ReVanced#3315](https://github.com/E85Addict/revanced-patches/issues/3315)) ([3c31e55](3c31e55)) * **YouTube:** Rename `Minimized playback` to `Remove background playback restrictions` ([ReVanced#3314](https://github.com/E85Addict/revanced-patches/issues/3314)) ([37d415b](37d415b)) ### Features * Add `Change version code` patch ([ReVanced#3338](https://github.com/E85Addict/revanced-patches/issues/3338)) ([685ef39](685ef39)) * **Boost For Reddit:** Add `Fix /s/ links` patch ([ReVanced#3154](https://github.com/E85Addict/revanced-patches/issues/3154)) ([5fa9fd2](5fa9fd2)) * **Boost for Reddit:** Add `Fix audio missing in video downloads` patch ([ReVanced#3287](https://github.com/E85Addict/revanced-patches/issues/3287)) ([a9258d4](a9258d4)) * **YouTube - Comments:** Add `Hide 'Create a Short' button` option ([ReVanced#3333](https://github.com/E85Addict/revanced-patches/issues/3333)) ([be9e244](be9e244)) * **YouTube - Comments:** Add `Hide Thanks button` and `Hide 'Comments by members' header` options ([ReVanced#3317](https://github.com/E85Addict/revanced-patches/issues/3317)) ([9c4c4f0](9c4c4f0)) * **YouTube - Miniplayer:** Rename `Tablet mini player` and allow selecting the style of the in-app miniplayer ([ReVanced#3302](https://github.com/E85Addict/revanced-patches/issues/3302)) ([5511736](5511736)) ### Performance Improvements * Personal Logo && Add upstream sync ([fc5b72d](fc5b72d))
# [4.10.0](v4.9.0...v4.10.0) (2024-07-11) ### Bug Fixes * Correct invalid string name ([b84494f](b84494f)) * **YouTube - Client spoof:** Correctly play more livestreams using Android VR ([ReVanced#3316](https://github.com/E85Addict/revanced-patches/issues/3316)) ([c05264a](c05264a)) * **YouTube - Hide description components:** Replace `Hide game section` and `Hide music section` with `Hide attributes section` ([ReVanced#3327](https://github.com/E85Addict/revanced-patches/issues/3327)) ([0198a43](0198a43)) * **YouTube Music:** Rename `Minimized playback` to `Remove background playback restrictions` ([ReVanced#3315](https://github.com/E85Addict/revanced-patches/issues/3315)) ([3c31e55](3c31e55)) * **YouTube:** Rename `Minimized playback` to `Remove background playback restrictions` ([ReVanced#3314](https://github.com/E85Addict/revanced-patches/issues/3314)) ([37d415b](37d415b)) ### Features * Add `Change version code` patch ([ReVanced#3338](https://github.com/E85Addict/revanced-patches/issues/3338)) ([685ef39](685ef39)) * **Boost For Reddit:** Add `Fix /s/ links` patch ([ReVanced#3154](https://github.com/E85Addict/revanced-patches/issues/3154)) ([5fa9fd2](5fa9fd2)) * **Boost for Reddit:** Add `Fix audio missing in video downloads` patch ([ReVanced#3287](https://github.com/E85Addict/revanced-patches/issues/3287)) ([a9258d4](a9258d4)) * **YouTube - Comments:** Add `Hide 'Create a Short' button` option ([ReVanced#3333](https://github.com/E85Addict/revanced-patches/issues/3333)) ([be9e244](be9e244)) * **YouTube - Comments:** Add `Hide Thanks button` and `Hide 'Comments by members' header` options ([ReVanced#3317](https://github.com/E85Addict/revanced-patches/issues/3317)) ([9c4c4f0](9c4c4f0)) * **YouTube - Miniplayer:** Rename `Tablet mini player` and allow selecting the style of the in-app miniplayer ([ReVanced#3302](https://github.com/E85Addict/revanced-patches/issues/3302)) ([5511736](5511736)) ### Performance Improvements * Personal Logo && Add upstream sync ([05677c9](05677c9))
Adds a patch that sets an app's versionCode to 1, allowing apps to be downgraded since the versionCode is now constant