"APK Signature Scheme v2" is supported only by "apksigner" not by "jarsigner"
Asked Answered
C

1

5

We use HSM for APK signing and in order to support new "APK Signature Scheme v2" do we need to use apksigner going forward to support both Scheme 1 & 2?

jarsigner - supports only "APK Signature Scheme v1" (JAR-based signing scheme)

apksigner - supports both "APK Signature Scheme v1 & V2"

Colosseum answered 24/3, 2017 at 18:29 Comment(0)
C
15

Yes, you'll need to switch away from jarsigner.

jarsigner is for signing JAR files. Thus, I don't believe jarsigner will ever support APK Signature Scheme v2 -- it just would not make sense. You'll need to use apksigner or other tools which support APK Signature Scheme v2.

There's also the apksig library on top of which apksigner is built. If you need a custom tool for signing APKs, you could build your own tool on top of this library.

Cleruchy answered 25/3, 2017 at 19:6 Comment(1)
This answer helped me to understand that on the old Team Foundation Server that we had been using (TFS2018), the Android signing task is only V2 which uses jarsigner and not apksigner and can therefore not sign with signature scheme v2 -> github.com/microsoft/azure-pipelines-tasks/issues/…Pollack

© 2022 - 2024 — McMap. All rights reserved.