Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Bug App bundle installation size is double that of APK

Discussion in 'Android' started by kfireven, Oct 2, 2021.

  1. kfireven

    kfireven

    Joined:
    Oct 18, 2016
    Posts:
    38
    When I build the app bundle, the .aab file size is 550mb, but the installation size on device is 1.2GB.
    When I build APK, the .apk file size is also about 550mb, and the installation size is 600mb.

    In both cases, "split application binary" is checked.
    It is the same case with Google Play. If I upload the game to Google Play, it says that the base module is 50mb and the DataPack module is 509mb, but when I download it is 1.2gb. - the SAME game used to be 600mb with apk+obb build!

    Unity says when it checks the final app size at the end of the bundle build process that it should be 550mb after installation, but again... it gets to 1.2gb.

    What am I missing here.
     
    Last edited: Oct 2, 2021
  2. kfireven

    kfireven

    Joined:
    Oct 18, 2016
    Posts:
    38
    Guys, seriously, what is going on.

    When I check this checkbox it produces an .aab file that, when installed on the device it doubles the size of an app compared to when it is unchecked. WHY.

    upload_2021-10-2_20-59-48.png
     
  3. kfireven

    kfireven

    Joined:
    Oct 18, 2016
    Posts:
    38
    Well… would you look at that. It has something to do with the "Compression Method" in the build setting. If the compression method is set to default then the apk installation size (on device) is 600mb and the aab installation size is 1.2gb.
    When the compression method is set to lz4hc, then the apk and the aab installation size is about the SAME AT ~720mb.
    So… the compression is not happening when default method is selected?
    Is this a bug? Is this expected…? Am I talking to myself? Yes.
     
    Last edited: Oct 2, 2021
  4. SimonFireproof

    SimonFireproof

    Joined:
    May 20, 2013
    Posts:
    16
    Hi @kfireven! I think I'm hitting the same problem now and I'm wondering if you ever found a solution. I'm updating our app and switching from apk/obb to aab and the installed size has roughly doubled. I tried using lz4hc compression but that doesn't seem to make a difference.

    Thanks!
     
  5. kfireven

    kfireven

    Joined:
    Oct 18, 2016
    Posts:
    38
    Well, that was a year ago I guess it worked back then, but you can also make aab build with the google plugin, I opened an issue about it here and they fixed it: https://github.com/google/play-unity-plugins/issues/154.
    You should download the play-unity-plugins and build the aab file with it, that's the way I did it at the end. Good luck.
     
    SimonFireproof and DevDunk like this.
  6. SimonFireproof

    SimonFireproof

    Joined:
    May 20, 2013
    Posts:
    16
    That's great, I'll take a look. Thanks for your help!