jamulussoftware / jamulussoftware/jamulus
Android: Add proper APK signing & zipalign'ing
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- C
- Sterne
- 1.1k
- Forks
- 248
- Ø Merge
- 2 T. 3 Std.
- Gemergte PRs (30 T.)
- 9
Beschreibung
APKs currently do not seem to be signed. The androiddeployqt does not contain the relevant parameters:
https://github.com/jamulussoftware/jamulus/blob/5f8ce856114f3ff34ba7bbd43bfaac0ff9579b52/autobuild/android/autobuild_apk_2_build.sh#L33
This means that APKs are currently signed with debug keys (which, I assume, are freshly generated in each new run).
02-19 11:55:00.948 1070 1625 W PackageManager: Package com.github.jamulussoftware.jamulus signatures do not match previously installed version; ignoring!
02-19 11:55:00.965 462 30113 E : Couldn't opendir /data/app/vmdl2123040391.tmp: No such file or directory
02-19 11:55:00.965 462 30113 E installd: Failed to delete /data/app/vmdl2123040391.tmp: No such file or directory
$ /opt/android-sdk/build-tools/30.0.3/apksigner verify --print-certs jamulus_3.8.2beta1_android.apk
Signer #1 certificate DN: C=US, O=Android, CN=Android Debug
Signer #1 certificate SHA-256 digest: 027398c8681ae8f1eb530afc224e1acbc9a904752af435c37e4e8fcfd47e568f
Signer #1 certificate SHA-1 digest: e080c2b954df6cd94d1305fc025d96a4068f12c8
Signer #1 certificate MD5 digest: af64a6a9340ed57910e387fd8ba1d8b8
$ /opt/android-sdk/build-tools/30.0.3/apksigner verify --print-certs jamulus_3.8.2rc1_android.apk
Signer #1 certificate DN: C=US, O=Android, CN=Android Debug
Signer #1 certificate SHA-256 digest: 61a02eb837389a9cf17bb7f4b91f3ec72e81e27e19b9a7d3a88fd59142f8497b
Signer #1 certificate SHA-1 digest: b584757c43598e2fb18cac1227ca47600a14816b
Signer #1 certificate MD5 digest: 07eea7058e5a4cd42e14984a50dc64f3
Has this feature been discussed and generally agreed?
No. I believe this is one (maybe even the one) reason for #1760. As signing is a separate, non-trivial task and as I'm not sure if it solves everything, I'm opening this as a dedicated issue.
Describe the solution you'd like
Without having put much effort into research, I assume that simply signing with a proper, permanent self-signed certificate should work: https://doc.qt.io/qtcreator/creator-deploying-android.html#signing-android-packages
Hints that this is the likely root cause:
https://stackoverflow.com/questions/41709102/package-signatures-do-not-match-the-previously-installed-version/41711890#41711890
https://qa.h-mdm.com/5207/cannot-upgrade-the-application-signatures-do-not-match
- Only start work after autobuild logic refactoring has been completed
- Securely generate a key
- Store it in Github secrets
- Modify autobuild
androiddeployqtcall to use the key from Github secrets - Ensure that
zipalignis also run - Verify that the Warnining/Error/Update problem goes away
Describe alternatives that have been considered
cc @NickHyHo
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginnen Sie nach Abschluss der Refaktorierung der autobuild-Logik bei dem referenzierten androiddeployqt-Aufruf in autobuild/android/autobuild_apk_2_build.sh. Ermitteln Sie, wie ein dauerhafter Signaturschlüssel sicher über GitHub secrets bereitgestellt werden kann, stellen Sie dann sicher, dass Signierung und zipalign angewendet werden, und verifizieren Sie das APK mit apksigner sowie das im Issue beschriebene Installations-/Updateverhalten.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- android
- Bereich
- build-system, ci-cd, mobile-dev, security
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 45/100