Apk反编译

Android apk decompile

Posted by LXG on January 14, 2019

反编译工具

ApkTool

A tool for reverse engineering Android apk files

官方网址

安装教程

dex2jar

Tools to work with android .dex and java .class files

下载地址

配置环境变量

vim ~/.bashrc
export PATH=$PATH:$HOME/***/dex2jar

JD-GUI

JD-GUI is a standalone graphical utility that displays Java source codes of “.class” files. You can browse the reconstructed source code with the JD-GUI for instant access to methods and fields.

官方地址

反编译步骤

sudo apktool d ***.apk

I: Using Apktool 2.3.4 on **.apk
I: Loading resource table…
I: Decoding AndroidManifest.xml with resources…
S: WARNING: Could not write to (/root/.local/share/apktool/framework), using /tmp instead…
S: Please be aware this is a volatile directory and frameworks could go missing, please utilize –frame-path if the default storage directory is unavailable
I: Loading resource table from file: /tmp/1.apk
I: Regular manifest package…
I: Decoding file-resources…
I: Decoding values */
XMLs…
I: Baksmaling classes.dex…
I: Copying assets and libs…
I: Copying unknown files…
I: Copying original files…

dex2jar

  1. cp **.apk **.zip

  2. unzip ***.zip

  3. chmod 771 d2j_invoke.sh

  4. sh dex2jar-2.0/d2j-dex2jar.sh classes.dex

JD-GUI

使用JD-GUI工具打开classes-dex2jar.jar

参考网址

Android APK反编译实战