App size problems after AABs become mandatory from Aug 2021

Most of my apps have a size of 60-95 MB (APK). I add the large files (mostly audio files) after decompiling.

From → August 2021 the AAB format must be used for new apps, for updates from → November 2021. Google has increased the size from 100 MB (for APK) to 150 MB for AAB. However, as far as I know, AABs cannot be decompiled.

Hence my question:
Does the AI2 size limit remain at 30 MB for aia (after AABs become mandatory)?
If so, I would have to switch to Android Studio, which after Xcode & Swift would be another (maybe) too big challenge (for a musician). :wink:

Or is there any other way to solve this problem?
I do not want to download the audio files at the first start and thus make them accessible without a rooted device.

2 Likes

AABs are also ZIP files, but some of the content is in a binary form. I expect it would be possible to build a simple tool to amend the AAB after creation to add more assets. @Diego do you have thoughts on this?

3 Likes

If I worked at Google, I would say that the solution to that problem is using the Play Asset Delivery. It basically allows to just include the source code in the AAB, and then Google Play will automatically pull the assets from their CDN.
However, this "might" not fit for App Inventor, because it would need to totally change how assets work with the core system, and lots of things can easily go wrong (starting with extensions, for example).

Working on this feature, I had to "manually build" ABBs. So, in theory, it is possible to decompile an ABB and put assets into it later. I would have to make some tests and a tutorial (because you have to run a few tools), but it should be possible.
In the meantime, can you try opening the ABB, going to the base/ directory, and placing those assets into the assets/ folder? And then just sign it with jarsigner (these are the arguments it requires).

6 Likes

Sorry for the late reply. I had little time and haven't worked with jarsigner yet.

  • I created a new AAB of one of my PlayStore apps
  • added a large file (10 MB) to the assets
  • signed the AAB with jarsigner
    (jarsigner -verbose -sigalg SHA256withRSA -digestalg SHA-256 -keystore See.keystore Sea.aab androidkey) and
  • uploaded the AAB as an → internal test track in the Play Store (successfully).

This was accepted without any problems. So far so good. Then I downloaded the → "signed, universal APK" (from the Play Store) and tried installing the APK. Result: → App was not installed. Strange!

I then tried to delete the → "META-INF" directory beforehand. Same result.

1 Like

What was the specific error encountered when installing the APK? If you are installing via adb at the console, you should get an error message that indicates the issue. If you check inside of the APK it should have the META-INF/ directory with the index of the APK and its signature as signed using the keystore known by Google.

1 Like

Yes this dir is there in both case that I tried (so also after removing it).

App not installed.
(German: "App wurde nicht installiert.")

If you want, please privately send me the two APK files (production and beta test) and I can see if there are any particular differences causing the issue.

1 Like

The production version is about 50MB and the test tack version is about 12MB (because this was only for testing purposes). Tomorrow I will prepare a smaller APK with which the update works and one that will be generated from the AAB by Google and send it to you via PM (links to GDrive).

Was it a new app or an update? If the update then can uninstall the previous version? For me, this error occurs when modifying the manifest.

Is there anything unclear about this?

@Diego I built the AAB with Kodular, because the previous version was also built with Kodular and I don't want to change the packageName for AI2 (package="com.bodymindpower.xyz).

Here is my PM to @ewpatton (screenshot):

As I don't have the ability to test through playstore however, I was able to go back and forth when installing,

  • apk install from Kodular
  • aab, adding extra files, signing, extracting universal.apk and installing without a issue
  • again install apk from Kodular, without a issue

check that this is signed with the same keystore

keytool -list -printcert -jarfile your-apk-name.apk

Yes, I also had the assumption that it is due to the keystore (i.e. the signing). But why is the Bundle (AAB) accepted by Google and not rejected?

Because I had already tried to decompile and re-sign the "signed, universal APK" using → APK Studio Editor. The update then worked with this APK.

So what's wrong with this line:
jarsigner -verbose -sigalg SHA256withRSA -digestalg SHA-256 -keystore Sea.keystore Sea.aab androidkey

Then it is due to keystore, just check the downloaded file with the keytool that I provided above

I moved some posts to this new topic because time is running out. There are only 3 weeks left.
Unfortunately, there does not seem to be a (practicable) solution) for this yet.

My tutorial How to build a big app will then be out of date and no longer applicable (Nov 2021 at the latest).

I really hope that I will get a solution / idea for this, especially from @ewpatton and / or @Diego.

I likely won't have time to address this until after the next release goes out. If you want to get a jump start on it, you may want to take a look at how Diego implemented the signing in the Java code and reproduce that at the terminal.

Could this help you? You would be able to decompile and compile aab.

This is how you should decompile

  java -jar BundleDecompiler.jar decompile  --in=input_app.aab   --out=output_dir

With a warning from the stackoverflow topic:

better be aware that BundleDecompiler will delete all your file on output folder! lost all of my files cause of this

After Doing Some Google I found This That We Can convert APK ---> ABB

Unfortunately not. What does → wget have to do with it?

I've tried this several times without success and explained the problems in my previous posts.