apktool初步使用以及反编译后生成apk签名打包

apktool的配置

首先需要apktool.jar 和apktool.bat 

apktool.jar地址在:https://bitbucket.org/iBotPeaches/apktool/downloads/

apktool.bat地址在:https://ibotpeaches.github.io/Apktool/install/

下载后将其放在 C:\Windows 下

apktool使用

windows 下 cd 进入 用户\apktool 

例如:C:\Users\xxx\apktool

输入apk 即可看到下方提示

usage: apktool
 -advance,--advanced   prints advance information.
 -version,--version    prints the version then exits
usage: apktool if|install-framework [options] <framework.apk>
 -p,--frame-path <dir>   Stores framework files into <dir>.
 -t,--tag <tag>          Tag frameworks using <tag>.
usage: apktool d[ecode] [options] <file_apk>
 -f,--force              Force delete destination directory.
 -o,--output <dir>       The name of folder that gets written. Default is apk.out
 -p,--frame-path <dir>   Uses framework files located in <dir>.
 -r,--no-res             Do not decode resources.
 -s,--no-src             Do not decode sources.
 -t,--frame-tag <tag>    Uses framework files tagged by <tag>.
usage: apktool b[uild] [options] <app_path>
 -f,--force-all          Skip changes detection and build all files.
 -o,--output <dir>       The name of apk that gets written. Default is dist/name.apk
 -p,--frame-path <dir>   Uses framework files located in <dir>.

For additional info, see: http://ibotpeaches.github.io/Apktool/
For smali/baksmali info, see: https://github.com/JesusFreke/smali

 

1.apk拆包命令

apktool d {apk路径}   注:拆包的路径在Users\xxx 下

指定路径

apktool d  {apk路径}  -o F:\xxxx  注:不要使用已存在的文件夹 

例如 : apktool d  F:\xxxx\xxx.apk -o F:\xxx

 

2.apk打包命令

apktool b {拆包目录} -o {保存apk的路径}

例如 : apktool b F:\xxx -o F:\xxxx\xxx.apk

 

3.拿到生成后未签名的apk 加入debug签名

jarsigner 目录地址在 android\jre\bin 目录下

cd 进入jarsigner 目录地址

签名命令如下:
jarsigner -verbose -keystore {debug.keystore 所在的路径} -storepass android -signedjar {签名后生成的apk} {未签名的apk} androiddebugkey

 

以上经测试是可行的 。

 

smali 文件查看及转换请见(以便以后继续学习)

https://www.cnblogs.com/mq0036/p/7941285.html

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值