Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

ApkBlacklist-Shipping.txt not working

I've got a 6mb content game and the APK is 66mb.... I've tried everything...no result, it doesn't even go down 1mb.

What I'm trying now is the blacklist method to exclude all the engine default files which seem to be the cause, the problem is it isn't working. I've got the blacklist in the "projectname"/build/android folder and this is my list: link text These are very big files and if it was working I should really see an improvement.

Any idea what I'm doing wrong? Seems pretty straight forward, I don't know why it isn't working

Product Version: UE 4.13 Preview
more ▼

asked Aug 31 '16 at 04:11 PM in Packaging & Deployment

avatar image

81 8 9 12

avatar image Steve Hardister ♦♦ STAFF Sep 02 '16 at 02:28 PM

Hi SulXo,

  1. What platform are you developing for?

  2. What OS are you developing on?

  3. Have you tried everything on this link: Reducing APK Package Size

  4. Is your blacklist typed "camel-humped" like the example: PakBlacklist-Shipping.txt

Please review and follow any steps you have not already tried from the list above and let me know the results.


Steve H

avatar image SuIXo Sep 02 '16 at 03:07 PM

It's for android and I'm developing on Windows 7, UE 4.13.

I did try everything on the documentation page yes, also some tips from other users, but still nothing.

And also yes, the txt file is written correctly (I just realised I messed up the question title, but file is ok)

avatar image SuIXo Sep 02 '16 at 03:12 PM

Oh BTW, is everything in this directory what is actually packaged inside the APK?


I can see there the stuff I'm trying to blacklist like the sky materials

EDIT: It may be worth mentioning in 4.12 apk was 50mb, then suddently in 4.13 it went to 66mb

avatar image Steve Hardister ♦♦ STAFF Sep 02 '16 at 06:58 PM

Do you have the entire package log? You should see "Applying PAK blacklist file ..." and "Excluding ..." messages in the log.

avatar image Steve Hardister ♦♦ STAFF Sep 02 '16 at 07:45 PM

We tested the PAK blacklist functionality with TappyChicken and it works fine; we got the messages in the log.

In addition to looking at the packaging log for the PAK blacklist entries, you can also try taking apart the two APK files and comparing the contents.

An APK is just a ZIP file so any ZIP extractor will open it. Look in the assets directory for main.obb.png and extract it. This is also a ZIP file, open it up and extract the PAK file.

UnrealPak.exe in the Engine/Binaries/Win64 directory can be used to get the list of files and sizes:

unrealpak mypakfile.pak -List

You can do this for both the 4.12 and 4.13 packages and see what is different.

avatar image Steve Hardister ♦♦ STAFF Sep 02 '16 at 07:49 PM

...A few more thoughts, if you created the UE4.13 version of the project by making a copy of the UE4.12 version of the project, if you have not already, try right-clicking the Content folder in the Content Browser and selecing "fix up redirectors in folder." Also do a map check for each level and make sure there are no errors. Finally, back up your Intermediate, Saved, and Config files and remove them from you project folder so that they are rebuilt anew when you reopen the project in UE4.13/

avatar image SuIXo Sep 02 '16 at 09:24 PM

I extracted the pak file and I can confirm the files I want to get rid of are there. So the blacklist isn't getting recognized.

In the 4.12, looking with 7-zip, both the lib folder and the engine content folder are about 10mb smaller. I'm guessing the size difference is the new content from 4.13 making it's way into the apk even without being used.

There is no mention whatsoever to the blacklist in the package log.

I did the fix redirectors and I only have one map with one blueprint, I made the game like tappychicken, all in one. No apparent errors.

Although when looking at the reference viewer and navigating around I see stuff I'd never be using like VR and worldgrid materials, the sky materials as well, connected down the line to the level. But I don't know if seeing them in the reference viewer means it's actually using it.

Anyways the blacklist should just keep it out even if used.

I tried deleting the folders you said but that just destroys everything. I still have the assets but I have to reassign everything. So for now I just went back. I may try that if all else fails.

avatar image SuIXo Sep 02 '16 at 10:13 PM

Ok, now something very weird is happening.

The blacklist is now working. I realized there is a bug on the project settings interface. Normally when you check "For Distribution: True" the "build config" switches to shipping. But, at least in my case, every time I launch the editor the greyed out "build configuration" shows development instead of shipping (still having the For Distribution set on true).

As soon as I uncheck and recheck For Distribution, the build config switches back to shipping. Now when packaging I can see the blacklist being taken (I only had the shipping blacklist). Size of the apk went to 38mb. Problem is it crashes on launch when I install it.

So, the blacklist works fine, it's just that bug where I have to uncheck and check "for distribution"

I thought the crash might be one of the files I excluded, so I removed the blacklist. Now when I launch I can hear the game playing and even interact with buttons but the screen is completely black.

Then I tested a development build without blacklist for a 68mb apk and everything seems fine except for a button with alpha material that appears black.

There is definitely something going on between the dev build and the shipping build.

avatar image SuIXo Sep 06 '16 at 09:35 AM

As my problem seems no longer related to blacklist I'll set this as answered and post a new question.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Solved. In project settings/packaging the greyed out "build configuration" must match the blacklist name.

It is not automatically set to shipping when you launch the editor even when "For Distribution" is checked. You have to check and uncheck and it will reset itself. Some bug probably.

more ▼

answered Sep 06 '16 at 09:39 AM

avatar image

81 8 9 12

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question