jsign icon indicating copy to clipboard operation
jsign copied to clipboard

Azure trusted signing w/ apksigner fails

Open vilgotf opened this issue 11 months ago • 8 comments

The command below fails to run with the following error: Failed to load signer "signer #1": NONE entry "<accountName>/<profileName>" does not contain a key.

 java -cp apksigner.jar:jsign.jar com.android.apksigner.ApkSignerTool sign \
      --provider-class net.jsign.jca.JsignJcaProvider \
      --provider-arg https://neu.codesigning.azure.net \
      --ks NONE \
      --ks-type TRUSTEDSIGNING \
      --ks-pass env:ACCESS_TOKEN \
      --ks-key-alias <accountName>/<profileName> \
      --in app.apk

Jsign is otherwise working. E.g. jsign --storetype TRUSTEDSIGNING --keystore neu.codesigning.azure.net --storepass env:ACCESS_TOKEN --alias <accountName>/<profileName> app.msix successfully completes.

vilgotf avatar Mar 18 '25 14:03 vilgotf

Do you get more details with the --verbose option?

ebourg avatar Mar 18 '25 15:03 ebourg

No. I should also mention that I'm using apksigner bundled with Android 35.

vilgotf avatar Mar 18 '25 16:03 vilgotf

And you use a fresh token generated just before invoking apksigner?

ebourg avatar Mar 18 '25 17:03 ebourg

Yes

vilgotf avatar Mar 18 '25 18:03 vilgotf

Did you try --ks-pass pass:$ACCESS_TOKEN instead of --ks-pass env:ACCESS_TOKEN?

ebourg avatar Mar 18 '25 18:03 ebourg

Yes I've tried that too. I should add that the error appears instantaneously without seemingly making any http request (I am even able to reproduce the error without an internet connection (I would expect another, network, error then)).

vilgotf avatar Mar 18 '25 19:03 vilgotf

And you've downloaded jsign-7.1.jar from the release page, renamed it to jsign.jar, and placed it in the current directory, right?

ebourg avatar Mar 19 '25 07:03 ebourg

Yes, I've used both the release page's .deb and .jar files.

vilgotf avatar Mar 19 '25 08:03 vilgotf