APK for Google Play and Tablet

Discussion and feedback on Construct 2

Post » Mon Jun 24, 2013 1:35 pm

Hello this is a tutorial to run games in various construct 2 tablets.
I do not know much about programming and how everyone here on the site had doubts of how to make a game on the tablet radar by Google Play.
After searching a lot and doing a lot of experiences I got wrong somewhere and want to share it.
In this tutorial you will learn how to decompile and compile an apk file, create registry key and use the zipalign leaving the apk file ready for publishing on tablet.
You must have an account on google play and a license Construct 2.
- We will use Cocoonjs to generate the apk files;
- We will use Notepad + + to edit the xml file apk;
- Download files:
- SignApk
- Apktool
- JDK 1.6.0
- Android SDK
In this tutorial you will learn how to decompile and compile an apk file, create registry key and use the zipalign leaving the apk file ready for publishing on tablet.
Now that we have all done we'll start downloads.
Create a folder on Local Disk C: \ with the name Android getting the path as "C: \ Android \".
All other files can be installed wherever you want, I recommend the Local Disk C: \.
Apk file # # # #
Export your game to CocoonJS and then download the file unzip the zip file.
2 apk files will open a 'debug_signed "and" release_unsignad ".
Delete the file "debug_signed" and rename the file "release_unsignad" to: <username> <Game _release.apk and copy the file by pasting it into the folder "ApkTool".
Select the folder "ApkTool" presione [Chift] + Right-click the folder and click: Open Command Window Here.
With the command window open type:
Apktool d <username> your file> _release.apk

The command will unpack the apk creating a folder with all your game open the AndroidManifest.xml file inside that folder with Notepad + + to edit it.
Modify the following lines HTML:
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="8" /> to <uses-sdk android:minSdkVersion="11" android:targetSdkVersion="14" />.

Now add the line <supports-screens> HTML:
android: largeScreens = "true" and android: xlargeScreens = "true".
Getting this:
<supports-screens android:anyDensity="true" android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:largeScreens="true" android:xlargeScreens="true" />

Save the file and close the program.
Compressing the folder apk:
Even with the open command window type:
Apktool b <username> <folder <filename> _release.apk
Now copy the apk file and paste in the folder SignApk.
If you take time to compress error in the file change <manifest android: versionCode = "25" in the xml file to above:
manifest android: versionCode = "26"

Select the folder "SignApk" presione [Chift] + Right-click the folder and click: Open Command Window Here.
With the command window open type:
Java-jar signapk.jar certificate.pem key.pk8 <filename> _release.apk <filename> _signer.apk
This command will create a file signer.apk that will be used to make a registry key.
Copy the two files apk "and signer release" folder and paste in Android that the Local Disk created in the beginning.
Creating the registry key:
Open the folder that should this JDK 1.6.0 in C: \ Java \ and select the folder "bin" presione [Chift] + Right-click the folder and click: Open Command Window Here.
With the command window open type:
Keytool-genkey-v-keystore C: \ Android \ <filename> _signer.keystore-alias <filename>-keyalg RSA-keysize 2048-validity 10000

This will create a file <filename> _signar.keystore.
Save the file to be able to update signer_.keystore future changes in their games.

In the same command window type:
Jarsigner-verbose-keystore C: \ Android \ <filename> _signer.keystore C: \ Android \ <filename> _release.apk <filename> _signer

Now the file _release.apk this signed, but before it is published on Google Play he has to go through the "zipalign" what about zipalign understand is that it compresses the files and organizes more better too.

Open the Android SDK folder that should this in C: \ AndroidSDK and select the folder "tools" presione [Chift] + Right-click the folder and click: Open Command Window Here.
With the command window open type:
Zipalign 4-v C: \ Android \ <filename> _release.apk C: \ Android \ <filename> _release_XX.apk

The latter name may be the name of your game with the version number in place of the XX example:
Construct2game_release_10.apk
Now just post the file in Google play.
I made this tutorial picking up a lot of the internet by adapting and modifying to get here.
Hope that helps the most as I had no luck in finding something explanatory and didactic.
Many errors can occur for type it wrong, stay tuned!
The text is in Portuguese from Brazil and has been translated by Google translator excuse some flaws.
Monkey Indie Games(Android)
B
44
S
10
G
2
Posts: 45
Reputation: 5,853

Post » Mon Jun 24, 2013 2:10 pm

Thanks for sharing! Valeu mesmo. :)andreyin2013-06-24 14:11:02
B
121
S
41
G
40
Posts: 841
Reputation: 27,859

Post » Mon Jun 24, 2013 2:40 pm

This will quickly be forgotten if you leave it just on the forum. We've got a whole Tutorials section of the site for things like this, you should post it there as well.
Scirra Founder
B
386
S
229
G
87
Posts: 24,207
Reputation: 191,742

Post » Mon Jun 24, 2013 6:47 pm

My god! This was so useful! You have no idea how much of a pain signing apks has been for me lately!
B
20
S
7
G
4
Posts: 322
Reputation: 4,521

Post » Mon Jun 24, 2013 8:46 pm

As Ashley said, this might be forgotten, also there is already such a tutorial at this url : https://www.scirra.com/tutorials/432/android-games-with-cocoonjs
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
280
S
105
G
86
Posts: 7,313
Reputation: 84,466

Post » Tue Jun 25, 2013 6:33 pm

put some time now the link is: https://www.scirra.com/tutorials/568/games-for-tablet and is in English and Portuguese (Br).
Monkey Indie Games(Android)
B
44
S
10
G
2
Posts: 45
Reputation: 5,853


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 7 guests