Announcement

Collapse
No announcement yet.

How to reduce Android APK file size

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to reduce Android APK file size

    Hi Everyone,

    I know a lot has been said about this in earlier posts. But the problem is apart from the one in Epic Documentation most of posts doesn't give comprehensive steps to achieve it. Following the Epic documentation, we were certainly able to reduce the APK file size but it still is big (~40mb to 60mb) for a default new level (even without starter content). If we add any of our project content then certainly it will cross 150mb.

    Can any one let us know what is the minimum size they can get for a DEFAULT level and how did you achieve it?

    I have also read in several posts to disable things which are not used (removing fonts and all) and recompile the Editor from source which can reduce the size. Can anyone confirm this to be true and how can we go about this(a step by step guide may be)?

    Most of our work is regarding ArchViz. We start with Blueprint template for creating our content. We also make sure to clean up the assets so as not to have any unwanted things. Only features we use are normal mesh collisions no Physx or any other stuff.

    #2
    Hi, MSL

    Have you tried to build in production mode?

    Comment


      #3
      Hey MSL,

      The following document can actually give you some ideas on how to go about doing this.,

      https://docs.unrealengine.com/latest...ducingAPKSize/

      Please let us know if you have more questions.

      Comment


        #4
        Originally posted by Sam Deiter View Post
        Hey MSL,

        The following document can actually give you some ideas on how to go about doing this.,

        https://docs.unrealengine.com/latest...ducingAPKSize/

        Please let us know if you have more questions.
        Hey sam. Every time that this question is made the official answer is this link and "check the tappy chicken project"

        The thing is tappy chicken is really small, how ever there is no detailed process of how did you reduce the size.
        There is some general rules like texture pot and so, but i believe that tappy chicken must use more than texture and audio optimization. I wonder if there is other hidden optimization such as config vars, blacklist, etc.

        Comment


          #5
          Sam
          Originally posted by Sam Deiter View Post
          Hey MSL,

          The following document can actually give you some ideas on how to go about doing this.,

          https://docs.unrealengine.com/latest...ducingAPKSize/

          Please let us know if you have more questions.
          Hi @Sam Deiter , as I mentioned in my post, I did follow the document which resulted in bringing the blank Default level to 40 MB size. I still think 40 MB is high for a default level. Please see below the size reduction in each step for a Default level:

          For Android (Shipping):

          Default ------------------------------------------ 92.9 MB
          Compressing Cooked Content ----------- 50.8 MB
          Shared Material Shaders & Libraries --- 49.1 MB
          Excluding Editor Content ------------------ 44.5 MB
          Disable Plugin -------------------------------- 43.8 MB
          PakBlacklist-Shipping ----------------------- 40.2 MB


          For Windows 64 bit (Shipping):

          Default ------------------------------------------- 208 MB
          Compressing Cooked Content ------------- 144 MB
          Shared Material Shaders & Libraries ----- 142 MB
          Excluding Editor Content -------------------- 137 MB
          Disable Plugin ---------------------------------- 108 MB
          PakBlacklist-Shipping ------------------------ 100 MB

          Out of 100 MB, Engine folder is ~50 Mb: UE4PrereqSetup_x64 - 39 MB, Third-Party binaries 11 MB
          (For Windows, need to create Win64 folder inside Project->Build folder and place PakBlacklist file, otherwise PakBlacklist won't work)

          So what I want to know:
          1 - Is there any other option which can reduce the file size further (may be, say 20 MB or less for a Default level)?
          (Unrelated to topic) 2 - Is TCP messaging plug-in mandatory for Standalone game? (Packaged game crashes with Fatal Error! if TCP Messaging plug-in is disabled)

          Edit:
          In this following post, @fxtentacle has mentioned he was able to reduce the size to some 34 MB which includes his game content also. This effectively looks like what PakBlacklist-Shipping does but I am not sure. I am NOT familiar with patching process and also not sure his patch works for 4.18. Is it possible to validate this process and probably provide little details regarding patching

          https://answers.unrealengine.com/que...ages-size.html

          Last edited by MSL; 02-08-2018, 09:07 AM.

          Comment


            #6
            My biggest problem are lighmap file sizes.plus i dont know if using instanced mesh vs merge mesh actor have any difference on lighmaps

            Comment


              #7
              unity blank project is less 20mb

              Comment


                #8
                Unreal Engines default map is not blank!

                I've managed to create a 50 level game

                First packaging was 127mb
                After removing everything extra (Post processing, Sky sphere, Atmospheric fog, ...)
                The size went down to 39mb
                After adding music its now 40mb

                I'm now trying to bring it down to 35 (Its possible if i manually exclude a few engine contents)

                The Unreal Engine (4.21) library for android compressed inside a apk is 29mb, so theoretically its possible to make apps as small as 30mb

                Comment


                  #9
                  I've looked into this and you might want to do some research into Oodle by RADgametools
                  they have a few other handy tools as well.
                  http://www.radgametools.com/oodlecompressors.htm

                  Comment


                    #10
                    I know this is an old topic, but I want to post my blog article about reducing Android build size, just so everybody can find it here: https://damnow.blogspot.com/2018/12/...d-game-in.html

                    I was able to shrink whole Third Person Template to 30MB.

                    Comment

                    Working...
                    X