Android反编译看看手Q口令红包的实现原理

2019-12-10 19:07:55王振洲
易采站长站为您分析Android反编译看看手Q口令红包的实现原理,需要的朋友可以参考下  

首篇作为开始,先讲讲简单的反编译。反编译通常有几种目的:互相学习、借来用用、嘿嘿(干你,又分为小干干类似微信红包,和大干干改别人的apk帮他上架)。

因为没带kvm回来,mbpr屏幕太小,所以下文环境为windows。

一、反编译
让我们从实战开始,先实践一下怎么去反编译一个apk,看看某些功能的实现。毕竟没有实践的原理都是耍流氓。
这里我们保留互相学习的心态,所以是友善的第一种目的,嘻嘻。

1、准备
工具

  • Apktool
  • jadx(新一代反编译大杀器)

    安装包

    手机QQ 6.2.3 (目标就设定为看看口令红包是怎么做的吧)
    2、Apktool的使用

    首先确保你安装了java 7或以上,并能直接在命令行调用java。

    • 下载 windows用wrapper脚本 (mac使用这个)。
    • 下载最新的apktool。
    • 重命名上面下载的apktool jar文件为apktool.jar。
    • 把apktool.bat和apktool.jar放在同一个目录下,并加入PATH环境变量。
    • 现在你可以直接通过命令行调用apktool并查看使用方式了。
      Apktool v2.0.3 - a tool for reengineering Android apk files
      with smali v2.1.0 and baksmali v2.1.0
      
      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>.