[Copyright belongs to the author wixe. You are welcome to repost it, but please inform the author and indicate the source in advance]
To decompile an APK translation, perform the following steps:
1. Find the APK Installation File.
2. Find the *. Dex translation for installing the software.
3. Dump Dex File
4. Analyze the DEX file to obtain the desired code
1. Find the APK Installation File.
This is relatively easy. After installing the mobile phone or the plug-in, you can find the APK translation of the installation program under file explorer of Eclipse, or you can find it through the ADB command:
$ ADB Shell
# Cd/system/APP
CD/system/APP
# Ls
2. Find the *. Dex translation for installing the software.
After the software is installed, a *. Dex file is generated in the android file system, which is usually in the directory/data/Dalvik-Cache. You can also find the file by running the ADB command:
$ ADB Shell
# Cd/data/Dalvik-Cache
CD/data/Dalvik-Cache
# Ls
3. Compile the DEX file corresponding to the software using the following commands:
ADB shell dexdump-D-f-h/data/Dalvik-Cache/data@app@be.citylive.twitpic.apk @ classes. Dex> Twitpic. Text
Command Parameter explanation:
-D: disassemble code sections
-F: display summary information from File Header
-H: display file header details
-C: Decode (demangle) low-level symbol names
-S: Compute sizes only
4. Get the required code:
Open the compiled text file and you will see the following code:
Class #0 header:
Class_idx: 32
Access_flags: 196625 (0x30011)
Superclass_idx: 61
Interfaces_off: 0 (0x000000)
From this translation, we can easily obtain code information.
This article from the csdn blog, reproduced please indicate the source: http://blog.csdn.net/lastsweetop/archive/2009/11/24/4864090.aspx