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

Split assets folder by device ABI #359

Open
hongtandu opened this issue Apr 4, 2024 · 0 comments
Open

Split assets folder by device ABI #359

hongtandu opened this issue Apr 4, 2024 · 0 comments

Comments

@hongtandu
Copy link

Is your feature request related to a problem? Please describe.
Hello, we are moving WhatsApp to ship with AAB. Our current context is that files under lib/<arch>/... are split properly upon generating APKs, and we'd hope bundletool to have the functionality of splitting assets folder by device ABI as well.

More specifically, our bundle structure would be like,

/
|-- assets
|   |-- compressed
|   |   |-- x86
|   |   |   |-- libs.spo
|   |   |-- x86_64
|   |   |   |-- libs.spo
|   |   |-- arm64-v8a
|   |   |   |-- libs.spo
|   |   |-- emojis
...
|-- lib
|   |-- x86
|   |-- x86_64
|   |-- arm64-v8a
...

Describe the solution you'd like
The solution we'd like to have is to split assets/.../<arch>/... (or any format of paths with <arch> under assets) and select the matching ones when generating APKs from bundletool, just like what we do for lib/<arch>/....

Describe alternatives you've considered
We've considered moving all ABI-specific files under /lib. However, since we perform custom compression on some native libraries and deal with them with our own runtime logic, this didn't turn out to be a proper fix for the problem due to some Android build system and security concerns. (one example is some OEMs check file names under /lib and throw all sorts of errors if it's not a real .so file).

Additional context
There are similar asks in #190, #180, and #116, but it seems it's not addressed yet.
We'd appreciate your time and effort helping add this functionality, or let us know what it takes to support this in bundletool and we'd like to contribute if possible. Thanks in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant