2. Protecting Your Code

For many developers, protecting your code means enabling ProGuard and then forgetting about it. In this chapter we cover why you need ProGuard in the first place and what it does under the covers. We also look at some other less commonly used tools and techniques that protect your code and why you may want to explore other options.

From the first chapter we know how the architecture of the DVM allows someone to decompile an APK back into Java. In this chapter we’re first going to look at the structure of the classes.dex file to show where the bytecodes can be found. Bytecodes are the low-level instructions that your Java code gets converted into so that they can run on the DVM. And bytecodes are made up of two parts: opcode ...

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.