Signing an App that's been created with Buildozer

3,665 views
Skip to first unread message

plysp...@gmail.com

unread,
Dec 8, 2013, 5:45:16 PM12/8/13
to kivy-...@googlegroups.com
I'm packaging my kivy-apps with buildozer and want to release them for android.
How do I sign the packages after I built them with the buildozer? Is there an easy way or do I have to do something else than using buildozer?

 

Alexander Taylor

unread,
Dec 9, 2013, 7:38:31 AM12/9/13
to kivy-...@googlegroups.com
Buildozer can't currently do this part for you. You need to follow the instructions at https://developer.android.com/tools/publishing/app-signing.html - specifically, step 1 with keytool, step 3 with jarsigner and step 4 with zipalign. You don't need step 2, that's what buildozer takes care of.

This isn't too hard, just 3 terminal commands, and one of them (generating your key store) only needs to be done once.

You should also read about safely securing your keys. If you lose them you won't be able to sign apps any more - you can create a new one, but then can't upgrade existing apps easily and need to make a new Play store entry etc.

Ben Rousch

unread,
Dec 9, 2013, 8:13:10 AM12/9/13
to kivy-...@googlegroups.com
In general, the steps are:

1. Generate Keystore (once)
2. Create Release APK
3. Sign APK
4. Zip-align APK

For a specific example of doing a release, here is the setup for my SayThis app:

* My keystore is in ~/keystores
* My project root is in ~/saythis
* Which means buildozer.spec is at ~/saythis/buildozer.spec
* The virtualenv for the project is activated

The specific commands I use to release the SayThis app are:

$ cd ~
$ keytool -genkey -v -keystore ./keystores/net-clusterbleep-saythis.keystore -alias cb-play -keyalg RSA -keysize 2048 -validity 10000
$ cd ~/saythis
$ buildozer android release
$ cd ~
$ jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore ./keystores/net-clusterbleep-saythis-release.keystore ./saythis/bin/SayThis-1.1.6-release-unsigned.apk cb-play
$ .buildozer/android/platform/android-sdk-21/tools/zipalign -v 4 ./saythis/bin/SayThis-1.1.6-release-unsigned.apk ./saythis/bin/SayThis.apk

The SayThis.apk is what you upload to Google Play. Please make sure you use your own name for the keystore and APKs.



--
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/groups/opt_out.



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

Michael Hines

unread,
Jun 5, 2014, 3:49:39 AM6/5/14
to kivy-...@googlegroups.com
Whenever I re-build and re-deploy my app with buildozer in debug mode, all the application's data disappears.

But, if I just re-deploy (without rebuilding from scratch), the app's data remains without any problem.

I was thinking this was an APK-signing problem, so I followed these instructions and instead deployed a release-mode
version of the APK, but I still have the same problem - the app's data gets reset.

Is this normal? Or is this an artifact of "adb install -r" ?

- Michael

Michael Hines

unread,
Jun 5, 2014, 6:45:00 AM6/5/14
to kivy-...@googlegroups.com
Don't respond to that: I was just using getFilesDir() instead of getExternalFilesDir(). Silly me. =)
Reply all
Reply to author
Forward
0 new messages