mac反编译安卓apk

2018-10-23  本文已影响0人  Morgan7

反编译工具

apktool

两种方式

dex2jar

两种方式

jd-gui

apktool 安装

$ apktool
Apktool v2.3.4 - a tool for reengineering Android apk files
with smali v2.2.2 and baksmali v2.2.2
Copyright 2014 Ryszard Wiśniewski <brut.alll@gmail.com>
Updated by Connor Tumbleson <connor.tumbleson@gmail.com>

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

开始反编译

目录结构

AndroidDecompilation/
├── Decompile
│   └── com.stub.StubApp.apk
├── apktool
├── apktool.jar
├── dex2jar-2.0
│   ├── d2j-baksmali.bat
│   ├── d2j-baksmali.sh
│   ├── d2j-dex-recompute-checksum.bat
│   ├── d2j-dex-recompute-checksum.sh
│   ├── d2j-dex2jar.bat
│   ├── d2j-dex2jar.sh
│   ├── d2j-dex2smali.bat
│   ├── d2j-dex2smali.sh
│   ├── d2j-jar2dex.bat
│   ├── d2j-jar2dex.sh
│   ├── d2j-jar2jasmin.bat
│   ├── d2j-jar2jasmin.sh
│   ├── d2j-jasmin2jar.bat
│   ├── d2j-jasmin2jar.sh
│   ├── d2j-smali.bat
│   ├── d2j-smali.sh
│   ├── d2j-std-apk.bat
│   ├── d2j-std-apk.sh
│   ├── d2j_invoke.bat
│   ├── d2j_invoke.sh
│   └── lib
│       ├── antlr-runtime-3.5.jar
│       ├── asm-debug-all-4.1.jar
│       ├── d2j-base-cmd-2.0.jar
│       ├── d2j-jasmin-2.0.jar
│       ├── d2j-smali-2.0.jar
│       ├── dex-ir-2.0.jar
│       ├── dex-reader-2.0.jar
│       ├── dex-reader-api-2.0.jar
│       ├── dex-tools-2.0.jar
│       ├── dex-translator-2.0.jar
│       ├── dex-writer-2.0.jar
│       └── dx-1.7.jar
├── dex2jar-2.0.zip
├── jd-gui-osx-1.4.0
│   ├── JD-GUI.app
│   │   └── Contents
│   │       ├── Info.plist
│   │       ├── MacOS
│   │       │   └── universalJavaApplicationStub.sh
│   │       └── Resources
│   │           ├── Java
│   │           │   └── jd-gui-1.4.0.jar
│   │           └── jd-gui.icns
│   ├── LICENSE
│   ├── NOTICE
│   └── README.md
└── jd-gui-osx-1.4.0.tar
com.stub.StubApp    com.stub.StubApp.apk
$ mv com.stub.StubApp.apk com.stub.StubApp.zip
$ mkdir JavaSourceCode
$ unzip com.stub.StubApp.zip -d JavaSourceCode/
$ sudo chmod +x d2j_invoke.sh
$ sh d2j-dex2jar.sh classes.dex
上一篇下一篇

猜你喜欢

热点阅读