File size of apk file - over 17mb! Can I reduce this?

My android game is weighing in at approx 17mb so I wondered if it could be packaging unnecessary libraries such as openfeint etc?

I am sure I read that these libraries are only added if needed. What determines if openfeint is packaged - is it simply the addition of the following line of code?

  
local openfeint = require("openfeint")  
  

I noticed a lot of the Android games are very small file sizes so wondered if a large file size may be putting people off downloading my game… [import]uid: 7863 topic_id: 10123 reply_id: 310123[/import]

What is the size of your project directory? Typically corona ads about 2 to 4 mb. You can take a look here to decompile your apk and remove libraries if you really think there are ones included you don’t need:

http://www.base2solutions.com/walkabout/Corona%20Tips.html
(section 7)

Also this will compress the binary with better compression. [import]uid: 8872 topic_id: 10123 reply_id: 37650[/import]

Thanks for the reply.

My project directory is 15.5 MB so with the additional 2-4 MB from Corona that would bring it up to at least 17 assuming no compression.

Just wanted to be sure it wasn’t adding on the openfeint and physics libraries when these are not required.

I will have a look at the link you sent.

Thanks

Paul [import]uid: 7863 topic_id: 10123 reply_id: 37889[/import]

The files needed for doing the APK decompile mentioned in Section 7 of Corona Tips is no longer available on mediafire unfortunately. [import]uid: 83823 topic_id: 10123 reply_id: 84170[/import]

Oops! I deleted the mediafire link by mistake :stuck_out_tongue:

The web hoster is doing some maintenance, but as soon as thats sorted i’ll update the link. In the mean time here’s a newer version that lets you sign and compile all on the PC.

http://www.mediafire.com/?davapp8lyqbz487

Usage is slightly different. To setup for signing:

  • Rename your .keystore file to mykey.keystore and copy it into the ‘other’ directory
  • Edit Script.bat in notepad and add your password to the second line (whithin the quotes)

Now to modify an apk:

  • Place your apk in the directory ‘place-apk-here-for-modding’ and run script.bat
  • Select option 22 and then your apk file
  • Select option 9 to decompile
  • Your decompiled apk is in the projects directory. Edit the manifest there. Be careful not to leave any .bak copies of your manifest (ultraedit for example will do this)
  • Select option 14 to compile, sign and zipalign in one shot. Your final apk will be in the ‘place-apk-here-for-modding’ directory.

Note you must use JDK version 6. Version 7 causes an issue with apktool and new corona builds. You can get jdk 6 from here:

http://www.oracle.com/technetwork/java/javase/downloads/jdk-6u25-download-346242.html
[import]uid: 8872 topic_id: 10123 reply_id: 84232[/import]