APK file itself is a compressed package, directly with the decompression tool can be opened, but the inside of the file has been encoded into a binary file format, can not directly see, such as the program description file Androidmanifest.xml.
These files can be decoded and restored using the Apktool tool. Apktool (http://code.google.com/p/android-apktool/now address is: http://ibotpeaches.github.io/Apktool/) is a very well-known open source Toolkit, Powerful, can unpack apk files and repackage, commonly used to Chinese Android applications.
Installation method, see http://ibotpeaches.github.io/Apktool/install/:
Quick Check
- Apktool 2.x (Versions after
1.5.2
)
- is Java 1.7 installed?
- Does executing on java -version command Line/command prompt return 1.7?
- If not, please install Java 7 and make it the default.
Installation for Apktool 2.x
- Windows :
- Download Windows Wrapper script (right click, Save Link as
apktool.bat )
- Download Apktool-2 (Find newest here)
- Rename downloaded jar to
Apktool.jar
li>
Move both files ( Apktool.jar
& apktool.bat
) to your Windows directory (usually c://windows
)
- If You don't have access to
c://windows
Ywhere then add this directory to your environment Variables System PATH variable.
- Try running apktool via command prompt
- Linux :
- Download Linux Wrapper script (right click, Save Link as
apktool
) /li>
- Download Apktool-2 (Find newest here)
- Make sure the 32bit libraries (
Ia32-libs) downloaded and installed by your Linux Package Manager, if is on a 64bit Unix system.
- (This helps provide support for the 32bit native binary aapt, which are required by Apktool)
- Rena Me downloaded jar to
apktool.jar
- Move both files (
Apktool.jar
& apktool) to /usr/local/bin
(Root needed)
- Make sure both files is executable (
chmod +x
- Try running apktool via CLI
- Mac OS X:
- Download Mac Wrapper script (right click, Save Link as
apktool
)
- Download Apktool-2 (Find newest here)
- Rename downloaded jar to
apktool.jar
- Move both files (
apktool.jar
& apktool
) to /usr/local/bin
(Root needed)
- Make sure both files is executable (
chmod +x
)
- Try running apktool via CLI
Note -Wrapper scripts is not a needed, but the helpful so don't have a to type of over and over java -jar apktool.jar .
I can't put them in the bin directory, but I put them in the/software/android/tools directory.
In this way, I unzip an apk file under the download directory, which is the following command:
/software/android/tools/apktool D ~/downloads/com.supercell.clashofclans_v8.116.2-722_android-4.0.3.apk
The extracted directory is:/software/android/tools/the following directory.
Parameter description:
apktool d [demo.apk] // 参数是 d 而不是 -d。
./apktool
Apktool v2.0.3-a tool for reengineering Android apk files
With Smali v2.1.0 and Baksmali v2.1.0
Copyright Ryszard Wi?niewski <[email protected]>
Updated by Connor Tumbleson [email protected]
Usage:apktool
-advance,--Advanced Prints advance information.
-version,--Version Prints the version then exits
Usage:apktool if|install-framework [options] <framework.apk>
-p,--frame-path <dir> Stores framework files into <dir>.
-T,--tag <tag> tag frameworks using <tag>.
Usage:apktool D[ecode] [options] <file_apk>
-F,--force & nbsp; force Delete Destination directory.
-o,--output <dir> The name of folder that gets written. Default is apk.out
-P,--frame-path <dir> Uses framework files located in <dir>.
-R,--no-res do not decode resources.
-S,--no-src do not decode sources.
-T,--frame-tag <tag> Uses framework files tagged by <tag>.
Usage:apktool b[uild] [options] <app_path>
-F,--force-all Skip changes detection and build all files.
-O,--output <dir> The name of the apk that gets written. Default is dist/name.apk
-P,--frame-path <dir> Uses framework files located in <dir>.
For additional info, see:http://ibotpeaches.github.io/apktool/
For Smali/baksmali info, See:https://github.com/jesusfreke/smali
Apktool Extract the apk file's resources