reducing apk size

Trying to reduce the apk size below 50megs so google play allows upload.
I’ve found that when launching a level on device, apk has ‘only’ 23MB and rest of data is pushed directly to sd card without packaging. Looking at those files, my content takes only 10MB and rest (~$40MB) is ‘Engine\Content’ folder with stuff like default materials, editor icons and other irreleventness. Looks like this folder also get’s packaged to apk in shipping mode because apk is bloated to +60MB.
How do I get rid of this?

Delete the extra stuff out of the project and it shouldn’t push it into the apk.

Make sure “use OBB in APK” is unticketed in your Projects packaging settings. The APK will then be around 20meg and easily uploadable to play store. You then need to attach the OBB file separately (you may not see this option on the first upload but should see it after a refresh

I did. Those files are not from project folder.

Still it will include all the garbage for users to download

The workaround I used to make the OBB smaller as given in my answer here:

Not pretty but works - see the game in my sig - managed to get the whole thing down to 35meg :slight_smile: Wish the engine was better at not packing engine stuff that is not used to reduce the file size automatically!

I’ve seen that post before but didn’t work for me, apk size went down but not below 50MB. Now I tried again and removed everything from slate folder except ‘Docking’ (build was failing without it) and it’s 45MB.
Packed with ETC1 only but good enough I guess, thanks :slight_smile:

I have a question about size of files on android too so I will ask it on this thread if you don’t mind :slight_smile:

I’m really a newbie in programmation so I was wondering if it was possible to cut in the source files of the Engine to remove all unused features ? In my case I only use unlit materials (a shame considering the graphical power of UE4, I know ^^) so could I simply go in the files concerning lightining and delete everything about light ? Would I save a significant amount of memory like this ?

See this video:

Couldn’t you just disable the Slate plugin in settings if you aren’t using it, and it will compile without? Thought I read that somewhere in the past.

I reduced a lot(about 40%) changing the size of textures from 2048x2048 to 512x512

How did you do that? Google search doesnt show me anything…

Double click on texture, you’ll see “Compression settings”->“Maximum Texture Size”

Just leaving it here
I was able to shrink “Third Person Template” APK+OBB to about 30MB.
The core idea is to remove absolutely everything you don’t need - it includes plugins, engine modules, blacklisted content, debug symbols. Compressing content, sharing shader code and disabling movable lights also helps. The problem might be also the multiple architectures of the build, you might consider building only for arm64 devices these days.
Hope it’ll help a little, cheers!