Author: Xu jianxiang (netpirate@gmail.com)
Date: 2009/12/23
Web: http://www.anymobile.org
1/apk file structure:
Apk file:
Android application package file. Every application to be installed on the ophoneplatform must be compiled into a single file with the suffix .apk, which contains the binary code, resources, and configuration files of the application.
The apk file is actually a zip package and can be unzipped. You can use zip to unbind the *. apk file. The following is a helloword apk sample file.
|-AndroidManifest. xml
|-META-INF
|-CERT. RSA
|-CERT. SF
| '-MANIFEST. MF
|-Classes. dex
|-Res
|-Drawable
| '-Icon.png
| '-Layout
| '-Main. xml
'-Resources. arsc
2. decompress the apk file and decompile it:
2.1 images and other multimedia files: No compilation, no need to decompile.
2.2 layout and other binary xml files: Use AXMLPrinter to convert them into readable xml files: java-jar AXMLPrinter2.jar main. xml> new_main.xml
Tool: http://code.google.com/p/android4me/downloads/list
2.3 class file decompilation:
The Android simulator provides dexdump, A decompilation tool for dex files. First, start the Android simulator, and use the adb push upload simulator to view the dex file. Then, log on to the simulator using the adb shell, find the dex file to be viewed, and execute dexdump xxx. dex.
Dedexer is another decompilation tool for dex files that can be found online. Dedexer can read files in dex format and generate an output similar to assembly language. This output is similar to the output of jasmin [], but contains the Dalvik bytecode.
2.4 resources. arsc resource file: see Chinese
3. Localization of android software
Solution 1: Use hexadecimal encoding software to replace English
1. JDK (Java Development Kit)-Development Environment
2. Auto-Sign-signature Tool
3. Hex Workshop-hexadecimal Editor
4. WinRAR-compression software
Illustrated example: http://bbs.blueshow.net/thread-604533-1-1.html
Solution 2: hand-written software For Android
1. JDK (Java Development Kit)-Development Environment
2. Android ResEdit-Chinese Software
3. WinRAR-compression software
Illustrated example: http://mobile.yesky.com/363/9292863.shtml
Reference:
Apk file structure overview http://www.ophonesdn.com/article/show/38
Apk file structure, dex decompiling http://ken.opda.cn /? P = 31
Android resource file decompile http://ken.opda.cn /? P = 53