-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Need to be able to create App Bundles (.aab) files in addition to APK files #2084
Comments
Have you found a solution until now? |
This looks pretty relevant: https://github.com/google/bundletool |
As we currently use gradle internaly in p4a, https://developer.android.com/studio/build/building-cmdline#bundle_build_gradle might be a good place to start. |
I currently create .aab using android studio after building the apk with bulldozer(actually bulldozer will create an android studio project style) though I have not uploaded it to google playstore and download it on different android arch to see if it works |
I have just developed an app for android with kivy and found the same issue. Google play store requires since months ago an aab including apks for 64bits architecture and buildozer only generates apk for each architecture 32bits and 64bits. This is a kind of relevant show stopper for kivy and python for android when it comes to 32 bits architecture eg. armeabiv7a instruction set e.g. Motorola Google Nexus 6 6.0.1. Thre is a need to create Need to be able to create App Bundles (.aab) files in addition to APK files. |
Google play still accepts uploading both a 32bit and 64bit apk. Though this of course has drawbacks. It seems that running |
Have you found a new solution for this problem? |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Switching to a completely different framework, when you can run one (undocumented, but explained in previous messages) command here, seems a bit extreme. |
This comment has been minimized.
This comment has been minimized.
alexgrusu, are you angry at this app bundle issue that you reference flutter so curtly? It doesn't look like flutter uses python as its language, although I haven't explored in depth. |
I'm not angry at all. I explored and used kivy a lot and it's a good framework but with some limitations. One of this limitations is explained inhere. If you go further and target to build large scale projects, that include various features, you will encounter other barriers. |
Sorry that kivy has frustrated you. We all need workflows that function smoothly. For me that sometimes means using python. Are you able to reference issues for the other barriers you encountered so people can know what needs work? It looks like the python-for-android/pythonforandroid/toolchain.py Line 1079 in bf76add
|
A downside (for some) of app bundles is that you cannot use a private signing key that Google doesn't have access to. |
I'm not primarily working on Android, so it wasn't on my top list until a week ago, but this one seems pretty relevant in 2021. The following one is the statement that Google made about the new requirements for new apps (targeting August 2021) and updates (targeting November 2021):
I analyzed the python-for-android source code, the Android App Bundle specification, and the https://github.com/google/bundletool repo. Apart from some minor changes in order to support a new distributing format, the major issue is how We ship the "user app" + Right now, The Unfortunately, shipping different (ABI-specific) files into the So, We need to check if the workaround of placing a non-lib, but ".so-extensioned" file is fine also for our use case or not. @tshirtman , @AndreMiras , any thoughts? |
@misl6 so you know, I got really confused reading that python for android packages folders into an mp3 file, a format which is used to make audio files small. I infer it's a typo other software engineers will understand, but it might be clear to fix it for all of us to understand and help together. |
Actually, it's named mp3, although it's a tar.gz (similar to zip) archive, i don't think if it's necessary anymore, but early in p4a history, it was, as the system restricted the type of files that could be shipped in an app, and mp3 was one of the unrestricted types. It stayed that way because there was no real reason to change it. @misl6 yeah, that deadline is starting to loom, and it's certainly time to look into it more seriously. I've looked at the bundletool issue, and indeed, it might be time to reconsider the current way, If we ship python as part of the main bundle, wouldn't that make aab packages a lot bigger? or can we still have compression if we go this route? Should user python files still be part of assets, or is it better to put them in lib as well? (one thing to consider could be Cython and other native extensions, that works as python modules, and hence should be together as python files). Unless bundles are installed by being extracted in the same directory and hence can mix their files in same target directories? Also, could this mean we could pre package aab files for python and other recipes, and only build an asset aab for user code without requiring any compilation of their code? |
I'm not expecting to use app bundles any time soon myself and don't really know all the details, but I'd be happy to help with this a bit if needed. If the only problems are
then 1) seems easy to fix and 2) is hopefully easy to "fix" short-term by
NB: this doesn't address the lack of support in p4a for building for multiple architectures at the same time. |
@misl6 // If the disk data is out of date, extract it and write the version file.
|
@LionReal I don't get why you mentioned me, can you please better explain? |
@misl6 |
Problems I had with the p4a aab trial: |
Any updates? Thanks. |
HI @grummble-ai and @LionReal, the PR #2467 is now been updated. |
is there any update ? |
Why does every one posting how to generate |
@misl6 I noticed some abnormalities from the method you used in building
The picture below shows an apk separated from a kivy app using an online apk Downloader: The picture below shows two apks separated from a facebook app using an online apk Downloader: Judging from both apk you can see clearly that This is a kivy apk after installation from play store and trying to share with xender you can also try to download the original from here https://apkcombo.com/apk-downloader/?q=org.picdf.picdf Please do not get me wrong, you have done a great job so far but I believe this might be an issue later in the future where an app might be shared due to no internet connection in a particular area, Also the app seems to unpack every time I start up the app(judging from ADB logcat) this prolongs the app startup a little bit unlike before |
@kengoon. I am not really sure about the first point, but the second point I believe that play store only sends the correct apk based on architecture. After deploying my app picdf i tested it in the internal testing track with a 32 bit phone and a 64 bit phone. The 32 bit phone received a download apk of size around 32 mb while the 64 bit one got a download of 34.5 mb. Which means the proper apk is installed based on the architecture of the device |
@Guhan-SenSam thanks for the reply and also, I apologize for tearing up your app in public without your permission. Please I have one question for you:
|
@kengoon The original size of the aab was 60.7 mb |
@Guhan-SenSam Ok that is better because, I was scared that they were packed in one. Whenever you have time you can check up on my first point to see if you get the same result as me |
Fixed via #2467 |
Google Play now prefers to have app bundles (.aab) files uploaded instead of apk files. It would be nice if there was a way to have this tool produce app bundles instead of apks.
Versions
Description
I would like to be able to produce App Bundles that have all of the desired architectures in them to upload to the play store. It can then take care of key management and split the bundles up for the device to be installed on. This then means only needing to produce a single artifact rather than an apk for ever desired target.
buildozer.spec
N/A
Command:
N/A
Spec file:
N/A
Logs
N/A
The text was updated successfully, but these errors were encountered: