Testing

If you are using obfuscation in your projects, then it’s important to have a testing strategy that isn’t destroyed by any obfuscation. Unit testing is difficult on an obfuscated APK, so run your unit tests before obfuscation if possible. However, obfuscation does some major surgery on your APK. By its very nature, obfuscation results in many methods and variables being renamed as well as significant changes made to the flow of your app, so you’ll need to do some testing before releasing your app into Google Play with any confidence.

You can use the -applymapping and -printmapping options in ProGuard. These are typically used in incremental obfuscation when making patches to obfuscated code but can also be used for unit testing obfuscated ...

Get Bulletproof Android™: Practical Advice for Building Secure Apps now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.