Use Progaurd to secure your code in APK file from getting reverse engineered


Do you know an android Apk can be completley reverse enginnered to get all source code from it


As the use of the mobile is getting more day by day so security is one of the important concern for mobile software an android application apk can be reverse engineered and we can retrieve whole code from the .apk which is harmful from security point of view so what is the solution for this?
how developer can assure the security of the software,for thisandroid has provided one tool called "progaurd"it is the tool which secures your code in .apk it becomes very very complex to reverse engineer the code


How to implement progaurd ?


Add the following line in that file
proguard.config=proguard.cfg (its default location of file)

If you have moved the location of file then give absolute path as,

proguard.config=/path/to/proguard.cfg

This is how your cfg file will look like.

-injars lib
-libraryjars ../../..//Android/android_sdk_mac_x86/add-ons/addon-google_apis-google-16

-optimizationpasses 5

-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-dontpreverify
-dontnote
-verbose
-optimizations 

!code/simplification/arithmetic,!field/*,!class/merging/*


-dontwarn sun.misc.Unsafe, java.lang.management.ManagementFactory, org.codehaus.jackson.JsonParser, org.json.JSONObject, org.codehaus.jackson.JsonGenerator, org.codehaus.jackson.JsonFactory, com.google.common.collect.MinMaxPriorityQueue



-keep public class * extends android.app.Application

-keep public class com.android.vending.licensing.ILicensingService
-keepclasseswithmembernames class * {
    native;
}

-keepclasseswithmembers class * {


    public(android.content.Context, android.util.AttributeSet);

}

 -keepclasseswithmembers class * {

    public(android.content.Context, android.util.AttributeSet, int);
}

 -keepclassmembers class * extends android.app.Activity {

   public void *(android.view.View);
}

 -keepclassmembers enum * {

    public static **[] values();
    public static ** valueOf(java.lang.String);
}
 -keep class * implements android.os.Parcelable {
  public static final android.os.Parcelable$Creator *;

}


Post a Comment