Security is main concern nowadays for our app .we want to secure our apps from hackers and also want it to be more complex to understand by anyone.To achieve this we use Obfuscation in Android .So lets start with brief information about Obfuscation.
What is Obfuscation:
According to the Oxford dictionary, obfuscation denotes that the action of making something obscure, unclear, or unintelligible. In software, the obfuscation of code is the process of modifying an executable so that it is no longer useful to unauthorized parties such as hackers but remains fully functional. Or in other ways we can say that
To protect trade secrets, processes, unauthorized access, vulnerability discovery and bypassing licensing or other controls can be done by using obfuscation.
Advantages of Using Obfuscation:
1. Optimized Code is one of the most important feature of using Obfuscation the code become more optimized after applying Obfuscation.
2. Security is also a feature of Obfuscation .By using this we can achieve more security for our code because it convert the code into human Unreadable format.
3.Track Illegal Copies by using Obfuscation is one of its feature .By using this feature we can reduce the cloning of apps.
Obfuscation Tools:
There are a few tools related to Android Studio such as ProGuard and DexGuard. ProGuard is a free tool that is included in Android Studio, DexGuard which is a commercial version of ProGuard.
How to use Obfuscation in Android :
There is very simple step to apply Obfuscation in our Android Project .First, we need to enable minifyEnabled true from its default value which is false in app-level Gradle file in Android Studio.
If you are adding your own ProGuard rules, you can modify the code .To obfuscate the code in a more complex form you could go to your root directory app and create a .pro file, for example proguard-rules-new.pro, in the same directory you should see a file called proguard-rules.pro file.
Now add the file you have created to the build.gradle file.
After Generating apk try to decompile the apk file you will find the classes becomes in un-readable format like this:
That's all Thank you for reading this post.
Comments
Post a Comment