Issue
I used proguard to obfuscate a jar and after research the resulting jar it was found that it didn't obfuscate logger messages which I probably would like to do.
How to do it with proguard? I used gui based tool with allmost default settings.
original class
logger.info("value encrypted");
after proguard and decompiled
this.c.info("value encrypted");
Solution
The simple answer is that ProGuard does not do this.
And relatedly, ProGuard will not obfuscate constant strings in your code either; see Does proguard work to obfuscate static string constants?.
The best things I can suggest are:
- Turn off logging in your release version.
- Log to Crashlytics so that the end users don't to get to see the log messages on their devices.
- Implement a custom
LogFormatter
that obfuscates the log messages on the fly. (It could do it for all log messages, or just for log messages that match particular patterns.) - If you are actually trying to obfuscate the log message strings embedded in your code, there are alternatives to ProGuard that will do that; see the Q&A link above for some leads.
Answered By - Stephen C
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.