1、反编译可调试模式的smail代码
D:\software\android\ApkTool\dump\apktool>java -jar apktool.jar d -d b11842d4126d
72df16c1c1870c819c37.apk -o out
I: Using Apktool 2.0.0-RC3 on b11842d4126d72df16c1c1870c819c37.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\topsec\apktool\framework\1.apk
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Baksmaling classes.dex...
Cleaning up unclosed ZipFile for archive C:\Users\topsec\apktool\framework\1.apk
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...
2、在输出的out文件夹中,用文本编辑工具打开AndroidManifest.xml,在application节点中设置属性android:debuggable=”true”
D:\software\android\ApkTool\dump\apktool>java -jar apktool.jar b -d out -o debug
.apk
I: Using Apktool 2.0.0-RC3 on out
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
I: Checking whether resources has changed...
I: Building resources...
Warning: AndroidManifest.xml already defines debuggable (in http://schemas.andro
id.com/apk/res/android); using existing value in manifest.
I: Copying libs...
I: Building apk file...
I: Copying unknown files/dir...
Cleaning up unclosed ZipFile for archive C:\Users\topsec\AppData\Local\Temp\APKT
OOL5083930743852064505.tmp
D:\software\android\ApkTool\dump\apktool>cd D:\software\android\ApkTool\dump\apk
tool
3、使用签名工具对debug.apk文件进行签名,签名后安装
D:\software\android\ApkTool\dump\apktool>adb install -r debug.apk
1726 KB/s (14505061 bytes in 8.203s)
pkg: /data/local/tmp/debug.apk
success
D:\software\android\ApkTool\dump\apktool>
4、启动软件等待调试
5、下面开始设置Eclipse实时调试的环境,进入第1步产生的OUT文件夹,把里面的BUILD和DIST文件夹删除,这是APKTOOL编译APK时产生的。
6、启动ECLIPSE,构建JAVA项目
1) File -> New -> Project -> Java Project -> Next
2) Project Name随便起,Use default location选项去掉,Location选择out文件夹,然后Next
3) 把smali文件夹设为Source Folder,然后Finish
7、ddms中查看要调试进程端口,然后找到我们要下断点的smail代码设置断点
8、选择eclipse下run->debug configurations->new一个新配置选择端口,点击debug开始调试
9.手机中操作开始收报发包跟踪即可,同时抓包查看详细信息,调试跟踪找到加解密算法实现数据还原。
版权声明:本文为博主原创文章,未经博主允许不得转载。
时间: 2024-10-07 14:15:20