Android杂谈:smali动态调试

作者: 我在等你回复可你没回 | 来源:发表于2017-08-03 10:39 被阅读158次

eclipse导入smali进行调试,现在简单记录一下

一.反编译APK

apktool.bat d -d NowInfo.apk
I: Using Apktool 2.0.2 on NowInfo.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\Administrator\apktool\framework\1.apk
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Baksmaling classes.dex...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...
反编译APK.png

二.导入eclipse

new 一个java Project,修改项目名与地址

导入eclipse.png

三.加入调试等待

a=0;//     invoke-static {}, Landroid/os/Debug;->waitForDebugger()V
加入调试等待.png

四.回编译APK

apktool.bat b -d NowInfo -o debug.apk
I: Using Apktool 2.0.2
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.android.com/apk/res/android); using existing value in manifest.
I: Building apk file...

五.APK签名

略过

六.打开应用,选择ddms,配置debug选项,点击debug

注意:端口与项目要选对


ddms.png Paste_Image.png

七.开始debug

开始debug前,记得加断点哟!!


debug.png

参考:http://blog.csdn.net/oo_oo_/article/details/27183897

相关文章

网友评论

    本文标题:Android杂谈:smali动态调试

    本文链接:https://www.haomeiwen.com/subject/bcnulxtx.html