This is a tutorial for signing and aligning your publish builds for Google Play Store submission. Note: you need a Pro V-Play account in order to build a “Publish Build” instead of “Test Build”. Once you purchase your V-Play license, you need to update your config.json file in your app’s QML folder and add the following line: “stage”: “publish”,
Send the contents of your QML folder to a compressed folder and upload it to the v-Play build server. I have had problems uploading from Firefox 27, so I have been using Chrome. Download your .apk which will be named yourapp-release-unsigned.apk.
Download and install Java JDK (not JRE)
Here’s where the fun begins.
1. Copy yourapp-release-unsigned.apk
2. Navigate to your JDK folder. In my case, it was installed in the default location of C:\Program Files\Java\jdk1.7.0_51
3. Open the bin folder, and make sure the jarsigner and keytool are there. If they aren’t, make sure you downloaded and navigated to the JDK folder and not JRE.
4. Paste a copy of your .apk into this folder. (Trust me, it makes the process easier)
5.Now you need to create a “keystore”. Open your command prompt and “cd” to the bin folder. Just type the following:
cd C:\Program Files\Java\jdk1.7.0_51\bin and press enter. Note: your bin location may be different depending on where you installed your JDK. If you are successful, the command line should have changed to show you are now starting in the bin folder of JDK.
Enter the following into you command line:
keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000
I chose to replace “my-release-key.keystore” with “myapp.keystore”, and “alias_name” with the name of my app.
Press enter and you should be asked a few questions like your first and last name, organizational unit (I entered Application Development), Organization (I chose the name of my Google Play developer account), city, state, and 2-letter country code (mine was US).
By the way, when you choose your password, it may seem like nothing is being typed in the cmd, but it is. Just make sure you’re careful. You need to type your password twice anyway.
Now you should have a file in your bin folder called yourapp.keystore, or whatever you named it in the previous step.
6. Now you will sign your apk with jarsigner. enter the following into your command prompt (make sure you’re still at your bin folder).
jarsigner -storepass YOURPASSWORD -keystore YOURKEYSTORENAME.keystore YOURAPP-release-unsigned.apk YOURKEYSTORENAME
7. You need Android SDK for this next step. Download it here: http://developer.android.com/sdk/index.html
As you did previously with your jdk\bin folder, you will have to “cd” to the following folder:
you will be using the zipalign tool, so make sure it is in that folder. Enter this into the cmd:
zipalign -f 4 YOURAPP-release-unsigned.apk YOURAPP_release.apk
Note: I pointed YOURAPP-release-unsigned.apk to the file I created in the previous step by entering the following:
zipalign -f 4 C:\Program Files\Java\jdk1.7.0_51\bin\YOURAPP-release-unsigned.apk YOURAPP_release.apk
I believe I had trouble with permissions the first time I tried this, so I right-clicked on the jdk bin folder and changed my permissions so I modify the file.
If you are successful, a new file should appear in your sdk\tools folder called YOURAPP_release.apk.
8. Verify everything worked by “cd” back to the jdk\bin and running:
jarsigner -verify YOURAPP_release.apk
Note: you need to point to your release.apk. for example, i used:
jarsigner -verify C:…\adk…\sdk\tools\YOURAPP_release.apk
You should be good to go!
Please let me know if this works for you or if you’re having trouble understanding my directions. If any V-Play team member is reading, tell me if I made a mistake!