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, through

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

To run, depending on the Java Runtime Environment

2.dex2jar Dex Conversion Jar Tool
: Http://dex2jar.googlecode.com/files/dex2jar-0.0.9.15.zip
Install: Directly decompression can, is a folder, which contains a lot of files, through

[Plain]View Plaincopyprint?
    1. $./dex2jar.sh
$./dex2jar.sh

To run

3. If you do not have unzip, install this decompression tool, zip decompression tool, for unpacking the jar package (the jar package is zip compressed, so you can use other tools instead)
: 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 run

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

Http://varaneckas.com/jad/jad158e.linux.static.zip
Install: Directly unzip can, is an executable file, through

./jad

To run. It is necessary to note that this need to download the static version, if not, in the first link to find another download.

Next, the tool is ready, and it's best to set the environment variables so we can decompile the APK.

First, extract the APK resources

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

Second, anti-compiling source code

(1) Unzip apk

[Plain]View Plaincopyprint?
    1. $unzip [source.apk]-D [Step_1]
  $unzip [source.apk]-D [Step_1]

Step_1 refers to the directory you need to extract.

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

[Plain]View Plaincopyprint?
    1. $dex 2jar.sh Classes.dex
$dex 2jar.sh Classes.dex

(3) To obtain a Classes_dex2jar.jar file, we now want to unzip the file again

[Plain]View Plaincopyprint?
    1. $upzip classes_dex2jar.jar-d [Step_3]
        $upzip classes_dex2jar.jar-d [Step_3]

Step_3 refers to the directory you extracted.

(4) We obtain a step_3 directory, and we will then decompile all the. class files in that directory

[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, you can do it directly./jad view, or Readme.txt view

(5) Once again we get a src directory, which is the anti-compiled source file.

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


If the above command does not execute, see if the directory is correct.

Related Article

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.