Dalvik Assembly Language Basics
The Dalvik virtual machine designed a set of instructions for itself and developed its own instruction format and invocation specification .
The bit Description conventions are as follows:
- Each 16-bit word is separated by a space
- Each letter represents 4 bits, each of which begins in order from a high byte and is arranged to a low byte. A vertical line may be used between every 4 bits "|" Represents a different content.
- The order uses a single capital letter of A~z as a 4-bit opcode, and op represents a 8-bit opcode.
- "∅" to indicate that all bits in this field are 0 values.
With "a| G|op BBBB f| e| d| c", for example,
Instruction Middle two spaces each separate part size is 16 bits;
First 16-bit a| G|op, the high 8 bits consist of a and g, and the low byte is composed of opcode op;
The second 16-bit BBBB represents a 16-bit offset value;
The third 16 bits consist of F, E, D, and C four bytes, where they represent the register parameters .
It is not possible to determine an instruction simply by using a bit ID , which must be specified by the instruction format identifier . On page 38 of the book, it is not excerpted here.
Dex File Disassembly Tool
The current mainstream DEX executable Disassembly tool has Baksmali-dedexer. Baksmali also supports packaging disassembly code to regenerate the Dex file, which is used more broadly.