http://download.youkuaiyun.com/detail/u010026901/7204023资源
清空模拟器缓存
导出apk(绑定keystore)单击右键项目导出
选择导出key的位置和密码
最大70年保存
apk直接可以 解压解压出 classes.dex 文件,(这个就是 .jar 的前生--- 其实应该说 后世)
还原.jar文件;这一步需要用到一个工具 dex2jar (谷歌的代码库里有 http://code.google.com/p/dex2jar/)
下载完了,解压,然后把第一步的 产物(即那个classes.dex文件)放到 dex2jar的解压目录里
(解压目录里 有 dex2jar.bat 文件linux 系统的话 执行那个 .sh文件)
cmd 命令行 ,目录切换到 dex2jar的目录下(linux 系统的话 执行那个 .sh文件)
“ dex2jar.bat classes.dex”
看到命令行 的 “Done” 之后, dex2jar 文件夹里 就会有“classes.dex.dex2jar.jar” 文件了,
查看.jar文件;这一步就是传统的 反编译 了,需要工具辅助,我这里用到的工具是jd-gui
双击exe文件添加刚反编译的classes.dex.dex2jar.jar就可以看见了
这时候代码是未混淆的,菜鸟都看的懂
OK接下来开始混淆,其实可以用自带的,当然也可以网上找个混淆器,不过我觉得都是用别人的,安全性只能说soso,当然下一次写一个自己如何混淆
2.3以后已经自带混淆了,只不过默认不混淆,我们只需要改下配置就好,当然不同版本ADT不一样,但总之你去找proguard之类的文件,打开看看
打开txt,能看懂英文就会改
# To enable ProGuard in your project, edit project.properties
# to define the proguard.config property as described in that file.
#
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in ${sdk.dir}/tools/proguard/proguard-android.txt
# You can edit the include path and order 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:
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
改project.properties