Ubuntu uses Apktool for APK anti-compilation

Source: Internet
Author: User

1.Apktool Downloads

http://ibotpeaches.github.io/Apktool/

Download latest Version Apktool_2.1.1.jar

2. Create a new Apktool directory and place the Apktool_2.1.1.jar in the directory.

3. Create a new apktool.sh script file in the Apktool directory and edit the contents:

#!/bin/BASHCD $ (dirname $0-jar apktool_2.  1.1. jar [Email protected]

4. Edit the ~/.BASHRC and add the Apktool directory to path.

5. Restart the terminal to use the apktool.sh command to decompile.

Apktool. SH d test.apk

6. After the anti-compilation, the output directory and Smali folder, this is the SRC source code.

------------------------------------------------------------------

To convert Smali to Java, the true anti-compilation succeeds.

In the Windows environment, you can use this: http://www.hensence.com/cn/smali2java/

What about the Ubuntu environment?

(1) Go to GitHub to download: Smali2java unzip the project Zip package.

(2) Download Gradle

: http://gradle.org/gradle-download/

Installation reference:Ubuntu installation Gradle

(3) Enter the directory after Smali2java decompression

' ~/Download/smali2java-master/smali2java '

(4) Compiling with the Gradle command

Gradle Build

After compiling, you can get Smali2java.jar

---------------------------------------------------------

However, the Smali2java project has not been updated for a long time and can only be used in some simple Java programs. The contents of the translated Java file may not be complete.

Therefore, learn Smali grammar, directly see Smali file is kingly. Here are a few links about Smali, after reading some understanding, the basic can read Smali file.

1.Smali--dalvik Virtual Machine Instruction language---"Android_smali grammar Learning One"

2.Smali File Syntax reference

Ubuntu uses Apktool for APK anti-compilation

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.