Structure analysis, decompilation, and localization of the Android software Installer (*. APK) (12-24)

Source: Internet
Author: User

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

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.