Android-Obfuscation Package and verification

Source: Internet
Author: User

1. Confusion: Find Item project.properties add

Proguard.config=proguard-project.txt

2. In the Proguard-project.txt file, add (in accordance with the needs of Baidu, Google recommends not to confuse the system derived classes, generally also the 3rd party jar package is declared to be not confused)

-dontshrink-dontpreverify-dontoptimize-dontusemixedcaseclassnames- Flattenpackagehierarchy-allowaccessmodification-printmapping map.txt-optimizationpasses 7-verbose-keepattributes Exceptions,innerclasses-dontskipnonpubliclibraryclasses-dontskipnonpubliclibraryclassmembers- Ignorewarnings-keep public class * extends Android.app.activity-keep public class * extends Android.app.application-keep public class * Extends Android.app.service-keep public class * extends Android.content.broadcastreceiver-keep public clas S * extends Android.content.contentprovider-keep public class * extends Java.lang.Throwable {*;} -keep public class * extends Java.lang.Exception {*;} -libraryjars Libs/alipaysdk.jar-libraryjars Libs/alipaysecsdk.jar-libraryjars Libs/alipayutdid.jar-libraryjars Libs/jsoup-1.7.2.jar-libraryjars Libs/zxing.jar-libraryjars Libs/fastjson-1.0.3.jar-libraryjars libs/ Animations-2.4.0.jar-libraryjars Libs/android-support-v4.jar-libraryjars Libs/gson-2.2.4-javadoc.jar-libraryjars LibS/gson-2.2.4-sources.jar-libraryjars Libs/gson-2.2.4.jar-keep class com.alipay.android.app.ialixpay{*;} -keep class com.alipay.android.app.ialixpay$stub{*;} -keep class com.alipay.android.app.iremoteservicecallback{*;} -keep class com.alipay.android.app.iremoteservicecallback$stub{*;} -keep class com.alipay.sdk.app.paytask{public *;} -keep class com.alipay.sdk.app.authtask{public *;} -keep Class Com.alipay.mobilesecuritysdk.*-keep Class Com.ut.*-keepclasseswithmembernames class * {native <methods& gt;;} -keepclasseswithmembers class * {public <init> (Android.content.Context, android.util.AttributeSet);} -keepclasseswithmembers class * {public <init> (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 *;} # Adding this and preserve line numbers so, the stack traces# can be remapped-renamesourcefileattribute sourcefile-k Eepattributes sourcefile,linenumbertable

3. Packaging to create a formal environment apk

4. Change the zip package suffix to remove the file Classes.dex

5. Compiling with the Dex2jar tool

Dex2jar ... /classes.dex

6. Viewing effects with Jd-gui


Android-Obfuscation Package and verification

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.