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...
二.导入eclipse
new 一个java Project,修改项目名与地址
三.加入调试等待
a=0;// invoke-static {}, Landroid/os/Debug;->waitForDebugger()V
四.回编译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
注意:端口与项目要选对
七.开始debug
开始debug前,记得加断点哟!!