資源描述:
《Android 2.2工程混淆代碼并反編譯查看解決方案.doc》由會(huì)員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在教育資源-天天文庫(kù)。
1、Android2.2工程混淆代碼解決步驟一、首先因?yàn)锳ndroid2.2是沒(méi)有proguard.cfg文件的,所以我們要先創(chuàng)建一個(gè)Android2.3.3或者是以上版本的工程二、創(chuàng)建成功后查找SDk路徑下tools文件夾中l(wèi)ib文件夾下如:E:informationandroid-sdk-windowstoolslib下就會(huì)有proguard.cfg文件該文件源碼-optimizationpasses5-dontusemixedcaseclassnames-dontskipnonpubliclibraryclasses-dontpreverify-verbose-opti
2、mizations!code/simplification/arithmetic,!field/*,!class/merging/*-keeppublicclass*extendsandroid.app.Activity-keeppublicclass*extendsandroid.app.Application-keeppublicclass*extendsandroid.app.Service-keeppublicclass*extendsandroid.content.BroadcastReceiver-keeppublicclass*extendsandroid.cont
3、ent.ContentProvider-keeppublicclass*extendsandroid.app.backup.BackupAgentHelper-keeppublicclass*extendsandroid.preference.Preference-keeppublicclasscom.android.vending.licensing.ILicensingService-keepclasseswithmembernamesclass*{native;}-keepclasseswithmembersclass*{public(andr
4、oid.content.Context,android.util.AttributeSet);}-keepclasseswithmembersclass*{public(android.content.Context,android.util.AttributeSet,int);}-keepclassmembersclass*extendsandroid.app.Activity{publicvoid*(android.view.View);}-keepclassmembersenum*{publicstatic**[]values();publicstatic**v
5、alueOf(java.lang.String);}-keepclass*implementsandroid.os.Parcelable{publicstaticfinalandroid.os.Parcelable$Creator*;}一、把該文件拷貝到要打包的工程下(和)proguard-project.txt一個(gè)路徑下二、修改proguard.cfg文件內(nèi)容為:(紅色標(biāo)記與源代碼不同)把dontpreverify改成dontwarn并加了引入包android-support-v4.jar的路徑-dontwarn-optimizationpasses5-dontusemixed
6、caseclassnames-dontskipnonpubliclibraryclasses-ignorewarnings-dontwarn-verbose-optimizations!code/simplification/arithmetic,!field/*,!class/merging/*-keeppublicclass*extendsandroid.app.Activity-keeppublicclass*extendsandroid.app.Application-keeppublicclass*extendsandroid.app.Service-keeppubli
7、cclass*extendsandroid.content.BroadcastReceiver-keeppublicclass*extendsandroid.content.ContentProvider-keeppublicclass*extendsandroid.app.backup.BackupAgentHelper-keeppublicclass*extendsandroid.preference.Preference-keeppublicclasscom.android