标签:
1) 不需要另外下载 baksmali-2.1.2.jar, apktool.jar 好像都包含了。
apktool d zhanqi.xxx.apk -o zhanqi
2) smalidea-0.03.zip 的 Android Studio插件装上之后,就可以调试 1) 生成的 smali 文件了
https://github.com/JesusFreke/smali/wiki/smalidea
baksmali myapp.apk -o ~/projects/myapp/src
~/projects/myapp
3)重新打包decomplie出来的smali
D:\proj\android>apktool b zhanqi I: Using Apktool 2.1.1 I: Checking whether sources has changed... I: Smaling smali folder into classes.dex... I: Checking whether resources has changed... I: Building apk file... I: Copying unknown files/dir...
4)重新签名打包的apk 文件
a) 下载sign.jar 和 signapk.jar https://github.com/appium/sign
b) 会生成 .s.apk 文件
D:\proj\android>java -jar sign.jar .\zhanqi\dist\zhanqi_v2_6_8.apk
D:\proj\android>adb install .\zhanqi\dist\zhanqi_v2_6_8.s.apk
5)启动app时就截住断点的方法
.method protected onCreate(Landroid/os/Bundle;)V .locals 4 .prologue .line 66 invoke-static {}, Landroid/os/Debug;->waitForDebugger()V
标签:
原文地址:http://www.cnblogs.com/johnsonshu/p/5539144.html