question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for renamesourcefileattribute in R8 config

See original GitHub issue

Hi 🙂 I’m currently working on improving obfuscation in one of our Android apps. Right now I want to remove any reference to the original file from obfuscated code, and to do so I’ve added this line to my R8/ProGuard config:

-renamesourcefileattribute SourceFile

Unfortunately, when I’ve added this, Sentry crash reporting stopped working as expected, giving me obfuscated stack traces. The mapping file is uploaded correctly, so this is not the issue. In the same time, Firebase Crashlytics is working fine in this configuration, so imo it is possible to get the original stack trace somehow.

Is this a bug, or a lack of feature? If the second thing, would it be possible to implement it into the Android SDK?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
ILikeYourHatcommented, Apr 8, 2021

what’s the version of your AGP?

It’s 4.1.3

0reactions
ILikeYourHatcommented, Apr 21, 2021

@marandaneto you are right, this is the issue in our case 🙈 we are building two artifacts: .apk (affected by this issue) and .aab (used by Google Play, unaffected). Obliviously tests were made on the .apk version 🙈

Thank you for your help! I am closing this issue, because it is unrelated to renamesourcefileattribute flag. I will open another one if something will still prevent me to use it.

One more question, when are you planning to release the new plugin version?

Read more comments on GitHub >

github_iconTop Results From Across the Web

ProGuard Manual: Usage - Guardsquare
Recursively reads configuration options from the given file filename. -basedirectory directoryname: Specifies the base directory for all subsequent relative ...
Read more >
Shrink, obfuscate, and optimize your app - Android Developers
Enable shrinking, obfuscation, and optimization; R8 configuration files ... and function names) in Android vitals to help you debug your app in production....
Read more >
ProGuard and R8 · Raygun Docs
This documentation will show you how to configure obfuscation in your Android application and how to upload the associated mapping files to Raygun....
Read more >
src/main/java/com/android/tools/r8/shaking ... - Google Git
Returns the Proguard configuration with default rules derived from empty rules added. */. public ProguardConfiguration getConfig() {. validate();.
Read more >
How to properly obfuscate code in android studio?
... minifyEnabled false//todo add proguard rules for every dependencies before setting this to true useProguard ... Hope this will help you.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found