Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

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

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

  1. free4allgames

    free4allgames

    Joined:
    Dec 5, 2018
    Posts:
    40
    I just tested uploading my game, ~350mb, using android app bundle, according to the documentation, https://developer.android.com/guide/app-bundle/,

    "Publishing with Android App Bundles also increases the app size limit to 500MB without having to use APK expansion files."

    However when I upload the 350mb aab file to the store this is what happens :



    Any ideas ?
     
  2. free4allgames

    free4allgames

    Joined:
    Dec 5, 2018
    Posts:
    40
    So, does anyone here tried this "new" upload method and got it to work ?
     
  3. free4allgames

    free4allgames

    Joined:
    Dec 5, 2018
    Posts:
    40
    This is the reply I got from google...



    However with Unity that doesn't seem very possible to do ?

    If I build with Split Application Binary I can't upload the expansion file to the AAB build in Google Console, if I don't, then the APK gets the full content and goes over 100MB...

    Is there really nobody who tried this ?
     
  4. free4allgames

    free4allgames

    Joined:
    Dec 5, 2018
    Posts:
    40
  5. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    6,840
    aab is kinda useless right now, until they change the APK limit from 100mb to 500mb (specifically for aabs though).

    The feature (going from 100mb to 500mb) is in early access now, some developers have it, others don't. It will (soon?) be available to everyone. So if you can, wait until then.
     
  6. free4allgames

    free4allgames

    Joined:
    Dec 5, 2018
    Posts:
    40
    From what I understood the limit is really 500MB, but the APK must be 100 MB.

    This is, unity should make things differently when we choose split apk with aab so that we can raise the limitation...

    Right now what we do is make essential content attached to the first scene and choose split binary, unity will make a small(ish) apk under 100mb and then the obb with the remaining content.

    We then upload both those files to google play and google play delivers them to the client, this process works but has issues as the infamous wrong access permission to the obb file which forces us to request read/write permission to the user device external storage for the obb file to be accessed, even though we shouldn't need it. (This is an android issue, not an unity issue.)

    But with aab files unity would need to generate the android project using the new "system", instead of creating a separate obb file the project needs to use this : https://developer.android.com/guide/app-bundle/playcore

    And then we hopefully no longer need to worry with obb files.

    I'm not experienced with android projects, but I will take a look into it when the time allows... Maybe it's an easy fix, maybe not.

    I wish the guys at unity looked into it since they probably know a lot more about this than me.
     
  7. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    6,840
    That's not correct.

    The aab itself it can be larger than 500mb as long as the resulting APKs are less than 500mb.

    But the Google Play Store itself still only allows for 100mb max files to be downloaded from it, so...
     
  8. free4allgames

    free4allgames

    Joined:
    Dec 5, 2018
    Posts:
    40
    Yes, but then with the feature I linked you download the remaining files on demand, which allows up to 500mb games.

    The initial apk must be smaller than 100mb.
     
  9. KrcKung

    KrcKung

    Joined:
    Jul 18, 2017
    Posts:
    31
    I believe that is the case, since this is what stated in https://developer.android.com/guide/app-bundle.
     
  10. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    6,840
    Read the Known Issues section
     
  11. free4allgames

    free4allgames

    Joined:
    Dec 5, 2018
    Posts:
    40
    Yes, this is the part I'm talking about and linked above :

    "So, users can download apps as large as 500MB and, with dynamic delivery"

    However I still haven't figure out how to use dynamic delivery with Unity, this is what I'm asking here.
     
  12. imaginalis

    imaginalis

    Joined:
    Feb 20, 2015
    Posts:
    11
    free4allgames likes this.
  13. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    6,840
  14. JohnnyFactor

    JohnnyFactor

    Joined:
    May 18, 2018
    Posts:
    177
  15. free4allgames

    free4allgames

    Joined:
    Dec 5, 2018
    Posts:
    40
    I'm glad I didn't waste my time trying to implement this in Unity then...

    Doubt this is a typo.
     
  16. Cuicui_Studios

    Cuicui_Studios

    Joined:
    May 3, 2014
    Posts:
    45
    Hi, looking to this post maybe you can help me. I'm a bit stuck uploading my app to the store.

    I tried the App Bundles but my app exceeds the limit of mb so I tried to split it by architecture, but when I upload it to the store it says that I have codes and libraries that are not need so I can use those apks neither.

    I look into my plugins folder and don't see any plugin with checks for different Android architectures so I can't figure out where the hell are those libraries.

    Does any one have a trick for this kind of issues?
    Thank you in advance :D
     
  17. free4allgames

    free4allgames

    Joined:
    Dec 5, 2018
    Posts:
    40
    If you're talking about the new warnings google created you can safely ignore them.

    Google wants people to use the new AAB but they ignored the fact that games can be larger than their 150mb limit and annoys us with useless warnings.

    If your game cannot be uploaded using AAB you have no choice AFAIK.

    What you should do:

    Always try to send the game first with AAB to avoid issues, choose "Split APK by target architecture" and uncheck "Split application binary", then check "Build App Bundle" and build, it will create a single AAB file you send to google, the AAB file can be larger than 150mb, google will create the apk file for your on their end, and if the APK they generate has more than 150mb they will not let you upload the game.

    It is the best way to upload the game now, and if your game is only a few MB above the limit you should try to lower it (compressing more textures, audio files, removing any possible garbage, etc).

    Now, if you have no way to lower it further (like my game is 400mb due to many textures needed), you have to do it the "bad" way.

    You will have to check "Split APK by target architecture", check "Split application binary" and unckeck "Build App Bundle". When you build unity will ask for a folder and create 4 files, 3 are apk files by architecture, 1 arm7, 1 x86 and one x64, and the other is the obb file.

    When you upload to google then you need to upload all apks (in the same release, it will show the different versions when you upload), then FOR EACH APK uploaded, you have to add the obb file, you have to repeat this for every architecture, Google will once again warn you that you're uploading the same file 3 times (the obb file is the same indeed), IGNORE it, if you don't do it this way the game will not work.

    Google will then complain with more warnings, you have no choice but to ignore.

    This also comes with the problem of a known bug on androids, when the game is downloaded from google play the obb file has the wrong owner set to it, and so your game will now need access external storage permission to access the obb file or it will once again not function since it cannot access the obb files, this means you need to put a request for a permission to access the players personal photos (this is what the permission message actually says) even when you're not doing it, just because of a bug on Google's code, and they won't fix it! Bug related: https://issuetracker.google.com/issues/37075181
    If the player refuses the permission the game will only work after a device reboot, this means the first scene in your Android Unity game has to be a scene forcing the permission request and not allowing the game to continue unless you have the permission...
     
  18. Cuicui_Studios

    Cuicui_Studios

    Joined:
    May 3, 2014
    Posts:
    45
    Thank you @free4allgames !

    I'm at the bad case like you :(. I already tried the steps you said but I can't click the launch button even on internal test, it is like I can't ignore the warnings. I sent a ticket to Google because I do not know what more to try without downgrade the assets as you said, but some one here will kill me if I compress it more xD
     
  19. Cuicui_Studios

    Cuicui_Studios

    Joined:
    May 3, 2014
    Posts:
    45
    Forget it, my client didn't complete all store data ¬¬. Sorry, so many frustation that I didn't notice
     
  20. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    6,840
    But they forgot to make it worth using. Fun!
     
  21. mbrindic

    mbrindic

    Joined:
    Mar 13, 2014
    Posts:
    14
    Hello guys, can anyone tried publishing the app with with play stores "Unoptimized app" warning?
    I need to publish the game in next month, so does this warning stopping us publishing the game?
    Thanks!
     
    Last edited: Jul 25, 2019
  22. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    6,840
    No it doesn't.
     
  23. mbrindic

    mbrindic

    Joined:
    Mar 13, 2014
    Posts:
    14
    Great, thanks @AcidArrow!
     
  24. ABerlemont

    ABerlemont

    Joined:
    Sep 27, 2012
    Posts:
    41
    I managed to upload a build 2 weeks ago through that process : thumbs_up :
    But since this morning I can't rollout anymore because :

    I still can't add .obb through the aab process on the android console.
    What's left to be done for bigger games ? :/
     
    Last edited: Aug 12, 2019
    Calebsem and Eternity774 like this.
  25. BFS-Kyle

    BFS-Kyle

    Joined:
    Jun 12, 2013
    Posts:
    876
    Just as an update to anyone hitting issues uploading builds to Google Play with the new 64-bit requirement:

    You must disable x86 android output in order to upload to Google Play. If you upload an APK with x86 support, it must also have x64 support (which Unity doesn't seem to have yet). Unity does have ARM and ARM64, which is what almost all devices will be using (except for emulators).
     
    Spiros_Learity likes this.
  26. kaarloew

    kaarloew

    Joined:
    Nov 1, 2018
    Posts:
    153
    There won't be x64 support for Android builds. And ARM Android binaries can run in x86/x64 based devices.
     
  27. Nadan

    Nadan

    Joined:
    Jan 20, 2013
    Posts:
    341
    My last update of the game online is 151-152MB. Now it's too much so I've reduced about 10MB but still it's not enough. I can't upload to Google Play anymore.
     
  28. MotionBrain

    MotionBrain

    Joined:
    Dec 5, 2015
    Posts:
    22
    Hey Guys,

    so how is it possible to upload an app with over 100MB?

    Regards

    Joachim
     
  29. JustAnotherDude

    JustAnotherDude

    Joined:
    Oct 28, 2013
    Posts:
    211
    If you use Android App Bundle you can go up to 150MB. With Unity expansion files are not supported wih AAB.

    The standard method is still 100MB but you can add obb files with 2GB.
     
  30. Sholz

    Sholz

    Joined:
    Dec 12, 2016
    Posts:
    21
    The way it stands we basically have only one option...and that's aab files (which can oly be less than 150mb) .... because even uploading apk and obb file still gives errors.....wonder how bigger studios will publish content.


    upload_2020-2-12_22-7-2.png
     
    skunight likes this.
  31. Sholz

    Sholz

    Joined:
    Dec 12, 2016
    Posts:
    21
  32. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    6,840
    That’s a warning, not an error. You can simply not use .aab and keep using apk and obb files.
     
  33. kaarloew

    kaarloew

    Joined:
    Nov 1, 2018
    Posts:
    153
    Games do download content from CDN (with Unity you can do asset bundles). No need to put everything in original binary package.
     
  34. elbaronjack

    elbaronjack

    Joined:
    Jun 5, 2018
    Posts:
    1
    We finally could upload a version of our big proyect in the PlayStore following this steps:

    - Check "Split Application Binary", and uncheck "Target Architectures -> x86 (deprecated)" and the f**king "Build App Bundle (Play Store)".
    - Make an empty scene and set it's build index has 0 (adjust your project to deal with it).
    - Upload your apk and your obb.

    The error was the deprecated x86 version of the proyect was making troubles when tring to upload the project to Google Play Console. It also work if you check "Split APKs to target architectures" and upload the 2 versions with the same obb at the same time.
     
  35. paulc218

    paulc218

    Joined:
    Jul 21, 2019
    Posts:
    3
    I had this issue (and fixed it) for the first time and read *most* of the posts on here, so just in case this wasn't noted already, that 500MB limit that you may have read in some old google docs never actually happened. They were planning on making 500MB the limit but it never got through their beta testing, and stayed at the 150MB limit for app bundles and 100MB for apk files. I am mentioning this because when I google'd this my first results were still telling me that 500MB was the limit, I noticed the posts were 2 years old and then found the thread google made saying that they decided not to go as high as 500 and stuck to 100, and 150 for app bundles. So just making that clear to anyone else new to this that is confused when they see the 500MB limit on google help forums and gets confused that it doesn't match their google play console.

    After playing around with my project, I learned how the apk file size works. It is based on the first scene of the project, so if you have a heavy graphic first scene which turns out to make the apk file over 100MB, you have to either reduce your first scene until it hits 100MB or less, or make a loading scene that either does something simple or just redirects to the normal main scene (moved to the 2nd slot). I made mine just print the word loading on a canvas and put a script in that scene that just loads the next scene. Dropped my apk size to 35MB and just tacked the rest on to the obb file. And the apk size was 20MB before I added textmeshpro and an animation to the loading text, so it's almost entirely based on the amount of assets required for the very first scene of your project.
     
  36. stuart567

    stuart567

    Joined:
    Jun 21, 2017
    Posts:
    1
    This cant be right surly? My first scene is my main menu which is just an empty scene with a canvas yet m game comes to 260mb.
     
  37. JuliusM

    JuliusM

    Unity Technologies

    Joined:
    Apr 17, 2013
    Posts:
    580
    That person is talking about obb expansion files and the information is correct. Have you enabled the editor option to split the app binary? https://docs.unity3d.com/Manual/android-OBBsupport.html
     
  38. a-dolbilov

    a-dolbilov

    Joined:
    Jun 4, 2013
    Posts:
    9
  39. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    6,840
    I'm confused though, can we use that without having to use Unity's Asset Bundles? (and just upload a large .aab)
     
  40. a-dolbilov

    a-dolbilov

    Joined:
    Jun 4, 2013
    Posts:
    9
    As far as I understand, nope! You have to use Asset Bundles or another binary data format.
     
  41. a-dolbilov

    a-dolbilov

    Joined:
    Jun 4, 2013
    Posts:
    9
    As I understand Unity programmers can easily solve this issue by placing data.unity3d file into their own Asset Pack with AssetPackDeliveryMode.InstallTime, and patch data.unity3d loading. The only thing Unity clients should do for this case is to set Compression Method to LZ4(HC). This approach can solve 99% of apk->aab migration issues.
    Google plugin on the other side is very helpful for OnDemand and FastFollow asset packs.
     
    AcidArrow likes this.
  42. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    6,840
    Yeah, that's my conclusion as well...

    Any chance of that happening @JuliusM ?
     
  43. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    6,840
    Many many years after Asset Bundles are introduced, they still seem like an absolute pain to set up.

    I thought I'd set up some kinda of "an asset bundle per type of asset", so that our builds will be sufficiently split for Google, or whatever, but it's still very convoluted to do? (especially since our project has a ton of unused assets, depending on the build target).

    Plus we'd have to refactor a lot of our code to load the bundles first instead of just referencing assets?

    And all of that just because Google insists on not allowing larger APKs, and Unity does not want to make Asset Bundles make sense?

    Am I missing something?
     
  44. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    6,840
    So where / who do I need to keep spamming to make Unity consider this? There are plenty of people that don't care about dynamic delivery and restructuring our game to use Asset Bundles, when we don't care about dynamic delivery and just want to use our local assets, is a ton more work for no real benefit.

    Maybe Unity could have the equivalent of split APK / OBB feature, only instead its split aab / asset pack with InstallTime and then Unity just loads it without us needing to change any code and then we can all happily transition to it and leave OBB files in the past where they belong.

    Google people I've contacted seem to think it's a good idea, but I (and also they) don't believe it can be done purely from their plugins without also internal changes from Unity.

    So, again, who do I need to pester to at the very least have this idea properly considered and evaluated?

    @JuliusM @Tomas1856 @Yury-Habets @Aurimas-Cernius
     
    Salvador-Romero likes this.
  45. diego_unity680

    diego_unity680

    Joined:
    Apr 17, 2020
    Posts:
    1
    Just wondering how I am supposed to load an AAB bigger than 150Mb?
    Google won't allow the upload otherwise.
    I know about moving the data in an asset bundle, etc but in case you can't, there is no solution?
    The OBB used to be the escape route in this case, has it been exchanged with nothing?
    Just 150Mb, that's it?
     
unityunity