Skip to content
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: merge bundle option/merge upon patching #2143

Open
3 tasks done
OldManJenkins12 opened this issue Aug 16, 2024 · 7 comments
Open
3 tasks done

feat: merge bundle option/merge upon patching #2143

OldManJenkins12 opened this issue Aug 16, 2024 · 7 comments
Labels
Feature request Requesting a new feature that's not implemented yet

Comments

@OldManJenkins12
Copy link

Feature description

  1. A new option to simply merge app bundles/split apk's
  2. If the manager sees the user giving it an app bundle/split APK when patching, it merges then patches

Motivation

  1. Some people may simply want to install an apk, but not patch, so on the bottom of the manager there could be a "merger" option which would simply merge the provided file to an APK, android app bundles can target the specific device, so the manager would target the specific device when signing

  2. As the play store now only provides bundles for some apps, this makes it harder to patch apps, forcing the user to use older versions of the app in order to get the APK and then patch, so to continue using newer versions, and patching apps that the play store only provides bundles for, it's best for the manager to automatically merge the provided file, then patch the app, targeting the specific device upon merging

  3. As this would be in revanced manager people wouldn't need to install tools to merge (which can end up giving corrupted/broken apk's) and people can simply stick to revanced, this is especially helpful if they're low on storage or just don't want to install these tools, and revanced would/should give a safe and fully working apk. This being in the manager also makes it much easier and quicker to patch/merge bundles/split apk's

Acknowledgements

  • I have checked all open and closed feature requests and this is not a duplicate.
  • I have chosen an appropriate title.
  • The feature request is only related to ReVanced Manager.
@OldManJenkins12 OldManJenkins12 added the Feature request Requesting a new feature that's not implemented yet label Aug 16, 2024
@Mehlsine
Copy link

There's an issue with MinSdkVersionException being raised during merged APK signing that one of ReVanced Manager's maintainers is not willing to acknowledge by simply referring to it as "broken APK", so I doubt there's going to be some work on your proposal in the near future. Please refer to this #2083 (comment) if you want to know the details.

Meanwhile, you can merge split APKs using 3rd party tools (for example, Antisplit function in Apktool M) and use this modified ReVanced Manager to patch merged APK without getting any exceptions in the process: https://github.com/AbdurazaaqMohammed/revanced-antisplit

@oSumAtrIX
Copy link
Member

This is false information and also the last time I will allow it to be posted on this organization. The issue you linked contains the explanation on why.

@kitadai31
Copy link
Contributor

@OldManJenkins12

A new option to simply merge app bundles/split apk's

Some people may simply want to install an apk, but not patch, so on the bottom of the manager there could be a "merger" option which would simply merge the provided file to an APK, android app bundles can target the specific device, so the manager would target the specific device when signing

To install a bundle APK, you don't have to merge it into a single APK.
I think it's other app's job such as Split APKs Installer.
Those installer tools can install bundle APKs without modifying and re-signing.

Merging APKs is only required when patching a bundle APK.


@Mehlsine
I think Antisplit-M sometime outputs a broken APK.
If the merged APK is broken (Malformed ZIP entry), clear the app data of Antisplit-M and merge again will solves the problem.
AbdurazaaqMohammed claims the APK is not corrupted, but that does not explain the inconsistent occurrence of Malformed ZIP entry errors.

This will be a reason why a reliable antisplit implementation is needed for revanced.

But this error could also be caused by the ReVanced Manager...
I once had a Malformed ZIP entry error when I patched the Antisplit-M output APK with ReVanced Manager.
However, after that, I tried patching again with the same apk, and no error was happened.
So, this error possibly be caused by the ReVanced Manager. (randomly)
But since then, I have not been able to reproduce the error.

@AbdurazaaqMohammed
Copy link

So, this error possibly be caused by the ReVanced Manager. (randomly)

Well, the same error in ReVanced happens with APKs merged by Apktool M, even thouigh Maximoff said he used apksig in Apktool M and it doesn't have this error, it also didn't have it when I tried with apksig, though I used MuntashirAkon's port for Android, so Maximoff said on 4pda he thinks it may be caused by something in ReVanced Manager

tilks (the developer of AntiSplit G2) said the problem is caused by ZIPDATADESCR for whatever reason, which can just be removed and is why signing the APK or modifying anything in MT Manager will fix it

Anyway, I added the option in AntiSplit M to fix it for ReVanced by rebuilding the APK, now it will work with no problem

@oSumAtrIX
Copy link
Member

But this error could also be caused by the ReVanced Manager

ReVanced does not handle reading APK files. It uses apkzlib, the official Library to read .apk files according to spec which reports the issue. Any regular zip verifier will report the same issue.

@OldManJenkins12
Copy link
Author

To install a bundle APK, you don't have to merge it into a single APK. I think it's other app's job such as Split APKs Installer. Those installer tools can install bundle APKs without modifying and re-signing.

Merging APKs is only required when patching a bundle APK.

Oh alright, then there could be a "bundle installer" option on the bottom instead of "merger" for when people simply want to install a bundle/split apk

@oSumAtrIX
Copy link
Member

If ReVanced implements split APK patching it will very likely not merge APKs but instead simply support the split architecture.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature request Requesting a new feature that's not implemented yet
Projects
None yet
Development

No branches or pull requests

5 participants