Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Android App Bundle, how to upload game larger than 100 mb ?

Discussion in 'Android' started by free4allgames, Feb 1, 2019.

  1. grobonom

    grobonom

    Joined:
    Jun 23, 2018
    Posts:
    335
    I also fell in the >150MB google trap.
    Amazing to see this company hosting billions of petabytes of data about each person in the world is dumb enough for recucing an app size to 150 ridiculous MB !

    Now i have to struggle finding a solution and waste time for it, because of stupid limits.

    Does anyone know other android app platform that do no have the google play store defects ?

    Happy unitying :)
     
  2. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,631
    Any (most just allow straight up an APK without having to split the game), although none are as popular as google play.
     
    grobonom likes this.
  3. grobonom

    grobonom

    Joined:
    Jun 23, 2018
    Posts:
    335
    Back there with some infos and questions^^

    Sumup:
    - APK size limit is 100MB
    - AAB size limit is 150MB per target
    - google forces you to use AAB ( APK are still OK but not for long )
    - unity target separation is of no help
    - unity 150MB warning is useless sh1t ( and bwt do not work )

    The .OBB solution is not one as gogol states it's now almost obsolete.

    Officially, google limit is 2GB !!!!
    But as they're small-d1cked :p they only allow a 150MB loader and the rest ( real usefull data from our unity projects ) in another file.

    The interresting thing from google ( interresting is not the right word... ) is here:
    https://forum.unity.com/threads/new-google-play-asset-delivery-possible-with-ucb.872575/

    The thing is that in unity we got no mean of creating this file ( i guess it can contain textures, assets, meshes, sounds, etc.... )

    So untill U3D dev team will offer us a tickbox on the build settings window, saying "create loader and scene so that gogol is happy" we are screwed :(

    there are many ( too many ) possibilities:
    - asset bundles loaded at runtime
    - addressables loaded at runtime

    All are unity3D solutions requesting big bunch of code and time and at the moment i don't know wether or not this will mess-up my unity project or targets ( textures are not the same when you target android or windows ! )
    Making target transparent is the ( really amazing ) role of unity and thanks to gogol it's simply fu*ked-up.

    Shall i have to leave the android target due to S***fullness just like i left webGL for the same reason ?

    I'm kinda disappointed with all this and sincerely see no escape.

    If anyone have a clue ? I'd really be glad !!!!

    Now, from your game dev point of view...

    Is play store aimed to sell game loaders ?
    I mean my Carcassonne app would just be a loader of something located on google servers ? or on my servers ?
    Sorry to say but we are in 2021 and VR and AR comes to light smartphones.
    I wonder who can make VR or AR with less than 150MB of data, vertex, textures, and PBR rendering !
    I do but i just smashed my face on the limit..... and this really pee-me-off !

    Please could anyone help ? :)

    Happy unitying !
     
    ooxcit likes this.
  4. JesOb

    JesOb

    Joined:
    Sep 3, 2012
    Posts:
    1,106
    For now you can only wait.
    Or use heavy solution like addresables or something from third party

    May be you can try to put everything into one bundle and use com.google.play.assetdelivery package manually by just copying code from samples in docs

    https://resources.unity.com/unity-engine-roadmap/platforms
    upload_2021-4-18_6-20-2.png
     
    grobonom likes this.
  5. grobonom

    grobonom

    Joined:
    Jun 23, 2018
    Posts:
    335
    Hi @Jes28

    Thanks for the link !

    I didn't know about this roadmap page and am very interrested in it :)

    I'm really happy u3D devs are taking care of this android problem and i'm sure they will build a simple & efficient solution.
    As you said, i just have to wait. ( and i guess am not the only one who will wait impatiently :p )

    Happy unitying :)
     
  6. domonyiv

    domonyiv

    Joined:
    Oct 1, 2016
    Posts:
    75
    apkdev likes this.
  7. grobonom

    grobonom

    Joined:
    Jun 23, 2018
    Posts:
    335
    I noticed it and wrote a lil message :)

    I also downloaded the 2021.1.3f1 but it appears there's nothing implemented yet for targetting towards android with asset bundles :/
    I wonder when this can be delivered ( even in beta test ^^ )

    Happy unitying !
     
  8. grobonom

    grobonom

    Joined:
    Jun 23, 2018
    Posts:
    335
    Anyone knows when this feature will be visible even in a beta or alpha unity version ?
     
  9. Cerberus_team

    Cerberus_team

    Joined:
    Apr 9, 2014
    Posts:
    41
    Any news on this?
     
  10. HasanMakesGamess

    HasanMakesGamess

    Joined:
    May 14, 2021
    Posts:
    5
    Hey everyone i'v been working on my mobile game for almost 8 months and now when try to upload the game it says the apk file must be less than 100 mb and i'v tried the split application binary and the file is still 214mb

    I would like to know how to publish my game for more than 100 mb i'v been searching on this topic for many weeks and yet nothing is makes sense


    Some ppl say I need to write a script some say I can't publish more than 100mb and some say uou have to use aab and i'v tried all but nothing is working

    I'm just so lost Idk what to do anymore all my hardwork won't pay off I'm just so upset

    If anyone knows how to publish a game with more than 100mb it would be incredibly helpful
    -----------------SOLUTION---------------------


    UPDATE : For everyone struggling on this topic I have a solution so listen carefully

    First follow this tutorial until you reach the file upload page then do what I wrote down


    WHAT TO DO :

    Firstly, when you want to export your project you must untick the 'Use Android App Bundle' and tick Split application binary under publishing settings then you must create a new empty scene then add a script to it that loads the first scene on void Start then export your project there will be 2 files one with .Apk and the other with .obb then drag the apk file to the file upload thing then add the obb file and hopefully your done

    EXPLANATION :

    - an apk file limit is 100mb
    - an obb file limit is 2gb
    - The apk file contains only the very first scene of your build
    -The obb file contains the rest of the project build

    So what we're doing here is creating an empty scenes so that the apk's mb is low then we immediately load the original first scene through the script and the obb can contain the rest of the project

    If you have any questions feel completely free to ask me because I know your struggle and I don't want ppl to get stuck in this mess while publishing



     
    Last edited: May 15, 2021
    CloudAktsk and elaine_unity694 like this.
  11. djdavidrevolution

    djdavidrevolution

    Joined:
    Nov 16, 2014
    Posts:
    8
    That solution will be deprecated in a few months when aab files become mandatory. We hope Unity can bring us this solution before that: https://portal.productboard.com/gup.../c/525-support-for-google-play-asset-delivery
     
    goldcloud144 likes this.
  12. HasanMakesGamess

    HasanMakesGamess

    Joined:
    May 14, 2021
    Posts:
    5
  13. kaarloew

    kaarloew

    Joined:
    Nov 1, 2018
    Posts:
    360
    If you have existing game with .obb that gets updates, it will require some work to move to the new system.
     
  14. djdavidrevolution

    djdavidrevolution

    Joined:
    Nov 16, 2014
    Posts:
    8
    The deadline of .obb apps is August, so we will need an .aab solution if we want to upload or update our games. I don't know if Unity will be able to bring us a solution before that deadline, otherwise it would be a bad thing.
     
  15. devmedroom

    devmedroom

    Joined:
    Oct 26, 2020
    Posts:
    6
    Hi! As of the current date, we still were able to upload our .obb to the store, since it was already published.
    But no luck trying to upload our very large .aab. In Unity 2020.3, .aab and split binary are still incompatible checkboxes. Anyone got any news?
     
  16. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,631
    Pretty sure there's a different split binary checkbox now, doesn't it work for you?
    upload_2021-8-4_17-47-18.png
     
  17. JustAnotherDude

    JustAnotherDude

    Joined:
    Oct 28, 2013
    Posts:
    279
    This is probably the now recommended way to deliver large games:


    https://developers.google.com/unity/packages#play_asset_delivery
    (Thanks Unity for killing the package manager, now we can't simply install and update this with google scoped registry anymore)


    https://developer.android.com/guide/playcore/asset-delivery
    "Play Asset Delivery (PAD) brings the benefits of app bundles to games. It allows games larger than 150MB to replace legacy expansion files (OBBs) by publishing a single artifact to Play containing all the resources the game needs."


    I haven't tried this yet though...
     
  18. JuliusM

    JuliusM

    Unity Technologies

    Joined:
    Apr 17, 2013
    Posts:
    835
    Take a look at official Unity support https://docs.unity3d.com/Manual/play-asset-delivery.html
    Make sure to use the latest update of the major Unity version that you use.
     
    JustAnotherDude likes this.
  19. JustAnotherDude

    JustAnotherDude

    Joined:
    Oct 28, 2013
    Posts:
    279
    Didn't know this existed, this is probably the best way and what everyone on this thread should look at.
     
  20. MassiveHeadGames

    MassiveHeadGames

    Joined:
    Jun 5, 2021
    Posts:
    23
    Hi Julius, so if I understand this correctly. As of August 2021, for new games that are above the 150M size and that do not use asset bundles. (As a least path of resistance) In order to get a successful .aab package for Google Play, we would need to insert a small boot loader scene to act as a loader and then put all the game scenes into an asset bundle? And there's no "magical" way of Unity packaging it up correctly for us by simply ticking the "split application binary" on the player settings?

    I asked about the need to use asset bundles on another forum post and someone from Unity said that I did not need asset bundles and referred me to the exact same link. So I am a bit confused about the correct way to go about getttog a successful build uploaded to Google without dinging me with the dreaded red text:

    "Your App Bundle contains the following configurations where the initial install would exceed the maximum size of 150 MB: arm64-v8a,armeabi-v7a"
     
    Last edited: Oct 26, 2021
  21. JuliusM

    JuliusM

    Unity Technologies

    Joined:
    Apr 17, 2013
    Posts:
    835
    You don't necessarily have to use asset bundles. Creating a boot loader scene shouldn't be necessary either in most cases (unless your app is very big, bigger than 1GB). You can do a simple test: try to build .apk + .obb instead of .aab. Disable the build option for building "Android App Bundle" and leave "Split Application Binary" enabled in player settings. If you will get a relatively small .apk (less than 150MB) and the .obb less than 1GB, then you should not need to do any project modifications , simply building .aab with "split application binary" option enabled should create everything for you.

    One thing to keep in mind, when this feature was added in Unity, there were some modifications to default gradle templates. If your project uses custom gradle templates, you should recreate them with the new Unity version and then do your modifications on top again.
     
  22. MassiveHeadGames

    MassiveHeadGames

    Joined:
    Jun 5, 2021
    Posts:
    23
    I was under the impression that Gradle is used to create a project for Android Studio in order to better control the build pipeline. Is Gradle required or is it optional?

    Just a note - I did read the documentation in both the Unity and Android docs but find it a little confusing. It seems to me that there are so many ways to skin this cat that for a new comer to the new Google standards situation it can be confusing to know exactly which combo to try first. So you end up trying all of them till it works. Either that or I have poor comprehension - which I never rule out. :)
     
    Last edited: Oct 26, 2021
  23. JuliusM

    JuliusM

    Unity Technologies

    Joined:
    Apr 17, 2013
    Posts:
    835
    All current android projects are built with Gradle. Unity automatically creates the Gradle project and uses it to build the application. You can configure various aspects of the Gradle project using the Gradle templates in Unity. You can read this documentation page to learn more https://docs.unity3d.com/Manual/android-gradle-overview.html
    So based on my explanation above I'm not sure how to answer this question. If you are talking about the custom Gradle version which has to be used in Unity 2019LTS to create the asset packs for play asset delivery, then yes, as documentation specifies that is mandatory.
    Specifically for the Play Asset Delivery feature there are two separate solutions:
    1) The Unity plugin created by Google, which is supported by Google (not Unity), so all issues should be reported to Google
    2) The Unity's built-in solution described here https://docs.unity3d.com/Manual/play-asset-delivery.html
    You should use either one or the other.
     
  24. MassiveHeadGames

    MassiveHeadGames

    Joined:
    Jun 5, 2021
    Posts:
    23
    Julius, thanks for your help. I've been at this for almost two weeks trying different methods. The road blocks aren't with Unity. Google won't accept anything I upload.

    I followed your post above. I built an apk + obb and it is well within the accepted ranges. APK = ~40M and OBB ~200M. Then I built the .aab version as directed.. It was around 260M total (above the 150M limit) so I thought maybe there's some Unity magic in there to let Google know it's all good. Nope, Google will not accept it due to size.

    Do you think there might be issues at Google? Or am I missing something. Again I am using 2019.4.31f1 (I believe the latest version with the proper split binary feature). I also set Unity Preferences to path to a newer Gradle version 6.1.1 as directed in the Unity docs for Play Asset Delivery for my version of unity. I am out of ideas. Should I try a higher Gradle version?
     
  25. JuliusM

    JuliusM

    Unity Technologies

    Joined:
    Apr 17, 2013
    Posts:
    835
    Everything that you describe seems correct. Do you get any warnings in the Editor when you build the AAB? One more thing you could check is once you build the AAB, extract it (it's a zip file) and look at what contents are inside. You should see a "base" directory and if everything worked well, there should be one or two more directories mentioning asset packs. If they are not there, then something did not work on Unity's side. Without looking at the project I really don't know what could be causing that. You can submit a bug report using these instructions https://unity3d.com/unity/qa/bug-reporting.
     
  26. MassiveHeadGames

    MassiveHeadGames

    Joined:
    Jun 5, 2021
    Posts:
    23
    MHG_aab_Contents.JPG Okay, so I built the project again as an aab with buld app bundle (google play) and split binary ticked. No warnings. It's all good. Then I changed the extension from aab to zip to look inside. Looks like all the correct folders are there. It's 280M compressed. So maybe I need to contact Google.

    [Edit] I sent a ticket to Google. We'll see if they have anything helpful to offer.
     
    Last edited: Oct 28, 2021
  27. JuliusM

    JuliusM

    Unity Technologies

    Joined:
    Apr 17, 2013
    Posts:
    835
    Thanks for the update. From all of the provided information so far, everything seems to work correctly on our side. I can't think of anything else. I would have to look into the project and check what could be causing the issue. For this I would need a bug report.
     
  28. MassiveHeadGames

    MassiveHeadGames

    Joined:
    Jun 5, 2021
    Posts:
    23
    @julius

    Since I get a lot of help on these forums I thought I'd return to relay the successful conclusion to our discussion above.

    Google hasn't responded to me yet regarding my help ticket about them rejecting my .aab file. There console presence is a lot like Facebook - sloppy, confusing, and they really don't want to interact with devs - just make money off our content - so I had no confidence they'd be of any help anyway and rather than waste time I moved on to try the Samsung Galaxy store.

    I was able to setup an account and upload a test build within a day. It's a dream to work with compared to Google. Way simpler and I didn't even have to split the application. They take original .apk files with a 2 or 4G limit. No problems. Downloaded in ~1.5minutes (oh the horror of waiting that long). The game works great after imported from the Galaxy store.

    However, while working on the Samsung stuff I had to wait for certain account approvals in order to continue with adding IAP so I decided to take another look inside my Google Play .aab build folders. Well, I initially overlooked how big the "base" folder was - and realized it might be larger than the Google spec for the base loader size.

    So I decided to just try making a boot scene with nothing in it that simply calls the main scene so I could sneak past Google's strict loader size limit. I made a boot scene, built the .aab, uploaded it, and the Google console accepted it. I downloaded it via internal testing and it works perfectly.

    The reason my initial build had a large base folder is due to the way I structured my project. So I will probably end up restructuring it later using assetbundles after we get this first release out and have some time to reassess our strategy for adding content in the future. Hope this helps someone.
     
    grobonom and JuliusM like this.
  29. JuliusM

    JuliusM

    Unity Technologies

    Joined:
    Apr 17, 2013
    Posts:
    835
    Thanks for getting back with the update. I'm really glad you were able to solve your issue, however I'm still a little bit confused, because if your base split ends up being larger than 150 MB, then the "APK" should've been bigger than 40MB as well when you were doing APK + OBB build. There might be something we are missing on our side.
     
  30. MassiveHeadGames

    MassiveHeadGames

    Joined:
    Jun 5, 2021
    Posts:
    23
    Yes, that is odd when comparing my apk+obb build to the .aab. I didn't forensically investigate this. We are way behind schedule so I am in a rush to get the project up and out before Christmas. Not sure if something is going on under the hood or if I ticked something different that changed things.
     
  31. BlinksTale

    BlinksTale

    Joined:
    Dec 15, 2013
    Posts:
    13
    Play Asset Delivery has been working great for me, but initially when I had >1GB of files, it just showed a black screen and gave "Request to PGS failed" errors. It was tricky too since Google Play seems to not allow developer builds to upload, so logging was limited.

    The fix for me was cutting all my asset sizes in half - reducing quality to squeeze onto mobile. It seems to have worked out, and "magically" just started successfully playing on devices again (as opposed to loading only the first scene) but I wish there was more verbose logging on this.

    tl;dr: if you have a really significant size of an app, PAD can still work - but I recommend pushing to get it under 1GB of assets. I'd love to learn more on *why* someday, but this works fine for now.
     
  32. MassiveHeadGames

    MassiveHeadGames

    Joined:
    Jun 5, 2021
    Posts:
    23
    This was an option my partner suggested along with switching to assetbundles. It would've required so much rework that I argued against it. Our game has a lot of moving parts so it would've likely taken a month or more of rework and testing.

    So I suggested that I would try a boot loader first then once the game is out we address the rework in the next update so we at least have the game out there. He agreed. So we added the bootloader instead - for now.

    Reducing our textures should have a significant impact on both footprint and mobile gfx processing. It shouldn't impact the look either since our game is stylized and not hyper realistic. In hind sight we should have used assetbundles from the start as we have lots of content and intend to add more later.
     
  33. JuliusM

    JuliusM

    Unity Technologies

    Joined:
    Apr 17, 2013
    Posts:
    835
    I don't know which Unity version you use and how your project is set up, but in general "Generated asset packs" section in this page https://docs.unity3d.com/Manual/play-asset-delivery.html specifies that if your project assets fit into 1GB, then only a single install-time delivered asset pack will be created. This means that everything will be installed at the same time, when the app is installed from the Play store. All of the files will be always available when the app launches. If the assets in the project are bigger, then a fast-follow delivery type asset pack will be created as well. This type of asset pack starts downloading after the application is already installed, so the app can be launched before it is downloaded. Also the user can cancel the download or even after the download completes, the user can go into Android OS settings -> Apps and delete your app data, which would result in a fast-follow asset pack being removed. That's why the app should always check if the fast-follow (and on-demand) delivered asset packs are available and download them if they are needed, but not available. The page I linked above goes into more details.
     
  34. NamelessDeveloper777

    NamelessDeveloper777

    Joined:
    May 9, 2021
    Posts:
    10
    Hello i haven't build split files but i tried with just tick the split apk in player settings and it worked for me(but this is only for apk files if you are trying to build aab then this will not work it only generate a single apk in my case its size is 400 mb). I am using unity 2020 LTS for building my project
    and you know that from august 2021 google only allow .aab files.
    so how can i achieve that. can somebody suggest me something may be a written post or any tutorial so i can better understand.
    I did my own reaserch and tried somethings but nothing happned
    So it will be a great help for me.I want to upload the game asap but without this i can't
    so please suggest me
    Thank you
     
  35. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,875
    You need to switch to producing aab and select Split Application Binary in Player Settings (Android)->Publishing Settings
     
  36. NamelessDeveloper777

    NamelessDeveloper777

    Joined:
    May 9, 2021
    Posts:
    10
    But it generated an aab file which was 387 mb in size and it only generated a single aab.
    So how can I deal with it
    Can you please suggest me.
    Thank you
     
  37. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,875
    If you're referring to the size limit set by Google, it's for downloadable APKs.
     
  38. NamelessDeveloper777

    NamelessDeveloper777

    Joined:
    May 9, 2021
    Posts:
    10
    ok so can i upload this 387 mb aab file to the play console without any problem?
     
  39. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,875
    I think so
     
  40. grobonom

    grobonom

    Joined:
    Jun 23, 2018
    Posts:
    335
    this is not what i noticed !
    AAB limit was 150MB when i tried but maybe things changed since this ?
     
  41. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,722
    150MB limit is not for AAB, but for actually installed apks combined.
    https://developer.android.com/guide/app-bundle/
     
  42. Rachan

    Rachan

    Joined:
    Dec 3, 2012
    Posts:
    759
    So Now is 2022 and what is a maximum size of Android Game on Google Play? 100MB or 150MB?