APK anti-compilation software and process introduction under Linux.

Source: Internet
Author: User

Tools Required:
1.apktool apk Packaging Tool
: http://android-apktool.googlecode.com/files/apktool1.5.2.tar.bz2
Installation: Direct decompression can be, is a Apktool.jar file. Pass

[Plain]View Plaincopyprint?
    1. $java-jar Apktool.jar
  $java-jar Apktool.jar

To execute. Dependent on the Java execution Environment

2.dex2jar Dex Conversion Jar Tool
: Http://dex2jar.googlecode.com/files/dex2jar-0.0.9.15.zip
Installation: Direct decompression can be, is a directory, which contains a lot of files. Pass

[Plain]View Plaincopyprint

"Href=" http://blog.csdn.net/richerg85/article/details/24596823# ";?"

    1. $./dex2jar.sh
$./dex2jar.sh

To perform

3. Suppose you have no unzip. Install this decompression tool, zip Unzip tool, for unpacking jar package (jar package is zip compressed, so can be replaced by other tools)
: Ubuntu $sudo apt-get Install unzip
Installation: $sudo apt-get install unzip

[Plain]View Plaincopyprint?
    1. $upzip [Src_path]-D [Dst_path]
        $upzip [Src_path]-D [Dst_path]

To perform

4.jad. class file Anti-compilation tool
: Http://www.varaneckas.com/jad

Http://varaneckas.com/jad/jad158e.linux.static.zip
Installation: Direct decompression can be, is a executable file, through

./jad

To execute. What needs to be explained is. This need to download the static version number, if not, in the first link to something else there is a download.

Next. The tool is ready to be completed, and it is best to set environment variables. We'll be able to decompile the APK.

First, extract the APK resources

Run: $java-jar apktool.jar d [source.apk]

Second, the anti-compilation source code

(1) Unzip apk

[Plain]View Plaincopyprint

"Href=" http://blog.csdn.net/richerg85/article/details/24596823# ";?"

    1. $unzip [source.apk]-D [Step_1]
  $unzip [source.apk]-D [Step_1]

Step_1 refers to the folder you need to unzip.

(2) Enter the Step_1 folder, locate the Classes.dex file, and convert the Dex file to a jar file

[Plain]View Plaincopyprint?

    1. $dex 2jar.sh Classes.dex
$dex 2jar.sh Classes.dex

(3) obtain a Classes_dex2jar.jar file. We're going to unzip the file again now.

[Plain]View Plaincopyprint

"Href=" http://blog.csdn.net/richerg85/article/details/24596823# ";?"

    1. $upzip classes_dex2jar.jar-d [Step_3]
        $upzip classes_dex2jar.jar-d [Step_3]

Step_3 refers to the folder you extracted.

(4) We get a step_3 folder. We will then decompile all the. class files under this folder

[Plain]View Plaincopyprint?
    1. $./jad-o-r-s java-d src step_3/**/*.class
        $./jad-o-r-s  java-d  src step_3/**/*.class

For the above parameters, it is possible to run directly./jad view, or Readme.txt view

(5) We get another src folder, which is the anti-compiled source code file.

You can also use the Jd-gui tool to view the Classes_dex2jar.jar class file directly.


If the above command does not run, see if the folder is correct.


APK anti-compilation software and process introduction under Linux.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.