I disassembled an Android application with baksmali
, and studied the produced smali code. One of the classes contains the following line:
.local v1, "future":Lcom/android/volley/toolbox/RequestFuture;, "Lcom/android/volley/toolbox/RequestFuture<Ljava/lang/Void;>;"
I'm not sure about the meaning of this line of code.
Does v1
contain a RequestFuture<Void>
, that corresponds to variable future
in original code? (i.e. is the original code: RequestFuture<Void> future;
?) Or is it something different?
Noun. smali m (genitive singular smala, nominative plural smalar) (obsolete, collective) livestock. herder, herdsman. (figuratively) someone who gathers people for an event, such as voting.
From the official git¹, “smali/baksmali is an assembler/disassembler for the dex format used by dalvik, Android's Java VM implementation”. The smali code, which is what we wish to modify, can be thought of as an equivalent of assembly code of a C program.
smali/baksmali is an assembler/disassembler for the dex format used by dalvik, Android's Java VM implementation. The syntax is loosely based on Jasmin's/dedexer's syntax, and supports the full functionality of the dex format (annotations, debug info, line info, etc.)
the . registers directive specifies the total number of registers in the method, while the alternate . locals directive specifies the number of non-parameter registers in the method. The total number of registers would therefore include the registers needed to hold the method parameters.
Yes, that is part of the debugging information that can optionally be present. It is used when debugging to be able to, e.g. evaluate the value of a local variable.
The .local you mention means exactly what you said. The v1 register holds the value of the future
variable from the original source, and its type is RequestFuture<Void>
A .local directive is equivalent to a DBG_START_LOCAL
or DBG_START_LOCAL_EXTENDED
instruction in the debug info for that method, as defined by the dex format
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