Is there an easy way to sign your .apk for Google Play? I can’t seem to figure out how to open my project in Eclipse. Is there a good tutorial out there?
February 27, 2014 at 19:50 #6949
February 28, 2014 at 11:01 #6953
jarsigner -storepass YOURPASSWORD -keystore YOURKEYSTORE_key.keystore YOURAPP-release-unsigned.apk YOURKEYSTORE_key zipalign -f 4 YOURAPP-release-unsigned.apk YOURAPP_release.apk jarsigner -verify YOURAPP_release.apk
DavidFebruary 28, 2014 at 20:32 #6961
Thanks for your help David. I eventually got this to work but definitely not easy to figure out for a newbie. Do you have to perform this operation each time you send an updated .apk to Google Play?February 28, 2014 at 20:54 #6962
You are welcome! Basically yes, each update needs to be signed before it can be uploaded in the Google Play Store!
DavidMarch 1, 2014 at 17:11 #6972
I am a newbie by this, can someone help me with this or have you a tuturial that i can read?
JoshuaMarch 1, 2014 at 17:17 #6973
I am going to make a tutorial either today or tomorrow to show what I did.
EdMarch 1, 2014 at 17:21 #6974
Thnx, i will see it soon, i hope you het it for tonight or els tomorrow.
Thnx.March 1, 2014 at 22:17 #6979
This is a tutorial for signing and aligning your publish builds for Google Play Store submission. Note: you need a Pro Felgo account in order to build a “Publish Build” instead of “Test Build”. Once you purchase your Felgo 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 Felgo team member is reading, tell me if I made a mistake!
-EdMarch 3, 2014 at 09:11 #6985
Thanks for the tutorial Ed, looking good so far! 🙂March 3, 2014 at 14:40 #6990
In step 7, I just realized that I actually copied my signed apk over to the jdk/tools folder before using zipalign. There was no “pointing” as I mistakenly mentioned. It’s much easier to just drop a copy of your file into the folder where the tool is.March 5, 2014 at 00:35 #7010
I have som problems with step 5, when information and password, he show me the next error:
[storing my-release-key.keystore] keytool error: java.io.FileNotFoundException: my-release-key.keystore <not allowed> Java.io.FileNotException: my-release-key.keystore <not allowed> at java.io.FileOutpurStream.open<native Method> at java.io.FileOutpurStream.<init><FileOutputStream.java:221> at java.io.FileOutpurStream.<init><FileOutputStream.java:110> at sun.security.tools.KeyTool.doCommands<KeyTool.java:1152> at sun.security.tools.KeyTool.run<KeyTool.java:340> at sun.security.tools.KeyTool.main<KeyTool.java:333>
What did i worng?March 5, 2014 at 05:27 #7011
Try running your command as Admin. Right-click, run-as administrator. Let me know if this helps.March 5, 2014 at 16:07 #7020
it work but i have another problem with step 6.
jarsigner: Certificate chain not found for: my-release-key. my-release-key must reference a valid Keystore key entry containing a private key and corresponding public key certificate chain.
My Command was:
jarsigner -storepass ******** -keystore my-release-key.keystore yourapp-release-unsigned.apk my-release-keyMarch 5, 2014 at 23:22 #7026
Is your .keystore located in your bin folder? Make sure you have a copy of it in the same location as the jarsigner tool.March 5, 2014 at 23:25 #7027
Both of the files are in my bin folder, but what is the problem ?
You can mail it me at firstname.lastname@example.org Thnx. Edomich !!
You must be logged in to reply to this topic.