I have recently dug into some smali code and would love learning it. I have checked the dalvik bytecode reference but I couldn't find a structure reference as to when/how to use these
.locals
.local
.registers
.prologue
.line
.annotation
.parameter
Do you know other resources to explain more of the smali structure?
Most of these, with the exception of .locals, .registers and .annotation, are a part of the debug information that is stored as part of a method. You can find more information about these in the debug_info_item section in the dex-format document.
For the .locals and .registers directive, these are two different ways you can specify the number of registers that are available in the method (i.e. the registers_size field of the code_item, as per the dex-format document). You can find more information about the differences between the two on the Registers wiki page on the smali googlecode site.
And finally, the .annotation directive defines an annotation. You can find more information in the dex-format document. Specifically, you'll want to look at the following items:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With