So according to the Oxford English Dictionary, obfuscation denotes the action of making something obscure,
unclear or unintelligible.
Now in software.
The obfuscation of code is the process of modifying an executable so that it is no longer useful to
unauthorized party such as hackers, but remains fully functional.
So right now, we're going to focus on obfuscation techniques and how to code obfuscate in Android applications.
So why do you suppose we need to obfuscate?
Well, anyone who has been working in Java or maybe just knows a thing or two about it can easily picture
how your app is coded once an app is unpacked.
The WiFi location won't guarantee code security, this process would give hackers a hard time reverse
engineering your Android app.
It's still advisable, though, to add layers of security to your code, such as implementing encryption,
avoiding saving of credentials to device level storage and all that kind of stuff.
But few techniques can be performed, obfuscations and programming, and some of them are right here
as follows rename obfuscation.
Which is the basic transformation that's used by many of you skaters such as Android, iOS and Java.
It is done by renaming variables and method names, it uses new strings, letters, numbers, unprintable
characters and invisible characters for the transformation process.
And string encryption.
So this way, all the strings are discoverable and readable and managed executables.
Even though methods and variables are renamed, strings can be used to navigate the critical code segment
by looking for string references inside binary files, therefore string encryption can be used to hide
the strings in the executable file.
Now, of course, there's our old friend Dommy code insertion.
So inserting code segments into the executable that do not affect the logic of the main program, but
I'll tell you, it's getting way harder to break by decompiled or reverse engineering the code, and
it's certainly difficult to analyze.
So there are many techniques just like these, so how do you obfuscate code in Android?
Well, pro guard is one of the most popular optimizers and obfuscatory for Java bytecode and Android
apps.
It'll detect and remove unused classes, fields, methods and attributes.
It optimizes byte code and removes unused instructions, it renames the remaining classes, fields and
methods using short, meaningless names.
So obfuscation with pro guard results in changes to filenames and to code as displayed in this screenshot.