Reputation: 55
I want to analyze the Android bytecode, and find all instructions that are relevant to the method parameters (kind of slicing on the parameters). Can anybody provide some references for this? Any help would be greatly appreciated!
Upvotes: 4
Views: 1022
Reputation: 2686
Generating bytecode from .class file to .dex is done using tool dx .
once you have example.dex file you have many tools like dexdump,dedexer,baksmali . commands for disassembly are as follows .
dexdump -d example.dex
java -jar ddx.jar -d (using dedexer) click here to know more
java -jar baksmali-0.93.jar -o <.dex file, typically classes.dex> (using baksmali)
Best resource i ever found on internet is this
For dalvik instruction set click
For opcodes click
Upvotes: 2
Reputation: 52303
The Dalvik bytecode is described in detail by this document:
http://source.android.com/tech/dalvik/dalvik-bytecode.html
Possibly also of interest:
http://source.android.com/tech/dalvik/dex-format.html
(These used to live in the dalvik/docs directory in the source tree, but were "promoted".)
You can use the dexdump
command with -d
to generate an instruction disassembly of a DEX file and just process that. Or you can process the DEX file yourself.
Upvotes: 2