[Original] tinker dex file format dump tool tinker-dex-dump, dextinker-dex-dump
Preface
Tinker is an open-source hot update project launched. Compared with other hot update solutions, Tinker has the advantages of small patch packages, support classes, so, and resource file replacement. In the class replacement solution, the DexDiff algorithm is independently developed to make the patch package smaller. Although the final product generated by the DexDiff algorithm uses. dex as the format suffix, The dex file is in two completely different formats than the dex file in the actual virtual machine.
About tinker-dex-dump
Tinker-dex-dump is a tool for viewing internal data of. dex files generated by dexdiff. The main purpose is to help you have a more intuitive understanding of the dex format generated by dexdiff. If you use this tool to make it easier for you to understand the principles of tinker, the goal of this tool will be achieved, which is also a personal tribute to Tinker. The tool has been uploaded to github, github address for https://github.com/LaurenceYang/tinker-dex-dump
How to Use tinker-dex-dump
1. First download the tinker-dex-dump.jar File
2. Run the command line
Command Format
java -jar tinker-dex-dump.jar --dex *.dex [--header] [--section section-name]
-- Dex: required, followed by the dex path that requires dump
-- Header option to display header region information
-- The section option is used to display the section region information, followed by the section name to be displayed.
-- Section parameter list, with the same meaning as its name
- StringData
- TypeId
- ProtoId
- FieldId
- MethodId
- ClassDef
- TypeList
- AnnotationSetRefList
- AnnotationSet
- ClassData
- Code
- DebugInfo
- Annotation
- StaticValue
- AnnotationsDirectory
Example 1: display the header information
java -jar tinker-dex-dump.jar --dex classes.dex --header
Example 2: display the region information of StringData
java -jar tinker-dex-dump.jar --dex classes.dex --section StringData
Example 3: Display help information
java -jar tinker-dex-dump.jar --help
Tinker dex format reference
The tinker dex format mainly includes two parts: the operation list of the header and each section area, for example: