Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is the .apk file output after signing it via Azure android signing build pipeline?

I'm signing an apk file in a build pipeline using the Azure 'Android Signing' task but I cannot see the path in which the signed apk is output to. I've exported the entire root of the build pipeline as .zip file, but a signed .apk file does not exist. What's even more confusing is that the Android Signing task is passing, so the signed .apk must be somewhere right? The question is where!

Thanks

like image 276
James Brightman Avatar asked Oct 16 '25 13:10

James Brightman


1 Answers

Android Signing' task did not create a new apk. The signed apk is still in the output folder of android build task. If you use XamarinAndroid task to build your apk. The .apk will be output to $(Build.ArtifactStagingDirectory) for below example: Check here for all predefined variables

- task: XamarinAndroid@1
  inputs:
    projectFile: '**/*droid*.csproj'
    outputDirectory: '$(Build.ArtifactStagingDirectory)'
    configuration: '$(buildConfiguration)'

Then you can add the android sign task and point apkFiles to $(Build.ArtifactStagingDirectory)/*.apk for below example:

- task: AndroidSigning@3
  inputs:
    apksign: true
    zipalign: false
    apksignerKeystoreFile: levi.keystore
    apkFiles: '$(Build.ArtifactStagingDirectory)/*.apk'
    keystoreAlias: levi
    apksignerKeyPassword: '**'
    apksignerKeystorePassword: '**'

You can then add a publish artifacts task to publish your apk to azure server,where you can download from azure devops build summary UI when your build is complete.

- task: PublishBuildArtifacts@1
  inputs:
    pathtoPublish: '$(Build.ArtifactStagingDirectory)'.

Then you can download the apk from your build summary page. enter image description here

You can run below command to check if the apk is signed or not after you downloaded it from azure server.

$ jarsigner -verify -verbose -certs my_application.apk
like image 149
Levi Lu-MSFT Avatar answered Oct 18 '25 12:10

Levi Lu-MSFT



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!