0

I have an Azure DevOps pipeline that builds an android app well. I now want to sign the android active bundle created by this pipeline, so that I can distribute it. The problem is, I have to sign it. I use this yaml command to sign it

- task: CmdLine@2
displayName: 'Signing and aligning AAB file(s) **/*.aab'
inputs:
  script: 'jarsigner -verbose -sigalg SHA256withRSA -digestalg SHA-256 -keystore 
   releaskey.keystore -storepass $(KeystorePassword) -keypass $(KeystorePassword) 
   /Users/runner/work/1/s/Platforms/MobileApp.Android/obj/
   Release/android/bin/mobileapp.aab'

Here is the final command ran in the pipeline : jarsigner -verbose -sigalg SHA256withRSA -digestalg SHA-256 -keystore releasekey.keystore -storepass *** -keypass *** /Users/runner/work/1/s/Platforms/MobileApp.Android/obj/Release/android/bin/mobileapp.aab

But the problem is that, at the end I get the error:

Please specify alias name

I went to the jarsigner documentation here, and it state that "The aliases are defined in the keystore specified by -keystore or the default keystore." But though I precise a keystore, the build fails at this point.

Damien Doumer
  • 1,991
  • 1
  • 18
  • 33

1 Answers1

0

You can try to add a alias for your keystore .

For example:

jarsigner -verbose -sigalg SHA256withRSA -digestalg SHA-256 -keystore xample.jks bundle.aab keystoreAlias

For more,you can refer to this thread:

How to Sign Android app Bundle with azure pipeline

Jessie Zhang -MSFT
  • 9,830
  • 1
  • 7
  • 19