apktool 打包解包apk的总结
2016-05-29 11:45
232 查看
1) 不需要另外下载 baksmali-2.1.2.jar, apktool.jar 好像都包含了。
2) smalidea-0.03.zip 的 Android Studio插件装上之后,就可以调试 1) 生成的 smali 文件了
https://github.com/JesusFreke/smali/wiki/smalidea
Manually disassemble an application using baksmali into a "src" subdirectory of a new project directory, e.g.
In IDEA, import a new project, and select the project directory. e.g.
Use the "Create project from existing sources" option when importing the project
Once the project has been created, right click on the src directory and select "Mark Directory As->Sources Root"
Open the project settings and select/create an appropriate JDK
Install/start the application on the device
Run ddms, and select the application's process
In IDEA, Create a new "Remote" debug configuration (Run->Edit Configurations), and change the debug port to 8700
Run->Debug
The application should pause if/when the breakpoint is hit, at which point you can single step, add watches, etc.
3)重新打包decomplie出来的smali
4)重新签名打包的apk 文件
a) 下载sign.jar 和 signapk.jar https://github.com/appium/sign
b) 会生成 .s.apk 文件
5)启动app时就截住断点的方法
apktool d zhanqi.xxx.apk -o zhanqi
2) smalidea-0.03.zip 的 Android Studio插件装上之后,就可以调试 1) 生成的 smali 文件了
https://github.com/JesusFreke/smali/wiki/smalidea
Manually disassemble an application using baksmali into a "src" subdirectory of a new project directory, e.g.
baksmali myapp.apk -o ~/projects/myapp/src
In IDEA, import a new project, and select the project directory. e.g.
~/projects/myapp
Use the "Create project from existing sources" option when importing the project
Once the project has been created, right click on the src directory and select "Mark Directory As->Sources Root"
Open the project settings and select/create an appropriate JDK
Install/start the application on the device
Run ddms, and select the application's process
In IDEA, Create a new "Remote" debug configuration (Run->Edit Configurations), and change the debug port to 8700
Run->Debug
The application should pause if/when the breakpoint is hit, at which point you can single step, add watches, etc.
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
相关文章推荐
- MyBatis
- centos7下搭建nexus
- 第十四周项目一(2) 阅读程序,解释程序运行得到的结果
- [Java源码分析]ArrayList源码分析
- LightOJ 1282 Leading and Trailing(n^k的高三位和低三位)
- CodeForces 650A Watchmen
- javascript实现粘贴qq截图功能(clipboardData)
- oracle使用exp与imp对数据迁移备份的方法
- 面试题31:连续子数组的最大和
- 1. Two Sum
- Sort Colors
- cmd进入 链接mysql注意事项
- Hust oj 1635 ikki的旅行(Dij)
- 2016-5-28:实验室第三天
- 线性代数学习(一)
- APP设计趋势——轻量化设计和微交互
- LightOJ 1341 Aladdin and the Flying Carpet(质因数分解、因子个数)
- 第二阶段团队冲刺站立会议05
- 利用 filter 机制 给 静态资源 url 加上时间戳,来防止js和css文件的缓存,利于开发调试
- Android中常用的Manager