Shankha057
Shankha057

Reputation: 1369

How to get ProGuard mapping file of previous release build

I have an application in production, I have got some crash report stacktraces and they are from the previous release version. I don't know if I have the ProGuard mapping file for the previous build version. I have the current one. And as far as I know that the mapping file is different for different release builds.

My question is:
How do I get the mapping file for the previous build?

Upvotes: 12

Views: 6277

Answers (2)

Manuel
Manuel

Reputation: 15072

If you created an app bundle (.aab) instead of an app package (.apk), you can extract the mapping file from there.

  1. Download app bundle from Google Play Console
  2. Rename file extension from .aab to .zip
  3. Extract ZIP archive
  4. Navigate to BUNDLE-METADATA/com.android.tools.build.obfuscation/proguard.map
  5. Open proguard.map with file editor, it is the mapping file.

Upvotes: 39

Henrique
Henrique

Reputation: 882

The mapping file is overwritten after every build so you probably lost it for good.

The best approach I can think of would be versioning your code with some VCS (Git, for example) and moving the mapping file to a location that is not being gitignored.

To move the generated proguard mapping file to a different path check this answer. You can even rename it if you like.

Upvotes: 2

Related Questions