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