Skip to main content
Known Participant
October 9, 2014
Question

Cleaning up ANE Android leftovers?

  • October 9, 2014
  • 2 replies
  • 522 views

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 has been closed for replies.

2 replies

seaders6mAuthor
Known Participant
October 15, 2014

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

seaders6mAuthor
Known Participant
October 14, 2014

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.

grahamsmith10151448
Inspiring
October 15, 2014

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

it certainly makes sense ..