Search code examples
androidinstrumentationjarsignerzipaligndynatrace

Unable to parse Dynatrace Instrumented APK file


I used the Dynatrace auto-instrumentor command on my Android apk file

auto-instrumentor.cmd apk <apk file> prop <APK-Instr.properties>

and then signed it with my keystore.

jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore mykeystore.keystore myApp.apk aliasname

Finally I zip align it using the below command:

zipalign -f -v 4 AppFile.apk AppFile2.apk

But when I try to install the file, I get a parsing error:

There is a problem parsing the package.

Note: I have been able to successfully verify the jar using the below command:

jarsigner -verify -keystore mystore.keystore AppFile.apk

But still get the parsing error!


Solution

  • Try using changing the hash algorithms and retrying. You may use either SHA2 or SHA256 as a start.

    Note that SHA1 is being deprecated by browsers.