Good day all,
Here’s a solution to the 5 meg limit imposed by MIT’s App Inventor Classic and App Inventor 2…
1) Save your AI app as a .apk file.
2) Download ApkTool from http://ibotpeaches.github.io/Apktool and install it to your computer.
3) Copy your .apk file to the Apktool folder located in your computer’s c: drive (should normally be located at c:/apktool).
4) Open your computer’s command prompt terminal; be sure to go back to the c:/ by typing cd.. in the terminal (you may have to do so more than once). Once at c:/, type cd apktool (if you installed Apktool in this particular folder, that is).
5) Still in the terminal, type apktool d NameOfYourFile.apk (i.e.: apktool d Test.apk). This will “unzip” your .apk file and a folder (NameOfYourFile) shall be created; in it, you’ll find your .apk’s manifest and other related folders and files. If you see a folder called meta-inf, delete it. Open the asset folder; you will be able to update your files there (delete or add any required files for your app)… The good news is: no need to worry about the 5 meg limit anymore!
6) Once this is done, go back to the terminal and type apktool b NameOfYourFile NameOfYourFile.apk (i.e.: apktool b Test Test.apk).
7) By doing so, you now “zipped” back your app to a standard .apk file, which also includes the files you added to the asset folder. Copy this new .apk file back to your desktop…
8) You will now have to use a program called JarSigner in order to sign your .apk file. It is notably included to Java version 184.108.40.206 and that is the version that I use (Jarsigner may not be included to later versions of Java though). Hence, you can download Java 220.127.116.11 from http://filehippo.com/download_jre_32/14872/. Once this Java version is downloaded and installed to your computer, you will have to open a command prompt terminal and locate the Jarsigner program. In my computer, it is under Java’s bin folder… c:/Program Files/Java/jdk1.6.0_45/bin/…
9) Once in the bin folder (and always in your command terminal), type: jarsigner -verbose -sigalg MD5withRSA -digestalg SHA1 -keystore android.keystore C:LocationOfYourDesktopNameOfYourFile.apk androidkey (i.e.: jarsigner -verbose -sigalg MD5withRSA -digestalg SHA1 -keystore android.keystore C:UsersRobDesktopTest.apk androidkey)
10) Jarsigner will ask for your keystore passphrase… by default, the AI keystore passphrase (or password) is “android”. Your .apk is now signed. Bravo.
11) Before uploading it to Google Play, you still need to zipalign it! The Zipalign tool is part of Android SDK (1.6 onwards) and can be found under the tools folder of the SDK. To use it, you will have to run the following command in your terminal: zipalign -v 4 source.apk destination.apk. In example: zipalign -v 4 Test.apk Test2.apk … Once the zipping is done, delete Test.apk and rename Test2.apk to Test.apk (in order to preserve the original name of the file).
12) Test your .apk in your mobile phone and if everything’s fine you’ll be ready for uploading it to Google Play !
If you would like to obtain help regarding this procedure, feel free to contact me. For US$20.00, I shall update your .apk file accordingly and make it ready for your Google Play upload. Please include your zipped .apk file to your email (you can use 7-zip to do so, a free tool) and mention your keystore passphrase if modified from the default “android” value. I shall respond with a Paypal link for your payment as well as a server link where you’ll be able to upload the files you would like to add to your asset folder. Once your payment is through, you will receive a final email including the updated .apk file.