"Turn" Android project confused on 4.0 basis

Source: Internet
Author: User

Android now has high security requirements, I want to do today to confuse the APK, with all third-party tools can not decompile, the author's intellectual property is protected, is not a bunker.   I, first of all, this is on the basis of 4.0.   First Look at project.properties this file.  # This file was automatically generated by Android tools.# does not modify this file--YOUR changes would be erased!## This file must is checked in Version Control systems.## to customize properties used by the Ant build system edit# "ANT.PR Operties ", and override values to adapt the script to your# project structure.## to enable Proguard to shrink and obfuscat E Your code, uncomment this (available Properties:sdk.dir, user.home): # proguard.config=${sdk.dir}/tools/proguard/ proguard-android.txt:proguard-project.txt# Project target.target=android-17#proguard.config= proguard.cfgproguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt  Get rid of Proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt's comments first.   In fact, the difficulty of confusion is that the project introduced a third-party package, if not the introduction of third-party package, directly above the things commented out can be confused, if the introduction of third-party package is more troublesome, please see below.   Add third-party packages, note that the general third-party jarhave been confused, so can not be confused again. Here are the actions I've filtered out of the third-party jar package. The general side is at the bottom.   This file proguard-project.txt # to enable Proguard in your project, edit project.properties# to define the Proguard. Config property as described on that file.## ADD project specific Proguard rules here.# by default, the "flags in" this file is appended to flags specified# in ${sdk.dir}/tools/proguard/proguard-android.txt# You can edit the include path and Ord Er by changing the proguard# include property in project.properties.## for more details, see# http://developer.android.com /guide/developing/tools/proguard.html # ADD any project specific keep Options Here: #-keep class PackageName. ** {*;}  # If your project uses WebView with JS, uncomment the following# and specify the fully qualified class name to THE&N Bsp JavaScript interface# Class:#-keepclassmembers class Fqcn.of.javascript.interface.for.webview {# public *;#}- Keepclasseswithmembernames class * {native <methods>;}  -keepclasseswithmembers class * {public &LT;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 ();p ublic static * * VALUEOF (java.lang.String);}  -keep class * Implements android.os.Parcelable {public static final Android.os.parcelable$creator *;}  -dontwarn Com.umeng.** -dontwarn Org.apache.commons.** -dontwarn com.tencent.weibo.sdk.** - Keepattributes *annotation* -keep class com.umeng*.** {*;}  -keep public class [Your_pkg]. R$*{public static final int *;} -keep class Com.tencent.open.tdialog$* -keep class com.tencent.open.tdialog$* {*;}  -keep class Com.tencent.open.pkdialog -keep class Com.tencent.open.PKDialog {*;}  -keep class Com.tencent.open.pkdialog$* -keep class com.tencent.open.pkdialog$*{*;}  -keep class Com.tencent.mm.sdk.openapi.WXMediaMessage {*;}  -keep class com.tencent.mm.sdk.openapi.** implements Com.tencent.mm.sdk.openapi.wxmediamessage$imediaobject { *;}    -libraryjars/libs/achartengine-1.1.0.jar-dontwarn Achartengine.**-keep class achartengine.** {*;}  -libraryjars/libs/android-support-v4.jar-dontwarn Android.support.v4.**-keep class android.support.v4.** {*;}  -libraryjars/libs/jpush-sdk-release1.4.0.jar-dontwarn Jpush.sdk.release.**-keep class jpush.sdk.release.** { *;}   -libraryjars/libs/umeng_sdk.jar-dontwarn Umeng.sdk.**-keep class umeng.sdk.** {*;}  -libraryjars/libs/umeng_social_sdk.jar-dontwarn Umeng.social.sdk.**-keep class umeng.social.sdk.** {*;}  -libraryjars/libs/universal-image-loader.jar-dontwarn Universal.image.loader.**-keep Class universal.image.loader.** {*;}  -libraryjars/libs/sharesdk-sinaweibo-2.1.2.jar-dontwarn Cn.sharesdk.sina.weibo.**-keep Class cn.sharesdk.sina.weibo.** { *;}  -libraryjars/libs/sharesdk-tencentweibo-2.1.2.jar-dontwarn Cn.sharesdk.tencent.weibo.**-keep Class cn.sharesdk.tencent.weibo.** {*;}  -libraryjars/libs/sharesdk-wechat-moments-2.1.2.jar-dontwarn Cn.sharesdk.wechat.moments.**-keep Class cn.sharesdk.wechat.moments.** {*;}   These correspond to the jar packages above to prevent confusion again.    -braryjars Libs/nineoldandroids-2.4.0.jar----Indicates the path of the Lib package in the project and-dontwarn com.xx.bbb.** and-keep class com.xx.bbb.** {;} These two parameters are used to keep the classes in the third-party library in a random way, using-dontwarn and-keep, meaning to keep com.xx.bbb.* all classes and all methods within the package without confusion, and then proguard not to be warned to find com.xx.bbb.** A reference to the class within the package.    -libraryjars. \ third-party library project name-dontwarn   Package name. **-keep class Package name. * * {*;}    Final package signature, success.

"Go" Android project is confused on 4.0 basis

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.