Problem with release apk for kivy app

750 views
Skip to first unread message

Saurav Singhi

unread,
May 10, 2014, 1:17:07 PM5/10/14
to kivy-...@googlegroups.com
Hi,
I have been working on a app and have managed to successfully create a "<myapp>-debug.apk" using buildozer. This apk installs and runs just the way I want it to but when I create a <myapp>-release-unsigned.apk (again using buildozer), The apk now fails to install. I have tried installing it after signing and aligning it as well but in vain.
Why is this so? How can I solve this. I wish to upload my app on the Google Play Store.
Thanks and Regards,
Saurav Singhi

Ben Rousch

unread,
May 10, 2014, 2:36:15 PM5/10/14
to kivy-...@googlegroups.com
What's the error message when you try to install it?


--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
 Ben Rousch
   bro...@gmail.com
   http://clusterbleep.net/

Saurav Singhi

unread,
May 10, 2014, 4:58:32 PM5/10/14
to kivy-...@googlegroups.com
just "app not installed

Alexander Taylor

unread,
May 10, 2014, 5:04:51 PM5/10/14
to kivy-...@googlegroups.com
The problem is probably that you did something wrong. Could you paste exactly what commands you used to sign and align?

Saurav Singhi

unread,
May 10, 2014, 5:07:09 PM5/10/14
to kivy-...@googlegroups.com
in fact I tried to install it on other phones, it successfully installed on androids v4.3 and v4.4 but not on 4.1 and 4.0. But the debug version worked fine on all the versions.


On Sunday, May 11, 2014 12:06:15 AM UTC+5:30, Ben Rousch wrote:

Saurav Singhi

unread,
May 10, 2014, 5:17:51 PM5/10/14
to kivy-...@googlegroups.com
to sign i used :

sudo jarsigner -keystore "/home/saurav/workspace/HDAY/certificates/sigmazix.keystore" -storepass Flt93jsq! -keypass hdaypasskeykdv00llm "/home/saurav/workspace/HDAY/bin/HDAY-0.1-release-unsigned.apk" sigmazix

and to align i navigated to my android sdk tools folder and then the following command:

./zipalign -v 4 /home/saurav/workspace/HDAY/bin/HDAY-0.1-release-unsigned.apk /home/saurav/Desktop/HDAY-0.1-final.apk

Ben Rousch

unread,
May 10, 2014, 5:23:20 PM5/10/14
to kivy-...@googlegroups.com
Why sudo? You should have no problem signing as a normal user.


--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Saurav Singhi

unread,
May 10, 2014, 5:26:18 PM5/10/14
to kivy-...@googlegroups.com
the bin directory was restricted. 

Saurav Singhi

unread,
May 10, 2014, 5:30:19 PM5/10/14
to kivy-...@googlegroups.com
when i ran the buildozer command as normal user it popped 
"Permission denied" so i did a sudo buildozer, so i guess that caused the bin directory to be restricted.


On Sunday, May 11, 2014 2:53:20 AM UTC+5:30, Ben Rousch wrote:

Ben Rousch

unread,
May 10, 2014, 6:23:47 PM5/10/14
to kivy-...@googlegroups.com
That can also set incorrect permissions on essential buildozer folders, which will break things.

Saurav Singhi

unread,
May 11, 2014, 11:08:47 AM5/11/14
to kivy-...@googlegroups.com
ok so i tried to run buildozer without sudo but again the same "Permission denied". I am working on a virtual machine so i decided to format and let buildozer do everything for me. So I formatted everything and installed buildozer,cython and java-jdk. and let buildozer do everything for me. this time i did not need sudo for buildozer. again the debug.apk installed fine but the release.apk failed to install

Saurav Singhi

unread,
May 11, 2014, 3:14:40 PM5/11/14
to kivy-...@googlegroups.com
Why is this happening?? why does the apk generated by buildozer android debug run but not buildozer android release??? What confuses me more is the fact that the release does work but only on android 4.3.x and 4.4.x ...!!



You received this message because you are subscribed to a topic in the Google Groups "Kivy users support" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/kivy-users/pBtbg8aSlNo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to kivy-users+...@googlegroups.com.

Ben Rousch

unread,
May 11, 2014, 3:30:27 PM5/11/14
to kivy-...@googlegroups.com

Your debug version works on older Android versions?

Saurav Singhi

unread,
May 11, 2014, 7:13:27 PM5/11/14
to kivy-...@googlegroups.com
yes it does!

Saurav Singhi

unread,
May 13, 2014, 12:31:41 PM5/13/14
to kivy-...@googlegroups.com
What can I do! I am unable to come up with a solution..

Ben Rousch

unread,
May 13, 2014, 4:07:02 PM5/13/14
to kivy-...@googlegroups.com
Are you actually signing the APK, or trying to install the unsigned release APK? The normal way of developing is to use the debug APK for testing during development, then creating the signed APK when you are ready for release.

Saurav Singhi

unread,
May 13, 2014, 4:59:21 PM5/13/14
to kivy-...@googlegroups.com
after signing i am trying to install the apk... it installs on 4.3 and 4.4 but not on 4.1 or 4.0...

Ben Rousch

unread,
May 13, 2014, 5:01:47 PM5/13/14
to kivy-...@googlegroups.com
Did you set the SDK version to 17 or 18? Or is it at the default of 14?

Saurav Singhi

unread,
May 13, 2014, 5:08:02 PM5/13/14
to kivy-...@googlegroups.com
default 14

Saurav Singhi

unread,
May 13, 2014, 5:28:53 PM5/13/14
to kivy-...@googlegroups.com
should it be 17 or 18??

Saurav Singhi

unread,
May 16, 2014, 7:02:54 AM5/16/14
to kivy-...@googlegroups.com
I have uploaded the apk on the play store.. 
https://play.google.com/store/apps/details?id=org.test.hday
It says the apk was not signed correctly while installation

Saurav Singhi

unread,
May 16, 2014, 7:07:40 AM5/16/14
to kivy-...@googlegroups.com
is there any other way to sign my apk other than jarsigner?

Ben Rousch

unread,
May 16, 2014, 7:32:01 AM5/16/14
to kivy-...@googlegroups.com
First, they might not allow you to use the org.test domain to name your package. Try it with your own domain.

If that fails, here is the process I use to generate a signing key and to sign my APKs. This puts your signing keys in ~/keystores . Note the release number in step 6 and 8 which will need to match your actual release number. Use your own domain and app name.

My App
$ cd ~
$ keytool -genkey -v -keystore ./keystores/com-mydomain-myapp.keystore -alias myalias -keyalg RSA -keysize 2048 -validity 10000
$ cd ~/myapp
$ buildozer android release
$ cd ~
$ jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore ./keystores/com-mydomain-myapp.keystore ./myapp/bin/MyApp-1.0.0-release-unsigned.apk myalias
$ <password set during key generation in step 1>
$ .buildozer/android/platform/android-sdk-21/tools/zipalign -v 4 ./myapp/bin/MyApp-1.0.0-release-unsigned.apk ./myapp/bin/MyApp.apk

If you have more questions about signing, visit http://developer.android.com/tools/publishing/app-signing.html

Saurav Singhi

unread,
May 16, 2014, 9:04:49 AM5/16/14
to kivy-...@googlegroups.com
Thanks a lot!!! It worked!
Reply all
Reply to author
Forward
0 new messages