Skip to main content
Known Participant
Oct 9, 2014 5:00 PM UTC
Question

Cleaning up ANE Android leftovers?

After seeing the duplication of resources in assets/META-INF folders, I investigated this further to find that there's a huge amount of unneeded leftover files left here that can *and should* be deleted for a release build.

For us, this is 11.5MB of a 42.5MB apk, down to 31MB after this clearout.

Basically, after deleting all files that match the regex,

assets/META-INF/AIR/extensions/[^/]+/META-INF/ANE/Android-ARM/(?!library.swf)

Leaves the apk in a perfect state, but a much more manageable / palatable size.  This cleanout can be achieved after the building of the apk with aapt, from android-apktool -  A tool for reverse engineering Android apk files - Google Project Hosting, with commands like,

aapt remove mygame.apk assets/META-INF/AIR/extensions/com.google.api.game/META-INF/ANE/Android-ARM/android-support-v4.jar

aapt remove mygame.apk assets/META-INF/AIR/extensions/com.google.api.game/META-INF/ANE/Android-ARM/appcompat_v7-res/abc_ic_voice_search_api_holo_light.png

This should *absolutely* be done automatically by the build process, because as I said this contributed to our app growing by a third of it's proper size.

This topic is closed to new replies. Start a new post to keep the conversation going.

3 replies

seaders6mAuthor
Known Participant
Oct 15, 2014 3:16 PM UTC

I've added this in to bugbase, Bug#3836889 - Unnecessary files are duplicated with ANEs on Android please vote on it there.

Translate
seaders6mAuthor
Known Participant
Oct 14, 2014 3:39 AM UTC

Seriously Adobe, how can you not at least give this a reply?  Leaving 10MB of unnecessary files on a mobile app is nearly an abominable crime and has to be fixed, and as I've explained (and am operating with now), it's easy-ish for me to fix post-packaging.  For you guys to fix it pre that should be an absolute synch.  Please do something about it.

Translate
grahamsmith10151448
Inspiring
Oct 15, 2014 3:03 PM UTC

It would be cool if this could be looked at for future AIR builds ,

it certainly makes sense ..

Translate