[How to] Reduce Maximum amount of android final package size [4.7.5]

Hello fellow android devs,

Methods that have been around for a while

  1. Go to your Project\Config\DefaultEditor.ini and add the following 2 lines
    [UI]
    -ContentDirectories=/Engine/MobileResources -> this removes 1,5-2Mb

  2. Go to your engine directory 4.7/engine/content/slate/ <- In here take all folder except “old” and put them on a back up folder -> this removes 15-20Mb
    **NOTE 1) !!!Not inside unreal engine though the engine will find them if they are in its scope!!! **
    NOTE 2)!!!Once removed in order to run the editor again you need to place the files into the the 4.7/engine/content/slate/ again!!!

Now this for our project reduced our package of 65Mb -> 45Mb

Extra Method (it is probably known to some but i haven’t seen it clearly anywhere)

1)Open Project Launcher

2)Add new Custom Launch Profile (name what you like)

3)Project -> Navigate to your project.uproject

4)Build the first time (you can disable afterwards)

5)Cook for your texture of choice + localization (ex:en_US) and in additional cook options add the following: -clean -stage -pak -compressed -prereqs -distribution -nodebuginfo (as is)

6)Package and store locally (The output is your project’s binaries/android/ ignore the .so file)

7)Disable reply and launch (Unless you want to direct test your App but its much much slower just package and manually pass it to your device)

Edit: The above new method reduced the Apk from 65Mb -> 33Mb (Yes i didn’t even remove the slate files and mobile resources and got reduced that much) will be testing with the 45Mb reduced Apk from the old methods to see final results.

Edit 2: Final Apk size 26,3Mb Tappy Chicken Secret (Not really) revealed.

Many thanks for sharing this extra method!

Thank you for sharing these methods.

I’ll just throw in my thanks too, amazing first post!

hello

Default calls some textures that are in the Engine / EngineMaterial folder only to create the apk size increases to 2 to 3 mb.

thanks for posting this!

This was checked into github recently - https://github.com/EpicGames/UnrealEngine/commit/c68b415e173427fc1fa476036199b8ee45858f4a - disabling plugins is something im trying now

  • doing the plugins brought my install size down a few megs (From 76mb)

So… Why isn’t this a guide directly from Epic?

Because I am not done writing it yet ;).

Hooray! :smiley: Well perfect timing then! I am almost done with my app and I want to practice packing it down to bite-size.

This will make it into a new build? I read somewhere from epic staff they are already working on it adding things to a txt file and on build those folders won’t get packed/cooked. It will work similar to the ManifestRequirementsOverride.txt

And here it is…

https://docs.unrealengine.com/latest/INT/Platforms/Android/ReducingAPKSize/index.html

Let us know if you have any problems or questions.