learningequality / kolibri-installer-android

Android wrapper for Kolibri.
MIT License
26 stars 22 forks source link

Sign releases with a production key (currently unclear how to 'upgrade' or re-install) #12

Closed christianmemije closed 5 years ago

christianmemije commented 7 years ago

Reported during 0.5.x hack session on Android 7:

Unable to install the .apk file if an existing installation of Kolibri is on the device. It doesn't re-install over it like the .pex or .exe file

Install Kolibri on Android device using .apk

  1. Try installing a newer version of Kolibri on Android device using .apk
  2. An error is shown by the android OS
  3. The user had to uninstall the previous version to proceed

Sounds like part of the issue might have to do with signing certificates changing between builds. (cc @jamalex )

DXCanas commented 7 years ago

I think I've found out the way to handle this. Notes below. Some of the links provide outdated info (like the tools used to manually generate the keystore signature), but Android's documentation has a decent description of what's supposed to be used and how to do it. Going to try it first thing tomorrow.

I'm going to need some more information about the best way to handle a key that we're using to repeatedly build APK's -- I think it may be best to hold it inside of buildkite, so that everyone can just pull a signed APK from there. Going to need to talk to @aronasorman @jamalex for thoughts.

Some Notes

Main issue: apks are not signed, so android doesn't know they're really the same app

Resolution: sign apk (Steps 1, 3 , 4 -- 2 is taken care of by buildozer) Lead here by kivy user group Lead there by stackoverflow

indirectlylit commented 7 years ago

I'm going to need some more information about the best way to handle a key that we're using to repeatedly build APKs -- I think it may be best to hold it inside of buildkite, so that everyone can just pull a signed APK from there.

sounds good. we'll need similar functionality eventually for building signed windows installers - cc @mrpau-dev

jamalex commented 6 years ago

https://github.com/kivy/kivy/wiki/Creating-a-Release-APK

DXCanas commented 6 years ago

Documentation above is a bit fuzzy, found a thread on buildozer's repo outlining some of the confusion: https://github.com/kivy/buildozer/issues/363