cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Is there a way to change the certificate of the .apk from Dynatrace to "..." after uploading to Play Store?

apm-bradesco1
Participant

After the instrumentation on Android, when uploding the file in Play Store, the Application starts using an Dynatrace Certificate and I would like to use my own certificate. Is there a way to easily change the appointment?

3 REPLIES 3

matthias_hochri
Dynatrace Pro
Dynatrace Pro

Our gradle plugin is doing this step already, but if you use the instrument.cmd/sh, you have to use the apksigner after the instrumentation. See here: https://developer.android.com/studio/command-line/apksigner.html - So if possible use the dynatrace gradle plugin.

nj_njoku
Inactive

Hey Consultor,

Auto-instrumentation generates a working folder (with the name of the APK file) at the location of the provided APK file and stores the result in the dist folder. The path to this folder will be <pathToYourApk>/<nameOfAPK>/dist/.
There are three APK files in this folder:


  • <nameOfAPK>.apk: The instrumented APK file. The signing information of this file is invalid. Therefore it has to be signed before it can be used.
  • <nameOfAPK>-zipaligned.apk: Intermediate file. The instrumented APK file is zipaligned but not signed.
  • <nameOfAPK>-final.apk: This instrumented APK file is signed with a Dynatrace debug certificate. It can be directly installed on emulators and/or developer devices.

I am guessing you are uploading the final.apk file (Option 3 above) with the Dynatrace debug certificate.

To upload your mobile app on Google Play, you have to sign the instrumented APK <pathToYourApk>/<nameOfAPK>/dist/<nameOfAPK>.apk (Option 1 above) with your Google Play certificate. The auto-instrumentation script does not automatically sign the instrumented APK file with your Google Play certificate. Therefore, you have to do this step manually. First, you have to zipalign the APK file and then you have to use the tool apksigner to sign the APK file with your Google Play certificate.

Go to link and scroll to the bottom of page for more info (This applies to auto instrumentation from the command line)

Hope This Helps

NJ

apm-bradesco1
Participant

Hi,

Thanks guys, Im going to test and go then I back to you with the result.

Featured Posts